wapi-client 0.8.13 → 0.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (77) hide show
  1. package/dist/api/base-client.browser.cjs +9 -14
  2. package/dist/api/base-client.browser.js +10 -17
  3. package/dist/api/base-client.cjs +9 -14
  4. package/dist/api/base-client.js +10 -17
  5. package/dist/api/jsonrpc/jsonrpc.enums.d.ts +5 -4
  6. package/dist/api/ws-client.browser.cjs +3 -11
  7. package/dist/api/ws-client.browser.js +4 -16
  8. package/dist/api/ws-client.cjs +4 -12
  9. package/dist/api/ws-client.js +5 -17
  10. package/dist/client.browser.cjs +2 -5
  11. package/dist/client.browser.js +3 -6
  12. package/dist/client.cjs +3 -6
  13. package/dist/client.js +4 -7
  14. package/dist/fns/create-deposit/create-deposit.browser.cjs +1 -4
  15. package/dist/fns/create-deposit/create-deposit.browser.js +2 -5
  16. package/dist/fns/create-deposit/create-deposit.cjs +1 -4
  17. package/dist/fns/create-deposit/create-deposit.js +2 -5
  18. package/dist/fns/create-withdrawal/create-withdrawal.browser.cjs +1 -4
  19. package/dist/fns/create-withdrawal/create-withdrawal.browser.js +2 -5
  20. package/dist/fns/create-withdrawal/create-withdrawal.cjs +1 -4
  21. package/dist/fns/create-withdrawal/create-withdrawal.js +2 -5
  22. package/dist/fns/find-transfers/find-transfers.browser.cjs +8 -20
  23. package/dist/fns/find-transfers/find-transfers.browser.js +9 -21
  24. package/dist/fns/find-transfers/find-transfers.cjs +8 -20
  25. package/dist/fns/find-transfers/find-transfers.js +9 -21
  26. package/dist/fns/get-balance/get-balance.browser.cjs +2 -8
  27. package/dist/fns/get-balance/get-balance.browser.js +3 -9
  28. package/dist/fns/get-balance/get-balance.cjs +2 -8
  29. package/dist/fns/get-balance/get-balance.js +3 -9
  30. package/dist/fns/get-balance-history/get-balance-history.browser.cjs +1 -4
  31. package/dist/fns/get-balance-history/get-balance-history.browser.js +2 -5
  32. package/dist/fns/get-balance-history/get-balance-history.cjs +1 -4
  33. package/dist/fns/get-balance-history/get-balance-history.js +2 -5
  34. package/dist/fns/get-token/get-token.browser.cjs +1 -4
  35. package/dist/fns/get-token/get-token.browser.js +2 -5
  36. package/dist/fns/get-token/get-token.cjs +1 -4
  37. package/dist/fns/get-token/get-token.js +2 -5
  38. package/dist/fns/import-data/import-data.cjs +2 -5
  39. package/dist/fns/import-data/import-data.js +3 -6
  40. package/dist/fns/import-data/import-data.node.browser.cjs +2 -5
  41. package/dist/fns/import-data/import-data.node.browser.js +3 -6
  42. package/dist/fns/import-data/import-data.node.cjs +2 -5
  43. package/dist/fns/import-data/import-data.node.js +3 -6
  44. package/dist/fns/set-flags/set-flags.browser.cjs +3 -3
  45. package/dist/fns/set-flags/set-flags.browser.js +3 -3
  46. package/dist/fns/set-flags/set-flags.cjs +3 -3
  47. package/dist/fns/set-flags/set-flags.js +3 -3
  48. package/dist/index.browser.cjs +13 -1
  49. package/dist/index.browser.js +25 -1
  50. package/dist/index.cjs +25 -1
  51. package/dist/index.d.ts +2 -2
  52. package/dist/index.js +25 -1
  53. package/dist/lib/errors.browser.cjs +642 -214
  54. package/dist/lib/errors.browser.js +645 -214
  55. package/dist/lib/errors.cjs +652 -218
  56. package/dist/lib/errors.d.ts +1411 -342
  57. package/dist/lib/errors.js +645 -214
  58. package/dist/lib/query-builder.browser.cjs +2 -2
  59. package/dist/lib/query-builder.browser.js +2 -2
  60. package/dist/lib/query-builder.cjs +2 -2
  61. package/dist/lib/query-builder.js +2 -2
  62. package/dist/lib/stream-promise.browser.cjs +3 -4
  63. package/dist/lib/stream-promise.browser.js +4 -5
  64. package/dist/lib/stream-promise.cjs +3 -4
  65. package/dist/lib/stream-promise.js +4 -5
  66. package/dist/lib/utils.browser.cjs +9 -13
  67. package/dist/lib/utils.browser.js +9 -13
  68. package/dist/lib/utils.cjs +9 -13
  69. package/dist/lib/utils.js +9 -13
  70. package/dist/lib/validator.browser.cjs +6 -4
  71. package/dist/lib/validator.browser.js +6 -4
  72. package/dist/lib/validator.cjs +6 -4
  73. package/dist/lib/validator.js +6 -4
  74. package/dist/types/index.d.ts +2374 -1304
  75. package/dist/wapi-client-web.iife.js +6 -6
  76. package/dist/wapi-client.iife.js +6 -6
  77. package/package.json +1 -1
@@ -1,11 +1,11 @@
1
- var WAPI=(()=>{var Mm=Object.create;var kr=Object.defineProperty,Rm=Object.defineProperties,Wm=Object.getOwnPropertyDescriptor,Am=Object.getOwnPropertyDescriptors,Nm=Object.getOwnPropertyNames,pu=Object.getOwnPropertySymbols,Um=Object.getPrototypeOf,fu=Object.prototype.hasOwnProperty,qm=Object.prototype.propertyIsEnumerable;var du=(r,e,t)=>e in r?kr(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,P=(r,e)=>{for(var t in e||(e={}))fu.call(e,t)&&du(r,t,e[t]);if(pu)for(var t of pu(e))qm.call(e,t)&&du(r,t,e[t]);return r},ee=(r,e)=>Rm(r,Am(e));var G=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports),Bm=(r,e)=>{for(var t in e)kr(r,t,{get:e[t],enumerable:!0})},uu=(r,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of Nm(e))!fu.call(r,a)&&a!==t&&kr(r,a,{get:()=>e[a],enumerable:!(n=Wm(e,a))||n.enumerable});return r};var Lm=(r,e,t)=>(t=r!=null?Mm(Um(r)):{},uu(e||!r||!r.__esModule?kr(t,"default",{value:r,enumerable:!0}):t,r)),Vm=r=>uu(kr({},"__esModule",{value:!0}),r);var _e=(r,e,t)=>new Promise((n,a)=>{var s=d=>{try{o(t.next(d))}catch(g){a(g)}},i=d=>{try{o(t.throw(d))}catch(g){a(g)}},o=d=>d.done?n(d.value):Promise.resolve(d.value).then(s,i);o((t=t.apply(r,e)).next())});var Wr=G(te=>{"use strict";Object.defineProperty(te,"__esModule",{value:!0});te.regexpCode=te.getEsmExportName=te.getProperty=te.safeStringify=te.stringify=te.strConcat=te.addCodeArg=te.str=te._=te.nil=te._Code=te.Name=te.IDENTIFIER=te._CodeOrName=void 0;var Mr=class{};te._CodeOrName=Mr;te.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var Pt=class extends Mr{constructor(e){if(super(),!te.IDENTIFIER.test(e))throw new Error("CodeGen: name must be a valid identifier");this.str=e}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}};te.Name=Pt;var Be=class extends Mr{constructor(e){super(),this._items=typeof e=="string"?[e]:e}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let e=this._items[0];return e===""||e==='""'}get str(){var e;return(e=this._str)!==null&&e!==void 0?e:this._str=this._items.reduce((t,n)=>`${t}${n}`,"")}get names(){var e;return(e=this._names)!==null&&e!==void 0?e:this._names=this._items.reduce((t,n)=>(n instanceof Pt&&(t[n.str]=(t[n.str]||0)+1),t),{})}};te._Code=Be;te.nil=new Be("");function xu(r,...e){let t=[r[0]],n=0;for(;n<e.length;)Ro(t,e[n]),t.push(r[++n]);return new Be(t)}te._=xu;var Mo=new Be("+");function $u(r,...e){let t=[Rr(r[0])],n=0;for(;n<e.length;)t.push(Mo),Ro(t,e[n]),t.push(Mo,Rr(r[++n]));return nh(t),new Be(t)}te.str=$u;function Ro(r,e){e instanceof Be?r.push(...e._items):e instanceof Pt?r.push(e):r.push(ih(e))}te.addCodeArg=Ro;function nh(r){let e=1;for(;e<r.length-1;){if(r[e]===Mo){let t=ah(r[e-1],r[e+1]);if(t!==void 0){r.splice(e-1,3,t);continue}r[e++]="+"}e++}}function ah(r,e){if(e==='""')return r;if(r==='""')return e;if(typeof r=="string")return e instanceof Pt||r[r.length-1]!=='"'?void 0:typeof e!="string"?`${r.slice(0,-1)}${e}"`:e[0]==='"'?r.slice(0,-1)+e.slice(1):void 0;if(typeof e=="string"&&e[0]==='"'&&!(r instanceof Pt))return`"${r}${e.slice(1)}`}function sh(r,e){return e.emptyStr()?r:r.emptyStr()?e:$u`${r}${e}`}te.strConcat=sh;function ih(r){return typeof r=="number"||typeof r=="boolean"||r===null?r:Rr(Array.isArray(r)?r.join(","):r)}function oh(r){return new Be(Rr(r))}te.stringify=oh;function Rr(r){return JSON.stringify(r).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}te.safeStringify=Rr;function ph(r){return typeof r=="string"&&te.IDENTIFIER.test(r)?new Be(`.${r}`):xu`[${r}]`}te.getProperty=ph;function dh(r){if(typeof r=="string"&&te.IDENTIFIER.test(r))return new Be(`${r}`);throw new Error(`CodeGen: invalid export name: ${r}, use explicit $id name mapping`)}te.getEsmExportName=dh;function fh(r){return new Be(r.toString())}te.regexpCode=fh});var No=G(Ce=>{"use strict";Object.defineProperty(Ce,"__esModule",{value:!0});Ce.ValueScope=Ce.ValueScopeName=Ce.Scope=Ce.varKinds=Ce.UsedValueState=void 0;var Se=Wr(),Wo=class extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`),this.value=e.value}},qi;(function(r){r[r.Started=0]="Started",r[r.Completed=1]="Completed"})(qi||(Ce.UsedValueState=qi={}));Ce.varKinds={const:new Se.Name("const"),let:new Se.Name("let"),var:new Se.Name("var")};var Bi=class{constructor({prefixes:e,parent:t}={}){this._names={},this._prefixes=e,this._parent=t}toName(e){return e instanceof Se.Name?e:this.name(e)}name(e){return new Se.Name(this._newName(e))}_newName(e){let t=this._names[e]||this._nameGroup(e);return`${e}${t.index++}`}_nameGroup(e){var t,n;if(!((n=(t=this._parent)===null||t===void 0?void 0:t._prefixes)===null||n===void 0)&&n.has(e)||this._prefixes&&!this._prefixes.has(e))throw new Error(`CodeGen: prefix "${e}" is not allowed in this scope`);return this._names[e]={prefix:e,index:0}}};Ce.Scope=Bi;var Li=class extends Se.Name{constructor(e,t){super(t),this.prefix=e}setValue(e,{property:t,itemIndex:n}){this.value=e,this.scopePath=(0,Se._)`.${new Se.Name(t)}[${n}]`}};Ce.ValueScopeName=Li;var uh=(0,Se._)`\n`,Ao=class extends Bi{constructor(e){super(e),this._values={},this._scope=e.scope,this.opts=ee(P({},e),{_n:e.lines?uh:Se.nil})}get(){return this._scope}name(e){return new Li(e,this._newName(e))}value(e,t){var n;if(t.ref===void 0)throw new Error("CodeGen: ref must be passed in value");let a=this.toName(e),{prefix:s}=a,i=(n=t.key)!==null&&n!==void 0?n:t.ref,o=this._values[s];if(o){let h=o.get(i);if(h)return h}else o=this._values[s]=new Map;o.set(i,a);let d=this._scope[s]||(this._scope[s]=[]),g=d.length;return d[g]=t.ref,a.setValue(t,{property:s,itemIndex:g}),a}getValue(e,t){let n=this._values[e];if(n)return n.get(t)}scopeRefs(e,t=this._values){return this._reduceValues(t,n=>{if(n.scopePath===void 0)throw new Error(`CodeGen: name "${n}" has no value`);return(0,Se._)`${e}${n.scopePath}`})}scopeCode(e=this._values,t,n){return this._reduceValues(e,a=>{if(a.value===void 0)throw new Error(`CodeGen: name "${a}" has no value`);return a.value.code},t,n)}_reduceValues(e,t,n={},a){let s=Se.nil;for(let i in e){let o=e[i];if(!o)continue;let d=n[i]=n[i]||new Map;o.forEach(g=>{if(d.has(g))return;d.set(g,qi.Started);let h=t(g);if(h){let T=this.opts.es5?Ce.varKinds.var:Ce.varKinds.const;s=(0,Se._)`${s}${T} ${g} = ${h};${this.opts._n}`}else if(h=a==null?void 0:a(g))s=(0,Se._)`${s}${h}${this.opts._n}`;else throw new Wo(g);d.set(g,qi.Completed)})}return s}};Ce.ValueScope=Ao});var V=G(B=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0});B.or=B.and=B.not=B.CodeGen=B.operators=B.varKinds=B.ValueScopeName=B.ValueScope=B.Scope=B.Name=B.regexpCode=B.stringify=B.getProperty=B.nil=B.strConcat=B.str=B._=void 0;var J=Wr(),Ke=No(),yt=Wr();Object.defineProperty(B,"_",{enumerable:!0,get:function(){return yt._}});Object.defineProperty(B,"str",{enumerable:!0,get:function(){return yt.str}});Object.defineProperty(B,"strConcat",{enumerable:!0,get:function(){return yt.strConcat}});Object.defineProperty(B,"nil",{enumerable:!0,get:function(){return yt.nil}});Object.defineProperty(B,"getProperty",{enumerable:!0,get:function(){return yt.getProperty}});Object.defineProperty(B,"stringify",{enumerable:!0,get:function(){return yt.stringify}});Object.defineProperty(B,"regexpCode",{enumerable:!0,get:function(){return yt.regexpCode}});Object.defineProperty(B,"Name",{enumerable:!0,get:function(){return yt.Name}});var Ki=No();Object.defineProperty(B,"Scope",{enumerable:!0,get:function(){return Ki.Scope}});Object.defineProperty(B,"ValueScope",{enumerable:!0,get:function(){return Ki.ValueScope}});Object.defineProperty(B,"ValueScopeName",{enumerable:!0,get:function(){return Ki.ValueScopeName}});Object.defineProperty(B,"varKinds",{enumerable:!0,get:function(){return Ki.varKinds}});B.operators={GT:new J._Code(">"),GTE:new J._Code(">="),LT:new J._Code("<"),LTE:new J._Code("<="),EQ:new J._Code("==="),NEQ:new J._Code("!=="),NOT:new J._Code("!"),OR:new J._Code("||"),AND:new J._Code("&&"),ADD:new J._Code("+")};var ht=class{optimizeNodes(){return this}optimizeNames(e,t){return this}},Uo=class extends ht{constructor(e,t,n){super(),this.varKind=e,this.name=t,this.rhs=n}render({es5:e,_n:t}){let n=e?Ke.varKinds.var:this.varKind,a=this.rhs===void 0?"":` = ${this.rhs}`;return`${n} ${this.name}${a};`+t}optimizeNames(e,t){if(e[this.name.str])return this.rhs&&(this.rhs=nr(this.rhs,e,t)),this}get names(){return this.rhs instanceof J._CodeOrName?this.rhs.names:{}}},Vi=class extends ht{constructor(e,t,n){super(),this.lhs=e,this.rhs=t,this.sideEffects=n}render({_n:e}){return`${this.lhs} = ${this.rhs};`+e}optimizeNames(e,t){if(!(this.lhs instanceof J.Name&&!e[this.lhs.str]&&!this.sideEffects))return this.rhs=nr(this.rhs,e,t),this}get names(){let e=this.lhs instanceof J.Name?{}:P({},this.lhs.names);return zi(e,this.rhs)}},qo=class extends Vi{constructor(e,t,n,a){super(e,n,a),this.op=t}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}},Bo=class extends ht{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}},Lo=class extends ht{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:""};`+e}},Vo=class extends ht{constructor(e){super(),this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}},Ho=class extends ht{constructor(e){super(),this.code=e}render({_n:e}){return`${this.code};`+e}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(e,t){return this.code=nr(this.code,e,t),this}get names(){return this.code instanceof J._CodeOrName?this.code.names:{}}},Ar=class extends ht{constructor(e=[]){super(),this.nodes=e}render(e){return this.nodes.reduce((t,n)=>t+n.render(e),"")}optimizeNodes(){let{nodes:e}=this,t=e.length;for(;t--;){let n=e[t].optimizeNodes();Array.isArray(n)?e.splice(t,1,...n):n?e[t]=n:e.splice(t,1)}return e.length>0?this:void 0}optimizeNames(e,t){let{nodes:n}=this,a=n.length;for(;a--;){let s=n[a];s.optimizeNames(e,t)||(lh(e,s.names),n.splice(a,1))}return n.length>0?this:void 0}get names(){return this.nodes.reduce((e,t)=>Et(e,t.names),{})}},_t=class extends Ar{render(e){return"{"+e._n+super.render(e)+"}"+e._n}},zo=class extends Ar{},rr=class extends _t{};rr.kind="else";var Gt=class r extends _t{constructor(e,t){super(t),this.condition=e}render(e){let t=`if(${this.condition})`+super.render(e);return this.else&&(t+="else "+this.else.render(e)),t}optimizeNodes(){super.optimizeNodes();let e=this.condition;if(e===!0)return this.nodes;let t=this.else;if(t){let n=t.optimizeNodes();t=this.else=Array.isArray(n)?new rr(n):n}if(t)return e===!1?t instanceof r?t:t.nodes:this.nodes.length?this:new r(Ou(e),t instanceof r?[t]:t.nodes);if(!(e===!1||!this.nodes.length))return this}optimizeNames(e,t){var n;if(this.else=(n=this.else)===null||n===void 0?void 0:n.optimizeNames(e,t),!!(super.optimizeNames(e,t)||this.else))return this.condition=nr(this.condition,e,t),this}get names(){let e=super.names;return zi(e,this.condition),this.else&&Et(e,this.else.names),e}};Gt.kind="if";var Dt=class extends _t{};Dt.kind="for";var Ko=class extends Dt{constructor(e){super(),this.iteration=e}render(e){return`for(${this.iteration})`+super.render(e)}optimizeNames(e,t){if(super.optimizeNames(e,t))return this.iteration=nr(this.iteration,e,t),this}get names(){return Et(super.names,this.iteration.names)}},Qo=class extends Dt{constructor(e,t,n,a){super(),this.varKind=e,this.name=t,this.from=n,this.to=a}render(e){let t=e.es5?Ke.varKinds.var:this.varKind,{name:n,from:a,to:s}=this;return`for(${t} ${n}=${a}; ${n}<${s}; ${n}++)`+super.render(e)}get names(){let e=zi(super.names,this.from);return zi(e,this.to)}},Hi=class extends Dt{constructor(e,t,n,a){super(),this.loop=e,this.varKind=t,this.name=n,this.iterable=a}render(e){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(e)}optimizeNames(e,t){if(super.optimizeNames(e,t))return this.iterable=nr(this.iterable,e,t),this}get names(){return Et(super.names,this.iterable.names)}},Nr=class extends _t{constructor(e,t,n){super(),this.name=e,this.args=t,this.async=n}render(e){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(e)}};Nr.kind="func";var Ur=class extends Ar{render(e){return"return "+super.render(e)}};Ur.kind="return";var Jo=class extends _t{render(e){let t="try"+super.render(e);return this.catch&&(t+=this.catch.render(e)),this.finally&&(t+=this.finally.render(e)),t}optimizeNodes(){var e,t;return super.optimizeNodes(),(e=this.catch)===null||e===void 0||e.optimizeNodes(),(t=this.finally)===null||t===void 0||t.optimizeNodes(),this}optimizeNames(e,t){var n,a;return super.optimizeNames(e,t),(n=this.catch)===null||n===void 0||n.optimizeNames(e,t),(a=this.finally)===null||a===void 0||a.optimizeNames(e,t),this}get names(){let e=super.names;return this.catch&&Et(e,this.catch.names),this.finally&&Et(e,this.finally.names),e}},qr=class extends _t{constructor(e){super(),this.error=e}render(e){return`catch(${this.error})`+super.render(e)}};qr.kind="catch";var Br=class extends _t{render(e){return"finally"+super.render(e)}};Br.kind="finally";var Xo=class{constructor(e,t={}){this._values={},this._blockStarts=[],this._constants={},this.opts=ee(P({},t),{_n:t.lines?`
2
- `:""}),this._extScope=e,this._scope=new Ke.Scope({parent:e}),this._nodes=[new zo]}toString(){return this._root.render(this.opts)}name(e){return this._scope.name(e)}scopeName(e){return this._extScope.name(e)}scopeValue(e,t){let n=this._extScope.value(e,t);return(this._values[n.prefix]||(this._values[n.prefix]=new Set)).add(n),n}getScopeValue(e,t){return this._extScope.getValue(e,t)}scopeRefs(e){return this._extScope.scopeRefs(e,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(e,t,n,a){let s=this._scope.toName(t);return n!==void 0&&a&&(this._constants[s.str]=n),this._leafNode(new Uo(e,s,n)),s}const(e,t,n){return this._def(Ke.varKinds.const,e,t,n)}let(e,t,n){return this._def(Ke.varKinds.let,e,t,n)}var(e,t,n){return this._def(Ke.varKinds.var,e,t,n)}assign(e,t,n){return this._leafNode(new Vi(e,t,n))}add(e,t){return this._leafNode(new qo(e,B.operators.ADD,t))}code(e){return typeof e=="function"?e():e!==J.nil&&this._leafNode(new Ho(e)),this}object(...e){let t=["{"];for(let[n,a]of e)t.length>1&&t.push(","),t.push(n),(n!==a||this.opts.es5)&&(t.push(":"),(0,J.addCodeArg)(t,a));return t.push("}"),new J._Code(t)}if(e,t,n){if(this._blockNode(new Gt(e)),t&&n)this.code(t).else().code(n).endIf();else if(t)this.code(t).endIf();else if(n)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(e){return this._elseNode(new Gt(e))}else(){return this._elseNode(new rr)}endIf(){return this._endBlockNode(Gt,rr)}_for(e,t){return this._blockNode(e),t&&this.code(t).endFor(),this}for(e,t){return this._for(new Ko(e),t)}forRange(e,t,n,a,s=this.opts.es5?Ke.varKinds.var:Ke.varKinds.let){let i=this._scope.toName(e);return this._for(new Qo(s,i,t,n),()=>a(i))}forOf(e,t,n,a=Ke.varKinds.const){let s=this._scope.toName(e);if(this.opts.es5){let i=t instanceof J.Name?t:this.var("_arr",t);return this.forRange("_i",0,(0,J._)`${i}.length`,o=>{this.var(s,(0,J._)`${i}[${o}]`),n(s)})}return this._for(new Hi("of",a,s,t),()=>n(s))}forIn(e,t,n,a=this.opts.es5?Ke.varKinds.var:Ke.varKinds.const){if(this.opts.ownProperties)return this.forOf(e,(0,J._)`Object.keys(${t})`,n);let s=this._scope.toName(e);return this._for(new Hi("in",a,s,t),()=>n(s))}endFor(){return this._endBlockNode(Dt)}label(e){return this._leafNode(new Bo(e))}break(e){return this._leafNode(new Lo(e))}return(e){let t=new Ur;if(this._blockNode(t),this.code(e),t.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(Ur)}try(e,t,n){if(!t&&!n)throw new Error('CodeGen: "try" without "catch" and "finally"');let a=new Jo;if(this._blockNode(a),this.code(e),t){let s=this.name("e");this._currNode=a.catch=new qr(s),t(s)}return n&&(this._currNode=a.finally=new Br,this.code(n)),this._endBlockNode(qr,Br)}throw(e){return this._leafNode(new Vo(e))}block(e,t){return this._blockStarts.push(this._nodes.length),e&&this.code(e).endBlock(t),this}endBlock(e){let t=this._blockStarts.pop();if(t===void 0)throw new Error("CodeGen: not in self-balancing block");let n=this._nodes.length-t;if(n<0||e!==void 0&&n!==e)throw new Error(`CodeGen: wrong number of nodes: ${n} vs ${e} expected`);return this._nodes.length=t,this}func(e,t=J.nil,n,a){return this._blockNode(new Nr(e,t,n)),a&&this.code(a).endFunc(),this}endFunc(){return this._endBlockNode(Nr)}optimize(e=1){for(;e-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(e){return this._currNode.nodes.push(e),this}_blockNode(e){this._currNode.nodes.push(e),this._nodes.push(e)}_endBlockNode(e,t){let n=this._currNode;if(n instanceof e||t&&n instanceof t)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${t?`${e.kind}/${t.kind}`:e.kind}"`)}_elseNode(e){let t=this._currNode;if(!(t instanceof Gt))throw new Error('CodeGen: "else" without "if"');return this._currNode=t.else=e,this}get _root(){return this._nodes[0]}get _currNode(){let e=this._nodes;return e[e.length-1]}set _currNode(e){let t=this._nodes;t[t.length-1]=e}};B.CodeGen=Xo;function Et(r,e){for(let t in e)r[t]=(r[t]||0)+(e[t]||0);return r}function zi(r,e){return e instanceof J._CodeOrName?Et(r,e.names):r}function nr(r,e,t){if(r instanceof J.Name)return n(r);if(!a(r))return r;return new J._Code(r._items.reduce((s,i)=>(i instanceof J.Name&&(i=n(i)),i instanceof J._Code?s.push(...i._items):s.push(i),s),[]));function n(s){let i=t[s.str];return i===void 0||e[s.str]!==1?s:(delete e[s.str],i)}function a(s){return s instanceof J._Code&&s._items.some(i=>i instanceof J.Name&&e[i.str]===1&&t[i.str]!==void 0)}}function lh(r,e){for(let t in e)r[t]=(r[t]||0)-(e[t]||0)}function Ou(r){return typeof r=="boolean"||typeof r=="number"||r===null?!r:(0,J._)`!${Yo(r)}`}B.not=Ou;var ch=wu(B.operators.AND);function mh(...r){return r.reduce(ch)}B.and=mh;var hh=wu(B.operators.OR);function _h(...r){return r.reduce(hh)}B.or=_h;function wu(r){return(e,t)=>e===J.nil?t:t===J.nil?e:(0,J._)`${Yo(e)} ${r} ${Yo(t)}`}function Yo(r){return r instanceof J.Name?r:(0,J._)`(${r})`}});var re=G(H=>{"use strict";Object.defineProperty(H,"__esModule",{value:!0});H.checkStrictMode=H.getErrorPath=H.Type=H.useFunc=H.setEvaluated=H.evaluatedPropsToName=H.mergeEvaluated=H.eachItem=H.unescapeJsonPointer=H.escapeJsonPointer=H.escapeFragment=H.unescapeFragment=H.schemaRefOrVal=H.schemaHasRulesButRef=H.schemaHasRules=H.checkUnknownRules=H.alwaysValidSchema=H.toHash=void 0;var fe=V(),gh=Wr();function Th(r){let e={};for(let t of r)e[t]=!0;return e}H.toHash=Th;function yh(r,e){return typeof e=="boolean"?e:Object.keys(e).length===0?!0:(vu(r,e),!ku(e,r.self.RULES.all))}H.alwaysValidSchema=yh;function vu(r,e=r.schema){let{opts:t,self:n}=r;if(!t.strictSchema||typeof e=="boolean")return;let a=n.RULES.keywords;for(let s in e)a[s]||Pu(r,`unknown keyword: "${s}"`)}H.checkUnknownRules=vu;function ku(r,e){if(typeof r=="boolean")return!r;for(let t in r)if(e[t])return!0;return!1}H.schemaHasRules=ku;function bh(r,e){if(typeof r=="boolean")return!r;for(let t in r)if(t!=="$ref"&&e.all[t])return!0;return!1}H.schemaHasRulesButRef=bh;function Fh({topSchemaRef:r,schemaPath:e},t,n,a){if(!a){if(typeof t=="number"||typeof t=="boolean")return t;if(typeof t=="string")return(0,fe._)`${t}`}return(0,fe._)`${r}${e}${(0,fe.getProperty)(n)}`}H.schemaRefOrVal=Fh;function xh(r){return Su(decodeURIComponent(r))}H.unescapeFragment=xh;function $h(r){return encodeURIComponent(ep(r))}H.escapeFragment=$h;function ep(r){return typeof r=="number"?`${r}`:r.replace(/~/g,"~0").replace(/\//g,"~1")}H.escapeJsonPointer=ep;function Su(r){return r.replace(/~1/g,"/").replace(/~0/g,"~")}H.unescapeJsonPointer=Su;function Oh(r,e){if(Array.isArray(r))for(let t of r)e(t);else e(r)}H.eachItem=Oh;function Iu({mergeNames:r,mergeToName:e,mergeValues:t,resultToName:n}){return(a,s,i,o)=>{let d=i===void 0?s:i instanceof fe.Name?(s instanceof fe.Name?r(a,s,i):e(a,s,i),i):s instanceof fe.Name?(e(a,i,s),s):t(s,i);return o===fe.Name&&!(d instanceof fe.Name)?n(a,d):d}}H.mergeEvaluated={props:Iu({mergeNames:(r,e,t)=>r.if((0,fe._)`${t} !== true && ${e} !== undefined`,()=>{r.if((0,fe._)`${e} === true`,()=>r.assign(t,!0),()=>r.assign(t,(0,fe._)`${t} || {}`).code((0,fe._)`Object.assign(${t}, ${e})`))}),mergeToName:(r,e,t)=>r.if((0,fe._)`${t} !== true`,()=>{e===!0?r.assign(t,!0):(r.assign(t,(0,fe._)`${t} || {}`),tp(r,t,e))}),mergeValues:(r,e)=>r===!0?!0:P(P({},r),e),resultToName:Cu}),items:Iu({mergeNames:(r,e,t)=>r.if((0,fe._)`${t} !== true && ${e} !== undefined`,()=>r.assign(t,(0,fe._)`${e} === true ? true : ${t} > ${e} ? ${t} : ${e}`)),mergeToName:(r,e,t)=>r.if((0,fe._)`${t} !== true`,()=>r.assign(t,e===!0?!0:(0,fe._)`${t} > ${e} ? ${t} : ${e}`)),mergeValues:(r,e)=>r===!0?!0:Math.max(r,e),resultToName:(r,e)=>r.var("items",e)})};function Cu(r,e){if(e===!0)return r.var("props",!0);let t=r.var("props",(0,fe._)`{}`);return e!==void 0&&tp(r,t,e),t}H.evaluatedPropsToName=Cu;function tp(r,e,t){Object.keys(t).forEach(n=>r.assign((0,fe._)`${e}${(0,fe.getProperty)(n)}`,!0))}H.setEvaluated=tp;var ju={};function wh(r,e){return r.scopeValue("func",{ref:e,code:ju[e.code]||(ju[e.code]=new gh._Code(e.code))})}H.useFunc=wh;var Zo;(function(r){r[r.Num=0]="Num",r[r.Str=1]="Str"})(Zo||(H.Type=Zo={}));function Ih(r,e,t){if(r instanceof fe.Name){let n=e===Zo.Num;return t?n?(0,fe._)`"[" + ${r} + "]"`:(0,fe._)`"['" + ${r} + "']"`:n?(0,fe._)`"/" + ${r}`:(0,fe._)`"/" + ${r}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return t?(0,fe.getProperty)(r).toString():"/"+ep(r)}H.getErrorPath=Ih;function Pu(r,e,t=r.opts.strictSchema){if(t){if(e=`strict mode: ${e}`,t===!0)throw new Error(e);r.self.logger.warn(e)}}H.checkStrictMode=Pu});var gt=G(rp=>{"use strict";Object.defineProperty(rp,"__esModule",{value:!0});var Oe=V(),jh={data:new Oe.Name("data"),valCxt:new Oe.Name("valCxt"),instancePath:new Oe.Name("instancePath"),parentData:new Oe.Name("parentData"),parentDataProperty:new Oe.Name("parentDataProperty"),rootData:new Oe.Name("rootData"),dynamicAnchors:new Oe.Name("dynamicAnchors"),vErrors:new Oe.Name("vErrors"),errors:new Oe.Name("errors"),this:new Oe.Name("this"),self:new Oe.Name("self"),scope:new Oe.Name("scope"),json:new Oe.Name("json"),jsonPos:new Oe.Name("jsonPos"),jsonLen:new Oe.Name("jsonLen"),jsonPart:new Oe.Name("jsonPart")};rp.default=jh});var Lr=G(we=>{"use strict";Object.defineProperty(we,"__esModule",{value:!0});we.extendErrors=we.resetErrorsCount=we.reportExtraError=we.reportError=we.keyword$DataError=we.keywordError=void 0;var Y=V(),Qi=re(),ve=gt();we.keywordError={message:({keyword:r})=>(0,Y.str)`must pass "${r}" keyword validation`};we.keyword$DataError={message:({keyword:r,schemaType:e})=>e?(0,Y.str)`"${r}" keyword must be ${e} ($data)`:(0,Y.str)`"${r}" keyword is invalid ($data)`};function vh(r,e=we.keywordError,t,n){let{it:a}=r,{gen:s,compositeRule:i,allErrors:o}=a,d=Eu(r,e,t);(n!=null?n:i||o)?Gu(s,d):Du(a,(0,Y._)`[${d}]`)}we.reportError=vh;function kh(r,e=we.keywordError,t){let{it:n}=r,{gen:a,compositeRule:s,allErrors:i}=n,o=Eu(r,e,t);Gu(a,o),s||i||Du(n,ve.default.vErrors)}we.reportExtraError=kh;function Sh(r,e){r.assign(ve.default.errors,e),r.if((0,Y._)`${ve.default.vErrors} !== null`,()=>r.if(e,()=>r.assign((0,Y._)`${ve.default.vErrors}.length`,e),()=>r.assign(ve.default.vErrors,null)))}we.resetErrorsCount=Sh;function Ch({gen:r,keyword:e,schemaValue:t,data:n,errsCount:a,it:s}){if(a===void 0)throw new Error("ajv implementation error");let i=r.name("err");r.forRange("i",a,ve.default.errors,o=>{r.const(i,(0,Y._)`${ve.default.vErrors}[${o}]`),r.if((0,Y._)`${i}.instancePath === undefined`,()=>r.assign((0,Y._)`${i}.instancePath`,(0,Y.strConcat)(ve.default.instancePath,s.errorPath))),r.assign((0,Y._)`${i}.schemaPath`,(0,Y.str)`${s.errSchemaPath}/${e}`),s.opts.verbose&&(r.assign((0,Y._)`${i}.schema`,t),r.assign((0,Y._)`${i}.data`,n))})}we.extendErrors=Ch;function Gu(r,e){let t=r.const("err",e);r.if((0,Y._)`${ve.default.vErrors} === null`,()=>r.assign(ve.default.vErrors,(0,Y._)`[${t}]`),(0,Y._)`${ve.default.vErrors}.push(${t})`),r.code((0,Y._)`${ve.default.errors}++`)}function Du(r,e){let{gen:t,validateName:n,schemaEnv:a}=r;a.$async?t.throw((0,Y._)`new ${r.ValidationError}(${e})`):(t.assign((0,Y._)`${n}.errors`,e),t.return(!1))}var Mt={keyword:new Y.Name("keyword"),schemaPath:new Y.Name("schemaPath"),params:new Y.Name("params"),propertyName:new Y.Name("propertyName"),message:new Y.Name("message"),schema:new Y.Name("schema"),parentSchema:new Y.Name("parentSchema")};function Eu(r,e,t){let{createErrors:n}=r.it;return n===!1?(0,Y._)`{}`:Ph(r,e,t)}function Ph(r,e,t={}){let{gen:n,it:a}=r,s=[Gh(a,t),Dh(r,t)];return Eh(r,e,s),n.object(...s)}function Gh({errorPath:r},{instancePath:e}){let t=e?(0,Y.str)`${r}${(0,Qi.getErrorPath)(e,Qi.Type.Str)}`:r;return[ve.default.instancePath,(0,Y.strConcat)(ve.default.instancePath,t)]}function Dh({keyword:r,it:{errSchemaPath:e}},{schemaPath:t,parentSchema:n}){let a=n?e:(0,Y.str)`${e}/${r}`;return t&&(a=(0,Y.str)`${a}${(0,Qi.getErrorPath)(t,Qi.Type.Str)}`),[Mt.schemaPath,a]}function Eh(r,{params:e,message:t},n){let{keyword:a,data:s,schemaValue:i,it:o}=r,{opts:d,propertyName:g,topSchemaRef:h,schemaPath:T}=o;n.push([Mt.keyword,a],[Mt.params,typeof e=="function"?e(r):e||(0,Y._)`{}`]),d.messages&&n.push([Mt.message,typeof t=="function"?t(r):t]),d.verbose&&n.push([Mt.schema,i],[Mt.parentSchema,(0,Y._)`${h}${T}`],[ve.default.data,s]),g&&n.push([Mt.propertyName,g])}});var Ru=G(ar=>{"use strict";Object.defineProperty(ar,"__esModule",{value:!0});ar.boolOrEmptySchema=ar.topBoolOrEmptySchema=void 0;var Mh=Lr(),Rh=V(),Wh=gt(),Ah={message:"boolean schema is false"};function Nh(r){let{gen:e,schema:t,validateName:n}=r;t===!1?Mu(r,!1):typeof t=="object"&&t.$async===!0?e.return(Wh.default.data):(e.assign((0,Rh._)`${n}.errors`,null),e.return(!0))}ar.topBoolOrEmptySchema=Nh;function Uh(r,e){let{gen:t,schema:n}=r;n===!1?(t.var(e,!1),Mu(r)):t.var(e,!0)}ar.boolOrEmptySchema=Uh;function Mu(r,e){let{gen:t,data:n}=r,a={gen:t,keyword:"false schema",data:n,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:r};(0,Mh.reportError)(a,Ah,void 0,e)}});var np=G(sr=>{"use strict";Object.defineProperty(sr,"__esModule",{value:!0});sr.getRules=sr.isJSONType=void 0;var qh=["string","number","integer","boolean","null","object","array"],Bh=new Set(qh);function Lh(r){return typeof r=="string"&&Bh.has(r)}sr.isJSONType=Lh;function Vh(){let r={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:ee(P({},r),{integer:!0,boolean:!0,null:!0}),rules:[{rules:[]},r.number,r.string,r.array,r.object],post:{rules:[]},all:{},keywords:{}}}sr.getRules=Vh});var ap=G(bt=>{"use strict";Object.defineProperty(bt,"__esModule",{value:!0});bt.shouldUseRule=bt.shouldUseGroup=bt.schemaHasRulesForType=void 0;function Hh({schema:r,self:e},t){let n=e.RULES.types[t];return n&&n!==!0&&Wu(r,n)}bt.schemaHasRulesForType=Hh;function Wu(r,e){return e.rules.some(t=>Au(r,t))}bt.shouldUseGroup=Wu;function Au(r,e){var t;return r[e.keyword]!==void 0||((t=e.definition.implements)===null||t===void 0?void 0:t.some(n=>r[n]!==void 0))}bt.shouldUseRule=Au});var Vr=G(Ie=>{"use strict";Object.defineProperty(Ie,"__esModule",{value:!0});Ie.reportTypeError=Ie.checkDataTypes=Ie.checkDataType=Ie.coerceAndCheckDataType=Ie.getJSONTypes=Ie.getSchemaTypes=Ie.DataType=void 0;var zh=np(),Kh=ap(),Qh=Lr(),N=V(),Nu=re(),ir;(function(r){r[r.Correct=0]="Correct",r[r.Wrong=1]="Wrong"})(ir||(Ie.DataType=ir={}));function Jh(r){let e=Uu(r.type);if(e.includes("null")){if(r.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!e.length&&r.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');r.nullable===!0&&e.push("null")}return e}Ie.getSchemaTypes=Jh;function Uu(r){let e=Array.isArray(r)?r:r?[r]:[];if(e.every(zh.isJSONType))return e;throw new Error("type must be JSONType or JSONType[]: "+e.join(","))}Ie.getJSONTypes=Uu;function Xh(r,e){let{gen:t,data:n,opts:a}=r,s=Yh(e,a.coerceTypes),i=e.length>0&&!(s.length===0&&e.length===1&&(0,Kh.schemaHasRulesForType)(r,e[0]));if(i){let o=ip(e,n,a.strictNumbers,ir.Wrong);t.if(o,()=>{s.length?Zh(r,e,s):op(r)})}return i}Ie.coerceAndCheckDataType=Xh;var qu=new Set(["string","number","integer","boolean","null"]);function Yh(r,e){return e?r.filter(t=>qu.has(t)||e==="array"&&t==="array"):[]}function Zh(r,e,t){let{gen:n,data:a,opts:s}=r,i=n.let("dataType",(0,N._)`typeof ${a}`),o=n.let("coerced",(0,N._)`undefined`);s.coerceTypes==="array"&&n.if((0,N._)`${i} == 'object' && Array.isArray(${a}) && ${a}.length == 1`,()=>n.assign(a,(0,N._)`${a}[0]`).assign(i,(0,N._)`typeof ${a}`).if(ip(e,a,s.strictNumbers),()=>n.assign(o,a))),n.if((0,N._)`${o} !== undefined`);for(let g of t)(qu.has(g)||g==="array"&&s.coerceTypes==="array")&&d(g);n.else(),op(r),n.endIf(),n.if((0,N._)`${o} !== undefined`,()=>{n.assign(a,o),e_(r,o)});function d(g){switch(g){case"string":n.elseIf((0,N._)`${i} == "number" || ${i} == "boolean"`).assign(o,(0,N._)`"" + ${a}`).elseIf((0,N._)`${a} === null`).assign(o,(0,N._)`""`);return;case"number":n.elseIf((0,N._)`${i} == "boolean" || ${a} === null
3
- || (${i} == "string" && ${a} && ${a} == +${a})`).assign(o,(0,N._)`+${a}`);return;case"integer":n.elseIf((0,N._)`${i} === "boolean" || ${a} === null
4
- || (${i} === "string" && ${a} && ${a} == +${a} && !(${a} % 1))`).assign(o,(0,N._)`+${a}`);return;case"boolean":n.elseIf((0,N._)`${a} === "false" || ${a} === 0 || ${a} === null`).assign(o,!1).elseIf((0,N._)`${a} === "true" || ${a} === 1`).assign(o,!0);return;case"null":n.elseIf((0,N._)`${a} === "" || ${a} === 0 || ${a} === false`),n.assign(o,null);return;case"array":n.elseIf((0,N._)`${i} === "string" || ${i} === "number"
5
- || ${i} === "boolean" || ${a} === null`).assign(o,(0,N._)`[${a}]`)}}}function e_({gen:r,parentData:e,parentDataProperty:t},n){r.if((0,N._)`${e} !== undefined`,()=>r.assign((0,N._)`${e}[${t}]`,n))}function sp(r,e,t,n=ir.Correct){let a=n===ir.Correct?N.operators.EQ:N.operators.NEQ,s;switch(r){case"null":return(0,N._)`${e} ${a} null`;case"array":s=(0,N._)`Array.isArray(${e})`;break;case"object":s=(0,N._)`${e} && typeof ${e} == "object" && !Array.isArray(${e})`;break;case"integer":s=i((0,N._)`!(${e} % 1) && !isNaN(${e})`);break;case"number":s=i();break;default:return(0,N._)`typeof ${e} ${a} ${r}`}return n===ir.Correct?s:(0,N.not)(s);function i(o=N.nil){return(0,N.and)((0,N._)`typeof ${e} == "number"`,o,t?(0,N._)`isFinite(${e})`:N.nil)}}Ie.checkDataType=sp;function ip(r,e,t,n){if(r.length===1)return sp(r[0],e,t,n);let a,s=(0,Nu.toHash)(r);if(s.array&&s.object){let i=(0,N._)`typeof ${e} != "object"`;a=s.null?i:(0,N._)`!${e} || ${i}`,delete s.null,delete s.array,delete s.object}else a=N.nil;s.number&&delete s.integer;for(let i in s)a=(0,N.and)(a,sp(i,e,t,n));return a}Ie.checkDataTypes=ip;var t_={message:({schema:r})=>`must be ${r}`,params:({schema:r,schemaValue:e})=>typeof r=="string"?(0,N._)`{type: ${r}}`:(0,N._)`{type: ${e}}`};function op(r){let e=r_(r);(0,Qh.reportError)(e,t_)}Ie.reportTypeError=op;function r_(r){let{gen:e,data:t,schema:n}=r,a=(0,Nu.schemaRefOrVal)(r,n,"type");return{gen:e,keyword:"type",data:t,schema:n.type,schemaCode:a,schemaValue:a,parentSchema:n,params:{},it:r}}});var Lu=G(Ji=>{"use strict";Object.defineProperty(Ji,"__esModule",{value:!0});Ji.assignDefaults=void 0;var or=V(),n_=re();function a_(r,e){let{properties:t,items:n}=r.schema;if(e==="object"&&t)for(let a in t)Bu(r,a,t[a].default);else e==="array"&&Array.isArray(n)&&n.forEach((a,s)=>Bu(r,s,a.default))}Ji.assignDefaults=a_;function Bu(r,e,t){let{gen:n,compositeRule:a,data:s,opts:i}=r;if(t===void 0)return;let o=(0,or._)`${s}${(0,or.getProperty)(e)}`;if(a){(0,n_.checkStrictMode)(r,`default is ignored for: ${o}`);return}let d=(0,or._)`${o} === undefined`;i.useDefaults==="empty"&&(d=(0,or._)`${d} || ${o} === null || ${o} === ""`),n.if(d,(0,or._)`${o} = ${(0,or.stringify)(t)}`)}});var Le=G(pe=>{"use strict";Object.defineProperty(pe,"__esModule",{value:!0});pe.validateUnion=pe.validateArray=pe.usePattern=pe.callValidateCode=pe.schemaProperties=pe.allSchemaProperties=pe.noPropertyInData=pe.propertyInData=pe.isOwnProperty=pe.hasPropFunc=pe.reportMissingProp=pe.checkMissingProp=pe.checkReportMissingProp=void 0;var ue=V(),pp=re(),Ft=gt(),s_=re();function i_(r,e){let{gen:t,data:n,it:a}=r;t.if(fp(t,n,e,a.opts.ownProperties),()=>{r.setParams({missingProperty:(0,ue._)`${e}`},!0),r.error()})}pe.checkReportMissingProp=i_;function o_({gen:r,data:e,it:{opts:t}},n,a){return(0,ue.or)(...n.map(s=>(0,ue.and)(fp(r,e,s,t.ownProperties),(0,ue._)`${a} = ${s}`)))}pe.checkMissingProp=o_;function p_(r,e){r.setParams({missingProperty:e},!0),r.error()}pe.reportMissingProp=p_;function Vu(r){return r.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,ue._)`Object.prototype.hasOwnProperty`})}pe.hasPropFunc=Vu;function dp(r,e,t){return(0,ue._)`${Vu(r)}.call(${e}, ${t})`}pe.isOwnProperty=dp;function d_(r,e,t,n){let a=(0,ue._)`${e}${(0,ue.getProperty)(t)} !== undefined`;return n?(0,ue._)`${a} && ${dp(r,e,t)}`:a}pe.propertyInData=d_;function fp(r,e,t,n){let a=(0,ue._)`${e}${(0,ue.getProperty)(t)} === undefined`;return n?(0,ue.or)(a,(0,ue.not)(dp(r,e,t))):a}pe.noPropertyInData=fp;function Hu(r){return r?Object.keys(r).filter(e=>e!=="__proto__"):[]}pe.allSchemaProperties=Hu;function f_(r,e){return Hu(e).filter(t=>!(0,pp.alwaysValidSchema)(r,e[t]))}pe.schemaProperties=f_;function u_({schemaCode:r,data:e,it:{gen:t,topSchemaRef:n,schemaPath:a,errorPath:s},it:i},o,d,g){let h=g?(0,ue._)`${r}, ${e}, ${n}${a}`:e,T=[[Ft.default.instancePath,(0,ue.strConcat)(Ft.default.instancePath,s)],[Ft.default.parentData,i.parentData],[Ft.default.parentDataProperty,i.parentDataProperty],[Ft.default.rootData,Ft.default.rootData]];i.opts.dynamicRef&&T.push([Ft.default.dynamicAnchors,Ft.default.dynamicAnchors]);let O=(0,ue._)`${h}, ${t.object(...T)}`;return d!==ue.nil?(0,ue._)`${o}.call(${d}, ${O})`:(0,ue._)`${o}(${O})`}pe.callValidateCode=u_;var l_=(0,ue._)`new RegExp`;function c_({gen:r,it:{opts:e}},t){let n=e.unicodeRegExp?"u":"",{regExp:a}=e.code,s=a(t,n);return r.scopeValue("pattern",{key:s.toString(),ref:s,code:(0,ue._)`${a.code==="new RegExp"?l_:(0,s_.useFunc)(r,a)}(${t}, ${n})`})}pe.usePattern=c_;function m_(r){let{gen:e,data:t,keyword:n,it:a}=r,s=e.name("valid");if(a.allErrors){let o=e.let("valid",!0);return i(()=>e.assign(o,!1)),o}return e.var(s,!0),i(()=>e.break()),s;function i(o){let d=e.const("len",(0,ue._)`${t}.length`);e.forRange("i",0,d,g=>{r.subschema({keyword:n,dataProp:g,dataPropType:pp.Type.Num},s),e.if((0,ue.not)(s),o)})}}pe.validateArray=m_;function h_(r){let{gen:e,schema:t,keyword:n,it:a}=r;if(!Array.isArray(t))throw new Error("ajv implementation error");if(t.some(d=>(0,pp.alwaysValidSchema)(a,d))&&!a.opts.unevaluated)return;let i=e.let("valid",!1),o=e.name("_valid");e.block(()=>t.forEach((d,g)=>{let h=r.subschema({keyword:n,schemaProp:g,compositeRule:!0},o);e.assign(i,(0,ue._)`${i} || ${o}`),r.mergeValidEvaluated(h,o)||e.if((0,ue.not)(i))})),r.result(i,()=>r.reset(),()=>r.error(!0))}pe.validateUnion=h_});var Qu=G(it=>{"use strict";Object.defineProperty(it,"__esModule",{value:!0});it.validateKeywordUsage=it.validSchemaType=it.funcKeywordCode=it.macroKeywordCode=void 0;var ke=V(),Rt=gt(),__=Le(),g_=Lr();function T_(r,e){let{gen:t,keyword:n,schema:a,parentSchema:s,it:i}=r,o=e.macro.call(i.self,a,s,i),d=Ku(t,n,o);i.opts.validateSchema!==!1&&i.self.validateSchema(o,!0);let g=t.name("valid");r.subschema({schema:o,schemaPath:ke.nil,errSchemaPath:`${i.errSchemaPath}/${n}`,topSchemaRef:d,compositeRule:!0},g),r.pass(g,()=>r.error(!0))}it.macroKeywordCode=T_;function y_(r,e){var t;let{gen:n,keyword:a,schema:s,parentSchema:i,$data:o,it:d}=r;F_(d,e);let g=!o&&e.compile?e.compile.call(d.self,s,i,d):e.validate,h=Ku(n,a,g),T=n.let("valid");r.block$data(T,O),r.ok((t=e.valid)!==null&&t!==void 0?t:T);function O(){if(e.errors===!1)$(),e.modifying&&zu(r),I(()=>r.error());else{let j=e.async?w():b();e.modifying&&zu(r),I(()=>b_(r,j))}}function w(){let j=n.let("ruleErrs",null);return n.try(()=>$((0,ke._)`await `),z=>n.assign(T,!1).if((0,ke._)`${z} instanceof ${d.ValidationError}`,()=>n.assign(j,(0,ke._)`${z}.errors`),()=>n.throw(z))),j}function b(){let j=(0,ke._)`${h}.errors`;return n.assign(j,null),$(ke.nil),j}function $(j=e.async?(0,ke._)`await `:ke.nil){let z=d.opts.passContext?Rt.default.this:Rt.default.self,q=!("compile"in e&&!o||e.schema===!1);n.assign(T,(0,ke._)`${j}${(0,__.callValidateCode)(r,h,z,q)}`,e.modifying)}function I(j){var z;n.if((0,ke.not)((z=e.valid)!==null&&z!==void 0?z:T),j)}}it.funcKeywordCode=y_;function zu(r){let{gen:e,data:t,it:n}=r;e.if(n.parentData,()=>e.assign(t,(0,ke._)`${n.parentData}[${n.parentDataProperty}]`))}function b_(r,e){let{gen:t}=r;t.if((0,ke._)`Array.isArray(${e})`,()=>{t.assign(Rt.default.vErrors,(0,ke._)`${Rt.default.vErrors} === null ? ${e} : ${Rt.default.vErrors}.concat(${e})`).assign(Rt.default.errors,(0,ke._)`${Rt.default.vErrors}.length`),(0,g_.extendErrors)(r)},()=>r.error())}function F_({schemaEnv:r},e){if(e.async&&!r.$async)throw new Error("async keyword in sync schema")}function Ku(r,e,t){if(t===void 0)throw new Error(`keyword "${e}" failed to compile`);return r.scopeValue("keyword",typeof t=="function"?{ref:t}:{ref:t,code:(0,ke.stringify)(t)})}function x_(r,e,t=!1){return!e.length||e.some(n=>n==="array"?Array.isArray(r):n==="object"?r&&typeof r=="object"&&!Array.isArray(r):typeof r==n||t&&typeof r=="undefined")}it.validSchemaType=x_;function $_({schema:r,opts:e,self:t,errSchemaPath:n},a,s){if(Array.isArray(a.keyword)?!a.keyword.includes(s):a.keyword!==s)throw new Error("ajv implementation error");let i=a.dependencies;if(i!=null&&i.some(o=>!Object.prototype.hasOwnProperty.call(r,o)))throw new Error(`parent schema must have dependencies of ${s}: ${i.join(",")}`);if(a.validateSchema&&!a.validateSchema(r[s])){let d=`keyword "${s}" value is invalid at path "${n}": `+t.errorsText(a.validateSchema.errors);if(e.validateSchema==="log")t.logger.error(d);else throw new Error(d)}}it.validateKeywordUsage=$_});var Xu=G(xt=>{"use strict";Object.defineProperty(xt,"__esModule",{value:!0});xt.extendSubschemaMode=xt.extendSubschemaData=xt.getSubschema=void 0;var ot=V(),Ju=re();function O_(r,{keyword:e,schemaProp:t,schema:n,schemaPath:a,errSchemaPath:s,topSchemaRef:i}){if(e!==void 0&&n!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(e!==void 0){let o=r.schema[e];return t===void 0?{schema:o,schemaPath:(0,ot._)`${r.schemaPath}${(0,ot.getProperty)(e)}`,errSchemaPath:`${r.errSchemaPath}/${e}`}:{schema:o[t],schemaPath:(0,ot._)`${r.schemaPath}${(0,ot.getProperty)(e)}${(0,ot.getProperty)(t)}`,errSchemaPath:`${r.errSchemaPath}/${e}/${(0,Ju.escapeFragment)(t)}`}}if(n!==void 0){if(a===void 0||s===void 0||i===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:n,schemaPath:a,topSchemaRef:i,errSchemaPath:s}}throw new Error('either "keyword" or "schema" must be passed')}xt.getSubschema=O_;function w_(r,e,{dataProp:t,dataPropType:n,data:a,dataTypes:s,propertyName:i}){if(a!==void 0&&t!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');let{gen:o}=e;if(t!==void 0){let{errorPath:g,dataPathArr:h,opts:T}=e,O=o.let("data",(0,ot._)`${e.data}${(0,ot.getProperty)(t)}`,!0);d(O),r.errorPath=(0,ot.str)`${g}${(0,Ju.getErrorPath)(t,n,T.jsPropertySyntax)}`,r.parentDataProperty=(0,ot._)`${t}`,r.dataPathArr=[...h,r.parentDataProperty]}if(a!==void 0){let g=a instanceof ot.Name?a:o.let("data",a,!0);d(g),i!==void 0&&(r.propertyName=i)}s&&(r.dataTypes=s);function d(g){r.data=g,r.dataLevel=e.dataLevel+1,r.dataTypes=[],e.definedProperties=new Set,r.parentData=e.data,r.dataNames=[...e.dataNames,g]}}xt.extendSubschemaData=w_;function I_(r,{jtdDiscriminator:e,jtdMetadata:t,compositeRule:n,createErrors:a,allErrors:s}){n!==void 0&&(r.compositeRule=n),a!==void 0&&(r.createErrors=a),s!==void 0&&(r.allErrors=s),r.jtdDiscriminator=e,r.jtdMetadata=t}xt.extendSubschemaMode=I_});var up=G((yI,Yu)=>{"use strict";Yu.exports=function r(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;var n,a,s;if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(a=n;a--!==0;)if(!r(e[a],t[a]))return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();if(s=Object.keys(e),n=s.length,n!==Object.keys(t).length)return!1;for(a=n;a--!==0;)if(!Object.prototype.hasOwnProperty.call(t,s[a]))return!1;for(a=n;a--!==0;){var i=s[a];if(!r(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}});var el=G((bI,Zu)=>{"use strict";var $t=Zu.exports=function(r,e,t){typeof e=="function"&&(t=e,e={}),t=e.cb||t;var n=typeof t=="function"?t:t.pre||function(){},a=t.post||function(){};Xi(e,n,a,r,"",r)};$t.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0};$t.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0};$t.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0};$t.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function Xi(r,e,t,n,a,s,i,o,d,g){if(n&&typeof n=="object"&&!Array.isArray(n)){e(n,a,s,i,o,d,g);for(var h in n){var T=n[h];if(Array.isArray(T)){if(h in $t.arrayKeywords)for(var O=0;O<T.length;O++)Xi(r,e,t,T[O],a+"/"+h+"/"+O,s,a,h,n,O)}else if(h in $t.propsKeywords){if(T&&typeof T=="object")for(var w in T)Xi(r,e,t,T[w],a+"/"+h+"/"+j_(w),s,a,h,n,w)}else(h in $t.keywords||r.allKeys&&!(h in $t.skipKeywords))&&Xi(r,e,t,T,a+"/"+h,s,a,h,n)}t(n,a,s,i,o,d,g)}}function j_(r){return r.replace(/~/g,"~0").replace(/\//g,"~1")}});var Hr=G(Pe=>{"use strict";Object.defineProperty(Pe,"__esModule",{value:!0});Pe.getSchemaRefs=Pe.resolveUrl=Pe.normalizeId=Pe._getFullPath=Pe.getFullPath=Pe.inlineRef=void 0;var v_=re(),k_=up(),S_=el(),C_=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function P_(r,e=!0){return typeof r=="boolean"?!0:e===!0?!lp(r):e?tl(r)<=e:!1}Pe.inlineRef=P_;var G_=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function lp(r){for(let e in r){if(G_.has(e))return!0;let t=r[e];if(Array.isArray(t)&&t.some(lp)||typeof t=="object"&&lp(t))return!0}return!1}function tl(r){let e=0;for(let t in r){if(t==="$ref")return 1/0;if(e++,!C_.has(t)&&(typeof r[t]=="object"&&(0,v_.eachItem)(r[t],n=>e+=tl(n)),e===1/0))return 1/0}return e}function rl(r,e="",t){t!==!1&&(e=pr(e));let n=r.parse(e);return nl(r,n)}Pe.getFullPath=rl;function nl(r,e){return r.serialize(e).split("#")[0]+"#"}Pe._getFullPath=nl;var D_=/#\/?$/;function pr(r){return r?r.replace(D_,""):""}Pe.normalizeId=pr;function E_(r,e,t){return t=pr(t),r.resolve(e,t)}Pe.resolveUrl=E_;var M_=/^[a-z_][-a-z0-9._]*$/i;function R_(r,e){if(typeof r=="boolean")return{};let{schemaId:t,uriResolver:n}=this.opts,a=pr(r[t]||e),s={"":a},i=rl(n,a,!1),o={},d=new Set;return S_(r,{allKeys:!0},(T,O,w,b)=>{if(b===void 0)return;let $=i+O,I=s[b];typeof T[t]=="string"&&(I=j.call(this,T[t])),z.call(this,T.$anchor),z.call(this,T.$dynamicAnchor),s[O]=I;function j(q){let se=this.opts.uriResolver.resolve;if(q=pr(I?se(I,q):q),d.has(q))throw h(q);d.add(q);let W=this.refs[q];return typeof W=="string"&&(W=this.refs[W]),typeof W=="object"?g(T,W.schema,q):q!==pr($)&&(q[0]==="#"?(g(T,o[q],q),o[q]=T):this.refs[q]=$),q}function z(q){if(typeof q=="string"){if(!M_.test(q))throw new Error(`invalid anchor "${q}"`);j.call(this,`#${q}`)}}}),o;function g(T,O,w){if(O!==void 0&&!k_(T,O))throw h(w)}function h(T){return new Error(`reference "${T}" resolves to more than one schema`)}}Pe.getSchemaRefs=R_});var Qr=G(Ot=>{"use strict";Object.defineProperty(Ot,"__esModule",{value:!0});Ot.getData=Ot.KeywordCxt=Ot.validateFunctionCode=void 0;var pl=Ru(),al=Vr(),mp=ap(),Yi=Vr(),W_=Lu(),Kr=Qu(),cp=Xu(),D=V(),R=gt(),A_=Hr(),Tt=re(),zr=Lr();function N_(r){if(ul(r)&&(ll(r),fl(r))){B_(r);return}dl(r,()=>(0,pl.topBoolOrEmptySchema)(r))}Ot.validateFunctionCode=N_;function dl({gen:r,validateName:e,schema:t,schemaEnv:n,opts:a},s){a.code.es5?r.func(e,(0,D._)`${R.default.data}, ${R.default.valCxt}`,n.$async,()=>{r.code((0,D._)`"use strict"; ${sl(t,a)}`),q_(r,a),r.code(s)}):r.func(e,(0,D._)`${R.default.data}, ${U_(a)}`,n.$async,()=>r.code(sl(t,a)).code(s))}function U_(r){return(0,D._)`{${R.default.instancePath}="", ${R.default.parentData}, ${R.default.parentDataProperty}, ${R.default.rootData}=${R.default.data}${r.dynamicRef?(0,D._)`, ${R.default.dynamicAnchors}={}`:D.nil}}={}`}function q_(r,e){r.if(R.default.valCxt,()=>{r.var(R.default.instancePath,(0,D._)`${R.default.valCxt}.${R.default.instancePath}`),r.var(R.default.parentData,(0,D._)`${R.default.valCxt}.${R.default.parentData}`),r.var(R.default.parentDataProperty,(0,D._)`${R.default.valCxt}.${R.default.parentDataProperty}`),r.var(R.default.rootData,(0,D._)`${R.default.valCxt}.${R.default.rootData}`),e.dynamicRef&&r.var(R.default.dynamicAnchors,(0,D._)`${R.default.valCxt}.${R.default.dynamicAnchors}`)},()=>{r.var(R.default.instancePath,(0,D._)`""`),r.var(R.default.parentData,(0,D._)`undefined`),r.var(R.default.parentDataProperty,(0,D._)`undefined`),r.var(R.default.rootData,R.default.data),e.dynamicRef&&r.var(R.default.dynamicAnchors,(0,D._)`{}`)})}function B_(r){let{schema:e,opts:t,gen:n}=r;dl(r,()=>{t.$comment&&e.$comment&&ml(r),K_(r),n.let(R.default.vErrors,null),n.let(R.default.errors,0),t.unevaluated&&L_(r),cl(r),X_(r)})}function L_(r){let{gen:e,validateName:t}=r;r.evaluated=e.const("evaluated",(0,D._)`${t}.evaluated`),e.if((0,D._)`${r.evaluated}.dynamicProps`,()=>e.assign((0,D._)`${r.evaluated}.props`,(0,D._)`undefined`)),e.if((0,D._)`${r.evaluated}.dynamicItems`,()=>e.assign((0,D._)`${r.evaluated}.items`,(0,D._)`undefined`))}function sl(r,e){let t=typeof r=="object"&&r[e.schemaId];return t&&(e.code.source||e.code.process)?(0,D._)`/*# sourceURL=${t} */`:D.nil}function V_(r,e){if(ul(r)&&(ll(r),fl(r))){H_(r,e);return}(0,pl.boolOrEmptySchema)(r,e)}function fl({schema:r,self:e}){if(typeof r=="boolean")return!r;for(let t in r)if(e.RULES.all[t])return!0;return!1}function ul(r){return typeof r.schema!="boolean"}function H_(r,e){let{schema:t,gen:n,opts:a}=r;a.$comment&&t.$comment&&ml(r),Q_(r),J_(r);let s=n.const("_errs",R.default.errors);cl(r,s),n.var(e,(0,D._)`${s} === ${R.default.errors}`)}function ll(r){(0,Tt.checkUnknownRules)(r),z_(r)}function cl(r,e){if(r.opts.jtd)return il(r,[],!1,e);let t=(0,al.getSchemaTypes)(r.schema),n=(0,al.coerceAndCheckDataType)(r,t);il(r,t,!n,e)}function z_(r){let{schema:e,errSchemaPath:t,opts:n,self:a}=r;e.$ref&&n.ignoreKeywordsWithRef&&(0,Tt.schemaHasRulesButRef)(e,a.RULES)&&a.logger.warn(`$ref: keywords ignored in schema at path "${t}"`)}function K_(r){let{schema:e,opts:t}=r;e.default!==void 0&&t.useDefaults&&t.strictSchema&&(0,Tt.checkStrictMode)(r,"default is ignored in the schema root")}function Q_(r){let e=r.schema[r.opts.schemaId];e&&(r.baseId=(0,A_.resolveUrl)(r.opts.uriResolver,r.baseId,e))}function J_(r){if(r.schema.$async&&!r.schemaEnv.$async)throw new Error("async schema in sync schema")}function ml({gen:r,schemaEnv:e,schema:t,errSchemaPath:n,opts:a}){let s=t.$comment;if(a.$comment===!0)r.code((0,D._)`${R.default.self}.logger.log(${s})`);else if(typeof a.$comment=="function"){let i=(0,D.str)`${n}/$comment`,o=r.scopeValue("root",{ref:e.root});r.code((0,D._)`${R.default.self}.opts.$comment(${s}, ${i}, ${o}.schema)`)}}function X_(r){let{gen:e,schemaEnv:t,validateName:n,ValidationError:a,opts:s}=r;t.$async?e.if((0,D._)`${R.default.errors} === 0`,()=>e.return(R.default.data),()=>e.throw((0,D._)`new ${a}(${R.default.vErrors})`)):(e.assign((0,D._)`${n}.errors`,R.default.vErrors),s.unevaluated&&Y_(r),e.return((0,D._)`${R.default.errors} === 0`))}function Y_({gen:r,evaluated:e,props:t,items:n}){t instanceof D.Name&&r.assign((0,D._)`${e}.props`,t),n instanceof D.Name&&r.assign((0,D._)`${e}.items`,n)}function il(r,e,t,n){let{gen:a,schema:s,data:i,allErrors:o,opts:d,self:g}=r,{RULES:h}=g;if(s.$ref&&(d.ignoreKeywordsWithRef||!(0,Tt.schemaHasRulesButRef)(s,h))){a.block(()=>_l(r,"$ref",h.all.$ref.definition));return}d.jtd||Z_(r,e),a.block(()=>{for(let O of h.rules)T(O);T(h.post)});function T(O){(0,mp.shouldUseGroup)(s,O)&&(O.type?(a.if((0,Yi.checkDataType)(O.type,i,d.strictNumbers)),ol(r,O),e.length===1&&e[0]===O.type&&t&&(a.else(),(0,Yi.reportTypeError)(r)),a.endIf()):ol(r,O),o||a.if((0,D._)`${R.default.errors} === ${n||0}`))}}function ol(r,e){let{gen:t,schema:n,opts:{useDefaults:a}}=r;a&&(0,W_.assignDefaults)(r,e.type),t.block(()=>{for(let s of e.rules)(0,mp.shouldUseRule)(n,s)&&_l(r,s.keyword,s.definition,e.type)})}function Z_(r,e){r.schemaEnv.meta||!r.opts.strictTypes||(eg(r,e),r.opts.allowUnionTypes||tg(r,e),rg(r,r.dataTypes))}function eg(r,e){if(e.length){if(!r.dataTypes.length){r.dataTypes=e;return}e.forEach(t=>{hl(r.dataTypes,t)||hp(r,`type "${t}" not allowed by context "${r.dataTypes.join(",")}"`)}),ag(r,e)}}function tg(r,e){e.length>1&&!(e.length===2&&e.includes("null"))&&hp(r,"use allowUnionTypes to allow union type keyword")}function rg(r,e){let t=r.self.RULES.all;for(let n in t){let a=t[n];if(typeof a=="object"&&(0,mp.shouldUseRule)(r.schema,a)){let{type:s}=a.definition;s.length&&!s.some(i=>ng(e,i))&&hp(r,`missing type "${s.join(",")}" for keyword "${n}"`)}}}function ng(r,e){return r.includes(e)||e==="number"&&r.includes("integer")}function hl(r,e){return r.includes(e)||e==="integer"&&r.includes("number")}function ag(r,e){let t=[];for(let n of r.dataTypes)hl(e,n)?t.push(n):e.includes("integer")&&n==="number"&&t.push("integer");r.dataTypes=t}function hp(r,e){let t=r.schemaEnv.baseId+r.errSchemaPath;e+=` at "${t}" (strictTypes)`,(0,Tt.checkStrictMode)(r,e,r.opts.strictTypes)}var Zi=class{constructor(e,t,n){if((0,Kr.validateKeywordUsage)(e,t,n),this.gen=e.gen,this.allErrors=e.allErrors,this.keyword=n,this.data=e.data,this.schema=e.schema[n],this.$data=t.$data&&e.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,Tt.schemaRefOrVal)(e,this.schema,n,this.$data),this.schemaType=t.schemaType,this.parentSchema=e.schema,this.params={},this.it=e,this.def=t,this.$data)this.schemaCode=e.gen.const("vSchema",gl(this.$data,e));else if(this.schemaCode=this.schemaValue,!(0,Kr.validSchemaType)(this.schema,t.schemaType,t.allowUndefined))throw new Error(`${n} value must be ${JSON.stringify(t.schemaType)}`);("code"in t?t.trackErrors:t.errors!==!1)&&(this.errsCount=e.gen.const("_errs",R.default.errors))}result(e,t,n){this.failResult((0,D.not)(e),t,n)}failResult(e,t,n){this.gen.if(e),n?n():this.error(),t?(this.gen.else(),t(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(e,t){this.failResult((0,D.not)(e),void 0,t)}fail(e){if(e===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(e),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(e){if(!this.$data)return this.fail(e);let{schemaCode:t}=this;this.fail((0,D._)`${t} !== undefined && (${(0,D.or)(this.invalid$data(),e)})`)}error(e,t,n){if(t){this.setParams(t),this._error(e,n),this.setParams({});return}this._error(e,n)}_error(e,t){(e?zr.reportExtraError:zr.reportError)(this,this.def.error,t)}$dataError(){(0,zr.reportError)(this,this.def.$dataError||zr.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,zr.resetErrorsCount)(this.gen,this.errsCount)}ok(e){this.allErrors||this.gen.if(e)}setParams(e,t){t?Object.assign(this.params,e):this.params=e}block$data(e,t,n=D.nil){this.gen.block(()=>{this.check$data(e,n),t()})}check$data(e=D.nil,t=D.nil){if(!this.$data)return;let{gen:n,schemaCode:a,schemaType:s,def:i}=this;n.if((0,D.or)((0,D._)`${a} === undefined`,t)),e!==D.nil&&n.assign(e,!0),(s.length||i.validateSchema)&&(n.elseIf(this.invalid$data()),this.$dataError(),e!==D.nil&&n.assign(e,!1)),n.else()}invalid$data(){let{gen:e,schemaCode:t,schemaType:n,def:a,it:s}=this;return(0,D.or)(i(),o());function i(){if(n.length){if(!(t instanceof D.Name))throw new Error("ajv implementation error");let d=Array.isArray(n)?n:[n];return(0,D._)`${(0,Yi.checkDataTypes)(d,t,s.opts.strictNumbers,Yi.DataType.Wrong)}`}return D.nil}function o(){if(a.validateSchema){let d=e.scopeValue("validate$data",{ref:a.validateSchema});return(0,D._)`!${d}(${t})`}return D.nil}}subschema(e,t){let n=(0,cp.getSubschema)(this.it,e);(0,cp.extendSubschemaData)(n,this.it,e),(0,cp.extendSubschemaMode)(n,e);let a=ee(P(P({},this.it),n),{items:void 0,props:void 0});return V_(a,t),a}mergeEvaluated(e,t){let{it:n,gen:a}=this;n.opts.unevaluated&&(n.props!==!0&&e.props!==void 0&&(n.props=Tt.mergeEvaluated.props(a,e.props,n.props,t)),n.items!==!0&&e.items!==void 0&&(n.items=Tt.mergeEvaluated.items(a,e.items,n.items,t)))}mergeValidEvaluated(e,t){let{it:n,gen:a}=this;if(n.opts.unevaluated&&(n.props!==!0||n.items!==!0))return a.if(t,()=>this.mergeEvaluated(e,D.Name)),!0}};Ot.KeywordCxt=Zi;function _l(r,e,t,n){let a=new Zi(r,t,e);"code"in t?t.code(a,n):a.$data&&t.validate?(0,Kr.funcKeywordCode)(a,t):"macro"in t?(0,Kr.macroKeywordCode)(a,t):(t.compile||t.validate)&&(0,Kr.funcKeywordCode)(a,t)}var sg=/^\/(?:[^~]|~0|~1)*$/,ig=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function gl(r,{dataLevel:e,dataNames:t,dataPathArr:n}){let a,s;if(r==="")return R.default.rootData;if(r[0]==="/"){if(!sg.test(r))throw new Error(`Invalid JSON-pointer: ${r}`);a=r,s=R.default.rootData}else{let g=ig.exec(r);if(!g)throw new Error(`Invalid JSON-pointer: ${r}`);let h=+g[1];if(a=g[2],a==="#"){if(h>=e)throw new Error(d("property/index",h));return n[e-h]}if(h>e)throw new Error(d("data",h));if(s=t[e-h],!a)return s}let i=s,o=a.split("/");for(let g of o)g&&(s=(0,D._)`${s}${(0,D.getProperty)((0,Tt.unescapeJsonPointer)(g))}`,i=(0,D._)`${i} && ${s}`);return i;function d(g,h){return`Cannot access ${g} ${h} levels up, current level is ${e}`}}Ot.getData=gl});var eo=G(gp=>{"use strict";Object.defineProperty(gp,"__esModule",{value:!0});var _p=class extends Error{constructor(e){super("validation failed"),this.errors=e,this.ajv=this.validation=!0}};gp.default=_p});var Jr=G(bp=>{"use strict";Object.defineProperty(bp,"__esModule",{value:!0});var Tp=Hr(),yp=class extends Error{constructor(e,t,n,a){super(a||`can't resolve reference ${n} from id ${t}`),this.missingRef=(0,Tp.resolveUrl)(e,t,n),this.missingSchema=(0,Tp.normalizeId)((0,Tp.getFullPath)(e,this.missingRef))}};bp.default=yp});var ro=G(Ve=>{"use strict";Object.defineProperty(Ve,"__esModule",{value:!0});Ve.resolveSchema=Ve.getCompilingSchema=Ve.resolveRef=Ve.compileSchema=Ve.SchemaEnv=void 0;var Qe=V(),og=eo(),Wt=gt(),Je=Hr(),Tl=re(),pg=Qr(),dr=class{constructor(e){var t;this.refs={},this.dynamicAnchors={};let n;typeof e.schema=="object"&&(n=e.schema),this.schema=e.schema,this.schemaId=e.schemaId,this.root=e.root||this,this.baseId=(t=e.baseId)!==null&&t!==void 0?t:(0,Je.normalizeId)(n==null?void 0:n[e.schemaId||"$id"]),this.schemaPath=e.schemaPath,this.localRefs=e.localRefs,this.meta=e.meta,this.$async=n==null?void 0:n.$async,this.refs={}}};Ve.SchemaEnv=dr;function xp(r){let e=yl.call(this,r);if(e)return e;let t=(0,Je.getFullPath)(this.opts.uriResolver,r.root.baseId),{es5:n,lines:a}=this.opts.code,{ownProperties:s}=this.opts,i=new Qe.CodeGen(this.scope,{es5:n,lines:a,ownProperties:s}),o;r.$async&&(o=i.scopeValue("Error",{ref:og.default,code:(0,Qe._)`require("ajv/dist/runtime/validation_error").default`}));let d=i.scopeName("validate");r.validateName=d;let g={gen:i,allErrors:this.opts.allErrors,data:Wt.default.data,parentData:Wt.default.parentData,parentDataProperty:Wt.default.parentDataProperty,dataNames:[Wt.default.data],dataPathArr:[Qe.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:i.scopeValue("schema",this.opts.code.source===!0?{ref:r.schema,code:(0,Qe.stringify)(r.schema)}:{ref:r.schema}),validateName:d,ValidationError:o,schema:r.schema,schemaEnv:r,rootId:t,baseId:r.baseId||t,schemaPath:Qe.nil,errSchemaPath:r.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,Qe._)`""`,opts:this.opts,self:this},h;try{this._compilations.add(r),(0,pg.validateFunctionCode)(g),i.optimize(this.opts.code.optimize);let T=i.toString();h=`${i.scopeRefs(Wt.default.scope)}return ${T}`,this.opts.code.process&&(h=this.opts.code.process(h,r));let w=new Function(`${Wt.default.self}`,`${Wt.default.scope}`,h)(this,this.scope.get());if(this.scope.value(d,{ref:w}),w.errors=null,w.schema=r.schema,w.schemaEnv=r,r.$async&&(w.$async=!0),this.opts.code.source===!0&&(w.source={validateName:d,validateCode:T,scopeValues:i._values}),this.opts.unevaluated){let{props:b,items:$}=g;w.evaluated={props:b instanceof Qe.Name?void 0:b,items:$ instanceof Qe.Name?void 0:$,dynamicProps:b instanceof Qe.Name,dynamicItems:$ instanceof Qe.Name},w.source&&(w.source.evaluated=(0,Qe.stringify)(w.evaluated))}return r.validate=w,r}catch(T){throw delete r.validate,delete r.validateName,h&&this.logger.error("Error compiling schema, function code:",h),T}finally{this._compilations.delete(r)}}Ve.compileSchema=xp;function dg(r,e,t){var n;t=(0,Je.resolveUrl)(this.opts.uriResolver,e,t);let a=r.refs[t];if(a)return a;let s=lg.call(this,r,t);if(s===void 0){let i=(n=r.localRefs)===null||n===void 0?void 0:n[t],{schemaId:o}=this.opts;i&&(s=new dr({schema:i,schemaId:o,root:r,baseId:e}))}if(s!==void 0)return r.refs[t]=fg.call(this,s)}Ve.resolveRef=dg;function fg(r){return(0,Je.inlineRef)(r.schema,this.opts.inlineRefs)?r.schema:r.validate?r:xp.call(this,r)}function yl(r){for(let e of this._compilations)if(ug(e,r))return e}Ve.getCompilingSchema=yl;function ug(r,e){return r.schema===e.schema&&r.root===e.root&&r.baseId===e.baseId}function lg(r,e){let t;for(;typeof(t=this.refs[e])=="string";)e=t;return t||this.schemas[e]||to.call(this,r,e)}function to(r,e){let t=this.opts.uriResolver.parse(e),n=(0,Je._getFullPath)(this.opts.uriResolver,t),a=(0,Je.getFullPath)(this.opts.uriResolver,r.baseId,void 0);if(Object.keys(r.schema).length>0&&n===a)return Fp.call(this,t,r);let s=(0,Je.normalizeId)(n),i=this.refs[s]||this.schemas[s];if(typeof i=="string"){let o=to.call(this,r,i);return typeof(o==null?void 0:o.schema)!="object"?void 0:Fp.call(this,t,o)}if(typeof(i==null?void 0:i.schema)=="object"){if(i.validate||xp.call(this,i),s===(0,Je.normalizeId)(e)){let{schema:o}=i,{schemaId:d}=this.opts,g=o[d];return g&&(a=(0,Je.resolveUrl)(this.opts.uriResolver,a,g)),new dr({schema:o,schemaId:d,root:r,baseId:a})}return Fp.call(this,t,i)}}Ve.resolveSchema=to;var cg=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function Fp(r,{baseId:e,schema:t,root:n}){var a;if(((a=r.fragment)===null||a===void 0?void 0:a[0])!=="/")return;for(let o of r.fragment.slice(1).split("/")){if(typeof t=="boolean")return;let d=t[(0,Tl.unescapeFragment)(o)];if(d===void 0)return;t=d;let g=typeof t=="object"&&t[this.opts.schemaId];!cg.has(o)&&g&&(e=(0,Je.resolveUrl)(this.opts.uriResolver,e,g))}let s;if(typeof t!="boolean"&&t.$ref&&!(0,Tl.schemaHasRulesButRef)(t,this.RULES)){let o=(0,Je.resolveUrl)(this.opts.uriResolver,e,t.$ref);s=to.call(this,n,o)}let{schemaId:i}=this.opts;if(s=s||new dr({schema:t,schemaId:i,root:n,baseId:e}),s.schema!==s.root.schema)return s}});var bl=G((jI,mg)=>{mg.exports={$id:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",description:"Meta-schema for $data reference (JSON AnySchema extension proposal)",type:"object",required:["$data"],properties:{$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},additionalProperties:!1}});var xl=G((no,Fl)=>{(function(r,e){typeof no=="object"&&typeof Fl!="undefined"?e(no):typeof define=="function"&&define.amd?define(["exports"],e):e(r.URI=r.URI||{})})(no,function(r){"use strict";function e(){for(var f=arguments.length,p=Array(f),_=0;_<f;_++)p[_]=arguments[_];if(p.length>1){p[0]=p[0].slice(0,-1);for(var F=p.length-1,x=1;x<F;++x)p[x]=p[x].slice(1,-1);return p[F]=p[F].slice(1),p.join("")}else return p[0]}function t(f){return"(?:"+f+")"}function n(f){return f===void 0?"undefined":f===null?"null":Object.prototype.toString.call(f).split(" ").pop().split("]").shift().toLowerCase()}function a(f){return f.toUpperCase()}function s(f){return f!=null?f instanceof Array?f:typeof f.length!="number"||f.split||f.setInterval||f.call?[f]:Array.prototype.slice.call(f):[]}function i(f,p){var _=f;if(p)for(var F in p)_[F]=p[F];return _}function o(f){var p="[A-Za-z]",_="[\\x0D]",F="[0-9]",x="[\\x22]",S=e(F,"[A-Fa-f]"),A="[\\x0A]",Z="[\\x20]",ae=t(t("%[EFef]"+S+"%"+S+S+"%"+S+S)+"|"+t("%[89A-Fa-f]"+S+"%"+S+S)+"|"+t("%"+S+S)),Te="[\\:\\/\\?\\#\\[\\]\\@]",X="[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]",me=e(Te,X),ye=f?"[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]":"[]",ce=f?"[\\uE000-\\uF8FF]":"[]",ne=e(p,F,"[\\-\\.\\_\\~]",ye),he=t(p+e(p,F,"[\\+\\-\\.]")+"*"),ie=t(t(ae+"|"+e(ne,X,"[\\:]"))+"*"),vt=t(t("25[0-5]")+"|"+t("2[0-4]"+F)+"|"+t("1"+F+F)+"|"+t("[1-9]"+F)+"|"+F),Ee=t(t("25[0-5]")+"|"+t("2[0-4]"+F)+"|"+t("1"+F+F)+"|"+t("0?[1-9]"+F)+"|0?0?"+F),Ne=t(Ee+"\\."+Ee+"\\."+Ee+"\\."+Ee),de=t(S+"{1,4}"),Me=t(t(de+"\\:"+de)+"|"+Ne),Ue=t(t(de+"\\:")+"{6}"+Me),rt=t("\\:\\:"+t(de+"\\:")+"{5}"+Me),kt=t(t(de)+"?\\:\\:"+t(de+"\\:")+"{4}"+Me),ut=t(t(t(de+"\\:")+"{0,1}"+de)+"?\\:\\:"+t(de+"\\:")+"{3}"+Me),Or=t(t(t(de+"\\:")+"{0,2}"+de)+"?\\:\\:"+t(de+"\\:")+"{2}"+Me),Ei=t(t(t(de+"\\:")+"{0,3}"+de)+"?\\:\\:"+de+"\\:"+Me),Mi=t(t(t(de+"\\:")+"{0,4}"+de)+"?\\:\\:"+Me),Qt=t(t(t(de+"\\:")+"{0,5}"+de)+"?\\:\\:"+de),Jt=t(t(t(de+"\\:")+"{0,6}"+de)+"?\\:\\:"),lt=t([Ue,rt,kt,ut,Or,Ei,Mi,Qt,Jt].join("|")),Xt=t(t(ne+"|"+ae)+"+"),jo=t(lt+"\\%25"+Xt),St=t(lt+t("\\%25|\\%(?!"+S+"{2})")+Xt),km=t("[vV]"+S+"+\\."+e(ne,X,"[\\:]")+"+"),Sm=t("\\["+t(St+"|"+lt+"|"+km)+"\\]"),au=t(t(ae+"|"+e(ne,X))+"*"),wr=t(Sm+"|"+Ne+"(?!"+au+")|"+au),Ir=t(F+"*"),su=t(t(ie+"@")+"?"+wr+t("\\:"+Ir)+"?"),jr=t(ae+"|"+e(ne,X,"[\\:\\@]")),Cm=t(jr+"*"),iu=t(jr+"+"),Pm=t(t(ae+"|"+e(ne,X,"[\\@]"))+"+"),ct=t(t("\\/"+Cm)+"*"),Yt=t("\\/"+t(iu+ct)+"?"),vo=t(Pm+ct),Ri=t(iu+ct),Zt="(?!"+jr+")",Tw=t(ct+"|"+Yt+"|"+vo+"|"+Ri+"|"+Zt),er=t(t(jr+"|"+e("[\\/\\?]",ce))+"*"),vr=t(t(jr+"|[\\/\\?]")+"*"),ou=t(t("\\/\\/"+su+ct)+"|"+Yt+"|"+Ri+"|"+Zt),Gm=t(he+"\\:"+ou+t("\\?"+er)+"?"+t("\\#"+vr)+"?"),Dm=t(t("\\/\\/"+su+ct)+"|"+Yt+"|"+vo+"|"+Zt),Em=t(Dm+t("\\?"+er)+"?"+t("\\#"+vr)+"?"),yw=t(Gm+"|"+Em),bw=t(he+"\\:"+ou+t("\\?"+er)+"?"),Fw="^("+he+")\\:"+t(t("\\/\\/("+t("("+ie+")@")+"?("+wr+")"+t("\\:("+Ir+")")+"?)")+"?("+ct+"|"+Yt+"|"+Ri+"|"+Zt+")")+t("\\?("+er+")")+"?"+t("\\#("+vr+")")+"?$",xw="^(){0}"+t(t("\\/\\/("+t("("+ie+")@")+"?("+wr+")"+t("\\:("+Ir+")")+"?)")+"?("+ct+"|"+Yt+"|"+vo+"|"+Zt+")")+t("\\?("+er+")")+"?"+t("\\#("+vr+")")+"?$",$w="^("+he+")\\:"+t(t("\\/\\/("+t("("+ie+")@")+"?("+wr+")"+t("\\:("+Ir+")")+"?)")+"?("+ct+"|"+Yt+"|"+Ri+"|"+Zt+")")+t("\\?("+er+")")+"?$",Ow="^"+t("\\#("+vr+")")+"?$",ww="^"+t("("+ie+")@")+"?("+wr+")"+t("\\:("+Ir+")")+"?$";return{NOT_SCHEME:new RegExp(e("[^]",p,F,"[\\+\\-\\.]"),"g"),NOT_USERINFO:new RegExp(e("[^\\%\\:]",ne,X),"g"),NOT_HOST:new RegExp(e("[^\\%\\[\\]\\:]",ne,X),"g"),NOT_PATH:new RegExp(e("[^\\%\\/\\:\\@]",ne,X),"g"),NOT_PATH_NOSCHEME:new RegExp(e("[^\\%\\/\\@]",ne,X),"g"),NOT_QUERY:new RegExp(e("[^\\%]",ne,X,"[\\:\\@\\/\\?]",ce),"g"),NOT_FRAGMENT:new RegExp(e("[^\\%]",ne,X,"[\\:\\@\\/\\?]"),"g"),ESCAPE:new RegExp(e("[^]",ne,X),"g"),UNRESERVED:new RegExp(ne,"g"),OTHER_CHARS:new RegExp(e("[^\\%]",ne,me),"g"),PCT_ENCODED:new RegExp(ae,"g"),IPV4ADDRESS:new RegExp("^("+Ne+")$"),IPV6ADDRESS:new RegExp("^\\[?("+lt+")"+t(t("\\%25|\\%(?!"+S+"{2})")+"("+Xt+")")+"?\\]?$")}}var d=o(!1),g=o(!0),h=function(){function f(p,_){var F=[],x=!0,S=!1,A=void 0;try{for(var Z=p[Symbol.iterator](),ae;!(x=(ae=Z.next()).done)&&(F.push(ae.value),!(_&&F.length===_));x=!0);}catch(Te){S=!0,A=Te}finally{try{!x&&Z.return&&Z.return()}finally{if(S)throw A}}return F}return function(p,_){if(Array.isArray(p))return p;if(Symbol.iterator in Object(p))return f(p,_);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),T=function(f){if(Array.isArray(f)){for(var p=0,_=Array(f.length);p<f.length;p++)_[p]=f[p];return _}else return Array.from(f)},O=2147483647,w=36,b=1,$=26,I=38,j=700,z=72,q=128,se="-",W=/^xn--/,We=/[^\0-\x7E]/,ze=/[\x2E\u3002\uFF0E\uFF61]/g,Fr={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},It=w-b,$e=Math.floor,jt=String.fromCharCode;function Ye(f){throw new RangeError(Fr[f])}function Gi(f,p){for(var _=[],F=f.length;F--;)_[F]=p(f[F]);return _}function Di(f,p){var _=f.split("@"),F="";_.length>1&&(F=_[0]+"@",f=_[1]),f=f.replace(ze,".");var x=f.split("."),S=Gi(x,p).join(".");return F+S}function qf(f){for(var p=[],_=0,F=f.length;_<F;){var x=f.charCodeAt(_++);if(x>=55296&&x<=56319&&_<F){var S=f.charCodeAt(_++);(S&64512)==56320?p.push(((x&1023)<<10)+(S&1023)+65536):(p.push(x),_--)}else p.push(x)}return p}var im=function(p){return String.fromCodePoint.apply(String,T(p))},om=function(p){return p-48<10?p-22:p-65<26?p-65:p-97<26?p-97:w},Bf=function(p,_){return p+22+75*(p<26)-((_!=0)<<5)},L=function(p,_,F){var x=0;for(p=F?$e(p/j):p>>1,p+=$e(p/_);p>It*$>>1;x+=w)p=$e(p/It);return $e(x+(It+1)*p/(p+I))},Lf=function(p){var _=[],F=p.length,x=0,S=q,A=z,Z=p.lastIndexOf(se);Z<0&&(Z=0);for(var ae=0;ae<Z;++ae)p.charCodeAt(ae)>=128&&Ye("not-basic"),_.push(p.charCodeAt(ae));for(var Te=Z>0?Z+1:0;Te<F;){for(var X=x,me=1,ye=w;;ye+=w){Te>=F&&Ye("invalid-input");var ce=om(p.charCodeAt(Te++));(ce>=w||ce>$e((O-x)/me))&&Ye("overflow"),x+=ce*me;var ne=ye<=A?b:ye>=A+$?$:ye-A;if(ce<ne)break;var he=w-ne;me>$e(O/he)&&Ye("overflow"),me*=he}var ie=_.length+1;A=L(x-X,ie,X==0),$e(x/ie)>O-S&&Ye("overflow"),S+=$e(x/ie),x%=ie,_.splice(x++,0,S)}return String.fromCodePoint.apply(String,_)},Vf=function(p){var _=[];p=qf(p);var F=p.length,x=q,S=0,A=z,Z=!0,ae=!1,Te=void 0;try{for(var X=p[Symbol.iterator](),me;!(Z=(me=X.next()).done);Z=!0){var ye=me.value;ye<128&&_.push(jt(ye))}}catch(St){ae=!0,Te=St}finally{try{!Z&&X.return&&X.return()}finally{if(ae)throw Te}}var ce=_.length,ne=ce;for(ce&&_.push(se);ne<F;){var he=O,ie=!0,vt=!1,Ee=void 0;try{for(var Ne=p[Symbol.iterator](),de;!(ie=(de=Ne.next()).done);ie=!0){var Me=de.value;Me>=x&&Me<he&&(he=Me)}}catch(St){vt=!0,Ee=St}finally{try{!ie&&Ne.return&&Ne.return()}finally{if(vt)throw Ee}}var Ue=ne+1;he-x>$e((O-S)/Ue)&&Ye("overflow"),S+=(he-x)*Ue,x=he;var rt=!0,kt=!1,ut=void 0;try{for(var Or=p[Symbol.iterator](),Ei;!(rt=(Ei=Or.next()).done);rt=!0){var Mi=Ei.value;if(Mi<x&&++S>O&&Ye("overflow"),Mi==x){for(var Qt=S,Jt=w;;Jt+=w){var lt=Jt<=A?b:Jt>=A+$?$:Jt-A;if(Qt<lt)break;var Xt=Qt-lt,jo=w-lt;_.push(jt(Bf(lt+Xt%jo,0))),Qt=$e(Xt/jo)}_.push(jt(Bf(Qt,0))),A=L(S,Ue,ne==ce),S=0,++ne}}}catch(St){kt=!0,ut=St}finally{try{!rt&&Or.return&&Or.return()}finally{if(kt)throw ut}}++S,++x}return _.join("")},pm=function(p){return Di(p,function(_){return W.test(_)?Lf(_.slice(4).toLowerCase()):_})},dm=function(p){return Di(p,function(_){return We.test(_)?"xn--"+Vf(_):_})},Vt={version:"2.1.0",ucs2:{decode:qf,encode:im},decode:Lf,encode:Vf,toASCII:dm,toUnicode:pm},Ae={};function Ze(f){var p=f.charCodeAt(0),_=void 0;return p<16?_="%0"+p.toString(16).toUpperCase():p<128?_="%"+p.toString(16).toUpperCase():p<2048?_="%"+(p>>6|192).toString(16).toUpperCase()+"%"+(p&63|128).toString(16).toUpperCase():_="%"+(p>>12|224).toString(16).toUpperCase()+"%"+(p>>6&63|128).toString(16).toUpperCase()+"%"+(p&63|128).toString(16).toUpperCase(),_}function Ht(f){for(var p="",_=0,F=f.length;_<F;){var x=parseInt(f.substr(_+1,2),16);if(x<128)p+=String.fromCharCode(x),_+=3;else if(x>=194&&x<224){if(F-_>=6){var S=parseInt(f.substr(_+4,2),16);p+=String.fromCharCode((x&31)<<6|S&63)}else p+=f.substr(_,6);_+=6}else if(x>=224){if(F-_>=9){var A=parseInt(f.substr(_+4,2),16),Z=parseInt(f.substr(_+7,2),16);p+=String.fromCharCode((x&15)<<12|(A&63)<<6|Z&63)}else p+=f.substr(_,9);_+=9}else p+=f.substr(_,3),_+=3}return p}function $o(f,p){function _(F){var x=Ht(F);return x.match(p.UNRESERVED)?x:F}return f.scheme&&(f.scheme=String(f.scheme).replace(p.PCT_ENCODED,_).toLowerCase().replace(p.NOT_SCHEME,"")),f.userinfo!==void 0&&(f.userinfo=String(f.userinfo).replace(p.PCT_ENCODED,_).replace(p.NOT_USERINFO,Ze).replace(p.PCT_ENCODED,a)),f.host!==void 0&&(f.host=String(f.host).replace(p.PCT_ENCODED,_).toLowerCase().replace(p.NOT_HOST,Ze).replace(p.PCT_ENCODED,a)),f.path!==void 0&&(f.path=String(f.path).replace(p.PCT_ENCODED,_).replace(f.scheme?p.NOT_PATH:p.NOT_PATH_NOSCHEME,Ze).replace(p.PCT_ENCODED,a)),f.query!==void 0&&(f.query=String(f.query).replace(p.PCT_ENCODED,_).replace(p.NOT_QUERY,Ze).replace(p.PCT_ENCODED,a)),f.fragment!==void 0&&(f.fragment=String(f.fragment).replace(p.PCT_ENCODED,_).replace(p.NOT_FRAGMENT,Ze).replace(p.PCT_ENCODED,a)),f}function Oo(f){return f.replace(/^0*(.*)/,"$1")||"0"}function wo(f,p){var _=f.match(p.IPV4ADDRESS)||[],F=h(_,2),x=F[1];return x?x.split(".").map(Oo).join("."):f}function Hf(f,p){var _=f.match(p.IPV6ADDRESS)||[],F=h(_,3),x=F[1],S=F[2];if(x){for(var A=x.toLowerCase().split("::").reverse(),Z=h(A,2),ae=Z[0],Te=Z[1],X=Te?Te.split(":").map(Oo):[],me=ae.split(":").map(Oo),ye=p.IPV4ADDRESS.test(me[me.length-1]),ce=ye?7:8,ne=me.length-ce,he=Array(ce),ie=0;ie<ce;++ie)he[ie]=X[ie]||me[ne+ie]||"";ye&&(he[ce-1]=wo(he[ce-1],p));var vt=he.reduce(function(Ue,rt,kt){if(!rt||rt==="0"){var ut=Ue[Ue.length-1];ut&&ut.index+ut.length===kt?ut.length++:Ue.push({index:kt,length:1})}return Ue},[]),Ee=vt.sort(function(Ue,rt){return rt.length-Ue.length})[0],Ne=void 0;if(Ee&&Ee.length>1){var de=he.slice(0,Ee.index),Me=he.slice(Ee.index+Ee.length);Ne=de.join(":")+"::"+Me.join(":")}else Ne=he.join(":");return S&&(Ne+="%"+S),Ne}else return f}var fm=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,E="".match(/(){0}/)[1]===void 0;function dt(f){var p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},_={},F=p.iri!==!1?g:d;p.reference==="suffix"&&(f=(p.scheme?p.scheme+":":"")+"//"+f);var x=f.match(fm);if(x){E?(_.scheme=x[1],_.userinfo=x[3],_.host=x[4],_.port=parseInt(x[5],10),_.path=x[6]||"",_.query=x[7],_.fragment=x[8],isNaN(_.port)&&(_.port=x[5])):(_.scheme=x[1]||void 0,_.userinfo=f.indexOf("@")!==-1?x[3]:void 0,_.host=f.indexOf("//")!==-1?x[4]:void 0,_.port=parseInt(x[5],10),_.path=x[6]||"",_.query=f.indexOf("?")!==-1?x[7]:void 0,_.fragment=f.indexOf("#")!==-1?x[8]:void 0,isNaN(_.port)&&(_.port=f.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?x[4]:void 0)),_.host&&(_.host=Hf(wo(_.host,F),F)),_.scheme===void 0&&_.userinfo===void 0&&_.host===void 0&&_.port===void 0&&!_.path&&_.query===void 0?_.reference="same-document":_.scheme===void 0?_.reference="relative":_.fragment===void 0?_.reference="absolute":_.reference="uri",p.reference&&p.reference!=="suffix"&&p.reference!==_.reference&&(_.error=_.error||"URI is not a "+p.reference+" reference.");var S=Ae[(p.scheme||_.scheme||"").toLowerCase()];if(!p.unicodeSupport&&(!S||!S.unicodeSupport)){if(_.host&&(p.domainHost||S&&S.domainHost))try{_.host=Vt.toASCII(_.host.replace(F.PCT_ENCODED,Ht).toLowerCase())}catch(A){_.error=_.error||"Host's domain name can not be converted to ASCII via punycode: "+A}$o(_,d)}else $o(_,F);S&&S.parse&&S.parse(_,p)}else _.error=_.error||"URI can not be parsed.";return _}function um(f,p){var _=p.iri!==!1?g:d,F=[];return f.userinfo!==void 0&&(F.push(f.userinfo),F.push("@")),f.host!==void 0&&F.push(Hf(wo(String(f.host),_),_).replace(_.IPV6ADDRESS,function(x,S,A){return"["+S+(A?"%25"+A:"")+"]"})),(typeof f.port=="number"||typeof f.port=="string")&&(F.push(":"),F.push(String(f.port))),F.length?F.join(""):void 0}var zf=/^\.\.?\//,Kf=/^\/\.(\/|$)/,Qf=/^\/\.\.(\/|$)/,lm=/^\/?(?:.|\n)*?(?=\/|$)/;function zt(f){for(var p=[];f.length;)if(f.match(zf))f=f.replace(zf,"");else if(f.match(Kf))f=f.replace(Kf,"/");else if(f.match(Qf))f=f.replace(Qf,"/"),p.pop();else if(f==="."||f==="..")f="";else{var _=f.match(lm);if(_){var F=_[0];f=f.slice(F.length),p.push(F)}else throw new Error("Unexpected dot segment condition")}return p.join("")}function et(f){var p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},_=p.iri?g:d,F=[],x=Ae[(p.scheme||f.scheme||"").toLowerCase()];if(x&&x.serialize&&x.serialize(f,p),f.host&&!_.IPV6ADDRESS.test(f.host)){if(p.domainHost||x&&x.domainHost)try{f.host=p.iri?Vt.toUnicode(f.host):Vt.toASCII(f.host.replace(_.PCT_ENCODED,Ht).toLowerCase())}catch(Z){f.error=f.error||"Host's domain name can not be converted to "+(p.iri?"Unicode":"ASCII")+" via punycode: "+Z}}$o(f,_),p.reference!=="suffix"&&f.scheme&&(F.push(f.scheme),F.push(":"));var S=um(f,p);if(S!==void 0&&(p.reference!=="suffix"&&F.push("//"),F.push(S),f.path&&f.path.charAt(0)!=="/"&&F.push("/")),f.path!==void 0){var A=f.path;!p.absolutePath&&(!x||!x.absolutePath)&&(A=zt(A)),S===void 0&&(A=A.replace(/^\/\//,"/%2F")),F.push(A)}return f.query!==void 0&&(F.push("?"),F.push(f.query)),f.fragment!==void 0&&(F.push("#"),F.push(f.fragment)),F.join("")}function Jf(f,p){var _=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},F=arguments[3],x={};return F||(f=dt(et(f,_),_),p=dt(et(p,_),_)),_=_||{},!_.tolerant&&p.scheme?(x.scheme=p.scheme,x.userinfo=p.userinfo,x.host=p.host,x.port=p.port,x.path=zt(p.path||""),x.query=p.query):(p.userinfo!==void 0||p.host!==void 0||p.port!==void 0?(x.userinfo=p.userinfo,x.host=p.host,x.port=p.port,x.path=zt(p.path||""),x.query=p.query):(p.path?(p.path.charAt(0)==="/"?x.path=zt(p.path):((f.userinfo!==void 0||f.host!==void 0||f.port!==void 0)&&!f.path?x.path="/"+p.path:f.path?x.path=f.path.slice(0,f.path.lastIndexOf("/")+1)+p.path:x.path=p.path,x.path=zt(x.path)),x.query=p.query):(x.path=f.path,p.query!==void 0?x.query=p.query:x.query=f.query),x.userinfo=f.userinfo,x.host=f.host,x.port=f.port),x.scheme=f.scheme),x.fragment=p.fragment,x}function cm(f,p,_){var F=i({scheme:"null"},_);return et(Jf(dt(f,F),dt(p,F),F,!0),F)}function mm(f,p){return typeof f=="string"?f=et(dt(f,p),p):n(f)==="object"&&(f=dt(et(f,p),p)),f}function hm(f,p,_){return typeof f=="string"?f=et(dt(f,_),_):n(f)==="object"&&(f=et(f,_)),typeof p=="string"?p=et(dt(p,_),_):n(p)==="object"&&(p=et(p,_)),f===p}function _m(f,p){return f&&f.toString().replace(!p||!p.iri?d.ESCAPE:g.ESCAPE,Ze)}function ft(f,p){return f&&f.toString().replace(!p||!p.iri?d.PCT_ENCODED:g.PCT_ENCODED,Ht)}var xr={scheme:"http",domainHost:!0,parse:function(p,_){return p.host||(p.error=p.error||"HTTP URIs must have a host."),p},serialize:function(p,_){var F=String(p.scheme).toLowerCase()==="https";return(p.port===(F?443:80)||p.port==="")&&(p.port=void 0),p.path||(p.path="/"),p}},Xf={scheme:"https",domainHost:xr.domainHost,parse:xr.parse,serialize:xr.serialize};function Yf(f){return typeof f.secure=="boolean"?f.secure:String(f.scheme).toLowerCase()==="wss"}var $r={scheme:"ws",domainHost:!0,parse:function(p,_){var F=p;return F.secure=Yf(F),F.resourceName=(F.path||"/")+(F.query?"?"+F.query:""),F.path=void 0,F.query=void 0,F},serialize:function(p,_){if((p.port===(Yf(p)?443:80)||p.port==="")&&(p.port=void 0),typeof p.secure=="boolean"&&(p.scheme=p.secure?"wss":"ws",p.secure=void 0),p.resourceName){var F=p.resourceName.split("?"),x=h(F,2),S=x[0],A=x[1];p.path=S&&S!=="/"?S:void 0,p.query=A,p.resourceName=void 0}return p.fragment=void 0,p}},k={scheme:"wss",domainHost:$r.domainHost,parse:$r.parse,serialize:$r.serialize},gm={},Tm=!0,Zf="[A-Za-z0-9\\-\\.\\_\\~"+(Tm?"\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF":"")+"]",tt="[0-9A-Fa-f]",ym=t(t("%[EFef]"+tt+"%"+tt+tt+"%"+tt+tt)+"|"+t("%[89A-Fa-f]"+tt+"%"+tt+tt)+"|"+t("%"+tt+tt)),bm="[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]",Fm="[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",xm=e(Fm,'[\\"\\\\]'),$m="[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]",Om=new RegExp(Zf,"g"),Kt=new RegExp(ym,"g"),wm=new RegExp(e("[^]",bm,"[\\.]",'[\\"]',xm),"g"),eu=new RegExp(e("[^]",Zf,$m),"g"),Im=eu;function Io(f){var p=Ht(f);return p.match(Om)?p:f}var tu={scheme:"mailto",parse:function(p,_){var F=p,x=F.to=F.path?F.path.split(","):[];if(F.path=void 0,F.query){for(var S=!1,A={},Z=F.query.split("&"),ae=0,Te=Z.length;ae<Te;++ae){var X=Z[ae].split("=");switch(X[0]){case"to":for(var me=X[1].split(","),ye=0,ce=me.length;ye<ce;++ye)x.push(me[ye]);break;case"subject":F.subject=ft(X[1],_);break;case"body":F.body=ft(X[1],_);break;default:S=!0,A[ft(X[0],_)]=ft(X[1],_);break}}S&&(F.headers=A)}F.query=void 0;for(var ne=0,he=x.length;ne<he;++ne){var ie=x[ne].split("@");if(ie[0]=ft(ie[0]),_.unicodeSupport)ie[1]=ft(ie[1],_).toLowerCase();else try{ie[1]=Vt.toASCII(ft(ie[1],_).toLowerCase())}catch(vt){F.error=F.error||"Email address's domain name can not be converted to ASCII via punycode: "+vt}x[ne]=ie.join("@")}return F},serialize:function(p,_){var F=p,x=s(p.to);if(x){for(var S=0,A=x.length;S<A;++S){var Z=String(x[S]),ae=Z.lastIndexOf("@"),Te=Z.slice(0,ae).replace(Kt,Io).replace(Kt,a).replace(wm,Ze),X=Z.slice(ae+1);try{X=_.iri?Vt.toUnicode(X):Vt.toASCII(ft(X,_).toLowerCase())}catch(ne){F.error=F.error||"Email address's domain name can not be converted to "+(_.iri?"Unicode":"ASCII")+" via punycode: "+ne}x[S]=Te+"@"+X}F.path=x.join(",")}var me=p.headers=p.headers||{};p.subject&&(me.subject=p.subject),p.body&&(me.body=p.body);var ye=[];for(var ce in me)me[ce]!==gm[ce]&&ye.push(ce.replace(Kt,Io).replace(Kt,a).replace(eu,Ze)+"="+me[ce].replace(Kt,Io).replace(Kt,a).replace(Im,Ze));return ye.length&&(F.query=ye.join("&")),F}},jm=/^([^\:]+)\:(.*)/,ru={scheme:"urn",parse:function(p,_){var F=p.path&&p.path.match(jm),x=p;if(F){var S=_.scheme||x.scheme||"urn",A=F[1].toLowerCase(),Z=F[2],ae=S+":"+(_.nid||A),Te=Ae[ae];x.nid=A,x.nss=Z,x.path=void 0,Te&&(x=Te.parse(x,_))}else x.error=x.error||"URN can not be parsed.";return x},serialize:function(p,_){var F=_.scheme||p.scheme||"urn",x=p.nid,S=F+":"+(_.nid||x),A=Ae[S];A&&(p=A.serialize(p,_));var Z=p,ae=p.nss;return Z.path=(x||_.nid)+":"+ae,Z}},vm=/^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/,nu={scheme:"urn:uuid",parse:function(p,_){var F=p;return F.uuid=F.nss,F.nss=void 0,!_.tolerant&&(!F.uuid||!F.uuid.match(vm))&&(F.error=F.error||"UUID is not valid."),F},serialize:function(p,_){var F=p;return F.nss=(p.uuid||"").toLowerCase(),F}};Ae[xr.scheme]=xr,Ae[Xf.scheme]=Xf,Ae[$r.scheme]=$r,Ae[k.scheme]=k,Ae[tu.scheme]=tu,Ae[ru.scheme]=ru,Ae[nu.scheme]=nu,r.SCHEMES=Ae,r.pctEncChar=Ze,r.pctDecChars=Ht,r.parse=dt,r.removeDotSegments=zt,r.serialize=et,r.resolveComponents=Jf,r.resolve=cm,r.normalize=mm,r.equal=hm,r.escapeComponent=_m,r.unescapeComponent=ft,Object.defineProperty(r,"__esModule",{value:!0})})});var Ol=G($p=>{"use strict";Object.defineProperty($p,"__esModule",{value:!0});var $l=xl();$l.code='require("ajv/dist/runtime/uri").default';$p.default=$l});var Pl=G(Fe=>{"use strict";Object.defineProperty(Fe,"__esModule",{value:!0});Fe.CodeGen=Fe.Name=Fe.nil=Fe.stringify=Fe.str=Fe._=Fe.KeywordCxt=void 0;var hg=Qr();Object.defineProperty(Fe,"KeywordCxt",{enumerable:!0,get:function(){return hg.KeywordCxt}});var fr=V();Object.defineProperty(Fe,"_",{enumerable:!0,get:function(){return fr._}});Object.defineProperty(Fe,"str",{enumerable:!0,get:function(){return fr.str}});Object.defineProperty(Fe,"stringify",{enumerable:!0,get:function(){return fr.stringify}});Object.defineProperty(Fe,"nil",{enumerable:!0,get:function(){return fr.nil}});Object.defineProperty(Fe,"Name",{enumerable:!0,get:function(){return fr.Name}});Object.defineProperty(Fe,"CodeGen",{enumerable:!0,get:function(){return fr.CodeGen}});var _g=eo(),kl=Jr(),gg=np(),Xr=ro(),Tg=V(),Yr=Hr(),ao=Vr(),wp=re(),wl=bl(),yg=Ol(),Sl=(r,e)=>new RegExp(r,e);Sl.code="new RegExp";var bg=["removeAdditional","useDefaults","coerceTypes"],Fg=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),xg={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},$g={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},Il=200;function Og(r){var e,t,n,a,s,i,o,d,g,h,T,O,w,b,$,I,j,z,q,se,W,We,ze,Fr,It;let $e=r.strict,jt=(e=r.code)===null||e===void 0?void 0:e.optimize,Ye=jt===!0||jt===void 0?1:jt||0,Gi=(n=(t=r.code)===null||t===void 0?void 0:t.regExp)!==null&&n!==void 0?n:Sl,Di=(a=r.uriResolver)!==null&&a!==void 0?a:yg.default;return{strictSchema:(i=(s=r.strictSchema)!==null&&s!==void 0?s:$e)!==null&&i!==void 0?i:!0,strictNumbers:(d=(o=r.strictNumbers)!==null&&o!==void 0?o:$e)!==null&&d!==void 0?d:!0,strictTypes:(h=(g=r.strictTypes)!==null&&g!==void 0?g:$e)!==null&&h!==void 0?h:"log",strictTuples:(O=(T=r.strictTuples)!==null&&T!==void 0?T:$e)!==null&&O!==void 0?O:"log",strictRequired:(b=(w=r.strictRequired)!==null&&w!==void 0?w:$e)!==null&&b!==void 0?b:!1,code:r.code?ee(P({},r.code),{optimize:Ye,regExp:Gi}):{optimize:Ye,regExp:Gi},loopRequired:($=r.loopRequired)!==null&&$!==void 0?$:Il,loopEnum:(I=r.loopEnum)!==null&&I!==void 0?I:Il,meta:(j=r.meta)!==null&&j!==void 0?j:!0,messages:(z=r.messages)!==null&&z!==void 0?z:!0,inlineRefs:(q=r.inlineRefs)!==null&&q!==void 0?q:!0,schemaId:(se=r.schemaId)!==null&&se!==void 0?se:"$id",addUsedSchema:(W=r.addUsedSchema)!==null&&W!==void 0?W:!0,validateSchema:(We=r.validateSchema)!==null&&We!==void 0?We:!0,validateFormats:(ze=r.validateFormats)!==null&&ze!==void 0?ze:!0,unicodeRegExp:(Fr=r.unicodeRegExp)!==null&&Fr!==void 0?Fr:!0,int32range:(It=r.int32range)!==null&&It!==void 0?It:!0,uriResolver:Di}}var Zr=class{constructor(e={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,e=this.opts=P(P({},e),Og(e));let{es5:t,lines:n}=this.opts.code;this.scope=new Tg.ValueScope({scope:{},prefixes:Fg,es5:t,lines:n}),this.logger=Sg(e.logger);let a=e.validateFormats;e.validateFormats=!1,this.RULES=(0,gg.getRules)(),jl.call(this,xg,e,"NOT SUPPORTED"),jl.call(this,$g,e,"DEPRECATED","warn"),this._metaOpts=vg.call(this),e.formats&&Ig.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),e.keywords&&jg.call(this,e.keywords),typeof e.meta=="object"&&this.addMetaSchema(e.meta),wg.call(this),e.validateFormats=a}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){let{$data:e,meta:t,schemaId:n}=this.opts,a=wl;n==="id"&&(a=P({},wl),a.id=a.$id,delete a.$id),t&&e&&this.addMetaSchema(a,a[n],!1)}defaultMeta(){let{meta:e,schemaId:t}=this.opts;return this.opts.defaultMeta=typeof e=="object"?e[t]||e:void 0}validate(e,t){let n;if(typeof e=="string"){if(n=this.getSchema(e),!n)throw new Error(`no schema with key or ref "${e}"`)}else n=this.compile(e);let a=n(t);return"$async"in n||(this.errors=n.errors),a}compile(e,t){let n=this._addSchema(e,t);return n.validate||this._compileSchemaEnv(n)}compileAsync(e,t){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");let{loadSchema:n}=this.opts;return a.call(this,e,t);function a(h,T){return _e(this,null,function*(){yield s.call(this,h.$schema);let O=this._addSchema(h,T);return O.validate||i.call(this,O)})}function s(h){return _e(this,null,function*(){h&&!this.getSchema(h)&&(yield a.call(this,{$ref:h},!0))})}function i(h){return _e(this,null,function*(){try{return this._compileSchemaEnv(h)}catch(T){if(!(T instanceof kl.default))throw T;return o.call(this,T),yield d.call(this,T.missingSchema),i.call(this,h)}})}function o({missingSchema:h,missingRef:T}){if(this.refs[h])throw new Error(`AnySchema ${h} is loaded but ${T} cannot be resolved`)}function d(h){return _e(this,null,function*(){let T=yield g.call(this,h);this.refs[h]||(yield s.call(this,T.$schema)),this.refs[h]||this.addSchema(T,h,t)})}function g(h){return _e(this,null,function*(){let T=this._loading[h];if(T)return T;try{return yield this._loading[h]=n(h)}finally{delete this._loading[h]}})}}addSchema(e,t,n,a=this.opts.validateSchema){if(Array.isArray(e)){for(let i of e)this.addSchema(i,void 0,n,a);return this}let s;if(typeof e=="object"){let{schemaId:i}=this.opts;if(s=e[i],s!==void 0&&typeof s!="string")throw new Error(`schema ${i} must be string`)}return t=(0,Yr.normalizeId)(t||s),this._checkUnique(t),this.schemas[t]=this._addSchema(e,n,t,a,!0),this}addMetaSchema(e,t,n=this.opts.validateSchema){return this.addSchema(e,t,!0,n),this}validateSchema(e,t){if(typeof e=="boolean")return!0;let n;if(n=e.$schema,n!==void 0&&typeof n!="string")throw new Error("$schema must be a string");if(n=n||this.opts.defaultMeta||this.defaultMeta(),!n)return this.logger.warn("meta-schema not available"),this.errors=null,!0;let a=this.validate(n,e);if(!a&&t){let s="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(s);else throw new Error(s)}return a}getSchema(e){let t;for(;typeof(t=vl.call(this,e))=="string";)e=t;if(t===void 0){let{schemaId:n}=this.opts,a=new Xr.SchemaEnv({schema:{},schemaId:n});if(t=Xr.resolveSchema.call(this,a,e),!t)return;this.refs[e]=t}return t.validate||this._compileSchemaEnv(t)}removeSchema(e){if(e instanceof RegExp)return this._removeAllSchemas(this.schemas,e),this._removeAllSchemas(this.refs,e),this;switch(typeof e){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{let t=vl.call(this,e);return typeof t=="object"&&this._cache.delete(t.schema),delete this.schemas[e],delete this.refs[e],this}case"object":{let t=e;this._cache.delete(t);let n=e[this.opts.schemaId];return n&&(n=(0,Yr.normalizeId)(n),delete this.schemas[n],delete this.refs[n]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(e){for(let t of e)this.addKeyword(t);return this}addKeyword(e,t){let n;if(typeof e=="string")n=e,typeof t=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),t.keyword=n);else if(typeof e=="object"&&t===void 0){if(t=e,n=t.keyword,Array.isArray(n)&&!n.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(Pg.call(this,n,t),!t)return(0,wp.eachItem)(n,s=>Op.call(this,s)),this;Dg.call(this,t);let a=ee(P({},t),{type:(0,ao.getJSONTypes)(t.type),schemaType:(0,ao.getJSONTypes)(t.schemaType)});return(0,wp.eachItem)(n,a.type.length===0?s=>Op.call(this,s,a):s=>a.type.forEach(i=>Op.call(this,s,a,i))),this}getKeyword(e){let t=this.RULES.all[e];return typeof t=="object"?t.definition:!!t}removeKeyword(e){let{RULES:t}=this;delete t.keywords[e],delete t.all[e];for(let n of t.rules){let a=n.rules.findIndex(s=>s.keyword===e);a>=0&&n.rules.splice(a,1)}return this}addFormat(e,t){return typeof t=="string"&&(t=new RegExp(t)),this.formats[e]=t,this}errorsText(e=this.errors,{separator:t=", ",dataVar:n="data"}={}){return!e||e.length===0?"No errors":e.map(a=>`${n}${a.instancePath} ${a.message}`).reduce((a,s)=>a+t+s)}$dataMetaSchema(e,t){let n=this.RULES.all;e=JSON.parse(JSON.stringify(e));for(let a of t){let s=a.split("/").slice(1),i=e;for(let o of s)i=i[o];for(let o in n){let d=n[o];if(typeof d!="object")continue;let{$data:g}=d.definition,h=i[o];g&&h&&(i[o]=Cl(h))}}return e}_removeAllSchemas(e,t){for(let n in e){let a=e[n];(!t||t.test(n))&&(typeof a=="string"?delete e[n]:a&&!a.meta&&(this._cache.delete(a.schema),delete e[n]))}}_addSchema(e,t,n,a=this.opts.validateSchema,s=this.opts.addUsedSchema){let i,{schemaId:o}=this.opts;if(typeof e=="object")i=e[o];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof e!="boolean")throw new Error("schema must be object or boolean")}let d=this._cache.get(e);if(d!==void 0)return d;n=(0,Yr.normalizeId)(i||n);let g=Yr.getSchemaRefs.call(this,e,n);return d=new Xr.SchemaEnv({schema:e,schemaId:o,meta:t,baseId:n,localRefs:g}),this._cache.set(d.schema,d),s&&!n.startsWith("#")&&(n&&this._checkUnique(n),this.refs[n]=d),a&&this.validateSchema(e,!0),d}_checkUnique(e){if(this.schemas[e]||this.refs[e])throw new Error(`schema with key or id "${e}" already exists`)}_compileSchemaEnv(e){if(e.meta?this._compileMetaSchema(e):Xr.compileSchema.call(this,e),!e.validate)throw new Error("ajv implementation error");return e.validate}_compileMetaSchema(e){let t=this.opts;this.opts=this._metaOpts;try{Xr.compileSchema.call(this,e)}finally{this.opts=t}}};Zr.ValidationError=_g.default;Zr.MissingRefError=kl.default;Fe.default=Zr;function jl(r,e,t,n="error"){for(let a in r){let s=a;s in e&&this.logger[n](`${t}: option ${a}. ${r[s]}`)}}function vl(r){return r=(0,Yr.normalizeId)(r),this.schemas[r]||this.refs[r]}function wg(){let r=this.opts.schemas;if(r)if(Array.isArray(r))this.addSchema(r);else for(let e in r)this.addSchema(r[e],e)}function Ig(){for(let r in this.opts.formats){let e=this.opts.formats[r];e&&this.addFormat(r,e)}}function jg(r){if(Array.isArray(r)){this.addVocabulary(r);return}this.logger.warn("keywords option as map is deprecated, pass array");for(let e in r){let t=r[e];t.keyword||(t.keyword=e),this.addKeyword(t)}}function vg(){let r=P({},this.opts);for(let e of bg)delete r[e];return r}var kg={log(){},warn(){},error(){}};function Sg(r){if(r===!1)return kg;if(r===void 0)return console;if(r.log&&r.warn&&r.error)return r;throw new Error("logger must implement log, warn and error methods")}var Cg=/^[a-z_$][a-z0-9_$:-]*$/i;function Pg(r,e){let{RULES:t}=this;if((0,wp.eachItem)(r,n=>{if(t.keywords[n])throw new Error(`Keyword ${n} is already defined`);if(!Cg.test(n))throw new Error(`Keyword ${n} has invalid name`)}),!!e&&e.$data&&!("code"in e||"validate"in e))throw new Error('$data keyword must have "code" or "validate" function')}function Op(r,e,t){var n;let a=e==null?void 0:e.post;if(t&&a)throw new Error('keyword with "post" flag cannot have "type"');let{RULES:s}=this,i=a?s.post:s.rules.find(({type:d})=>d===t);if(i||(i={type:t,rules:[]},s.rules.push(i)),s.keywords[r]=!0,!e)return;let o={keyword:r,definition:ee(P({},e),{type:(0,ao.getJSONTypes)(e.type),schemaType:(0,ao.getJSONTypes)(e.schemaType)})};e.before?Gg.call(this,i,o,e.before):i.rules.push(o),s.all[r]=o,(n=e.implements)===null||n===void 0||n.forEach(d=>this.addKeyword(d))}function Gg(r,e,t){let n=r.rules.findIndex(a=>a.keyword===t);n>=0?r.rules.splice(n,0,e):(r.rules.push(e),this.logger.warn(`rule ${t} is not defined`))}function Dg(r){let{metaSchema:e}=r;e!==void 0&&(r.$data&&this.opts.$data&&(e=Cl(e)),r.validateSchema=this.compile(e,!0))}var Eg={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function Cl(r){return{anyOf:[r,Eg]}}});var Gl=G(Ip=>{"use strict";Object.defineProperty(Ip,"__esModule",{value:!0});var Mg={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};Ip.default=Mg});var Rl=G(At=>{"use strict";Object.defineProperty(At,"__esModule",{value:!0});At.callRef=At.getValidate=void 0;var Rg=Jr(),Dl=Le(),Ge=V(),ur=gt(),El=ro(),so=re(),Wg={keyword:"$ref",schemaType:"string",code(r){let{gen:e,schema:t,it:n}=r,{baseId:a,schemaEnv:s,validateName:i,opts:o,self:d}=n,{root:g}=s;if((t==="#"||t==="#/")&&a===g.baseId)return T();let h=El.resolveRef.call(d,g,a,t);if(h===void 0)throw new Rg.default(n.opts.uriResolver,a,t);if(h instanceof El.SchemaEnv)return O(h);return w(h);function T(){if(s===g)return io(r,i,s,s.$async);let b=e.scopeValue("root",{ref:g});return io(r,(0,Ge._)`${b}.validate`,g,g.$async)}function O(b){let $=Ml(r,b);io(r,$,b,b.$async)}function w(b){let $=e.scopeValue("schema",o.code.source===!0?{ref:b,code:(0,Ge.stringify)(b)}:{ref:b}),I=e.name("valid"),j=r.subschema({schema:b,dataTypes:[],schemaPath:Ge.nil,topSchemaRef:$,errSchemaPath:t},I);r.mergeEvaluated(j),r.ok(I)}}};function Ml(r,e){let{gen:t}=r;return e.validate?t.scopeValue("validate",{ref:e.validate}):(0,Ge._)`${t.scopeValue("wrapper",{ref:e})}.validate`}At.getValidate=Ml;function io(r,e,t,n){let{gen:a,it:s}=r,{allErrors:i,schemaEnv:o,opts:d}=s,g=d.passContext?ur.default.this:Ge.nil;n?h():T();function h(){if(!o.$async)throw new Error("async schema referenced by sync schema");let b=a.let("valid");a.try(()=>{a.code((0,Ge._)`await ${(0,Dl.callValidateCode)(r,e,g)}`),w(e),i||a.assign(b,!0)},$=>{a.if((0,Ge._)`!(${$} instanceof ${s.ValidationError})`,()=>a.throw($)),O($),i||a.assign(b,!1)}),r.ok(b)}function T(){r.result((0,Dl.callValidateCode)(r,e,g),()=>w(e),()=>O(e))}function O(b){let $=(0,Ge._)`${b}.errors`;a.assign(ur.default.vErrors,(0,Ge._)`${ur.default.vErrors} === null ? ${$} : ${ur.default.vErrors}.concat(${$})`),a.assign(ur.default.errors,(0,Ge._)`${ur.default.vErrors}.length`)}function w(b){var $;if(!s.opts.unevaluated)return;let I=($=t==null?void 0:t.validate)===null||$===void 0?void 0:$.evaluated;if(s.props!==!0)if(I&&!I.dynamicProps)I.props!==void 0&&(s.props=so.mergeEvaluated.props(a,I.props,s.props));else{let j=a.var("props",(0,Ge._)`${b}.evaluated.props`);s.props=so.mergeEvaluated.props(a,j,s.props,Ge.Name)}if(s.items!==!0)if(I&&!I.dynamicItems)I.items!==void 0&&(s.items=so.mergeEvaluated.items(a,I.items,s.items));else{let j=a.var("items",(0,Ge._)`${b}.evaluated.items`);s.items=so.mergeEvaluated.items(a,j,s.items,Ge.Name)}}}At.callRef=io;At.default=Wg});var Wl=G(jp=>{"use strict";Object.defineProperty(jp,"__esModule",{value:!0});var Ag=Gl(),Ng=Rl(),Ug=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",Ag.default,Ng.default];jp.default=Ug});var Al=G(vp=>{"use strict";Object.defineProperty(vp,"__esModule",{value:!0});var oo=V(),wt=oo.operators,po={maximum:{okStr:"<=",ok:wt.LTE,fail:wt.GT},minimum:{okStr:">=",ok:wt.GTE,fail:wt.LT},exclusiveMaximum:{okStr:"<",ok:wt.LT,fail:wt.GTE},exclusiveMinimum:{okStr:">",ok:wt.GT,fail:wt.LTE}},qg={message:({keyword:r,schemaCode:e})=>(0,oo.str)`must be ${po[r].okStr} ${e}`,params:({keyword:r,schemaCode:e})=>(0,oo._)`{comparison: ${po[r].okStr}, limit: ${e}}`},Bg={keyword:Object.keys(po),type:"number",schemaType:"number",$data:!0,error:qg,code(r){let{keyword:e,data:t,schemaCode:n}=r;r.fail$data((0,oo._)`${t} ${po[e].fail} ${n} || isNaN(${t})`)}};vp.default=Bg});var Nl=G(kp=>{"use strict";Object.defineProperty(kp,"__esModule",{value:!0});var en=V(),Lg={message:({schemaCode:r})=>(0,en.str)`must be multiple of ${r}`,params:({schemaCode:r})=>(0,en._)`{multipleOf: ${r}}`},Vg={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:Lg,code(r){let{gen:e,data:t,schemaCode:n,it:a}=r,s=a.opts.multipleOfPrecision,i=e.let("res"),o=s?(0,en._)`Math.abs(Math.round(${i}) - ${i}) > 1e-${s}`:(0,en._)`${i} !== parseInt(${i})`;r.fail$data((0,en._)`(${n} === 0 || (${i} = ${t}/${n}, ${o}))`)}};kp.default=Vg});var ql=G(Sp=>{"use strict";Object.defineProperty(Sp,"__esModule",{value:!0});function Ul(r){let e=r.length,t=0,n=0,a;for(;n<e;)t++,a=r.charCodeAt(n++),a>=55296&&a<=56319&&n<e&&(a=r.charCodeAt(n),(a&64512)===56320&&n++);return t}Sp.default=Ul;Ul.code='require("ajv/dist/runtime/ucs2length").default'});var Bl=G(Cp=>{"use strict";Object.defineProperty(Cp,"__esModule",{value:!0});var Nt=V(),Hg=re(),zg=ql(),Kg={message({keyword:r,schemaCode:e}){let t=r==="maxLength"?"more":"fewer";return(0,Nt.str)`must NOT have ${t} than ${e} characters`},params:({schemaCode:r})=>(0,Nt._)`{limit: ${r}}`},Qg={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:Kg,code(r){let{keyword:e,data:t,schemaCode:n,it:a}=r,s=e==="maxLength"?Nt.operators.GT:Nt.operators.LT,i=a.opts.unicode===!1?(0,Nt._)`${t}.length`:(0,Nt._)`${(0,Hg.useFunc)(r.gen,zg.default)}(${t})`;r.fail$data((0,Nt._)`${i} ${s} ${n}`)}};Cp.default=Qg});var Ll=G(Pp=>{"use strict";Object.defineProperty(Pp,"__esModule",{value:!0});var Jg=Le(),fo=V(),Xg={message:({schemaCode:r})=>(0,fo.str)`must match pattern "${r}"`,params:({schemaCode:r})=>(0,fo._)`{pattern: ${r}}`},Yg={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:Xg,code(r){let{data:e,$data:t,schema:n,schemaCode:a,it:s}=r,i=s.opts.unicodeRegExp?"u":"",o=t?(0,fo._)`(new RegExp(${a}, ${i}))`:(0,Jg.usePattern)(r,n);r.fail$data((0,fo._)`!${o}.test(${e})`)}};Pp.default=Yg});var Vl=G(Gp=>{"use strict";Object.defineProperty(Gp,"__esModule",{value:!0});var tn=V(),Zg={message({keyword:r,schemaCode:e}){let t=r==="maxProperties"?"more":"fewer";return(0,tn.str)`must NOT have ${t} than ${e} properties`},params:({schemaCode:r})=>(0,tn._)`{limit: ${r}}`},eT={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:Zg,code(r){let{keyword:e,data:t,schemaCode:n}=r,a=e==="maxProperties"?tn.operators.GT:tn.operators.LT;r.fail$data((0,tn._)`Object.keys(${t}).length ${a} ${n}`)}};Gp.default=eT});var Hl=G(Dp=>{"use strict";Object.defineProperty(Dp,"__esModule",{value:!0});var rn=Le(),nn=V(),tT=re(),rT={message:({params:{missingProperty:r}})=>(0,nn.str)`must have required property '${r}'`,params:({params:{missingProperty:r}})=>(0,nn._)`{missingProperty: ${r}}`},nT={keyword:"required",type:"object",schemaType:"array",$data:!0,error:rT,code(r){let{gen:e,schema:t,schemaCode:n,data:a,$data:s,it:i}=r,{opts:o}=i;if(!s&&t.length===0)return;let d=t.length>=o.loopRequired;if(i.allErrors?g():h(),o.strictRequired){let w=r.parentSchema.properties,{definedProperties:b}=r.it;for(let $ of t)if((w==null?void 0:w[$])===void 0&&!b.has($)){let I=i.schemaEnv.baseId+i.errSchemaPath,j=`required property "${$}" is not defined at "${I}" (strictRequired)`;(0,tT.checkStrictMode)(i,j,i.opts.strictRequired)}}function g(){if(d||s)r.block$data(nn.nil,T);else for(let w of t)(0,rn.checkReportMissingProp)(r,w)}function h(){let w=e.let("missing");if(d||s){let b=e.let("valid",!0);r.block$data(b,()=>O(w,b)),r.ok(b)}else e.if((0,rn.checkMissingProp)(r,t,w)),(0,rn.reportMissingProp)(r,w),e.else()}function T(){e.forOf("prop",n,w=>{r.setParams({missingProperty:w}),e.if((0,rn.noPropertyInData)(e,a,w,o.ownProperties),()=>r.error())})}function O(w,b){r.setParams({missingProperty:w}),e.forOf(w,n,()=>{e.assign(b,(0,rn.propertyInData)(e,a,w,o.ownProperties)),e.if((0,nn.not)(b),()=>{r.error(),e.break()})},nn.nil)}}};Dp.default=nT});var zl=G(Ep=>{"use strict";Object.defineProperty(Ep,"__esModule",{value:!0});var an=V(),aT={message({keyword:r,schemaCode:e}){let t=r==="maxItems"?"more":"fewer";return(0,an.str)`must NOT have ${t} than ${e} items`},params:({schemaCode:r})=>(0,an._)`{limit: ${r}}`},sT={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:aT,code(r){let{keyword:e,data:t,schemaCode:n}=r,a=e==="maxItems"?an.operators.GT:an.operators.LT;r.fail$data((0,an._)`${t}.length ${a} ${n}`)}};Ep.default=sT});var uo=G(Mp=>{"use strict";Object.defineProperty(Mp,"__esModule",{value:!0});var Kl=up();Kl.code='require("ajv/dist/runtime/equal").default';Mp.default=Kl});var Ql=G(Wp=>{"use strict";Object.defineProperty(Wp,"__esModule",{value:!0});var Rp=Vr(),xe=V(),iT=re(),oT=uo(),pT={message:({params:{i:r,j:e}})=>(0,xe.str)`must NOT have duplicate items (items ## ${e} and ${r} are identical)`,params:({params:{i:r,j:e}})=>(0,xe._)`{i: ${r}, j: ${e}}`},dT={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:pT,code(r){let{gen:e,data:t,$data:n,schema:a,parentSchema:s,schemaCode:i,it:o}=r;if(!n&&!a)return;let d=e.let("valid"),g=s.items?(0,Rp.getSchemaTypes)(s.items):[];r.block$data(d,h,(0,xe._)`${i} === false`),r.ok(d);function h(){let b=e.let("i",(0,xe._)`${t}.length`),$=e.let("j");r.setParams({i:b,j:$}),e.assign(d,!0),e.if((0,xe._)`${b} > 1`,()=>(T()?O:w)(b,$))}function T(){return g.length>0&&!g.some(b=>b==="object"||b==="array")}function O(b,$){let I=e.name("item"),j=(0,Rp.checkDataTypes)(g,I,o.opts.strictNumbers,Rp.DataType.Wrong),z=e.const("indices",(0,xe._)`{}`);e.for((0,xe._)`;${b}--;`,()=>{e.let(I,(0,xe._)`${t}[${b}]`),e.if(j,(0,xe._)`continue`),g.length>1&&e.if((0,xe._)`typeof ${I} == "string"`,(0,xe._)`${I} += "_"`),e.if((0,xe._)`typeof ${z}[${I}] == "number"`,()=>{e.assign($,(0,xe._)`${z}[${I}]`),r.error(),e.assign(d,!1).break()}).code((0,xe._)`${z}[${I}] = ${b}`)})}function w(b,$){let I=(0,iT.useFunc)(e,oT.default),j=e.name("outer");e.label(j).for((0,xe._)`;${b}--;`,()=>e.for((0,xe._)`${$} = ${b}; ${$}--;`,()=>e.if((0,xe._)`${I}(${t}[${b}], ${t}[${$}])`,()=>{r.error(),e.assign(d,!1).break(j)})))}}};Wp.default=dT});var Jl=G(Np=>{"use strict";Object.defineProperty(Np,"__esModule",{value:!0});var Ap=V(),fT=re(),uT=uo(),lT={message:"must be equal to constant",params:({schemaCode:r})=>(0,Ap._)`{allowedValue: ${r}}`},cT={keyword:"const",$data:!0,error:lT,code(r){let{gen:e,data:t,$data:n,schemaCode:a,schema:s}=r;n||s&&typeof s=="object"?r.fail$data((0,Ap._)`!${(0,fT.useFunc)(e,uT.default)}(${t}, ${a})`):r.fail((0,Ap._)`${s} !== ${t}`)}};Np.default=cT});var Xl=G(Up=>{"use strict";Object.defineProperty(Up,"__esModule",{value:!0});var sn=V(),mT=re(),hT=uo(),_T={message:"must be equal to one of the allowed values",params:({schemaCode:r})=>(0,sn._)`{allowedValues: ${r}}`},gT={keyword:"enum",schemaType:"array",$data:!0,error:_T,code(r){let{gen:e,data:t,$data:n,schema:a,schemaCode:s,it:i}=r;if(!n&&a.length===0)throw new Error("enum must have non-empty array");let o=a.length>=i.opts.loopEnum,d,g=()=>d!=null?d:d=(0,mT.useFunc)(e,hT.default),h;if(o||n)h=e.let("valid"),r.block$data(h,T);else{if(!Array.isArray(a))throw new Error("ajv implementation error");let w=e.const("vSchema",s);h=(0,sn.or)(...a.map((b,$)=>O(w,$)))}r.pass(h);function T(){e.assign(h,!1),e.forOf("v",s,w=>e.if((0,sn._)`${g()}(${t}, ${w})`,()=>e.assign(h,!0).break()))}function O(w,b){let $=a[b];return typeof $=="object"&&$!==null?(0,sn._)`${g()}(${t}, ${w}[${b}])`:(0,sn._)`${t} === ${$}`}}};Up.default=gT});var Yl=G(qp=>{"use strict";Object.defineProperty(qp,"__esModule",{value:!0});var TT=Al(),yT=Nl(),bT=Bl(),FT=Ll(),xT=Vl(),$T=Hl(),OT=zl(),wT=Ql(),IT=Jl(),jT=Xl(),vT=[TT.default,yT.default,bT.default,FT.default,xT.default,$T.default,OT.default,wT.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},IT.default,jT.default];qp.default=vT});var Lp=G(on=>{"use strict";Object.defineProperty(on,"__esModule",{value:!0});on.validateAdditionalItems=void 0;var Ut=V(),Bp=re(),kT={message:({params:{len:r}})=>(0,Ut.str)`must NOT have more than ${r} items`,params:({params:{len:r}})=>(0,Ut._)`{limit: ${r}}`},ST={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:kT,code(r){let{parentSchema:e,it:t}=r,{items:n}=e;if(!Array.isArray(n)){(0,Bp.checkStrictMode)(t,'"additionalItems" is ignored when "items" is not an array of schemas');return}Zl(r,n)}};function Zl(r,e){let{gen:t,schema:n,data:a,keyword:s,it:i}=r;i.items=!0;let o=t.const("len",(0,Ut._)`${a}.length`);if(n===!1)r.setParams({len:e.length}),r.pass((0,Ut._)`${o} <= ${e.length}`);else if(typeof n=="object"&&!(0,Bp.alwaysValidSchema)(i,n)){let g=t.var("valid",(0,Ut._)`${o} <= ${e.length}`);t.if((0,Ut.not)(g),()=>d(g)),r.ok(g)}function d(g){t.forRange("i",e.length,o,h=>{r.subschema({keyword:s,dataProp:h,dataPropType:Bp.Type.Num},g),i.allErrors||t.if((0,Ut.not)(g),()=>t.break())})}}on.validateAdditionalItems=Zl;on.default=ST});var Vp=G(pn=>{"use strict";Object.defineProperty(pn,"__esModule",{value:!0});pn.validateTuple=void 0;var ec=V(),lo=re(),CT=Le(),PT={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(r){let{schema:e,it:t}=r;if(Array.isArray(e))return tc(r,"additionalItems",e);t.items=!0,!(0,lo.alwaysValidSchema)(t,e)&&r.ok((0,CT.validateArray)(r))}};function tc(r,e,t=r.schema){let{gen:n,parentSchema:a,data:s,keyword:i,it:o}=r;h(a),o.opts.unevaluated&&t.length&&o.items!==!0&&(o.items=lo.mergeEvaluated.items(n,t.length,o.items));let d=n.name("valid"),g=n.const("len",(0,ec._)`${s}.length`);t.forEach((T,O)=>{(0,lo.alwaysValidSchema)(o,T)||(n.if((0,ec._)`${g} > ${O}`,()=>r.subschema({keyword:i,schemaProp:O,dataProp:O},d)),r.ok(d))});function h(T){let{opts:O,errSchemaPath:w}=o,b=t.length,$=b===T.minItems&&(b===T.maxItems||T[e]===!1);if(O.strictTuples&&!$){let I=`"${i}" is ${b}-tuple, but minItems or maxItems/${e} are not specified or different at path "${w}"`;(0,lo.checkStrictMode)(o,I,O.strictTuples)}}}pn.validateTuple=tc;pn.default=PT});var rc=G(Hp=>{"use strict";Object.defineProperty(Hp,"__esModule",{value:!0});var GT=Vp(),DT={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:r=>(0,GT.validateTuple)(r,"items")};Hp.default=DT});var ac=G(zp=>{"use strict";Object.defineProperty(zp,"__esModule",{value:!0});var nc=V(),ET=re(),MT=Le(),RT=Lp(),WT={message:({params:{len:r}})=>(0,nc.str)`must NOT have more than ${r} items`,params:({params:{len:r}})=>(0,nc._)`{limit: ${r}}`},AT={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:WT,code(r){let{schema:e,parentSchema:t,it:n}=r,{prefixItems:a}=t;n.items=!0,!(0,ET.alwaysValidSchema)(n,e)&&(a?(0,RT.validateAdditionalItems)(r,a):r.ok((0,MT.validateArray)(r)))}};zp.default=AT});var sc=G(Kp=>{"use strict";Object.defineProperty(Kp,"__esModule",{value:!0});var He=V(),co=re(),NT={message:({params:{min:r,max:e}})=>e===void 0?(0,He.str)`must contain at least ${r} valid item(s)`:(0,He.str)`must contain at least ${r} and no more than ${e} valid item(s)`,params:({params:{min:r,max:e}})=>e===void 0?(0,He._)`{minContains: ${r}}`:(0,He._)`{minContains: ${r}, maxContains: ${e}}`},UT={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:NT,code(r){let{gen:e,schema:t,parentSchema:n,data:a,it:s}=r,i,o,{minContains:d,maxContains:g}=n;s.opts.next?(i=d===void 0?1:d,o=g):i=1;let h=e.const("len",(0,He._)`${a}.length`);if(r.setParams({min:i,max:o}),o===void 0&&i===0){(0,co.checkStrictMode)(s,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(o!==void 0&&i>o){(0,co.checkStrictMode)(s,'"minContains" > "maxContains" is always invalid'),r.fail();return}if((0,co.alwaysValidSchema)(s,t)){let $=(0,He._)`${h} >= ${i}`;o!==void 0&&($=(0,He._)`${$} && ${h} <= ${o}`),r.pass($);return}s.items=!0;let T=e.name("valid");o===void 0&&i===1?w(T,()=>e.if(T,()=>e.break())):i===0?(e.let(T,!0),o!==void 0&&e.if((0,He._)`${a}.length > 0`,O)):(e.let(T,!1),O()),r.result(T,()=>r.reset());function O(){let $=e.name("_valid"),I=e.let("count",0);w($,()=>e.if($,()=>b(I)))}function w($,I){e.forRange("i",0,h,j=>{r.subschema({keyword:"contains",dataProp:j,dataPropType:co.Type.Num,compositeRule:!0},$),I()})}function b($){e.code((0,He._)`${$}++`),o===void 0?e.if((0,He._)`${$} >= ${i}`,()=>e.assign(T,!0).break()):(e.if((0,He._)`${$} > ${o}`,()=>e.assign(T,!1).break()),i===1?e.assign(T,!0):e.if((0,He._)`${$} >= ${i}`,()=>e.assign(T,!0)))}}};Kp.default=UT});var pc=G(pt=>{"use strict";Object.defineProperty(pt,"__esModule",{value:!0});pt.validateSchemaDeps=pt.validatePropertyDeps=pt.error=void 0;var Qp=V(),qT=re(),dn=Le();pt.error={message:({params:{property:r,depsCount:e,deps:t}})=>{let n=e===1?"property":"properties";return(0,Qp.str)`must have ${n} ${t} when property ${r} is present`},params:({params:{property:r,depsCount:e,deps:t,missingProperty:n}})=>(0,Qp._)`{property: ${r},
1
+ var WAPI=(()=>{var Um=Object.create;var Pr=Object.defineProperty,qm=Object.defineProperties,Bm=Object.getOwnPropertyDescriptor,Lm=Object.getOwnPropertyDescriptors,Vm=Object.getOwnPropertyNames,uu=Object.getOwnPropertySymbols,Hm=Object.getPrototypeOf,cu=Object.prototype.hasOwnProperty,zm=Object.prototype.propertyIsEnumerable;var lu=(r,e,t)=>e in r?Pr(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,v=(r,e)=>{for(var t in e||(e={}))cu.call(e,t)&&lu(r,t,e[t]);if(uu)for(var t of uu(e))zm.call(e,t)&&lu(r,t,e[t]);return r},Z=(r,e)=>qm(r,Lm(e));var R=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports),Jm=(r,e)=>{for(var t in e)Pr(r,t,{get:e[t],enumerable:!0})},mu=(r,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of Vm(e))!cu.call(r,a)&&a!==t&&Pr(r,a,{get:()=>e[a],enumerable:!(n=Bm(e,a))||n.enumerable});return r};var Qm=(r,e,t)=>(t=r!=null?Um(Hm(r)):{},mu(e||!r||!r.__esModule?Pr(t,"default",{value:r,enumerable:!0}):t,r)),Km=r=>mu(Pr({},"__esModule",{value:!0}),r);var _e=(r,e,t)=>new Promise((n,a)=>{var s=d=>{try{o(t.next(d))}catch(g){a(g)}},i=d=>{try{o(t.throw(d))}catch(g){a(g)}},o=d=>d.done?n(d.value):Promise.resolve(d.value).then(s,i);o((t=t.apply(r,e)).next())});var Ur=R(ee=>{"use strict";Object.defineProperty(ee,"__esModule",{value:!0});ee.regexpCode=ee.getEsmExportName=ee.getProperty=ee.safeStringify=ee.stringify=ee.strConcat=ee.addCodeArg=ee.str=ee._=ee.nil=ee._Code=ee.Name=ee.IDENTIFIER=ee._CodeOrName=void 0;var Ar=class{};ee._CodeOrName=Ar;ee.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var Dt=class extends Ar{constructor(e){if(super(),!ee.IDENTIFIER.test(e))throw new Error("CodeGen: name must be a valid identifier");this.str=e}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}};ee.Name=Dt;var Le=class extends Ar{constructor(e){super(),this._items=typeof e=="string"?[e]:e}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let e=this._items[0];return e===""||e==='""'}get str(){var e;return(e=this._str)!==null&&e!==void 0?e:this._str=this._items.reduce((t,n)=>`${t}${n}`,"")}get names(){var e;return(e=this._names)!==null&&e!==void 0?e:this._names=this._items.reduce((t,n)=>(n instanceof Dt&&(t[n.str]=(t[n.str]||0)+1),t),{})}};ee._Code=Le;ee.nil=new Le("");function ju(r,...e){let t=[r[0]],n=0;for(;n<e.length;)Ao(t,e[n]),t.push(r[++n]);return new Le(t)}ee._=ju;var Wo=new Le("+");function vu(r,...e){let t=[Nr(r[0])],n=0;for(;n<e.length;)t.push(Wo),Ao(t,e[n]),t.push(Wo,Nr(r[++n]));return dh(t),new Le(t)}ee.str=vu;function Ao(r,e){e instanceof Le?r.push(...e._items):e instanceof Dt?r.push(e):r.push(lh(e))}ee.addCodeArg=Ao;function dh(r){let e=1;for(;e<r.length-1;){if(r[e]===Wo){let t=fh(r[e-1],r[e+1]);if(t!==void 0){r.splice(e-1,3,t);continue}r[e++]="+"}e++}}function fh(r,e){if(e==='""')return r;if(r==='""')return e;if(typeof r=="string")return e instanceof Dt||r[r.length-1]!=='"'?void 0:typeof e!="string"?`${r.slice(0,-1)}${e}"`:e[0]==='"'?r.slice(0,-1)+e.slice(1):void 0;if(typeof e=="string"&&e[0]==='"'&&!(r instanceof Dt))return`"${r}${e.slice(1)}`}function uh(r,e){return e.emptyStr()?r:r.emptyStr()?e:vu`${r}${e}`}ee.strConcat=uh;function lh(r){return typeof r=="number"||typeof r=="boolean"||r===null?r:Nr(Array.isArray(r)?r.join(","):r)}function ch(r){return new Le(Nr(r))}ee.stringify=ch;function Nr(r){return JSON.stringify(r).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}ee.safeStringify=Nr;function mh(r){return typeof r=="string"&&ee.IDENTIFIER.test(r)?new Le(`.${r}`):ju`[${r}]`}ee.getProperty=mh;function hh(r){if(typeof r=="string"&&ee.IDENTIFIER.test(r))return new Le(`${r}`);throw new Error(`CodeGen: invalid export name: ${r}, use explicit $id name mapping`)}ee.getEsmExportName=hh;function _h(r){return new Le(r.toString())}ee.regexpCode=_h});var qo=R(Ce=>{"use strict";Object.defineProperty(Ce,"__esModule",{value:!0});Ce.ValueScope=Ce.ValueScopeName=Ce.Scope=Ce.varKinds=Ce.UsedValueState=void 0;var ke=Ur(),No=class extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`),this.value=e.value}},zi;(function(r){r[r.Started=0]="Started",r[r.Completed=1]="Completed"})(zi||(Ce.UsedValueState=zi={}));Ce.varKinds={const:new ke.Name("const"),let:new ke.Name("let"),var:new ke.Name("var")};var Ji=class{constructor({prefixes:e,parent:t}={}){this._names={},this._prefixes=e,this._parent=t}toName(e){return e instanceof ke.Name?e:this.name(e)}name(e){return new ke.Name(this._newName(e))}_newName(e){let t=this._names[e]||this._nameGroup(e);return`${e}${t.index++}`}_nameGroup(e){var t,n;if(!((n=(t=this._parent)===null||t===void 0?void 0:t._prefixes)===null||n===void 0)&&n.has(e)||this._prefixes&&!this._prefixes.has(e))throw new Error(`CodeGen: prefix "${e}" is not allowed in this scope`);return this._names[e]={prefix:e,index:0}}};Ce.Scope=Ji;var Qi=class extends ke.Name{constructor(e,t){super(t),this.prefix=e}setValue(e,{property:t,itemIndex:n}){this.value=e,this.scopePath=(0,ke._)`.${new ke.Name(t)}[${n}]`}};Ce.ValueScopeName=Qi;var gh=(0,ke._)`\n`,Uo=class extends Ji{constructor(e){super(e),this._values={},this._scope=e.scope,this.opts=Z(v({},e),{_n:e.lines?gh:ke.nil})}get(){return this._scope}name(e){return new Qi(e,this._newName(e))}value(e,t){var n;if(t.ref===void 0)throw new Error("CodeGen: ref must be passed in value");let a=this.toName(e),{prefix:s}=a,i=(n=t.key)!==null&&n!==void 0?n:t.ref,o=this._values[s];if(o){let h=o.get(i);if(h)return h}else o=this._values[s]=new Map;o.set(i,a);let d=this._scope[s]||(this._scope[s]=[]),g=d.length;return d[g]=t.ref,a.setValue(t,{property:s,itemIndex:g}),a}getValue(e,t){let n=this._values[e];if(n)return n.get(t)}scopeRefs(e,t=this._values){return this._reduceValues(t,n=>{if(n.scopePath===void 0)throw new Error(`CodeGen: name "${n}" has no value`);return(0,ke._)`${e}${n.scopePath}`})}scopeCode(e=this._values,t,n){return this._reduceValues(e,a=>{if(a.value===void 0)throw new Error(`CodeGen: name "${a}" has no value`);return a.value.code},t,n)}_reduceValues(e,t,n={},a){let s=ke.nil;for(let i in e){let o=e[i];if(!o)continue;let d=n[i]=n[i]||new Map;o.forEach(g=>{if(d.has(g))return;d.set(g,zi.Started);let h=t(g);if(h){let T=this.opts.es5?Ce.varKinds.var:Ce.varKinds.const;s=(0,ke._)`${s}${T} ${g} = ${h};${this.opts._n}`}else if(h=a==null?void 0:a(g))s=(0,ke._)`${s}${h}${this.opts._n}`;else throw new No(g);d.set(g,zi.Completed)})}return s}};Ce.ValueScope=Uo});var L=R(q=>{"use strict";Object.defineProperty(q,"__esModule",{value:!0});q.or=q.and=q.not=q.CodeGen=q.operators=q.varKinds=q.ValueScopeName=q.ValueScope=q.Scope=q.Name=q.regexpCode=q.stringify=q.getProperty=q.nil=q.strConcat=q.str=q._=void 0;var Q=Ur(),Ke=qo(),Ft=Ur();Object.defineProperty(q,"_",{enumerable:!0,get:function(){return Ft._}});Object.defineProperty(q,"str",{enumerable:!0,get:function(){return Ft.str}});Object.defineProperty(q,"strConcat",{enumerable:!0,get:function(){return Ft.strConcat}});Object.defineProperty(q,"nil",{enumerable:!0,get:function(){return Ft.nil}});Object.defineProperty(q,"getProperty",{enumerable:!0,get:function(){return Ft.getProperty}});Object.defineProperty(q,"stringify",{enumerable:!0,get:function(){return Ft.stringify}});Object.defineProperty(q,"regexpCode",{enumerable:!0,get:function(){return Ft.regexpCode}});Object.defineProperty(q,"Name",{enumerable:!0,get:function(){return Ft.Name}});var Zi=qo();Object.defineProperty(q,"Scope",{enumerable:!0,get:function(){return Zi.Scope}});Object.defineProperty(q,"ValueScope",{enumerable:!0,get:function(){return Zi.ValueScope}});Object.defineProperty(q,"ValueScopeName",{enumerable:!0,get:function(){return Zi.ValueScopeName}});Object.defineProperty(q,"varKinds",{enumerable:!0,get:function(){return Zi.varKinds}});q.operators={GT:new Q._Code(">"),GTE:new Q._Code(">="),LT:new Q._Code("<"),LTE:new Q._Code("<="),EQ:new Q._Code("==="),NEQ:new Q._Code("!=="),NOT:new Q._Code("!"),OR:new Q._Code("||"),AND:new Q._Code("&&"),ADD:new Q._Code("+")};var gt=class{optimizeNodes(){return this}optimizeNames(e,t){return this}},Bo=class extends gt{constructor(e,t,n){super(),this.varKind=e,this.name=t,this.rhs=n}render({es5:e,_n:t}){let n=e?Ke.varKinds.var:this.varKind,a=this.rhs===void 0?"":` = ${this.rhs}`;return`${n} ${this.name}${a};`+t}optimizeNames(e,t){if(e[this.name.str])return this.rhs&&(this.rhs=pr(this.rhs,e,t)),this}get names(){return this.rhs instanceof Q._CodeOrName?this.rhs.names:{}}},Ki=class extends gt{constructor(e,t,n){super(),this.lhs=e,this.rhs=t,this.sideEffects=n}render({_n:e}){return`${this.lhs} = ${this.rhs};`+e}optimizeNames(e,t){if(!(this.lhs instanceof Q.Name&&!e[this.lhs.str]&&!this.sideEffects))return this.rhs=pr(this.rhs,e,t),this}get names(){let e=this.lhs instanceof Q.Name?{}:v({},this.lhs.names);return Xi(e,this.rhs)}},Lo=class extends Ki{constructor(e,t,n,a){super(e,n,a),this.op=t}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}},Vo=class extends gt{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}},Ho=class extends gt{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:""};`+e}},zo=class extends gt{constructor(e){super(),this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}},Jo=class extends gt{constructor(e){super(),this.code=e}render({_n:e}){return`${this.code};`+e}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(e,t){return this.code=pr(this.code,e,t),this}get names(){return this.code instanceof Q._CodeOrName?this.code.names:{}}},qr=class extends gt{constructor(e=[]){super(),this.nodes=e}render(e){return this.nodes.reduce((t,n)=>t+n.render(e),"")}optimizeNodes(){let{nodes:e}=this,t=e.length;for(;t--;){let n=e[t].optimizeNodes();Array.isArray(n)?e.splice(t,1,...n):n?e[t]=n:e.splice(t,1)}return e.length>0?this:void 0}optimizeNames(e,t){let{nodes:n}=this,a=n.length;for(;a--;){let s=n[a];s.optimizeNames(e,t)||(Th(e,s.names),n.splice(a,1))}return n.length>0?this:void 0}get names(){return this.nodes.reduce((e,t)=>Nt(e,t.names),{})}},Tt=class extends qr{render(e){return"{"+e._n+super.render(e)+"}"+e._n}},Qo=class extends qr{},or=class extends Tt{};or.kind="else";var Wt=class r extends Tt{constructor(e,t){super(t),this.condition=e}render(e){let t=`if(${this.condition})`+super.render(e);return this.else&&(t+="else "+this.else.render(e)),t}optimizeNodes(){super.optimizeNodes();let e=this.condition;if(e===!0)return this.nodes;let t=this.else;if(t){let n=t.optimizeNodes();t=this.else=Array.isArray(n)?new or(n):n}if(t)return e===!1?t instanceof r?t:t.nodes:this.nodes.length?this:new r(Su(e),t instanceof r?[t]:t.nodes);if(!(e===!1||!this.nodes.length))return this}optimizeNames(e,t){var n;if(this.else=(n=this.else)===null||n===void 0?void 0:n.optimizeNames(e,t),!!(super.optimizeNames(e,t)||this.else))return this.condition=pr(this.condition,e,t),this}get names(){let e=super.names;return Xi(e,this.condition),this.else&&Nt(e,this.else.names),e}};Wt.kind="if";var At=class extends Tt{};At.kind="for";var Ko=class extends At{constructor(e){super(),this.iteration=e}render(e){return`for(${this.iteration})`+super.render(e)}optimizeNames(e,t){if(super.optimizeNames(e,t))return this.iteration=pr(this.iteration,e,t),this}get names(){return Nt(super.names,this.iteration.names)}},Yo=class extends At{constructor(e,t,n,a){super(),this.varKind=e,this.name=t,this.from=n,this.to=a}render(e){let t=e.es5?Ke.varKinds.var:this.varKind,{name:n,from:a,to:s}=this;return`for(${t} ${n}=${a}; ${n}<${s}; ${n}++)`+super.render(e)}get names(){let e=Xi(super.names,this.from);return Xi(e,this.to)}},Yi=class extends At{constructor(e,t,n,a){super(),this.loop=e,this.varKind=t,this.name=n,this.iterable=a}render(e){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(e)}optimizeNames(e,t){if(super.optimizeNames(e,t))return this.iterable=pr(this.iterable,e,t),this}get names(){return Nt(super.names,this.iterable.names)}},Br=class extends Tt{constructor(e,t,n){super(),this.name=e,this.args=t,this.async=n}render(e){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(e)}};Br.kind="func";var Lr=class extends qr{render(e){return"return "+super.render(e)}};Lr.kind="return";var Xo=class extends Tt{render(e){let t="try"+super.render(e);return this.catch&&(t+=this.catch.render(e)),this.finally&&(t+=this.finally.render(e)),t}optimizeNodes(){var e,t;return super.optimizeNodes(),(e=this.catch)===null||e===void 0||e.optimizeNodes(),(t=this.finally)===null||t===void 0||t.optimizeNodes(),this}optimizeNames(e,t){var n,a;return super.optimizeNames(e,t),(n=this.catch)===null||n===void 0||n.optimizeNames(e,t),(a=this.finally)===null||a===void 0||a.optimizeNames(e,t),this}get names(){let e=super.names;return this.catch&&Nt(e,this.catch.names),this.finally&&Nt(e,this.finally.names),e}},Vr=class extends Tt{constructor(e){super(),this.error=e}render(e){return`catch(${this.error})`+super.render(e)}};Vr.kind="catch";var Hr=class extends Tt{render(e){return"finally"+super.render(e)}};Hr.kind="finally";var Zo=class{constructor(e,t={}){this._values={},this._blockStarts=[],this._constants={},this.opts=Z(v({},t),{_n:t.lines?`
2
+ `:""}),this._extScope=e,this._scope=new Ke.Scope({parent:e}),this._nodes=[new Qo]}toString(){return this._root.render(this.opts)}name(e){return this._scope.name(e)}scopeName(e){return this._extScope.name(e)}scopeValue(e,t){let n=this._extScope.value(e,t);return(this._values[n.prefix]||(this._values[n.prefix]=new Set)).add(n),n}getScopeValue(e,t){return this._extScope.getValue(e,t)}scopeRefs(e){return this._extScope.scopeRefs(e,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(e,t,n,a){let s=this._scope.toName(t);return n!==void 0&&a&&(this._constants[s.str]=n),this._leafNode(new Bo(e,s,n)),s}const(e,t,n){return this._def(Ke.varKinds.const,e,t,n)}let(e,t,n){return this._def(Ke.varKinds.let,e,t,n)}var(e,t,n){return this._def(Ke.varKinds.var,e,t,n)}assign(e,t,n){return this._leafNode(new Ki(e,t,n))}add(e,t){return this._leafNode(new Lo(e,q.operators.ADD,t))}code(e){return typeof e=="function"?e():e!==Q.nil&&this._leafNode(new Jo(e)),this}object(...e){let t=["{"];for(let[n,a]of e)t.length>1&&t.push(","),t.push(n),(n!==a||this.opts.es5)&&(t.push(":"),(0,Q.addCodeArg)(t,a));return t.push("}"),new Q._Code(t)}if(e,t,n){if(this._blockNode(new Wt(e)),t&&n)this.code(t).else().code(n).endIf();else if(t)this.code(t).endIf();else if(n)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(e){return this._elseNode(new Wt(e))}else(){return this._elseNode(new or)}endIf(){return this._endBlockNode(Wt,or)}_for(e,t){return this._blockNode(e),t&&this.code(t).endFor(),this}for(e,t){return this._for(new Ko(e),t)}forRange(e,t,n,a,s=this.opts.es5?Ke.varKinds.var:Ke.varKinds.let){let i=this._scope.toName(e);return this._for(new Yo(s,i,t,n),()=>a(i))}forOf(e,t,n,a=Ke.varKinds.const){let s=this._scope.toName(e);if(this.opts.es5){let i=t instanceof Q.Name?t:this.var("_arr",t);return this.forRange("_i",0,(0,Q._)`${i}.length`,o=>{this.var(s,(0,Q._)`${i}[${o}]`),n(s)})}return this._for(new Yi("of",a,s,t),()=>n(s))}forIn(e,t,n,a=this.opts.es5?Ke.varKinds.var:Ke.varKinds.const){if(this.opts.ownProperties)return this.forOf(e,(0,Q._)`Object.keys(${t})`,n);let s=this._scope.toName(e);return this._for(new Yi("in",a,s,t),()=>n(s))}endFor(){return this._endBlockNode(At)}label(e){return this._leafNode(new Vo(e))}break(e){return this._leafNode(new Ho(e))}return(e){let t=new Lr;if(this._blockNode(t),this.code(e),t.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(Lr)}try(e,t,n){if(!t&&!n)throw new Error('CodeGen: "try" without "catch" and "finally"');let a=new Xo;if(this._blockNode(a),this.code(e),t){let s=this.name("e");this._currNode=a.catch=new Vr(s),t(s)}return n&&(this._currNode=a.finally=new Hr,this.code(n)),this._endBlockNode(Vr,Hr)}throw(e){return this._leafNode(new zo(e))}block(e,t){return this._blockStarts.push(this._nodes.length),e&&this.code(e).endBlock(t),this}endBlock(e){let t=this._blockStarts.pop();if(t===void 0)throw new Error("CodeGen: not in self-balancing block");let n=this._nodes.length-t;if(n<0||e!==void 0&&n!==e)throw new Error(`CodeGen: wrong number of nodes: ${n} vs ${e} expected`);return this._nodes.length=t,this}func(e,t=Q.nil,n,a){return this._blockNode(new Br(e,t,n)),a&&this.code(a).endFunc(),this}endFunc(){return this._endBlockNode(Br)}optimize(e=1){for(;e-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(e){return this._currNode.nodes.push(e),this}_blockNode(e){this._currNode.nodes.push(e),this._nodes.push(e)}_endBlockNode(e,t){let n=this._currNode;if(n instanceof e||t&&n instanceof t)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${t?`${e.kind}/${t.kind}`:e.kind}"`)}_elseNode(e){let t=this._currNode;if(!(t instanceof Wt))throw new Error('CodeGen: "else" without "if"');return this._currNode=t.else=e,this}get _root(){return this._nodes[0]}get _currNode(){let e=this._nodes;return e[e.length-1]}set _currNode(e){let t=this._nodes;t[t.length-1]=e}};q.CodeGen=Zo;function Nt(r,e){for(let t in e)r[t]=(r[t]||0)+(e[t]||0);return r}function Xi(r,e){return e instanceof Q._CodeOrName?Nt(r,e.names):r}function pr(r,e,t){if(r instanceof Q.Name)return n(r);if(!a(r))return r;return new Q._Code(r._items.reduce((s,i)=>(i instanceof Q.Name&&(i=n(i)),i instanceof Q._Code?s.push(...i._items):s.push(i),s),[]));function n(s){let i=t[s.str];return i===void 0||e[s.str]!==1?s:(delete e[s.str],i)}function a(s){return s instanceof Q._Code&&s._items.some(i=>i instanceof Q.Name&&e[i.str]===1&&t[i.str]!==void 0)}}function Th(r,e){for(let t in e)r[t]=(r[t]||0)-(e[t]||0)}function Su(r){return typeof r=="boolean"||typeof r=="number"||r===null?!r:(0,Q._)`!${ep(r)}`}q.not=Su;var yh=ku(q.operators.AND);function bh(...r){return r.reduce(yh)}q.and=bh;var Fh=ku(q.operators.OR);function xh(...r){return r.reduce(Fh)}q.or=xh;function ku(r){return(e,t)=>e===Q.nil?t:t===Q.nil?e:(0,Q._)`${ep(e)} ${r} ${ep(t)}`}function ep(r){return r instanceof Q.Name?r:(0,Q._)`(${r})`}});var te=R(V=>{"use strict";Object.defineProperty(V,"__esModule",{value:!0});V.checkStrictMode=V.getErrorPath=V.Type=V.useFunc=V.setEvaluated=V.evaluatedPropsToName=V.mergeEvaluated=V.eachItem=V.unescapeJsonPointer=V.escapeJsonPointer=V.escapeFragment=V.unescapeFragment=V.schemaRefOrVal=V.schemaHasRulesButRef=V.schemaHasRules=V.checkUnknownRules=V.alwaysValidSchema=V.toHash=void 0;var de=L(),Oh=Ur();function $h(r){let e={};for(let t of r)e[t]=!0;return e}V.toHash=$h;function wh(r,e){return typeof e=="boolean"?e:Object.keys(e).length===0?!0:(Gu(r,e),!Pu(e,r.self.RULES.all))}V.alwaysValidSchema=wh;function Gu(r,e=r.schema){let{opts:t,self:n}=r;if(!t.strictSchema||typeof e=="boolean")return;let a=n.RULES.keywords;for(let s in e)a[s]||Du(r,`unknown keyword: "${s}"`)}V.checkUnknownRules=Gu;function Pu(r,e){if(typeof r=="boolean")return!r;for(let t in r)if(e[t])return!0;return!1}V.schemaHasRules=Pu;function Ih(r,e){if(typeof r=="boolean")return!r;for(let t in r)if(t!=="$ref"&&e.all[t])return!0;return!1}V.schemaHasRulesButRef=Ih;function jh({topSchemaRef:r,schemaPath:e},t,n,a){if(!a){if(typeof t=="number"||typeof t=="boolean")return t;if(typeof t=="string")return(0,de._)`${t}`}return(0,de._)`${r}${e}${(0,de.getProperty)(n)}`}V.schemaRefOrVal=jh;function vh(r){return Eu(decodeURIComponent(r))}V.unescapeFragment=vh;function Sh(r){return encodeURIComponent(rp(r))}V.escapeFragment=Sh;function rp(r){return typeof r=="number"?`${r}`:r.replace(/~/g,"~0").replace(/\//g,"~1")}V.escapeJsonPointer=rp;function Eu(r){return r.replace(/~1/g,"/").replace(/~0/g,"~")}V.unescapeJsonPointer=Eu;function kh(r,e){if(Array.isArray(r))for(let t of r)e(t);else e(r)}V.eachItem=kh;function Cu({mergeNames:r,mergeToName:e,mergeValues:t,resultToName:n}){return(a,s,i,o)=>{let d=i===void 0?s:i instanceof de.Name?(s instanceof de.Name?r(a,s,i):e(a,s,i),i):s instanceof de.Name?(e(a,i,s),s):t(s,i);return o===de.Name&&!(d instanceof de.Name)?n(a,d):d}}V.mergeEvaluated={props:Cu({mergeNames:(r,e,t)=>r.if((0,de._)`${t} !== true && ${e} !== undefined`,()=>{r.if((0,de._)`${e} === true`,()=>r.assign(t,!0),()=>r.assign(t,(0,de._)`${t} || {}`).code((0,de._)`Object.assign(${t}, ${e})`))}),mergeToName:(r,e,t)=>r.if((0,de._)`${t} !== true`,()=>{e===!0?r.assign(t,!0):(r.assign(t,(0,de._)`${t} || {}`),np(r,t,e))}),mergeValues:(r,e)=>r===!0?!0:v(v({},r),e),resultToName:Mu}),items:Cu({mergeNames:(r,e,t)=>r.if((0,de._)`${t} !== true && ${e} !== undefined`,()=>r.assign(t,(0,de._)`${e} === true ? true : ${t} > ${e} ? ${t} : ${e}`)),mergeToName:(r,e,t)=>r.if((0,de._)`${t} !== true`,()=>r.assign(t,e===!0?!0:(0,de._)`${t} > ${e} ? ${t} : ${e}`)),mergeValues:(r,e)=>r===!0?!0:Math.max(r,e),resultToName:(r,e)=>r.var("items",e)})};function Mu(r,e){if(e===!0)return r.var("props",!0);let t=r.var("props",(0,de._)`{}`);return e!==void 0&&np(r,t,e),t}V.evaluatedPropsToName=Mu;function np(r,e,t){Object.keys(t).forEach(n=>r.assign((0,de._)`${e}${(0,de.getProperty)(n)}`,!0))}V.setEvaluated=np;var Ru={};function Ch(r,e){return r.scopeValue("func",{ref:e,code:Ru[e.code]||(Ru[e.code]=new Oh._Code(e.code))})}V.useFunc=Ch;var tp;(function(r){r[r.Num=0]="Num",r[r.Str=1]="Str"})(tp||(V.Type=tp={}));function Rh(r,e,t){if(r instanceof de.Name){let n=e===tp.Num;return t?n?(0,de._)`"[" + ${r} + "]"`:(0,de._)`"['" + ${r} + "']"`:n?(0,de._)`"/" + ${r}`:(0,de._)`"/" + ${r}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return t?(0,de.getProperty)(r).toString():"/"+rp(r)}V.getErrorPath=Rh;function Du(r,e,t=r.opts.strictSchema){if(t){if(e=`strict mode: ${e}`,t===!0)throw new Error(e);r.self.logger.warn(e)}}V.checkStrictMode=Du});var yt=R(ap=>{"use strict";Object.defineProperty(ap,"__esModule",{value:!0});var $e=L(),Gh={data:new $e.Name("data"),valCxt:new $e.Name("valCxt"),instancePath:new $e.Name("instancePath"),parentData:new $e.Name("parentData"),parentDataProperty:new $e.Name("parentDataProperty"),rootData:new $e.Name("rootData"),dynamicAnchors:new $e.Name("dynamicAnchors"),vErrors:new $e.Name("vErrors"),errors:new $e.Name("errors"),this:new $e.Name("this"),self:new $e.Name("self"),scope:new $e.Name("scope"),json:new $e.Name("json"),jsonPos:new $e.Name("jsonPos"),jsonLen:new $e.Name("jsonLen"),jsonPart:new $e.Name("jsonPart")};ap.default=Gh});var zr=R(we=>{"use strict";Object.defineProperty(we,"__esModule",{value:!0});we.extendErrors=we.resetErrorsCount=we.reportExtraError=we.reportError=we.keyword$DataError=we.keywordError=void 0;var Y=L(),eo=te(),ve=yt();we.keywordError={message:({keyword:r})=>(0,Y.str)`must pass "${r}" keyword validation`};we.keyword$DataError={message:({keyword:r,schemaType:e})=>e?(0,Y.str)`"${r}" keyword must be ${e} ($data)`:(0,Y.str)`"${r}" keyword is invalid ($data)`};function Ph(r,e=we.keywordError,t,n){let{it:a}=r,{gen:s,compositeRule:i,allErrors:o}=a,d=Nu(r,e,t);(n!=null?n:i||o)?Wu(s,d):Au(a,(0,Y._)`[${d}]`)}we.reportError=Ph;function Eh(r,e=we.keywordError,t){let{it:n}=r,{gen:a,compositeRule:s,allErrors:i}=n,o=Nu(r,e,t);Wu(a,o),s||i||Au(n,ve.default.vErrors)}we.reportExtraError=Eh;function Mh(r,e){r.assign(ve.default.errors,e),r.if((0,Y._)`${ve.default.vErrors} !== null`,()=>r.if(e,()=>r.assign((0,Y._)`${ve.default.vErrors}.length`,e),()=>r.assign(ve.default.vErrors,null)))}we.resetErrorsCount=Mh;function Dh({gen:r,keyword:e,schemaValue:t,data:n,errsCount:a,it:s}){if(a===void 0)throw new Error("ajv implementation error");let i=r.name("err");r.forRange("i",a,ve.default.errors,o=>{r.const(i,(0,Y._)`${ve.default.vErrors}[${o}]`),r.if((0,Y._)`${i}.instancePath === undefined`,()=>r.assign((0,Y._)`${i}.instancePath`,(0,Y.strConcat)(ve.default.instancePath,s.errorPath))),r.assign((0,Y._)`${i}.schemaPath`,(0,Y.str)`${s.errSchemaPath}/${e}`),s.opts.verbose&&(r.assign((0,Y._)`${i}.schema`,t),r.assign((0,Y._)`${i}.data`,n))})}we.extendErrors=Dh;function Wu(r,e){let t=r.const("err",e);r.if((0,Y._)`${ve.default.vErrors} === null`,()=>r.assign(ve.default.vErrors,(0,Y._)`[${t}]`),(0,Y._)`${ve.default.vErrors}.push(${t})`),r.code((0,Y._)`${ve.default.errors}++`)}function Au(r,e){let{gen:t,validateName:n,schemaEnv:a}=r;a.$async?t.throw((0,Y._)`new ${r.ValidationError}(${e})`):(t.assign((0,Y._)`${n}.errors`,e),t.return(!1))}var Ut={keyword:new Y.Name("keyword"),schemaPath:new Y.Name("schemaPath"),params:new Y.Name("params"),propertyName:new Y.Name("propertyName"),message:new Y.Name("message"),schema:new Y.Name("schema"),parentSchema:new Y.Name("parentSchema")};function Nu(r,e,t){let{createErrors:n}=r.it;return n===!1?(0,Y._)`{}`:Wh(r,e,t)}function Wh(r,e,t={}){let{gen:n,it:a}=r,s=[Ah(a,t),Nh(r,t)];return Uh(r,e,s),n.object(...s)}function Ah({errorPath:r},{instancePath:e}){let t=e?(0,Y.str)`${r}${(0,eo.getErrorPath)(e,eo.Type.Str)}`:r;return[ve.default.instancePath,(0,Y.strConcat)(ve.default.instancePath,t)]}function Nh({keyword:r,it:{errSchemaPath:e}},{schemaPath:t,parentSchema:n}){let a=n?e:(0,Y.str)`${e}/${r}`;return t&&(a=(0,Y.str)`${a}${(0,eo.getErrorPath)(t,eo.Type.Str)}`),[Ut.schemaPath,a]}function Uh(r,{params:e,message:t},n){let{keyword:a,data:s,schemaValue:i,it:o}=r,{opts:d,propertyName:g,topSchemaRef:h,schemaPath:T}=o;n.push([Ut.keyword,a],[Ut.params,typeof e=="function"?e(r):e||(0,Y._)`{}`]),d.messages&&n.push([Ut.message,typeof t=="function"?t(r):t]),d.verbose&&n.push([Ut.schema,i],[Ut.parentSchema,(0,Y._)`${h}${T}`],[ve.default.data,s]),g&&n.push([Ut.propertyName,g])}});var qu=R(dr=>{"use strict";Object.defineProperty(dr,"__esModule",{value:!0});dr.boolOrEmptySchema=dr.topBoolOrEmptySchema=void 0;var qh=zr(),Bh=L(),Lh=yt(),Vh={message:"boolean schema is false"};function Hh(r){let{gen:e,schema:t,validateName:n}=r;t===!1?Uu(r,!1):typeof t=="object"&&t.$async===!0?e.return(Lh.default.data):(e.assign((0,Bh._)`${n}.errors`,null),e.return(!0))}dr.topBoolOrEmptySchema=Hh;function zh(r,e){let{gen:t,schema:n}=r;n===!1?(t.var(e,!1),Uu(r)):t.var(e,!0)}dr.boolOrEmptySchema=zh;function Uu(r,e){let{gen:t,data:n}=r,a={gen:t,keyword:"false schema",data:n,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:r};(0,qh.reportError)(a,Vh,void 0,e)}});var sp=R(fr=>{"use strict";Object.defineProperty(fr,"__esModule",{value:!0});fr.getRules=fr.isJSONType=void 0;var Jh=["string","number","integer","boolean","null","object","array"],Qh=new Set(Jh);function Kh(r){return typeof r=="string"&&Qh.has(r)}fr.isJSONType=Kh;function Yh(){let r={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:Z(v({},r),{integer:!0,boolean:!0,null:!0}),rules:[{rules:[]},r.number,r.string,r.array,r.object],post:{rules:[]},all:{},keywords:{}}}fr.getRules=Yh});var ip=R(xt=>{"use strict";Object.defineProperty(xt,"__esModule",{value:!0});xt.shouldUseRule=xt.shouldUseGroup=xt.schemaHasRulesForType=void 0;function Xh({schema:r,self:e},t){let n=e.RULES.types[t];return n&&n!==!0&&Bu(r,n)}xt.schemaHasRulesForType=Xh;function Bu(r,e){return e.rules.some(t=>Lu(r,t))}xt.shouldUseGroup=Bu;function Lu(r,e){var t;return r[e.keyword]!==void 0||((t=e.definition.implements)===null||t===void 0?void 0:t.some(n=>r[n]!==void 0))}xt.shouldUseRule=Lu});var Jr=R(Ie=>{"use strict";Object.defineProperty(Ie,"__esModule",{value:!0});Ie.reportTypeError=Ie.checkDataTypes=Ie.checkDataType=Ie.coerceAndCheckDataType=Ie.getJSONTypes=Ie.getSchemaTypes=Ie.DataType=void 0;var Zh=sp(),e_=ip(),t_=zr(),A=L(),Vu=te(),ur;(function(r){r[r.Correct=0]="Correct",r[r.Wrong=1]="Wrong"})(ur||(Ie.DataType=ur={}));function r_(r){let e=Hu(r.type);if(e.includes("null")){if(r.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!e.length&&r.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');r.nullable===!0&&e.push("null")}return e}Ie.getSchemaTypes=r_;function Hu(r){let e=Array.isArray(r)?r:r?[r]:[];if(e.every(Zh.isJSONType))return e;throw new Error("type must be JSONType or JSONType[]: "+e.join(","))}Ie.getJSONTypes=Hu;function n_(r,e){let{gen:t,data:n,opts:a}=r,s=a_(e,a.coerceTypes),i=e.length>0&&!(s.length===0&&e.length===1&&(0,e_.schemaHasRulesForType)(r,e[0]));if(i){let o=pp(e,n,a.strictNumbers,ur.Wrong);t.if(o,()=>{s.length?s_(r,e,s):dp(r)})}return i}Ie.coerceAndCheckDataType=n_;var zu=new Set(["string","number","integer","boolean","null"]);function a_(r,e){return e?r.filter(t=>zu.has(t)||e==="array"&&t==="array"):[]}function s_(r,e,t){let{gen:n,data:a,opts:s}=r,i=n.let("dataType",(0,A._)`typeof ${a}`),o=n.let("coerced",(0,A._)`undefined`);s.coerceTypes==="array"&&n.if((0,A._)`${i} == 'object' && Array.isArray(${a}) && ${a}.length == 1`,()=>n.assign(a,(0,A._)`${a}[0]`).assign(i,(0,A._)`typeof ${a}`).if(pp(e,a,s.strictNumbers),()=>n.assign(o,a))),n.if((0,A._)`${o} !== undefined`);for(let g of t)(zu.has(g)||g==="array"&&s.coerceTypes==="array")&&d(g);n.else(),dp(r),n.endIf(),n.if((0,A._)`${o} !== undefined`,()=>{n.assign(a,o),i_(r,o)});function d(g){switch(g){case"string":n.elseIf((0,A._)`${i} == "number" || ${i} == "boolean"`).assign(o,(0,A._)`"" + ${a}`).elseIf((0,A._)`${a} === null`).assign(o,(0,A._)`""`);return;case"number":n.elseIf((0,A._)`${i} == "boolean" || ${a} === null
3
+ || (${i} == "string" && ${a} && ${a} == +${a})`).assign(o,(0,A._)`+${a}`);return;case"integer":n.elseIf((0,A._)`${i} === "boolean" || ${a} === null
4
+ || (${i} === "string" && ${a} && ${a} == +${a} && !(${a} % 1))`).assign(o,(0,A._)`+${a}`);return;case"boolean":n.elseIf((0,A._)`${a} === "false" || ${a} === 0 || ${a} === null`).assign(o,!1).elseIf((0,A._)`${a} === "true" || ${a} === 1`).assign(o,!0);return;case"null":n.elseIf((0,A._)`${a} === "" || ${a} === 0 || ${a} === false`),n.assign(o,null);return;case"array":n.elseIf((0,A._)`${i} === "string" || ${i} === "number"
5
+ || ${i} === "boolean" || ${a} === null`).assign(o,(0,A._)`[${a}]`)}}}function i_({gen:r,parentData:e,parentDataProperty:t},n){r.if((0,A._)`${e} !== undefined`,()=>r.assign((0,A._)`${e}[${t}]`,n))}function op(r,e,t,n=ur.Correct){let a=n===ur.Correct?A.operators.EQ:A.operators.NEQ,s;switch(r){case"null":return(0,A._)`${e} ${a} null`;case"array":s=(0,A._)`Array.isArray(${e})`;break;case"object":s=(0,A._)`${e} && typeof ${e} == "object" && !Array.isArray(${e})`;break;case"integer":s=i((0,A._)`!(${e} % 1) && !isNaN(${e})`);break;case"number":s=i();break;default:return(0,A._)`typeof ${e} ${a} ${r}`}return n===ur.Correct?s:(0,A.not)(s);function i(o=A.nil){return(0,A.and)((0,A._)`typeof ${e} == "number"`,o,t?(0,A._)`isFinite(${e})`:A.nil)}}Ie.checkDataType=op;function pp(r,e,t,n){if(r.length===1)return op(r[0],e,t,n);let a,s=(0,Vu.toHash)(r);if(s.array&&s.object){let i=(0,A._)`typeof ${e} != "object"`;a=s.null?i:(0,A._)`!${e} || ${i}`,delete s.null,delete s.array,delete s.object}else a=A.nil;s.number&&delete s.integer;for(let i in s)a=(0,A.and)(a,op(i,e,t,n));return a}Ie.checkDataTypes=pp;var o_={message:({schema:r})=>`must be ${r}`,params:({schema:r,schemaValue:e})=>typeof r=="string"?(0,A._)`{type: ${r}}`:(0,A._)`{type: ${e}}`};function dp(r){let e=p_(r);(0,t_.reportError)(e,o_)}Ie.reportTypeError=dp;function p_(r){let{gen:e,data:t,schema:n}=r,a=(0,Vu.schemaRefOrVal)(r,n,"type");return{gen:e,keyword:"type",data:t,schema:n.type,schemaCode:a,schemaValue:a,parentSchema:n,params:{},it:r}}});var Qu=R(to=>{"use strict";Object.defineProperty(to,"__esModule",{value:!0});to.assignDefaults=void 0;var lr=L(),d_=te();function f_(r,e){let{properties:t,items:n}=r.schema;if(e==="object"&&t)for(let a in t)Ju(r,a,t[a].default);else e==="array"&&Array.isArray(n)&&n.forEach((a,s)=>Ju(r,s,a.default))}to.assignDefaults=f_;function Ju(r,e,t){let{gen:n,compositeRule:a,data:s,opts:i}=r;if(t===void 0)return;let o=(0,lr._)`${s}${(0,lr.getProperty)(e)}`;if(a){(0,d_.checkStrictMode)(r,`default is ignored for: ${o}`);return}let d=(0,lr._)`${o} === undefined`;i.useDefaults==="empty"&&(d=(0,lr._)`${d} || ${o} === null || ${o} === ""`),n.if(d,(0,lr._)`${o} = ${(0,lr.stringify)(t)}`)}});var Ve=R(ie=>{"use strict";Object.defineProperty(ie,"__esModule",{value:!0});ie.validateUnion=ie.validateArray=ie.usePattern=ie.callValidateCode=ie.schemaProperties=ie.allSchemaProperties=ie.noPropertyInData=ie.propertyInData=ie.isOwnProperty=ie.hasPropFunc=ie.reportMissingProp=ie.checkMissingProp=ie.checkReportMissingProp=void 0;var fe=L(),fp=te(),Ot=yt(),u_=te();function l_(r,e){let{gen:t,data:n,it:a}=r;t.if(lp(t,n,e,a.opts.ownProperties),()=>{r.setParams({missingProperty:(0,fe._)`${e}`},!0),r.error()})}ie.checkReportMissingProp=l_;function c_({gen:r,data:e,it:{opts:t}},n,a){return(0,fe.or)(...n.map(s=>(0,fe.and)(lp(r,e,s,t.ownProperties),(0,fe._)`${a} = ${s}`)))}ie.checkMissingProp=c_;function m_(r,e){r.setParams({missingProperty:e},!0),r.error()}ie.reportMissingProp=m_;function Ku(r){return r.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,fe._)`Object.prototype.hasOwnProperty`})}ie.hasPropFunc=Ku;function up(r,e,t){return(0,fe._)`${Ku(r)}.call(${e}, ${t})`}ie.isOwnProperty=up;function h_(r,e,t,n){let a=(0,fe._)`${e}${(0,fe.getProperty)(t)} !== undefined`;return n?(0,fe._)`${a} && ${up(r,e,t)}`:a}ie.propertyInData=h_;function lp(r,e,t,n){let a=(0,fe._)`${e}${(0,fe.getProperty)(t)} === undefined`;return n?(0,fe.or)(a,(0,fe.not)(up(r,e,t))):a}ie.noPropertyInData=lp;function Yu(r){return r?Object.keys(r).filter(e=>e!=="__proto__"):[]}ie.allSchemaProperties=Yu;function __(r,e){return Yu(e).filter(t=>!(0,fp.alwaysValidSchema)(r,e[t]))}ie.schemaProperties=__;function g_({schemaCode:r,data:e,it:{gen:t,topSchemaRef:n,schemaPath:a,errorPath:s},it:i},o,d,g){let h=g?(0,fe._)`${r}, ${e}, ${n}${a}`:e,T=[[Ot.default.instancePath,(0,fe.strConcat)(Ot.default.instancePath,s)],[Ot.default.parentData,i.parentData],[Ot.default.parentDataProperty,i.parentDataProperty],[Ot.default.rootData,Ot.default.rootData]];i.opts.dynamicRef&&T.push([Ot.default.dynamicAnchors,Ot.default.dynamicAnchors]);let $=(0,fe._)`${h}, ${t.object(...T)}`;return d!==fe.nil?(0,fe._)`${o}.call(${d}, ${$})`:(0,fe._)`${o}(${$})`}ie.callValidateCode=g_;var T_=(0,fe._)`new RegExp`;function y_({gen:r,it:{opts:e}},t){let n=e.unicodeRegExp?"u":"",{regExp:a}=e.code,s=a(t,n);return r.scopeValue("pattern",{key:s.toString(),ref:s,code:(0,fe._)`${a.code==="new RegExp"?T_:(0,u_.useFunc)(r,a)}(${t}, ${n})`})}ie.usePattern=y_;function b_(r){let{gen:e,data:t,keyword:n,it:a}=r,s=e.name("valid");if(a.allErrors){let o=e.let("valid",!0);return i(()=>e.assign(o,!1)),o}return e.var(s,!0),i(()=>e.break()),s;function i(o){let d=e.const("len",(0,fe._)`${t}.length`);e.forRange("i",0,d,g=>{r.subschema({keyword:n,dataProp:g,dataPropType:fp.Type.Num},s),e.if((0,fe.not)(s),o)})}}ie.validateArray=b_;function F_(r){let{gen:e,schema:t,keyword:n,it:a}=r;if(!Array.isArray(t))throw new Error("ajv implementation error");if(t.some(d=>(0,fp.alwaysValidSchema)(a,d))&&!a.opts.unevaluated)return;let i=e.let("valid",!1),o=e.name("_valid");e.block(()=>t.forEach((d,g)=>{let h=r.subschema({keyword:n,schemaProp:g,compositeRule:!0},o);e.assign(i,(0,fe._)`${i} || ${o}`),r.mergeValidEvaluated(h,o)||e.if((0,fe.not)(i))})),r.result(i,()=>r.reset(),()=>r.error(!0))}ie.validateUnion=F_});var el=R(ot=>{"use strict";Object.defineProperty(ot,"__esModule",{value:!0});ot.validateKeywordUsage=ot.validSchemaType=ot.funcKeywordCode=ot.macroKeywordCode=void 0;var Se=L(),qt=yt(),x_=Ve(),O_=zr();function $_(r,e){let{gen:t,keyword:n,schema:a,parentSchema:s,it:i}=r,o=e.macro.call(i.self,a,s,i),d=Zu(t,n,o);i.opts.validateSchema!==!1&&i.self.validateSchema(o,!0);let g=t.name("valid");r.subschema({schema:o,schemaPath:Se.nil,errSchemaPath:`${i.errSchemaPath}/${n}`,topSchemaRef:d,compositeRule:!0},g),r.pass(g,()=>r.error(!0))}ot.macroKeywordCode=$_;function w_(r,e){var t;let{gen:n,keyword:a,schema:s,parentSchema:i,$data:o,it:d}=r;j_(d,e);let g=!o&&e.compile?e.compile.call(d.self,s,i,d):e.validate,h=Zu(n,a,g),T=n.let("valid");r.block$data(T,$),r.ok((t=e.valid)!==null&&t!==void 0?t:T);function $(){if(e.errors===!1)O(),e.modifying&&Xu(r),I(()=>r.error());else{let j=e.async?w():b();e.modifying&&Xu(r),I(()=>I_(r,j))}}function w(){let j=n.let("ruleErrs",null);return n.try(()=>O((0,Se._)`await `),H=>n.assign(T,!1).if((0,Se._)`${H} instanceof ${d.ValidationError}`,()=>n.assign(j,(0,Se._)`${H}.errors`),()=>n.throw(H))),j}function b(){let j=(0,Se._)`${h}.errors`;return n.assign(j,null),O(Se.nil),j}function O(j=e.async?(0,Se._)`await `:Se.nil){let H=d.opts.passContext?qt.default.this:qt.default.self,U=!("compile"in e&&!o||e.schema===!1);n.assign(T,(0,Se._)`${j}${(0,x_.callValidateCode)(r,h,H,U)}`,e.modifying)}function I(j){var H;n.if((0,Se.not)((H=e.valid)!==null&&H!==void 0?H:T),j)}}ot.funcKeywordCode=w_;function Xu(r){let{gen:e,data:t,it:n}=r;e.if(n.parentData,()=>e.assign(t,(0,Se._)`${n.parentData}[${n.parentDataProperty}]`))}function I_(r,e){let{gen:t}=r;t.if((0,Se._)`Array.isArray(${e})`,()=>{t.assign(qt.default.vErrors,(0,Se._)`${qt.default.vErrors} === null ? ${e} : ${qt.default.vErrors}.concat(${e})`).assign(qt.default.errors,(0,Se._)`${qt.default.vErrors}.length`),(0,O_.extendErrors)(r)},()=>r.error())}function j_({schemaEnv:r},e){if(e.async&&!r.$async)throw new Error("async keyword in sync schema")}function Zu(r,e,t){if(t===void 0)throw new Error(`keyword "${e}" failed to compile`);return r.scopeValue("keyword",typeof t=="function"?{ref:t}:{ref:t,code:(0,Se.stringify)(t)})}function v_(r,e,t=!1){return!e.length||e.some(n=>n==="array"?Array.isArray(r):n==="object"?r&&typeof r=="object"&&!Array.isArray(r):typeof r==n||t&&typeof r=="undefined")}ot.validSchemaType=v_;function S_({schema:r,opts:e,self:t,errSchemaPath:n},a,s){if(Array.isArray(a.keyword)?!a.keyword.includes(s):a.keyword!==s)throw new Error("ajv implementation error");let i=a.dependencies;if(i!=null&&i.some(o=>!Object.prototype.hasOwnProperty.call(r,o)))throw new Error(`parent schema must have dependencies of ${s}: ${i.join(",")}`);if(a.validateSchema&&!a.validateSchema(r[s])){let d=`keyword "${s}" value is invalid at path "${n}": `+t.errorsText(a.validateSchema.errors);if(e.validateSchema==="log")t.logger.error(d);else throw new Error(d)}}ot.validateKeywordUsage=S_});var rl=R($t=>{"use strict";Object.defineProperty($t,"__esModule",{value:!0});$t.extendSubschemaMode=$t.extendSubschemaData=$t.getSubschema=void 0;var pt=L(),tl=te();function k_(r,{keyword:e,schemaProp:t,schema:n,schemaPath:a,errSchemaPath:s,topSchemaRef:i}){if(e!==void 0&&n!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(e!==void 0){let o=r.schema[e];return t===void 0?{schema:o,schemaPath:(0,pt._)`${r.schemaPath}${(0,pt.getProperty)(e)}`,errSchemaPath:`${r.errSchemaPath}/${e}`}:{schema:o[t],schemaPath:(0,pt._)`${r.schemaPath}${(0,pt.getProperty)(e)}${(0,pt.getProperty)(t)}`,errSchemaPath:`${r.errSchemaPath}/${e}/${(0,tl.escapeFragment)(t)}`}}if(n!==void 0){if(a===void 0||s===void 0||i===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:n,schemaPath:a,topSchemaRef:i,errSchemaPath:s}}throw new Error('either "keyword" or "schema" must be passed')}$t.getSubschema=k_;function C_(r,e,{dataProp:t,dataPropType:n,data:a,dataTypes:s,propertyName:i}){if(a!==void 0&&t!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');let{gen:o}=e;if(t!==void 0){let{errorPath:g,dataPathArr:h,opts:T}=e,$=o.let("data",(0,pt._)`${e.data}${(0,pt.getProperty)(t)}`,!0);d($),r.errorPath=(0,pt.str)`${g}${(0,tl.getErrorPath)(t,n,T.jsPropertySyntax)}`,r.parentDataProperty=(0,pt._)`${t}`,r.dataPathArr=[...h,r.parentDataProperty]}if(a!==void 0){let g=a instanceof pt.Name?a:o.let("data",a,!0);d(g),i!==void 0&&(r.propertyName=i)}s&&(r.dataTypes=s);function d(g){r.data=g,r.dataLevel=e.dataLevel+1,r.dataTypes=[],e.definedProperties=new Set,r.parentData=e.data,r.dataNames=[...e.dataNames,g]}}$t.extendSubschemaData=C_;function R_(r,{jtdDiscriminator:e,jtdMetadata:t,compositeRule:n,createErrors:a,allErrors:s}){n!==void 0&&(r.compositeRule=n),a!==void 0&&(r.createErrors=a),s!==void 0&&(r.allErrors=s),r.jtdDiscriminator=e,r.jtdMetadata=t}$t.extendSubschemaMode=R_});var cp=R((wI,nl)=>{"use strict";nl.exports=function r(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;var n,a,s;if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(a=n;a--!==0;)if(!r(e[a],t[a]))return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();if(s=Object.keys(e),n=s.length,n!==Object.keys(t).length)return!1;for(a=n;a--!==0;)if(!Object.prototype.hasOwnProperty.call(t,s[a]))return!1;for(a=n;a--!==0;){var i=s[a];if(!r(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}});var sl=R((II,al)=>{"use strict";var wt=al.exports=function(r,e,t){typeof e=="function"&&(t=e,e={}),t=e.cb||t;var n=typeof t=="function"?t:t.pre||function(){},a=t.post||function(){};ro(e,n,a,r,"",r)};wt.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0};wt.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0};wt.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0};wt.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function ro(r,e,t,n,a,s,i,o,d,g){if(n&&typeof n=="object"&&!Array.isArray(n)){e(n,a,s,i,o,d,g);for(var h in n){var T=n[h];if(Array.isArray(T)){if(h in wt.arrayKeywords)for(var $=0;$<T.length;$++)ro(r,e,t,T[$],a+"/"+h+"/"+$,s,a,h,n,$)}else if(h in wt.propsKeywords){if(T&&typeof T=="object")for(var w in T)ro(r,e,t,T[w],a+"/"+h+"/"+G_(w),s,a,h,n,w)}else(h in wt.keywords||r.allKeys&&!(h in wt.skipKeywords))&&ro(r,e,t,T,a+"/"+h,s,a,h,n)}t(n,a,s,i,o,d,g)}}function G_(r){return r.replace(/~/g,"~0").replace(/\//g,"~1")}});var Qr=R(Re=>{"use strict";Object.defineProperty(Re,"__esModule",{value:!0});Re.getSchemaRefs=Re.resolveUrl=Re.normalizeId=Re._getFullPath=Re.getFullPath=Re.inlineRef=void 0;var P_=te(),E_=cp(),M_=sl(),D_=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function W_(r,e=!0){return typeof r=="boolean"?!0:e===!0?!mp(r):e?il(r)<=e:!1}Re.inlineRef=W_;var A_=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function mp(r){for(let e in r){if(A_.has(e))return!0;let t=r[e];if(Array.isArray(t)&&t.some(mp)||typeof t=="object"&&mp(t))return!0}return!1}function il(r){let e=0;for(let t in r){if(t==="$ref")return 1/0;if(e++,!D_.has(t)&&(typeof r[t]=="object"&&(0,P_.eachItem)(r[t],n=>e+=il(n)),e===1/0))return 1/0}return e}function ol(r,e="",t){t!==!1&&(e=cr(e));let n=r.parse(e);return pl(r,n)}Re.getFullPath=ol;function pl(r,e){return r.serialize(e).split("#")[0]+"#"}Re._getFullPath=pl;var N_=/#\/?$/;function cr(r){return r?r.replace(N_,""):""}Re.normalizeId=cr;function U_(r,e,t){return t=cr(t),r.resolve(e,t)}Re.resolveUrl=U_;var q_=/^[a-z_][-a-z0-9._]*$/i;function B_(r,e){if(typeof r=="boolean")return{};let{schemaId:t,uriResolver:n}=this.opts,a=cr(r[t]||e),s={"":a},i=ol(n,a,!1),o={},d=new Set;return M_(r,{allKeys:!0},(T,$,w,b)=>{if(b===void 0)return;let O=i+$,I=s[b];typeof T[t]=="string"&&(I=j.call(this,T[t])),H.call(this,T.$anchor),H.call(this,T.$dynamicAnchor),s[$]=I;function j(U){let ae=this.opts.uriResolver.resolve;if(U=cr(I?ae(I,U):U),d.has(U))throw h(U);d.add(U);let D=this.refs[U];return typeof D=="string"&&(D=this.refs[D]),typeof D=="object"?g(T,D.schema,U):U!==cr(O)&&(U[0]==="#"?(g(T,o[U],U),o[U]=T):this.refs[U]=O),U}function H(U){if(typeof U=="string"){if(!q_.test(U))throw new Error(`invalid anchor "${U}"`);j.call(this,`#${U}`)}}}),o;function g(T,$,w){if($!==void 0&&!E_(T,$))throw h(w)}function h(T){return new Error(`reference "${T}" resolves to more than one schema`)}}Re.getSchemaRefs=B_});var Xr=R(It=>{"use strict";Object.defineProperty(It,"__esModule",{value:!0});It.getData=It.KeywordCxt=It.validateFunctionCode=void 0;var cl=qu(),dl=Jr(),_p=ip(),no=Jr(),L_=Qu(),Yr=el(),hp=rl(),G=L(),M=yt(),V_=Qr(),bt=te(),Kr=zr();function H_(r){if(_l(r)&&(gl(r),hl(r))){Q_(r);return}ml(r,()=>(0,cl.topBoolOrEmptySchema)(r))}It.validateFunctionCode=H_;function ml({gen:r,validateName:e,schema:t,schemaEnv:n,opts:a},s){a.code.es5?r.func(e,(0,G._)`${M.default.data}, ${M.default.valCxt}`,n.$async,()=>{r.code((0,G._)`"use strict"; ${fl(t,a)}`),J_(r,a),r.code(s)}):r.func(e,(0,G._)`${M.default.data}, ${z_(a)}`,n.$async,()=>r.code(fl(t,a)).code(s))}function z_(r){return(0,G._)`{${M.default.instancePath}="", ${M.default.parentData}, ${M.default.parentDataProperty}, ${M.default.rootData}=${M.default.data}${r.dynamicRef?(0,G._)`, ${M.default.dynamicAnchors}={}`:G.nil}}={}`}function J_(r,e){r.if(M.default.valCxt,()=>{r.var(M.default.instancePath,(0,G._)`${M.default.valCxt}.${M.default.instancePath}`),r.var(M.default.parentData,(0,G._)`${M.default.valCxt}.${M.default.parentData}`),r.var(M.default.parentDataProperty,(0,G._)`${M.default.valCxt}.${M.default.parentDataProperty}`),r.var(M.default.rootData,(0,G._)`${M.default.valCxt}.${M.default.rootData}`),e.dynamicRef&&r.var(M.default.dynamicAnchors,(0,G._)`${M.default.valCxt}.${M.default.dynamicAnchors}`)},()=>{r.var(M.default.instancePath,(0,G._)`""`),r.var(M.default.parentData,(0,G._)`undefined`),r.var(M.default.parentDataProperty,(0,G._)`undefined`),r.var(M.default.rootData,M.default.data),e.dynamicRef&&r.var(M.default.dynamicAnchors,(0,G._)`{}`)})}function Q_(r){let{schema:e,opts:t,gen:n}=r;ml(r,()=>{t.$comment&&e.$comment&&yl(r),eg(r),n.let(M.default.vErrors,null),n.let(M.default.errors,0),t.unevaluated&&K_(r),Tl(r),ng(r)})}function K_(r){let{gen:e,validateName:t}=r;r.evaluated=e.const("evaluated",(0,G._)`${t}.evaluated`),e.if((0,G._)`${r.evaluated}.dynamicProps`,()=>e.assign((0,G._)`${r.evaluated}.props`,(0,G._)`undefined`)),e.if((0,G._)`${r.evaluated}.dynamicItems`,()=>e.assign((0,G._)`${r.evaluated}.items`,(0,G._)`undefined`))}function fl(r,e){let t=typeof r=="object"&&r[e.schemaId];return t&&(e.code.source||e.code.process)?(0,G._)`/*# sourceURL=${t} */`:G.nil}function Y_(r,e){if(_l(r)&&(gl(r),hl(r))){X_(r,e);return}(0,cl.boolOrEmptySchema)(r,e)}function hl({schema:r,self:e}){if(typeof r=="boolean")return!r;for(let t in r)if(e.RULES.all[t])return!0;return!1}function _l(r){return typeof r.schema!="boolean"}function X_(r,e){let{schema:t,gen:n,opts:a}=r;a.$comment&&t.$comment&&yl(r),tg(r),rg(r);let s=n.const("_errs",M.default.errors);Tl(r,s),n.var(e,(0,G._)`${s} === ${M.default.errors}`)}function gl(r){(0,bt.checkUnknownRules)(r),Z_(r)}function Tl(r,e){if(r.opts.jtd)return ul(r,[],!1,e);let t=(0,dl.getSchemaTypes)(r.schema),n=(0,dl.coerceAndCheckDataType)(r,t);ul(r,t,!n,e)}function Z_(r){let{schema:e,errSchemaPath:t,opts:n,self:a}=r;e.$ref&&n.ignoreKeywordsWithRef&&(0,bt.schemaHasRulesButRef)(e,a.RULES)&&a.logger.warn(`$ref: keywords ignored in schema at path "${t}"`)}function eg(r){let{schema:e,opts:t}=r;e.default!==void 0&&t.useDefaults&&t.strictSchema&&(0,bt.checkStrictMode)(r,"default is ignored in the schema root")}function tg(r){let e=r.schema[r.opts.schemaId];e&&(r.baseId=(0,V_.resolveUrl)(r.opts.uriResolver,r.baseId,e))}function rg(r){if(r.schema.$async&&!r.schemaEnv.$async)throw new Error("async schema in sync schema")}function yl({gen:r,schemaEnv:e,schema:t,errSchemaPath:n,opts:a}){let s=t.$comment;if(a.$comment===!0)r.code((0,G._)`${M.default.self}.logger.log(${s})`);else if(typeof a.$comment=="function"){let i=(0,G.str)`${n}/$comment`,o=r.scopeValue("root",{ref:e.root});r.code((0,G._)`${M.default.self}.opts.$comment(${s}, ${i}, ${o}.schema)`)}}function ng(r){let{gen:e,schemaEnv:t,validateName:n,ValidationError:a,opts:s}=r;t.$async?e.if((0,G._)`${M.default.errors} === 0`,()=>e.return(M.default.data),()=>e.throw((0,G._)`new ${a}(${M.default.vErrors})`)):(e.assign((0,G._)`${n}.errors`,M.default.vErrors),s.unevaluated&&ag(r),e.return((0,G._)`${M.default.errors} === 0`))}function ag({gen:r,evaluated:e,props:t,items:n}){t instanceof G.Name&&r.assign((0,G._)`${e}.props`,t),n instanceof G.Name&&r.assign((0,G._)`${e}.items`,n)}function ul(r,e,t,n){let{gen:a,schema:s,data:i,allErrors:o,opts:d,self:g}=r,{RULES:h}=g;if(s.$ref&&(d.ignoreKeywordsWithRef||!(0,bt.schemaHasRulesButRef)(s,h))){a.block(()=>Fl(r,"$ref",h.all.$ref.definition));return}d.jtd||sg(r,e),a.block(()=>{for(let $ of h.rules)T($);T(h.post)});function T($){(0,_p.shouldUseGroup)(s,$)&&($.type?(a.if((0,no.checkDataType)($.type,i,d.strictNumbers)),ll(r,$),e.length===1&&e[0]===$.type&&t&&(a.else(),(0,no.reportTypeError)(r)),a.endIf()):ll(r,$),o||a.if((0,G._)`${M.default.errors} === ${n||0}`))}}function ll(r,e){let{gen:t,schema:n,opts:{useDefaults:a}}=r;a&&(0,L_.assignDefaults)(r,e.type),t.block(()=>{for(let s of e.rules)(0,_p.shouldUseRule)(n,s)&&Fl(r,s.keyword,s.definition,e.type)})}function sg(r,e){r.schemaEnv.meta||!r.opts.strictTypes||(ig(r,e),r.opts.allowUnionTypes||og(r,e),pg(r,r.dataTypes))}function ig(r,e){if(e.length){if(!r.dataTypes.length){r.dataTypes=e;return}e.forEach(t=>{bl(r.dataTypes,t)||gp(r,`type "${t}" not allowed by context "${r.dataTypes.join(",")}"`)}),fg(r,e)}}function og(r,e){e.length>1&&!(e.length===2&&e.includes("null"))&&gp(r,"use allowUnionTypes to allow union type keyword")}function pg(r,e){let t=r.self.RULES.all;for(let n in t){let a=t[n];if(typeof a=="object"&&(0,_p.shouldUseRule)(r.schema,a)){let{type:s}=a.definition;s.length&&!s.some(i=>dg(e,i))&&gp(r,`missing type "${s.join(",")}" for keyword "${n}"`)}}}function dg(r,e){return r.includes(e)||e==="number"&&r.includes("integer")}function bl(r,e){return r.includes(e)||e==="integer"&&r.includes("number")}function fg(r,e){let t=[];for(let n of r.dataTypes)bl(e,n)?t.push(n):e.includes("integer")&&n==="number"&&t.push("integer");r.dataTypes=t}function gp(r,e){let t=r.schemaEnv.baseId+r.errSchemaPath;e+=` at "${t}" (strictTypes)`,(0,bt.checkStrictMode)(r,e,r.opts.strictTypes)}var ao=class{constructor(e,t,n){if((0,Yr.validateKeywordUsage)(e,t,n),this.gen=e.gen,this.allErrors=e.allErrors,this.keyword=n,this.data=e.data,this.schema=e.schema[n],this.$data=t.$data&&e.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,bt.schemaRefOrVal)(e,this.schema,n,this.$data),this.schemaType=t.schemaType,this.parentSchema=e.schema,this.params={},this.it=e,this.def=t,this.$data)this.schemaCode=e.gen.const("vSchema",xl(this.$data,e));else if(this.schemaCode=this.schemaValue,!(0,Yr.validSchemaType)(this.schema,t.schemaType,t.allowUndefined))throw new Error(`${n} value must be ${JSON.stringify(t.schemaType)}`);("code"in t?t.trackErrors:t.errors!==!1)&&(this.errsCount=e.gen.const("_errs",M.default.errors))}result(e,t,n){this.failResult((0,G.not)(e),t,n)}failResult(e,t,n){this.gen.if(e),n?n():this.error(),t?(this.gen.else(),t(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(e,t){this.failResult((0,G.not)(e),void 0,t)}fail(e){if(e===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(e),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(e){if(!this.$data)return this.fail(e);let{schemaCode:t}=this;this.fail((0,G._)`${t} !== undefined && (${(0,G.or)(this.invalid$data(),e)})`)}error(e,t,n){if(t){this.setParams(t),this._error(e,n),this.setParams({});return}this._error(e,n)}_error(e,t){(e?Kr.reportExtraError:Kr.reportError)(this,this.def.error,t)}$dataError(){(0,Kr.reportError)(this,this.def.$dataError||Kr.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,Kr.resetErrorsCount)(this.gen,this.errsCount)}ok(e){this.allErrors||this.gen.if(e)}setParams(e,t){t?Object.assign(this.params,e):this.params=e}block$data(e,t,n=G.nil){this.gen.block(()=>{this.check$data(e,n),t()})}check$data(e=G.nil,t=G.nil){if(!this.$data)return;let{gen:n,schemaCode:a,schemaType:s,def:i}=this;n.if((0,G.or)((0,G._)`${a} === undefined`,t)),e!==G.nil&&n.assign(e,!0),(s.length||i.validateSchema)&&(n.elseIf(this.invalid$data()),this.$dataError(),e!==G.nil&&n.assign(e,!1)),n.else()}invalid$data(){let{gen:e,schemaCode:t,schemaType:n,def:a,it:s}=this;return(0,G.or)(i(),o());function i(){if(n.length){if(!(t instanceof G.Name))throw new Error("ajv implementation error");let d=Array.isArray(n)?n:[n];return(0,G._)`${(0,no.checkDataTypes)(d,t,s.opts.strictNumbers,no.DataType.Wrong)}`}return G.nil}function o(){if(a.validateSchema){let d=e.scopeValue("validate$data",{ref:a.validateSchema});return(0,G._)`!${d}(${t})`}return G.nil}}subschema(e,t){let n=(0,hp.getSubschema)(this.it,e);(0,hp.extendSubschemaData)(n,this.it,e),(0,hp.extendSubschemaMode)(n,e);let a=Z(v(v({},this.it),n),{items:void 0,props:void 0});return Y_(a,t),a}mergeEvaluated(e,t){let{it:n,gen:a}=this;n.opts.unevaluated&&(n.props!==!0&&e.props!==void 0&&(n.props=bt.mergeEvaluated.props(a,e.props,n.props,t)),n.items!==!0&&e.items!==void 0&&(n.items=bt.mergeEvaluated.items(a,e.items,n.items,t)))}mergeValidEvaluated(e,t){let{it:n,gen:a}=this;if(n.opts.unevaluated&&(n.props!==!0||n.items!==!0))return a.if(t,()=>this.mergeEvaluated(e,G.Name)),!0}};It.KeywordCxt=ao;function Fl(r,e,t,n){let a=new ao(r,t,e);"code"in t?t.code(a,n):a.$data&&t.validate?(0,Yr.funcKeywordCode)(a,t):"macro"in t?(0,Yr.macroKeywordCode)(a,t):(t.compile||t.validate)&&(0,Yr.funcKeywordCode)(a,t)}var ug=/^\/(?:[^~]|~0|~1)*$/,lg=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function xl(r,{dataLevel:e,dataNames:t,dataPathArr:n}){let a,s;if(r==="")return M.default.rootData;if(r[0]==="/"){if(!ug.test(r))throw new Error(`Invalid JSON-pointer: ${r}`);a=r,s=M.default.rootData}else{let g=lg.exec(r);if(!g)throw new Error(`Invalid JSON-pointer: ${r}`);let h=+g[1];if(a=g[2],a==="#"){if(h>=e)throw new Error(d("property/index",h));return n[e-h]}if(h>e)throw new Error(d("data",h));if(s=t[e-h],!a)return s}let i=s,o=a.split("/");for(let g of o)g&&(s=(0,G._)`${s}${(0,G.getProperty)((0,bt.unescapeJsonPointer)(g))}`,i=(0,G._)`${i} && ${s}`);return i;function d(g,h){return`Cannot access ${g} ${h} levels up, current level is ${e}`}}It.getData=xl});var so=R(yp=>{"use strict";Object.defineProperty(yp,"__esModule",{value:!0});var Tp=class extends Error{constructor(e){super("validation failed"),this.errors=e,this.ajv=this.validation=!0}};yp.default=Tp});var Zr=R(xp=>{"use strict";Object.defineProperty(xp,"__esModule",{value:!0});var bp=Qr(),Fp=class extends Error{constructor(e,t,n,a){super(a||`can't resolve reference ${n} from id ${t}`),this.missingRef=(0,bp.resolveUrl)(e,t,n),this.missingSchema=(0,bp.normalizeId)((0,bp.getFullPath)(e,this.missingRef))}};xp.default=Fp});var oo=R(He=>{"use strict";Object.defineProperty(He,"__esModule",{value:!0});He.resolveSchema=He.getCompilingSchema=He.resolveRef=He.compileSchema=He.SchemaEnv=void 0;var Ye=L(),cg=so(),Bt=yt(),Xe=Qr(),Ol=te(),mg=Xr(),mr=class{constructor(e){var t;this.refs={},this.dynamicAnchors={};let n;typeof e.schema=="object"&&(n=e.schema),this.schema=e.schema,this.schemaId=e.schemaId,this.root=e.root||this,this.baseId=(t=e.baseId)!==null&&t!==void 0?t:(0,Xe.normalizeId)(n==null?void 0:n[e.schemaId||"$id"]),this.schemaPath=e.schemaPath,this.localRefs=e.localRefs,this.meta=e.meta,this.$async=n==null?void 0:n.$async,this.refs={}}};He.SchemaEnv=mr;function $p(r){let e=$l.call(this,r);if(e)return e;let t=(0,Xe.getFullPath)(this.opts.uriResolver,r.root.baseId),{es5:n,lines:a}=this.opts.code,{ownProperties:s}=this.opts,i=new Ye.CodeGen(this.scope,{es5:n,lines:a,ownProperties:s}),o;r.$async&&(o=i.scopeValue("Error",{ref:cg.default,code:(0,Ye._)`require("ajv/dist/runtime/validation_error").default`}));let d=i.scopeName("validate");r.validateName=d;let g={gen:i,allErrors:this.opts.allErrors,data:Bt.default.data,parentData:Bt.default.parentData,parentDataProperty:Bt.default.parentDataProperty,dataNames:[Bt.default.data],dataPathArr:[Ye.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:i.scopeValue("schema",this.opts.code.source===!0?{ref:r.schema,code:(0,Ye.stringify)(r.schema)}:{ref:r.schema}),validateName:d,ValidationError:o,schema:r.schema,schemaEnv:r,rootId:t,baseId:r.baseId||t,schemaPath:Ye.nil,errSchemaPath:r.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,Ye._)`""`,opts:this.opts,self:this},h;try{this._compilations.add(r),(0,mg.validateFunctionCode)(g),i.optimize(this.opts.code.optimize);let T=i.toString();h=`${i.scopeRefs(Bt.default.scope)}return ${T}`,this.opts.code.process&&(h=this.opts.code.process(h,r));let w=new Function(`${Bt.default.self}`,`${Bt.default.scope}`,h)(this,this.scope.get());if(this.scope.value(d,{ref:w}),w.errors=null,w.schema=r.schema,w.schemaEnv=r,r.$async&&(w.$async=!0),this.opts.code.source===!0&&(w.source={validateName:d,validateCode:T,scopeValues:i._values}),this.opts.unevaluated){let{props:b,items:O}=g;w.evaluated={props:b instanceof Ye.Name?void 0:b,items:O instanceof Ye.Name?void 0:O,dynamicProps:b instanceof Ye.Name,dynamicItems:O instanceof Ye.Name},w.source&&(w.source.evaluated=(0,Ye.stringify)(w.evaluated))}return r.validate=w,r}catch(T){throw delete r.validate,delete r.validateName,h&&this.logger.error("Error compiling schema, function code:",h),T}finally{this._compilations.delete(r)}}He.compileSchema=$p;function hg(r,e,t){var n;t=(0,Xe.resolveUrl)(this.opts.uriResolver,e,t);let a=r.refs[t];if(a)return a;let s=Tg.call(this,r,t);if(s===void 0){let i=(n=r.localRefs)===null||n===void 0?void 0:n[t],{schemaId:o}=this.opts;i&&(s=new mr({schema:i,schemaId:o,root:r,baseId:e}))}if(s!==void 0)return r.refs[t]=_g.call(this,s)}He.resolveRef=hg;function _g(r){return(0,Xe.inlineRef)(r.schema,this.opts.inlineRefs)?r.schema:r.validate?r:$p.call(this,r)}function $l(r){for(let e of this._compilations)if(gg(e,r))return e}He.getCompilingSchema=$l;function gg(r,e){return r.schema===e.schema&&r.root===e.root&&r.baseId===e.baseId}function Tg(r,e){let t;for(;typeof(t=this.refs[e])=="string";)e=t;return t||this.schemas[e]||io.call(this,r,e)}function io(r,e){let t=this.opts.uriResolver.parse(e),n=(0,Xe._getFullPath)(this.opts.uriResolver,t),a=(0,Xe.getFullPath)(this.opts.uriResolver,r.baseId,void 0);if(Object.keys(r.schema).length>0&&n===a)return Op.call(this,t,r);let s=(0,Xe.normalizeId)(n),i=this.refs[s]||this.schemas[s];if(typeof i=="string"){let o=io.call(this,r,i);return typeof(o==null?void 0:o.schema)!="object"?void 0:Op.call(this,t,o)}if(typeof(i==null?void 0:i.schema)=="object"){if(i.validate||$p.call(this,i),s===(0,Xe.normalizeId)(e)){let{schema:o}=i,{schemaId:d}=this.opts,g=o[d];return g&&(a=(0,Xe.resolveUrl)(this.opts.uriResolver,a,g)),new mr({schema:o,schemaId:d,root:r,baseId:a})}return Op.call(this,t,i)}}He.resolveSchema=io;var yg=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function Op(r,{baseId:e,schema:t,root:n}){var a;if(((a=r.fragment)===null||a===void 0?void 0:a[0])!=="/")return;for(let o of r.fragment.slice(1).split("/")){if(typeof t=="boolean")return;let d=t[(0,Ol.unescapeFragment)(o)];if(d===void 0)return;t=d;let g=typeof t=="object"&&t[this.opts.schemaId];!yg.has(o)&&g&&(e=(0,Xe.resolveUrl)(this.opts.uriResolver,e,g))}let s;if(typeof t!="boolean"&&t.$ref&&!(0,Ol.schemaHasRulesButRef)(t,this.RULES)){let o=(0,Xe.resolveUrl)(this.opts.uriResolver,e,t.$ref);s=io.call(this,n,o)}let{schemaId:i}=this.opts;if(s=s||new mr({schema:t,schemaId:i,root:n,baseId:e}),s.schema!==s.root.schema)return s}});var wl=R((GI,bg)=>{bg.exports={$id:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",description:"Meta-schema for $data reference (JSON AnySchema extension proposal)",type:"object",required:["$data"],properties:{$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},additionalProperties:!1}});var jl=R((po,Il)=>{(function(r,e){typeof po=="object"&&typeof Il!="undefined"?e(po):typeof define=="function"&&define.amd?define(["exports"],e):e(r.URI=r.URI||{})})(po,function(r){"use strict";function e(){for(var f=arguments.length,p=Array(f),_=0;_<f;_++)p[_]=arguments[_];if(p.length>1){p[0]=p[0].slice(0,-1);for(var F=p.length-1,x=1;x<F;++x)p[x]=p[x].slice(1,-1);return p[F]=p[F].slice(1),p.join("")}else return p[0]}function t(f){return"(?:"+f+")"}function n(f){return f===void 0?"undefined":f===null?"null":Object.prototype.toString.call(f).split(" ").pop().split("]").shift().toLowerCase()}function a(f){return f.toUpperCase()}function s(f){return f!=null?f instanceof Array?f:typeof f.length!="number"||f.split||f.setInterval||f.call?[f]:Array.prototype.slice.call(f):[]}function i(f,p){var _=f;if(p)for(var F in p)_[F]=p[F];return _}function o(f){var p="[A-Za-z]",_="[\\x0D]",F="[0-9]",x="[\\x22]",k=e(F,"[A-Fa-f]"),W="[\\x0A]",X="[\\x20]",ne=t(t("%[EFef]"+k+"%"+k+k+"%"+k+k)+"|"+t("%[89A-Fa-f]"+k+"%"+k+k)+"|"+t("%"+k+k)),Te="[\\:\\/\\?\\#\\[\\]\\@]",K="[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]",ce=e(Te,K),ye=f?"[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]":"[]",le=f?"[\\uE000-\\uF8FF]":"[]",re=e(p,F,"[\\-\\.\\_\\~]",ye),me=t(p+e(p,F,"[\\+\\-\\.]")+"*"),se=t(t(ne+"|"+e(re,K,"[\\:]"))+"*"),kt=t(t("25[0-5]")+"|"+t("2[0-4]"+F)+"|"+t("1"+F+F)+"|"+t("[1-9]"+F)+"|"+F),Ee=t(t("25[0-5]")+"|"+t("2[0-4]"+F)+"|"+t("1"+F+F)+"|"+t("0?[1-9]"+F)+"|0?0?"+F),Ue=t(Ee+"\\."+Ee+"\\."+Ee+"\\."+Ee),oe=t(k+"{1,4}"),Me=t(t(oe+"\\:"+oe)+"|"+Ue),qe=t(t(oe+"\\:")+"{6}"+Me),at=t("\\:\\:"+t(oe+"\\:")+"{5}"+Me),Ct=t(t(oe)+"?\\:\\:"+t(oe+"\\:")+"{4}"+Me),lt=t(t(t(oe+"\\:")+"{0,1}"+oe)+"?\\:\\:"+t(oe+"\\:")+"{3}"+Me),Sr=t(t(t(oe+"\\:")+"{0,2}"+oe)+"?\\:\\:"+t(oe+"\\:")+"{2}"+Me),Wi=t(t(t(oe+"\\:")+"{0,3}"+oe)+"?\\:\\:"+oe+"\\:"+Me),Ai=t(t(t(oe+"\\:")+"{0,4}"+oe)+"?\\:\\:"+Me),er=t(t(t(oe+"\\:")+"{0,5}"+oe)+"?\\:\\:"+oe),tr=t(t(t(oe+"\\:")+"{0,6}"+oe)+"?\\:\\:"),ct=t([qe,at,Ct,lt,Sr,Wi,Ai,er,tr].join("|")),rr=t(t(re+"|"+ne)+"+"),Ro=t(ct+"\\%25"+rr),Rt=t(ct+t("\\%25|\\%(?!"+k+"{2})")+rr),Pm=t("[vV]"+k+"+\\."+e(re,K,"[\\:]")+"+"),Em=t("\\["+t(Rt+"|"+ct+"|"+Pm)+"\\]"),ou=t(t(ne+"|"+e(re,K))+"*"),kr=t(Em+"|"+Ue+"(?!"+ou+")|"+ou),Cr=t(F+"*"),pu=t(t(se+"@")+"?"+kr+t("\\:"+Cr)+"?"),Rr=t(ne+"|"+e(re,K,"[\\:\\@]")),Mm=t(Rr+"*"),du=t(Rr+"+"),Dm=t(t(ne+"|"+e(re,K,"[\\@]"))+"+"),mt=t(t("\\/"+Mm)+"*"),nr=t("\\/"+t(du+mt)+"?"),Go=t(Dm+mt),Ni=t(du+mt),ar="(?!"+Rr+")",$w=t(mt+"|"+nr+"|"+Go+"|"+Ni+"|"+ar),sr=t(t(Rr+"|"+e("[\\/\\?]",le))+"*"),Gr=t(t(Rr+"|[\\/\\?]")+"*"),fu=t(t("\\/\\/"+pu+mt)+"|"+nr+"|"+Ni+"|"+ar),Wm=t(me+"\\:"+fu+t("\\?"+sr)+"?"+t("\\#"+Gr)+"?"),Am=t(t("\\/\\/"+pu+mt)+"|"+nr+"|"+Go+"|"+ar),Nm=t(Am+t("\\?"+sr)+"?"+t("\\#"+Gr)+"?"),ww=t(Wm+"|"+Nm),Iw=t(me+"\\:"+fu+t("\\?"+sr)+"?"),jw="^("+me+")\\:"+t(t("\\/\\/("+t("("+se+")@")+"?("+kr+")"+t("\\:("+Cr+")")+"?)")+"?("+mt+"|"+nr+"|"+Ni+"|"+ar+")")+t("\\?("+sr+")")+"?"+t("\\#("+Gr+")")+"?$",vw="^(){0}"+t(t("\\/\\/("+t("("+se+")@")+"?("+kr+")"+t("\\:("+Cr+")")+"?)")+"?("+mt+"|"+nr+"|"+Go+"|"+ar+")")+t("\\?("+sr+")")+"?"+t("\\#("+Gr+")")+"?$",Sw="^("+me+")\\:"+t(t("\\/\\/("+t("("+se+")@")+"?("+kr+")"+t("\\:("+Cr+")")+"?)")+"?("+mt+"|"+nr+"|"+Ni+"|"+ar+")")+t("\\?("+sr+")")+"?$",kw="^"+t("\\#("+Gr+")")+"?$",Cw="^"+t("("+se+")@")+"?("+kr+")"+t("\\:("+Cr+")")+"?$";return{NOT_SCHEME:new RegExp(e("[^]",p,F,"[\\+\\-\\.]"),"g"),NOT_USERINFO:new RegExp(e("[^\\%\\:]",re,K),"g"),NOT_HOST:new RegExp(e("[^\\%\\[\\]\\:]",re,K),"g"),NOT_PATH:new RegExp(e("[^\\%\\/\\:\\@]",re,K),"g"),NOT_PATH_NOSCHEME:new RegExp(e("[^\\%\\/\\@]",re,K),"g"),NOT_QUERY:new RegExp(e("[^\\%]",re,K,"[\\:\\@\\/\\?]",le),"g"),NOT_FRAGMENT:new RegExp(e("[^\\%]",re,K,"[\\:\\@\\/\\?]"),"g"),ESCAPE:new RegExp(e("[^]",re,K),"g"),UNRESERVED:new RegExp(re,"g"),OTHER_CHARS:new RegExp(e("[^\\%]",re,ce),"g"),PCT_ENCODED:new RegExp(ne,"g"),IPV4ADDRESS:new RegExp("^("+Ue+")$"),IPV6ADDRESS:new RegExp("^\\[?("+ct+")"+t(t("\\%25|\\%(?!"+k+"{2})")+"("+rr+")")+"?\\]?$")}}var d=o(!1),g=o(!0),h=function(){function f(p,_){var F=[],x=!0,k=!1,W=void 0;try{for(var X=p[Symbol.iterator](),ne;!(x=(ne=X.next()).done)&&(F.push(ne.value),!(_&&F.length===_));x=!0);}catch(Te){k=!0,W=Te}finally{try{!x&&X.return&&X.return()}finally{if(k)throw W}}return F}return function(p,_){if(Array.isArray(p))return p;if(Symbol.iterator in Object(p))return f(p,_);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),T=function(f){if(Array.isArray(f)){for(var p=0,_=Array(f.length);p<f.length;p++)_[p]=f[p];return _}else return Array.from(f)},$=2147483647,w=36,b=1,O=26,I=38,j=700,H=72,U=128,ae="-",D=/^xn--/,Ae=/[^\0-\x7E]/,Je=/[\x2E\u3002\uFF0E\uFF61]/g,Ir={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},vt=w-b,Oe=Math.floor,St=String.fromCharCode;function et(f){throw new RangeError(Ir[f])}function Mi(f,p){for(var _=[],F=f.length;F--;)_[F]=p(f[F]);return _}function Di(f,p){var _=f.split("@"),F="";_.length>1&&(F=_[0]+"@",f=_[1]),f=f.replace(Je,".");var x=f.split("."),k=Mi(x,p).join(".");return F+k}function Lf(f){for(var p=[],_=0,F=f.length;_<F;){var x=f.charCodeAt(_++);if(x>=55296&&x<=56319&&_<F){var k=f.charCodeAt(_++);(k&64512)==56320?p.push(((x&1023)<<10)+(k&1023)+65536):(p.push(x),_--)}else p.push(x)}return p}var um=function(p){return String.fromCodePoint.apply(String,T(p))},lm=function(p){return p-48<10?p-22:p-65<26?p-65:p-97<26?p-97:w},Vf=function(p,_){return p+22+75*(p<26)-((_!=0)<<5)},B=function(p,_,F){var x=0;for(p=F?Oe(p/j):p>>1,p+=Oe(p/_);p>vt*O>>1;x+=w)p=Oe(p/vt);return Oe(x+(vt+1)*p/(p+I))},Hf=function(p){var _=[],F=p.length,x=0,k=U,W=H,X=p.lastIndexOf(ae);X<0&&(X=0);for(var ne=0;ne<X;++ne)p.charCodeAt(ne)>=128&&et("not-basic"),_.push(p.charCodeAt(ne));for(var Te=X>0?X+1:0;Te<F;){for(var K=x,ce=1,ye=w;;ye+=w){Te>=F&&et("invalid-input");var le=lm(p.charCodeAt(Te++));(le>=w||le>Oe(($-x)/ce))&&et("overflow"),x+=le*ce;var re=ye<=W?b:ye>=W+O?O:ye-W;if(le<re)break;var me=w-re;ce>Oe($/me)&&et("overflow"),ce*=me}var se=_.length+1;W=B(x-K,se,K==0),Oe(x/se)>$-k&&et("overflow"),k+=Oe(x/se),x%=se,_.splice(x++,0,k)}return String.fromCodePoint.apply(String,_)},zf=function(p){var _=[];p=Lf(p);var F=p.length,x=U,k=0,W=H,X=!0,ne=!1,Te=void 0;try{for(var K=p[Symbol.iterator](),ce;!(X=(ce=K.next()).done);X=!0){var ye=ce.value;ye<128&&_.push(St(ye))}}catch(Rt){ne=!0,Te=Rt}finally{try{!X&&K.return&&K.return()}finally{if(ne)throw Te}}var le=_.length,re=le;for(le&&_.push(ae);re<F;){var me=$,se=!0,kt=!1,Ee=void 0;try{for(var Ue=p[Symbol.iterator](),oe;!(se=(oe=Ue.next()).done);se=!0){var Me=oe.value;Me>=x&&Me<me&&(me=Me)}}catch(Rt){kt=!0,Ee=Rt}finally{try{!se&&Ue.return&&Ue.return()}finally{if(kt)throw Ee}}var qe=re+1;me-x>Oe(($-k)/qe)&&et("overflow"),k+=(me-x)*qe,x=me;var at=!0,Ct=!1,lt=void 0;try{for(var Sr=p[Symbol.iterator](),Wi;!(at=(Wi=Sr.next()).done);at=!0){var Ai=Wi.value;if(Ai<x&&++k>$&&et("overflow"),Ai==x){for(var er=k,tr=w;;tr+=w){var ct=tr<=W?b:tr>=W+O?O:tr-W;if(er<ct)break;var rr=er-ct,Ro=w-ct;_.push(St(Vf(ct+rr%Ro,0))),er=Oe(rr/Ro)}_.push(St(Vf(er,0))),W=B(k,qe,re==le),k=0,++re}}}catch(Rt){Ct=!0,lt=Rt}finally{try{!at&&Sr.return&&Sr.return()}finally{if(Ct)throw lt}}++k,++x}return _.join("")},cm=function(p){return Di(p,function(_){return D.test(_)?Hf(_.slice(4).toLowerCase()):_})},mm=function(p){return Di(p,function(_){return Ae.test(_)?"xn--"+zf(_):_})},Kt={version:"2.1.0",ucs2:{decode:Lf,encode:um},decode:Hf,encode:zf,toASCII:mm,toUnicode:cm},Ne={};function tt(f){var p=f.charCodeAt(0),_=void 0;return p<16?_="%0"+p.toString(16).toUpperCase():p<128?_="%"+p.toString(16).toUpperCase():p<2048?_="%"+(p>>6|192).toString(16).toUpperCase()+"%"+(p&63|128).toString(16).toUpperCase():_="%"+(p>>12|224).toString(16).toUpperCase()+"%"+(p>>6&63|128).toString(16).toUpperCase()+"%"+(p&63|128).toString(16).toUpperCase(),_}function Yt(f){for(var p="",_=0,F=f.length;_<F;){var x=parseInt(f.substr(_+1,2),16);if(x<128)p+=String.fromCharCode(x),_+=3;else if(x>=194&&x<224){if(F-_>=6){var k=parseInt(f.substr(_+4,2),16);p+=String.fromCharCode((x&31)<<6|k&63)}else p+=f.substr(_,6);_+=6}else if(x>=224){if(F-_>=9){var W=parseInt(f.substr(_+4,2),16),X=parseInt(f.substr(_+7,2),16);p+=String.fromCharCode((x&15)<<12|(W&63)<<6|X&63)}else p+=f.substr(_,9);_+=9}else p+=f.substr(_,3),_+=3}return p}function vo(f,p){function _(F){var x=Yt(F);return x.match(p.UNRESERVED)?x:F}return f.scheme&&(f.scheme=String(f.scheme).replace(p.PCT_ENCODED,_).toLowerCase().replace(p.NOT_SCHEME,"")),f.userinfo!==void 0&&(f.userinfo=String(f.userinfo).replace(p.PCT_ENCODED,_).replace(p.NOT_USERINFO,tt).replace(p.PCT_ENCODED,a)),f.host!==void 0&&(f.host=String(f.host).replace(p.PCT_ENCODED,_).toLowerCase().replace(p.NOT_HOST,tt).replace(p.PCT_ENCODED,a)),f.path!==void 0&&(f.path=String(f.path).replace(p.PCT_ENCODED,_).replace(f.scheme?p.NOT_PATH:p.NOT_PATH_NOSCHEME,tt).replace(p.PCT_ENCODED,a)),f.query!==void 0&&(f.query=String(f.query).replace(p.PCT_ENCODED,_).replace(p.NOT_QUERY,tt).replace(p.PCT_ENCODED,a)),f.fragment!==void 0&&(f.fragment=String(f.fragment).replace(p.PCT_ENCODED,_).replace(p.NOT_FRAGMENT,tt).replace(p.PCT_ENCODED,a)),f}function So(f){return f.replace(/^0*(.*)/,"$1")||"0"}function ko(f,p){var _=f.match(p.IPV4ADDRESS)||[],F=h(_,2),x=F[1];return x?x.split(".").map(So).join("."):f}function Jf(f,p){var _=f.match(p.IPV6ADDRESS)||[],F=h(_,3),x=F[1],k=F[2];if(x){for(var W=x.toLowerCase().split("::").reverse(),X=h(W,2),ne=X[0],Te=X[1],K=Te?Te.split(":").map(So):[],ce=ne.split(":").map(So),ye=p.IPV4ADDRESS.test(ce[ce.length-1]),le=ye?7:8,re=ce.length-le,me=Array(le),se=0;se<le;++se)me[se]=K[se]||ce[re+se]||"";ye&&(me[le-1]=ko(me[le-1],p));var kt=me.reduce(function(qe,at,Ct){if(!at||at==="0"){var lt=qe[qe.length-1];lt&&lt.index+lt.length===Ct?lt.length++:qe.push({index:Ct,length:1})}return qe},[]),Ee=kt.sort(function(qe,at){return at.length-qe.length})[0],Ue=void 0;if(Ee&&Ee.length>1){var oe=me.slice(0,Ee.index),Me=me.slice(Ee.index+Ee.length);Ue=oe.join(":")+"::"+Me.join(":")}else Ue=me.join(":");return k&&(Ue+="%"+k),Ue}else return f}var hm=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,P="".match(/(){0}/)[1]===void 0;function ft(f){var p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},_={},F=p.iri!==!1?g:d;p.reference==="suffix"&&(f=(p.scheme?p.scheme+":":"")+"//"+f);var x=f.match(hm);if(x){P?(_.scheme=x[1],_.userinfo=x[3],_.host=x[4],_.port=parseInt(x[5],10),_.path=x[6]||"",_.query=x[7],_.fragment=x[8],isNaN(_.port)&&(_.port=x[5])):(_.scheme=x[1]||void 0,_.userinfo=f.indexOf("@")!==-1?x[3]:void 0,_.host=f.indexOf("//")!==-1?x[4]:void 0,_.port=parseInt(x[5],10),_.path=x[6]||"",_.query=f.indexOf("?")!==-1?x[7]:void 0,_.fragment=f.indexOf("#")!==-1?x[8]:void 0,isNaN(_.port)&&(_.port=f.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?x[4]:void 0)),_.host&&(_.host=Jf(ko(_.host,F),F)),_.scheme===void 0&&_.userinfo===void 0&&_.host===void 0&&_.port===void 0&&!_.path&&_.query===void 0?_.reference="same-document":_.scheme===void 0?_.reference="relative":_.fragment===void 0?_.reference="absolute":_.reference="uri",p.reference&&p.reference!=="suffix"&&p.reference!==_.reference&&(_.error=_.error||"URI is not a "+p.reference+" reference.");var k=Ne[(p.scheme||_.scheme||"").toLowerCase()];if(!p.unicodeSupport&&(!k||!k.unicodeSupport)){if(_.host&&(p.domainHost||k&&k.domainHost))try{_.host=Kt.toASCII(_.host.replace(F.PCT_ENCODED,Yt).toLowerCase())}catch(W){_.error=_.error||"Host's domain name can not be converted to ASCII via punycode: "+W}vo(_,d)}else vo(_,F);k&&k.parse&&k.parse(_,p)}else _.error=_.error||"URI can not be parsed.";return _}function _m(f,p){var _=p.iri!==!1?g:d,F=[];return f.userinfo!==void 0&&(F.push(f.userinfo),F.push("@")),f.host!==void 0&&F.push(Jf(ko(String(f.host),_),_).replace(_.IPV6ADDRESS,function(x,k,W){return"["+k+(W?"%25"+W:"")+"]"})),(typeof f.port=="number"||typeof f.port=="string")&&(F.push(":"),F.push(String(f.port))),F.length?F.join(""):void 0}var Qf=/^\.\.?\//,Kf=/^\/\.(\/|$)/,Yf=/^\/\.\.(\/|$)/,gm=/^\/?(?:.|\n)*?(?=\/|$)/;function Xt(f){for(var p=[];f.length;)if(f.match(Qf))f=f.replace(Qf,"");else if(f.match(Kf))f=f.replace(Kf,"/");else if(f.match(Yf))f=f.replace(Yf,"/"),p.pop();else if(f==="."||f==="..")f="";else{var _=f.match(gm);if(_){var F=_[0];f=f.slice(F.length),p.push(F)}else throw new Error("Unexpected dot segment condition")}return p.join("")}function rt(f){var p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},_=p.iri?g:d,F=[],x=Ne[(p.scheme||f.scheme||"").toLowerCase()];if(x&&x.serialize&&x.serialize(f,p),f.host&&!_.IPV6ADDRESS.test(f.host)){if(p.domainHost||x&&x.domainHost)try{f.host=p.iri?Kt.toUnicode(f.host):Kt.toASCII(f.host.replace(_.PCT_ENCODED,Yt).toLowerCase())}catch(X){f.error=f.error||"Host's domain name can not be converted to "+(p.iri?"Unicode":"ASCII")+" via punycode: "+X}}vo(f,_),p.reference!=="suffix"&&f.scheme&&(F.push(f.scheme),F.push(":"));var k=_m(f,p);if(k!==void 0&&(p.reference!=="suffix"&&F.push("//"),F.push(k),f.path&&f.path.charAt(0)!=="/"&&F.push("/")),f.path!==void 0){var W=f.path;!p.absolutePath&&(!x||!x.absolutePath)&&(W=Xt(W)),k===void 0&&(W=W.replace(/^\/\//,"/%2F")),F.push(W)}return f.query!==void 0&&(F.push("?"),F.push(f.query)),f.fragment!==void 0&&(F.push("#"),F.push(f.fragment)),F.join("")}function Xf(f,p){var _=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},F=arguments[3],x={};return F||(f=ft(rt(f,_),_),p=ft(rt(p,_),_)),_=_||{},!_.tolerant&&p.scheme?(x.scheme=p.scheme,x.userinfo=p.userinfo,x.host=p.host,x.port=p.port,x.path=Xt(p.path||""),x.query=p.query):(p.userinfo!==void 0||p.host!==void 0||p.port!==void 0?(x.userinfo=p.userinfo,x.host=p.host,x.port=p.port,x.path=Xt(p.path||""),x.query=p.query):(p.path?(p.path.charAt(0)==="/"?x.path=Xt(p.path):((f.userinfo!==void 0||f.host!==void 0||f.port!==void 0)&&!f.path?x.path="/"+p.path:f.path?x.path=f.path.slice(0,f.path.lastIndexOf("/")+1)+p.path:x.path=p.path,x.path=Xt(x.path)),x.query=p.query):(x.path=f.path,p.query!==void 0?x.query=p.query:x.query=f.query),x.userinfo=f.userinfo,x.host=f.host,x.port=f.port),x.scheme=f.scheme),x.fragment=p.fragment,x}function Tm(f,p,_){var F=i({scheme:"null"},_);return rt(Xf(ft(f,F),ft(p,F),F,!0),F)}function ym(f,p){return typeof f=="string"?f=rt(ft(f,p),p):n(f)==="object"&&(f=ft(rt(f,p),p)),f}function bm(f,p,_){return typeof f=="string"?f=rt(ft(f,_),_):n(f)==="object"&&(f=rt(f,_)),typeof p=="string"?p=rt(ft(p,_),_):n(p)==="object"&&(p=rt(p,_)),f===p}function Fm(f,p){return f&&f.toString().replace(!p||!p.iri?d.ESCAPE:g.ESCAPE,tt)}function ut(f,p){return f&&f.toString().replace(!p||!p.iri?d.PCT_ENCODED:g.PCT_ENCODED,Yt)}var jr={scheme:"http",domainHost:!0,parse:function(p,_){return p.host||(p.error=p.error||"HTTP URIs must have a host."),p},serialize:function(p,_){var F=String(p.scheme).toLowerCase()==="https";return(p.port===(F?443:80)||p.port==="")&&(p.port=void 0),p.path||(p.path="/"),p}},Zf={scheme:"https",domainHost:jr.domainHost,parse:jr.parse,serialize:jr.serialize};function eu(f){return typeof f.secure=="boolean"?f.secure:String(f.scheme).toLowerCase()==="wss"}var vr={scheme:"ws",domainHost:!0,parse:function(p,_){var F=p;return F.secure=eu(F),F.resourceName=(F.path||"/")+(F.query?"?"+F.query:""),F.path=void 0,F.query=void 0,F},serialize:function(p,_){if((p.port===(eu(p)?443:80)||p.port==="")&&(p.port=void 0),typeof p.secure=="boolean"&&(p.scheme=p.secure?"wss":"ws",p.secure=void 0),p.resourceName){var F=p.resourceName.split("?"),x=h(F,2),k=x[0],W=x[1];p.path=k&&k!=="/"?k:void 0,p.query=W,p.resourceName=void 0}return p.fragment=void 0,p}},tu={scheme:"wss",domainHost:vr.domainHost,parse:vr.parse,serialize:vr.serialize},xm={},Om=!0,ru="[A-Za-z0-9\\-\\.\\_\\~"+(Om?"\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF":"")+"]",nt="[0-9A-Fa-f]",$m=t(t("%[EFef]"+nt+"%"+nt+nt+"%"+nt+nt)+"|"+t("%[89A-Fa-f]"+nt+"%"+nt+nt)+"|"+t("%"+nt+nt)),wm="[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]",Im="[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",jm=e(Im,'[\\"\\\\]'),vm="[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]",Sm=new RegExp(ru,"g"),Zt=new RegExp($m,"g"),km=new RegExp(e("[^]",wm,"[\\.]",'[\\"]',jm),"g"),nu=new RegExp(e("[^]",ru,vm),"g"),Cm=nu;function Co(f){var p=Yt(f);return p.match(Sm)?p:f}var au={scheme:"mailto",parse:function(p,_){var F=p,x=F.to=F.path?F.path.split(","):[];if(F.path=void 0,F.query){for(var k=!1,W={},X=F.query.split("&"),ne=0,Te=X.length;ne<Te;++ne){var K=X[ne].split("=");switch(K[0]){case"to":for(var ce=K[1].split(","),ye=0,le=ce.length;ye<le;++ye)x.push(ce[ye]);break;case"subject":F.subject=ut(K[1],_);break;case"body":F.body=ut(K[1],_);break;default:k=!0,W[ut(K[0],_)]=ut(K[1],_);break}}k&&(F.headers=W)}F.query=void 0;for(var re=0,me=x.length;re<me;++re){var se=x[re].split("@");if(se[0]=ut(se[0]),_.unicodeSupport)se[1]=ut(se[1],_).toLowerCase();else try{se[1]=Kt.toASCII(ut(se[1],_).toLowerCase())}catch(kt){F.error=F.error||"Email address's domain name can not be converted to ASCII via punycode: "+kt}x[re]=se.join("@")}return F},serialize:function(p,_){var F=p,x=s(p.to);if(x){for(var k=0,W=x.length;k<W;++k){var X=String(x[k]),ne=X.lastIndexOf("@"),Te=X.slice(0,ne).replace(Zt,Co).replace(Zt,a).replace(km,tt),K=X.slice(ne+1);try{K=_.iri?Kt.toUnicode(K):Kt.toASCII(ut(K,_).toLowerCase())}catch(re){F.error=F.error||"Email address's domain name can not be converted to "+(_.iri?"Unicode":"ASCII")+" via punycode: "+re}x[k]=Te+"@"+K}F.path=x.join(",")}var ce=p.headers=p.headers||{};p.subject&&(ce.subject=p.subject),p.body&&(ce.body=p.body);var ye=[];for(var le in ce)ce[le]!==xm[le]&&ye.push(le.replace(Zt,Co).replace(Zt,a).replace(nu,tt)+"="+ce[le].replace(Zt,Co).replace(Zt,a).replace(Cm,tt));return ye.length&&(F.query=ye.join("&")),F}},Rm=/^([^\:]+)\:(.*)/,su={scheme:"urn",parse:function(p,_){var F=p.path&&p.path.match(Rm),x=p;if(F){var k=_.scheme||x.scheme||"urn",W=F[1].toLowerCase(),X=F[2],ne=k+":"+(_.nid||W),Te=Ne[ne];x.nid=W,x.nss=X,x.path=void 0,Te&&(x=Te.parse(x,_))}else x.error=x.error||"URN can not be parsed.";return x},serialize:function(p,_){var F=_.scheme||p.scheme||"urn",x=p.nid,k=F+":"+(_.nid||x),W=Ne[k];W&&(p=W.serialize(p,_));var X=p,ne=p.nss;return X.path=(x||_.nid)+":"+ne,X}},Gm=/^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/,iu={scheme:"urn:uuid",parse:function(p,_){var F=p;return F.uuid=F.nss,F.nss=void 0,!_.tolerant&&(!F.uuid||!F.uuid.match(Gm))&&(F.error=F.error||"UUID is not valid."),F},serialize:function(p,_){var F=p;return F.nss=(p.uuid||"").toLowerCase(),F}};Ne[jr.scheme]=jr,Ne[Zf.scheme]=Zf,Ne[vr.scheme]=vr,Ne[tu.scheme]=tu,Ne[au.scheme]=au,Ne[su.scheme]=su,Ne[iu.scheme]=iu,r.SCHEMES=Ne,r.pctEncChar=tt,r.pctDecChars=Yt,r.parse=ft,r.removeDotSegments=Xt,r.serialize=rt,r.resolveComponents=Xf,r.resolve=Tm,r.normalize=ym,r.equal=bm,r.escapeComponent=Fm,r.unescapeComponent=ut,Object.defineProperty(r,"__esModule",{value:!0})})});var Sl=R(wp=>{"use strict";Object.defineProperty(wp,"__esModule",{value:!0});var vl=jl();vl.code='require("ajv/dist/runtime/uri").default';wp.default=vl});var Dl=R(Fe=>{"use strict";Object.defineProperty(Fe,"__esModule",{value:!0});Fe.CodeGen=Fe.Name=Fe.nil=Fe.stringify=Fe.str=Fe._=Fe.KeywordCxt=void 0;var Fg=Xr();Object.defineProperty(Fe,"KeywordCxt",{enumerable:!0,get:function(){return Fg.KeywordCxt}});var hr=L();Object.defineProperty(Fe,"_",{enumerable:!0,get:function(){return hr._}});Object.defineProperty(Fe,"str",{enumerable:!0,get:function(){return hr.str}});Object.defineProperty(Fe,"stringify",{enumerable:!0,get:function(){return hr.stringify}});Object.defineProperty(Fe,"nil",{enumerable:!0,get:function(){return hr.nil}});Object.defineProperty(Fe,"Name",{enumerable:!0,get:function(){return hr.Name}});Object.defineProperty(Fe,"CodeGen",{enumerable:!0,get:function(){return hr.CodeGen}});var xg=so(),Pl=Zr(),Og=sp(),en=oo(),$g=L(),tn=Qr(),fo=Jr(),jp=te(),kl=wl(),wg=Sl(),El=(r,e)=>new RegExp(r,e);El.code="new RegExp";var Ig=["removeAdditional","useDefaults","coerceTypes"],jg=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),vg={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},Sg={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},Cl=200;function kg(r){var e,t,n,a,s,i,o,d,g,h,T,$,w,b,O,I,j,H,U,ae,D,Ae,Je,Ir,vt;let Oe=r.strict,St=(e=r.code)===null||e===void 0?void 0:e.optimize,et=St===!0||St===void 0?1:St||0,Mi=(n=(t=r.code)===null||t===void 0?void 0:t.regExp)!==null&&n!==void 0?n:El,Di=(a=r.uriResolver)!==null&&a!==void 0?a:wg.default;return{strictSchema:(i=(s=r.strictSchema)!==null&&s!==void 0?s:Oe)!==null&&i!==void 0?i:!0,strictNumbers:(d=(o=r.strictNumbers)!==null&&o!==void 0?o:Oe)!==null&&d!==void 0?d:!0,strictTypes:(h=(g=r.strictTypes)!==null&&g!==void 0?g:Oe)!==null&&h!==void 0?h:"log",strictTuples:($=(T=r.strictTuples)!==null&&T!==void 0?T:Oe)!==null&&$!==void 0?$:"log",strictRequired:(b=(w=r.strictRequired)!==null&&w!==void 0?w:Oe)!==null&&b!==void 0?b:!1,code:r.code?Z(v({},r.code),{optimize:et,regExp:Mi}):{optimize:et,regExp:Mi},loopRequired:(O=r.loopRequired)!==null&&O!==void 0?O:Cl,loopEnum:(I=r.loopEnum)!==null&&I!==void 0?I:Cl,meta:(j=r.meta)!==null&&j!==void 0?j:!0,messages:(H=r.messages)!==null&&H!==void 0?H:!0,inlineRefs:(U=r.inlineRefs)!==null&&U!==void 0?U:!0,schemaId:(ae=r.schemaId)!==null&&ae!==void 0?ae:"$id",addUsedSchema:(D=r.addUsedSchema)!==null&&D!==void 0?D:!0,validateSchema:(Ae=r.validateSchema)!==null&&Ae!==void 0?Ae:!0,validateFormats:(Je=r.validateFormats)!==null&&Je!==void 0?Je:!0,unicodeRegExp:(Ir=r.unicodeRegExp)!==null&&Ir!==void 0?Ir:!0,int32range:(vt=r.int32range)!==null&&vt!==void 0?vt:!0,uriResolver:Di}}var rn=class{constructor(e={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,e=this.opts=v(v({},e),kg(e));let{es5:t,lines:n}=this.opts.code;this.scope=new $g.ValueScope({scope:{},prefixes:jg,es5:t,lines:n}),this.logger=Mg(e.logger);let a=e.validateFormats;e.validateFormats=!1,this.RULES=(0,Og.getRules)(),Rl.call(this,vg,e,"NOT SUPPORTED"),Rl.call(this,Sg,e,"DEPRECATED","warn"),this._metaOpts=Pg.call(this),e.formats&&Rg.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),e.keywords&&Gg.call(this,e.keywords),typeof e.meta=="object"&&this.addMetaSchema(e.meta),Cg.call(this),e.validateFormats=a}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){let{$data:e,meta:t,schemaId:n}=this.opts,a=kl;n==="id"&&(a=v({},kl),a.id=a.$id,delete a.$id),t&&e&&this.addMetaSchema(a,a[n],!1)}defaultMeta(){let{meta:e,schemaId:t}=this.opts;return this.opts.defaultMeta=typeof e=="object"?e[t]||e:void 0}validate(e,t){let n;if(typeof e=="string"){if(n=this.getSchema(e),!n)throw new Error(`no schema with key or ref "${e}"`)}else n=this.compile(e);let a=n(t);return"$async"in n||(this.errors=n.errors),a}compile(e,t){let n=this._addSchema(e,t);return n.validate||this._compileSchemaEnv(n)}compileAsync(e,t){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");let{loadSchema:n}=this.opts;return a.call(this,e,t);function a(h,T){return _e(this,null,function*(){yield s.call(this,h.$schema);let $=this._addSchema(h,T);return $.validate||i.call(this,$)})}function s(h){return _e(this,null,function*(){h&&!this.getSchema(h)&&(yield a.call(this,{$ref:h},!0))})}function i(h){return _e(this,null,function*(){try{return this._compileSchemaEnv(h)}catch(T){if(!(T instanceof Pl.default))throw T;return o.call(this,T),yield d.call(this,T.missingSchema),i.call(this,h)}})}function o({missingSchema:h,missingRef:T}){if(this.refs[h])throw new Error(`AnySchema ${h} is loaded but ${T} cannot be resolved`)}function d(h){return _e(this,null,function*(){let T=yield g.call(this,h);this.refs[h]||(yield s.call(this,T.$schema)),this.refs[h]||this.addSchema(T,h,t)})}function g(h){return _e(this,null,function*(){let T=this._loading[h];if(T)return T;try{return yield this._loading[h]=n(h)}finally{delete this._loading[h]}})}}addSchema(e,t,n,a=this.opts.validateSchema){if(Array.isArray(e)){for(let i of e)this.addSchema(i,void 0,n,a);return this}let s;if(typeof e=="object"){let{schemaId:i}=this.opts;if(s=e[i],s!==void 0&&typeof s!="string")throw new Error(`schema ${i} must be string`)}return t=(0,tn.normalizeId)(t||s),this._checkUnique(t),this.schemas[t]=this._addSchema(e,n,t,a,!0),this}addMetaSchema(e,t,n=this.opts.validateSchema){return this.addSchema(e,t,!0,n),this}validateSchema(e,t){if(typeof e=="boolean")return!0;let n;if(n=e.$schema,n!==void 0&&typeof n!="string")throw new Error("$schema must be a string");if(n=n||this.opts.defaultMeta||this.defaultMeta(),!n)return this.logger.warn("meta-schema not available"),this.errors=null,!0;let a=this.validate(n,e);if(!a&&t){let s="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(s);else throw new Error(s)}return a}getSchema(e){let t;for(;typeof(t=Gl.call(this,e))=="string";)e=t;if(t===void 0){let{schemaId:n}=this.opts,a=new en.SchemaEnv({schema:{},schemaId:n});if(t=en.resolveSchema.call(this,a,e),!t)return;this.refs[e]=t}return t.validate||this._compileSchemaEnv(t)}removeSchema(e){if(e instanceof RegExp)return this._removeAllSchemas(this.schemas,e),this._removeAllSchemas(this.refs,e),this;switch(typeof e){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{let t=Gl.call(this,e);return typeof t=="object"&&this._cache.delete(t.schema),delete this.schemas[e],delete this.refs[e],this}case"object":{let t=e;this._cache.delete(t);let n=e[this.opts.schemaId];return n&&(n=(0,tn.normalizeId)(n),delete this.schemas[n],delete this.refs[n]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(e){for(let t of e)this.addKeyword(t);return this}addKeyword(e,t){let n;if(typeof e=="string")n=e,typeof t=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),t.keyword=n);else if(typeof e=="object"&&t===void 0){if(t=e,n=t.keyword,Array.isArray(n)&&!n.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(Wg.call(this,n,t),!t)return(0,jp.eachItem)(n,s=>Ip.call(this,s)),this;Ng.call(this,t);let a=Z(v({},t),{type:(0,fo.getJSONTypes)(t.type),schemaType:(0,fo.getJSONTypes)(t.schemaType)});return(0,jp.eachItem)(n,a.type.length===0?s=>Ip.call(this,s,a):s=>a.type.forEach(i=>Ip.call(this,s,a,i))),this}getKeyword(e){let t=this.RULES.all[e];return typeof t=="object"?t.definition:!!t}removeKeyword(e){let{RULES:t}=this;delete t.keywords[e],delete t.all[e];for(let n of t.rules){let a=n.rules.findIndex(s=>s.keyword===e);a>=0&&n.rules.splice(a,1)}return this}addFormat(e,t){return typeof t=="string"&&(t=new RegExp(t)),this.formats[e]=t,this}errorsText(e=this.errors,{separator:t=", ",dataVar:n="data"}={}){return!e||e.length===0?"No errors":e.map(a=>`${n}${a.instancePath} ${a.message}`).reduce((a,s)=>a+t+s)}$dataMetaSchema(e,t){let n=this.RULES.all;e=JSON.parse(JSON.stringify(e));for(let a of t){let s=a.split("/").slice(1),i=e;for(let o of s)i=i[o];for(let o in n){let d=n[o];if(typeof d!="object")continue;let{$data:g}=d.definition,h=i[o];g&&h&&(i[o]=Ml(h))}}return e}_removeAllSchemas(e,t){for(let n in e){let a=e[n];(!t||t.test(n))&&(typeof a=="string"?delete e[n]:a&&!a.meta&&(this._cache.delete(a.schema),delete e[n]))}}_addSchema(e,t,n,a=this.opts.validateSchema,s=this.opts.addUsedSchema){let i,{schemaId:o}=this.opts;if(typeof e=="object")i=e[o];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof e!="boolean")throw new Error("schema must be object or boolean")}let d=this._cache.get(e);if(d!==void 0)return d;n=(0,tn.normalizeId)(i||n);let g=tn.getSchemaRefs.call(this,e,n);return d=new en.SchemaEnv({schema:e,schemaId:o,meta:t,baseId:n,localRefs:g}),this._cache.set(d.schema,d),s&&!n.startsWith("#")&&(n&&this._checkUnique(n),this.refs[n]=d),a&&this.validateSchema(e,!0),d}_checkUnique(e){if(this.schemas[e]||this.refs[e])throw new Error(`schema with key or id "${e}" already exists`)}_compileSchemaEnv(e){if(e.meta?this._compileMetaSchema(e):en.compileSchema.call(this,e),!e.validate)throw new Error("ajv implementation error");return e.validate}_compileMetaSchema(e){let t=this.opts;this.opts=this._metaOpts;try{en.compileSchema.call(this,e)}finally{this.opts=t}}};rn.ValidationError=xg.default;rn.MissingRefError=Pl.default;Fe.default=rn;function Rl(r,e,t,n="error"){for(let a in r){let s=a;s in e&&this.logger[n](`${t}: option ${a}. ${r[s]}`)}}function Gl(r){return r=(0,tn.normalizeId)(r),this.schemas[r]||this.refs[r]}function Cg(){let r=this.opts.schemas;if(r)if(Array.isArray(r))this.addSchema(r);else for(let e in r)this.addSchema(r[e],e)}function Rg(){for(let r in this.opts.formats){let e=this.opts.formats[r];e&&this.addFormat(r,e)}}function Gg(r){if(Array.isArray(r)){this.addVocabulary(r);return}this.logger.warn("keywords option as map is deprecated, pass array");for(let e in r){let t=r[e];t.keyword||(t.keyword=e),this.addKeyword(t)}}function Pg(){let r=v({},this.opts);for(let e of Ig)delete r[e];return r}var Eg={log(){},warn(){},error(){}};function Mg(r){if(r===!1)return Eg;if(r===void 0)return console;if(r.log&&r.warn&&r.error)return r;throw new Error("logger must implement log, warn and error methods")}var Dg=/^[a-z_$][a-z0-9_$:-]*$/i;function Wg(r,e){let{RULES:t}=this;if((0,jp.eachItem)(r,n=>{if(t.keywords[n])throw new Error(`Keyword ${n} is already defined`);if(!Dg.test(n))throw new Error(`Keyword ${n} has invalid name`)}),!!e&&e.$data&&!("code"in e||"validate"in e))throw new Error('$data keyword must have "code" or "validate" function')}function Ip(r,e,t){var n;let a=e==null?void 0:e.post;if(t&&a)throw new Error('keyword with "post" flag cannot have "type"');let{RULES:s}=this,i=a?s.post:s.rules.find(({type:d})=>d===t);if(i||(i={type:t,rules:[]},s.rules.push(i)),s.keywords[r]=!0,!e)return;let o={keyword:r,definition:Z(v({},e),{type:(0,fo.getJSONTypes)(e.type),schemaType:(0,fo.getJSONTypes)(e.schemaType)})};e.before?Ag.call(this,i,o,e.before):i.rules.push(o),s.all[r]=o,(n=e.implements)===null||n===void 0||n.forEach(d=>this.addKeyword(d))}function Ag(r,e,t){let n=r.rules.findIndex(a=>a.keyword===t);n>=0?r.rules.splice(n,0,e):(r.rules.push(e),this.logger.warn(`rule ${t} is not defined`))}function Ng(r){let{metaSchema:e}=r;e!==void 0&&(r.$data&&this.opts.$data&&(e=Ml(e)),r.validateSchema=this.compile(e,!0))}var Ug={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function Ml(r){return{anyOf:[r,Ug]}}});var Wl=R(vp=>{"use strict";Object.defineProperty(vp,"__esModule",{value:!0});var qg={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};vp.default=qg});var ql=R(Lt=>{"use strict";Object.defineProperty(Lt,"__esModule",{value:!0});Lt.callRef=Lt.getValidate=void 0;var Bg=Zr(),Al=Ve(),Ge=L(),_r=yt(),Nl=oo(),uo=te(),Lg={keyword:"$ref",schemaType:"string",code(r){let{gen:e,schema:t,it:n}=r,{baseId:a,schemaEnv:s,validateName:i,opts:o,self:d}=n,{root:g}=s;if((t==="#"||t==="#/")&&a===g.baseId)return T();let h=Nl.resolveRef.call(d,g,a,t);if(h===void 0)throw new Bg.default(n.opts.uriResolver,a,t);if(h instanceof Nl.SchemaEnv)return $(h);return w(h);function T(){if(s===g)return lo(r,i,s,s.$async);let b=e.scopeValue("root",{ref:g});return lo(r,(0,Ge._)`${b}.validate`,g,g.$async)}function $(b){let O=Ul(r,b);lo(r,O,b,b.$async)}function w(b){let O=e.scopeValue("schema",o.code.source===!0?{ref:b,code:(0,Ge.stringify)(b)}:{ref:b}),I=e.name("valid"),j=r.subschema({schema:b,dataTypes:[],schemaPath:Ge.nil,topSchemaRef:O,errSchemaPath:t},I);r.mergeEvaluated(j),r.ok(I)}}};function Ul(r,e){let{gen:t}=r;return e.validate?t.scopeValue("validate",{ref:e.validate}):(0,Ge._)`${t.scopeValue("wrapper",{ref:e})}.validate`}Lt.getValidate=Ul;function lo(r,e,t,n){let{gen:a,it:s}=r,{allErrors:i,schemaEnv:o,opts:d}=s,g=d.passContext?_r.default.this:Ge.nil;n?h():T();function h(){if(!o.$async)throw new Error("async schema referenced by sync schema");let b=a.let("valid");a.try(()=>{a.code((0,Ge._)`await ${(0,Al.callValidateCode)(r,e,g)}`),w(e),i||a.assign(b,!0)},O=>{a.if((0,Ge._)`!(${O} instanceof ${s.ValidationError})`,()=>a.throw(O)),$(O),i||a.assign(b,!1)}),r.ok(b)}function T(){r.result((0,Al.callValidateCode)(r,e,g),()=>w(e),()=>$(e))}function $(b){let O=(0,Ge._)`${b}.errors`;a.assign(_r.default.vErrors,(0,Ge._)`${_r.default.vErrors} === null ? ${O} : ${_r.default.vErrors}.concat(${O})`),a.assign(_r.default.errors,(0,Ge._)`${_r.default.vErrors}.length`)}function w(b){var O;if(!s.opts.unevaluated)return;let I=(O=t==null?void 0:t.validate)===null||O===void 0?void 0:O.evaluated;if(s.props!==!0)if(I&&!I.dynamicProps)I.props!==void 0&&(s.props=uo.mergeEvaluated.props(a,I.props,s.props));else{let j=a.var("props",(0,Ge._)`${b}.evaluated.props`);s.props=uo.mergeEvaluated.props(a,j,s.props,Ge.Name)}if(s.items!==!0)if(I&&!I.dynamicItems)I.items!==void 0&&(s.items=uo.mergeEvaluated.items(a,I.items,s.items));else{let j=a.var("items",(0,Ge._)`${b}.evaluated.items`);s.items=uo.mergeEvaluated.items(a,j,s.items,Ge.Name)}}}Lt.callRef=lo;Lt.default=Lg});var Bl=R(Sp=>{"use strict";Object.defineProperty(Sp,"__esModule",{value:!0});var Vg=Wl(),Hg=ql(),zg=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",Vg.default,Hg.default];Sp.default=zg});var Ll=R(kp=>{"use strict";Object.defineProperty(kp,"__esModule",{value:!0});var co=L(),jt=co.operators,mo={maximum:{okStr:"<=",ok:jt.LTE,fail:jt.GT},minimum:{okStr:">=",ok:jt.GTE,fail:jt.LT},exclusiveMaximum:{okStr:"<",ok:jt.LT,fail:jt.GTE},exclusiveMinimum:{okStr:">",ok:jt.GT,fail:jt.LTE}},Jg={message:({keyword:r,schemaCode:e})=>(0,co.str)`must be ${mo[r].okStr} ${e}`,params:({keyword:r,schemaCode:e})=>(0,co._)`{comparison: ${mo[r].okStr}, limit: ${e}}`},Qg={keyword:Object.keys(mo),type:"number",schemaType:"number",$data:!0,error:Jg,code(r){let{keyword:e,data:t,schemaCode:n}=r;r.fail$data((0,co._)`${t} ${mo[e].fail} ${n} || isNaN(${t})`)}};kp.default=Qg});var Vl=R(Cp=>{"use strict";Object.defineProperty(Cp,"__esModule",{value:!0});var nn=L(),Kg={message:({schemaCode:r})=>(0,nn.str)`must be multiple of ${r}`,params:({schemaCode:r})=>(0,nn._)`{multipleOf: ${r}}`},Yg={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:Kg,code(r){let{gen:e,data:t,schemaCode:n,it:a}=r,s=a.opts.multipleOfPrecision,i=e.let("res"),o=s?(0,nn._)`Math.abs(Math.round(${i}) - ${i}) > 1e-${s}`:(0,nn._)`${i} !== parseInt(${i})`;r.fail$data((0,nn._)`(${n} === 0 || (${i} = ${t}/${n}, ${o}))`)}};Cp.default=Yg});var zl=R(Rp=>{"use strict";Object.defineProperty(Rp,"__esModule",{value:!0});function Hl(r){let e=r.length,t=0,n=0,a;for(;n<e;)t++,a=r.charCodeAt(n++),a>=55296&&a<=56319&&n<e&&(a=r.charCodeAt(n),(a&64512)===56320&&n++);return t}Rp.default=Hl;Hl.code='require("ajv/dist/runtime/ucs2length").default'});var Jl=R(Gp=>{"use strict";Object.defineProperty(Gp,"__esModule",{value:!0});var Vt=L(),Xg=te(),Zg=zl(),eT={message({keyword:r,schemaCode:e}){let t=r==="maxLength"?"more":"fewer";return(0,Vt.str)`must NOT have ${t} than ${e} characters`},params:({schemaCode:r})=>(0,Vt._)`{limit: ${r}}`},tT={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:eT,code(r){let{keyword:e,data:t,schemaCode:n,it:a}=r,s=e==="maxLength"?Vt.operators.GT:Vt.operators.LT,i=a.opts.unicode===!1?(0,Vt._)`${t}.length`:(0,Vt._)`${(0,Xg.useFunc)(r.gen,Zg.default)}(${t})`;r.fail$data((0,Vt._)`${i} ${s} ${n}`)}};Gp.default=tT});var Ql=R(Pp=>{"use strict";Object.defineProperty(Pp,"__esModule",{value:!0});var rT=Ve(),ho=L(),nT={message:({schemaCode:r})=>(0,ho.str)`must match pattern "${r}"`,params:({schemaCode:r})=>(0,ho._)`{pattern: ${r}}`},aT={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:nT,code(r){let{data:e,$data:t,schema:n,schemaCode:a,it:s}=r,i=s.opts.unicodeRegExp?"u":"",o=t?(0,ho._)`(new RegExp(${a}, ${i}))`:(0,rT.usePattern)(r,n);r.fail$data((0,ho._)`!${o}.test(${e})`)}};Pp.default=aT});var Kl=R(Ep=>{"use strict";Object.defineProperty(Ep,"__esModule",{value:!0});var an=L(),sT={message({keyword:r,schemaCode:e}){let t=r==="maxProperties"?"more":"fewer";return(0,an.str)`must NOT have ${t} than ${e} properties`},params:({schemaCode:r})=>(0,an._)`{limit: ${r}}`},iT={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:sT,code(r){let{keyword:e,data:t,schemaCode:n}=r,a=e==="maxProperties"?an.operators.GT:an.operators.LT;r.fail$data((0,an._)`Object.keys(${t}).length ${a} ${n}`)}};Ep.default=iT});var Yl=R(Mp=>{"use strict";Object.defineProperty(Mp,"__esModule",{value:!0});var sn=Ve(),on=L(),oT=te(),pT={message:({params:{missingProperty:r}})=>(0,on.str)`must have required property '${r}'`,params:({params:{missingProperty:r}})=>(0,on._)`{missingProperty: ${r}}`},dT={keyword:"required",type:"object",schemaType:"array",$data:!0,error:pT,code(r){let{gen:e,schema:t,schemaCode:n,data:a,$data:s,it:i}=r,{opts:o}=i;if(!s&&t.length===0)return;let d=t.length>=o.loopRequired;if(i.allErrors?g():h(),o.strictRequired){let w=r.parentSchema.properties,{definedProperties:b}=r.it;for(let O of t)if((w==null?void 0:w[O])===void 0&&!b.has(O)){let I=i.schemaEnv.baseId+i.errSchemaPath,j=`required property "${O}" is not defined at "${I}" (strictRequired)`;(0,oT.checkStrictMode)(i,j,i.opts.strictRequired)}}function g(){if(d||s)r.block$data(on.nil,T);else for(let w of t)(0,sn.checkReportMissingProp)(r,w)}function h(){let w=e.let("missing");if(d||s){let b=e.let("valid",!0);r.block$data(b,()=>$(w,b)),r.ok(b)}else e.if((0,sn.checkMissingProp)(r,t,w)),(0,sn.reportMissingProp)(r,w),e.else()}function T(){e.forOf("prop",n,w=>{r.setParams({missingProperty:w}),e.if((0,sn.noPropertyInData)(e,a,w,o.ownProperties),()=>r.error())})}function $(w,b){r.setParams({missingProperty:w}),e.forOf(w,n,()=>{e.assign(b,(0,sn.propertyInData)(e,a,w,o.ownProperties)),e.if((0,on.not)(b),()=>{r.error(),e.break()})},on.nil)}}};Mp.default=dT});var Xl=R(Dp=>{"use strict";Object.defineProperty(Dp,"__esModule",{value:!0});var pn=L(),fT={message({keyword:r,schemaCode:e}){let t=r==="maxItems"?"more":"fewer";return(0,pn.str)`must NOT have ${t} than ${e} items`},params:({schemaCode:r})=>(0,pn._)`{limit: ${r}}`},uT={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:fT,code(r){let{keyword:e,data:t,schemaCode:n}=r,a=e==="maxItems"?pn.operators.GT:pn.operators.LT;r.fail$data((0,pn._)`${t}.length ${a} ${n}`)}};Dp.default=uT});var _o=R(Wp=>{"use strict";Object.defineProperty(Wp,"__esModule",{value:!0});var Zl=cp();Zl.code='require("ajv/dist/runtime/equal").default';Wp.default=Zl});var ec=R(Np=>{"use strict";Object.defineProperty(Np,"__esModule",{value:!0});var Ap=Jr(),xe=L(),lT=te(),cT=_o(),mT={message:({params:{i:r,j:e}})=>(0,xe.str)`must NOT have duplicate items (items ## ${e} and ${r} are identical)`,params:({params:{i:r,j:e}})=>(0,xe._)`{i: ${r}, j: ${e}}`},hT={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:mT,code(r){let{gen:e,data:t,$data:n,schema:a,parentSchema:s,schemaCode:i,it:o}=r;if(!n&&!a)return;let d=e.let("valid"),g=s.items?(0,Ap.getSchemaTypes)(s.items):[];r.block$data(d,h,(0,xe._)`${i} === false`),r.ok(d);function h(){let b=e.let("i",(0,xe._)`${t}.length`),O=e.let("j");r.setParams({i:b,j:O}),e.assign(d,!0),e.if((0,xe._)`${b} > 1`,()=>(T()?$:w)(b,O))}function T(){return g.length>0&&!g.some(b=>b==="object"||b==="array")}function $(b,O){let I=e.name("item"),j=(0,Ap.checkDataTypes)(g,I,o.opts.strictNumbers,Ap.DataType.Wrong),H=e.const("indices",(0,xe._)`{}`);e.for((0,xe._)`;${b}--;`,()=>{e.let(I,(0,xe._)`${t}[${b}]`),e.if(j,(0,xe._)`continue`),g.length>1&&e.if((0,xe._)`typeof ${I} == "string"`,(0,xe._)`${I} += "_"`),e.if((0,xe._)`typeof ${H}[${I}] == "number"`,()=>{e.assign(O,(0,xe._)`${H}[${I}]`),r.error(),e.assign(d,!1).break()}).code((0,xe._)`${H}[${I}] = ${b}`)})}function w(b,O){let I=(0,lT.useFunc)(e,cT.default),j=e.name("outer");e.label(j).for((0,xe._)`;${b}--;`,()=>e.for((0,xe._)`${O} = ${b}; ${O}--;`,()=>e.if((0,xe._)`${I}(${t}[${b}], ${t}[${O}])`,()=>{r.error(),e.assign(d,!1).break(j)})))}}};Np.default=hT});var tc=R(qp=>{"use strict";Object.defineProperty(qp,"__esModule",{value:!0});var Up=L(),_T=te(),gT=_o(),TT={message:"must be equal to constant",params:({schemaCode:r})=>(0,Up._)`{allowedValue: ${r}}`},yT={keyword:"const",$data:!0,error:TT,code(r){let{gen:e,data:t,$data:n,schemaCode:a,schema:s}=r;n||s&&typeof s=="object"?r.fail$data((0,Up._)`!${(0,_T.useFunc)(e,gT.default)}(${t}, ${a})`):r.fail((0,Up._)`${s} !== ${t}`)}};qp.default=yT});var rc=R(Bp=>{"use strict";Object.defineProperty(Bp,"__esModule",{value:!0});var dn=L(),bT=te(),FT=_o(),xT={message:"must be equal to one of the allowed values",params:({schemaCode:r})=>(0,dn._)`{allowedValues: ${r}}`},OT={keyword:"enum",schemaType:"array",$data:!0,error:xT,code(r){let{gen:e,data:t,$data:n,schema:a,schemaCode:s,it:i}=r;if(!n&&a.length===0)throw new Error("enum must have non-empty array");let o=a.length>=i.opts.loopEnum,d,g=()=>d!=null?d:d=(0,bT.useFunc)(e,FT.default),h;if(o||n)h=e.let("valid"),r.block$data(h,T);else{if(!Array.isArray(a))throw new Error("ajv implementation error");let w=e.const("vSchema",s);h=(0,dn.or)(...a.map((b,O)=>$(w,O)))}r.pass(h);function T(){e.assign(h,!1),e.forOf("v",s,w=>e.if((0,dn._)`${g()}(${t}, ${w})`,()=>e.assign(h,!0).break()))}function $(w,b){let O=a[b];return typeof O=="object"&&O!==null?(0,dn._)`${g()}(${t}, ${w}[${b}])`:(0,dn._)`${t} === ${O}`}}};Bp.default=OT});var nc=R(Lp=>{"use strict";Object.defineProperty(Lp,"__esModule",{value:!0});var $T=Ll(),wT=Vl(),IT=Jl(),jT=Ql(),vT=Kl(),ST=Yl(),kT=Xl(),CT=ec(),RT=tc(),GT=rc(),PT=[$T.default,wT.default,IT.default,jT.default,vT.default,ST.default,kT.default,CT.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},RT.default,GT.default];Lp.default=PT});var Hp=R(fn=>{"use strict";Object.defineProperty(fn,"__esModule",{value:!0});fn.validateAdditionalItems=void 0;var Ht=L(),Vp=te(),ET={message:({params:{len:r}})=>(0,Ht.str)`must NOT have more than ${r} items`,params:({params:{len:r}})=>(0,Ht._)`{limit: ${r}}`},MT={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:ET,code(r){let{parentSchema:e,it:t}=r,{items:n}=e;if(!Array.isArray(n)){(0,Vp.checkStrictMode)(t,'"additionalItems" is ignored when "items" is not an array of schemas');return}ac(r,n)}};function ac(r,e){let{gen:t,schema:n,data:a,keyword:s,it:i}=r;i.items=!0;let o=t.const("len",(0,Ht._)`${a}.length`);if(n===!1)r.setParams({len:e.length}),r.pass((0,Ht._)`${o} <= ${e.length}`);else if(typeof n=="object"&&!(0,Vp.alwaysValidSchema)(i,n)){let g=t.var("valid",(0,Ht._)`${o} <= ${e.length}`);t.if((0,Ht.not)(g),()=>d(g)),r.ok(g)}function d(g){t.forRange("i",e.length,o,h=>{r.subschema({keyword:s,dataProp:h,dataPropType:Vp.Type.Num},g),i.allErrors||t.if((0,Ht.not)(g),()=>t.break())})}}fn.validateAdditionalItems=ac;fn.default=MT});var zp=R(un=>{"use strict";Object.defineProperty(un,"__esModule",{value:!0});un.validateTuple=void 0;var sc=L(),go=te(),DT=Ve(),WT={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(r){let{schema:e,it:t}=r;if(Array.isArray(e))return ic(r,"additionalItems",e);t.items=!0,!(0,go.alwaysValidSchema)(t,e)&&r.ok((0,DT.validateArray)(r))}};function ic(r,e,t=r.schema){let{gen:n,parentSchema:a,data:s,keyword:i,it:o}=r;h(a),o.opts.unevaluated&&t.length&&o.items!==!0&&(o.items=go.mergeEvaluated.items(n,t.length,o.items));let d=n.name("valid"),g=n.const("len",(0,sc._)`${s}.length`);t.forEach((T,$)=>{(0,go.alwaysValidSchema)(o,T)||(n.if((0,sc._)`${g} > ${$}`,()=>r.subschema({keyword:i,schemaProp:$,dataProp:$},d)),r.ok(d))});function h(T){let{opts:$,errSchemaPath:w}=o,b=t.length,O=b===T.minItems&&(b===T.maxItems||T[e]===!1);if($.strictTuples&&!O){let I=`"${i}" is ${b}-tuple, but minItems or maxItems/${e} are not specified or different at path "${w}"`;(0,go.checkStrictMode)(o,I,$.strictTuples)}}}un.validateTuple=ic;un.default=WT});var oc=R(Jp=>{"use strict";Object.defineProperty(Jp,"__esModule",{value:!0});var AT=zp(),NT={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:r=>(0,AT.validateTuple)(r,"items")};Jp.default=NT});var dc=R(Qp=>{"use strict";Object.defineProperty(Qp,"__esModule",{value:!0});var pc=L(),UT=te(),qT=Ve(),BT=Hp(),LT={message:({params:{len:r}})=>(0,pc.str)`must NOT have more than ${r} items`,params:({params:{len:r}})=>(0,pc._)`{limit: ${r}}`},VT={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:LT,code(r){let{schema:e,parentSchema:t,it:n}=r,{prefixItems:a}=t;n.items=!0,!(0,UT.alwaysValidSchema)(n,e)&&(a?(0,BT.validateAdditionalItems)(r,a):r.ok((0,qT.validateArray)(r)))}};Qp.default=VT});var fc=R(Kp=>{"use strict";Object.defineProperty(Kp,"__esModule",{value:!0});var ze=L(),To=te(),HT={message:({params:{min:r,max:e}})=>e===void 0?(0,ze.str)`must contain at least ${r} valid item(s)`:(0,ze.str)`must contain at least ${r} and no more than ${e} valid item(s)`,params:({params:{min:r,max:e}})=>e===void 0?(0,ze._)`{minContains: ${r}}`:(0,ze._)`{minContains: ${r}, maxContains: ${e}}`},zT={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:HT,code(r){let{gen:e,schema:t,parentSchema:n,data:a,it:s}=r,i,o,{minContains:d,maxContains:g}=n;s.opts.next?(i=d===void 0?1:d,o=g):i=1;let h=e.const("len",(0,ze._)`${a}.length`);if(r.setParams({min:i,max:o}),o===void 0&&i===0){(0,To.checkStrictMode)(s,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(o!==void 0&&i>o){(0,To.checkStrictMode)(s,'"minContains" > "maxContains" is always invalid'),r.fail();return}if((0,To.alwaysValidSchema)(s,t)){let O=(0,ze._)`${h} >= ${i}`;o!==void 0&&(O=(0,ze._)`${O} && ${h} <= ${o}`),r.pass(O);return}s.items=!0;let T=e.name("valid");o===void 0&&i===1?w(T,()=>e.if(T,()=>e.break())):i===0?(e.let(T,!0),o!==void 0&&e.if((0,ze._)`${a}.length > 0`,$)):(e.let(T,!1),$()),r.result(T,()=>r.reset());function $(){let O=e.name("_valid"),I=e.let("count",0);w(O,()=>e.if(O,()=>b(I)))}function w(O,I){e.forRange("i",0,h,j=>{r.subschema({keyword:"contains",dataProp:j,dataPropType:To.Type.Num,compositeRule:!0},O),I()})}function b(O){e.code((0,ze._)`${O}++`),o===void 0?e.if((0,ze._)`${O} >= ${i}`,()=>e.assign(T,!0).break()):(e.if((0,ze._)`${O} > ${o}`,()=>e.assign(T,!1).break()),i===1?e.assign(T,!0):e.if((0,ze._)`${O} >= ${i}`,()=>e.assign(T,!0)))}}};Kp.default=zT});var cc=R(dt=>{"use strict";Object.defineProperty(dt,"__esModule",{value:!0});dt.validateSchemaDeps=dt.validatePropertyDeps=dt.error=void 0;var Yp=L(),JT=te(),ln=Ve();dt.error={message:({params:{property:r,depsCount:e,deps:t}})=>{let n=e===1?"property":"properties";return(0,Yp.str)`must have ${n} ${t} when property ${r} is present`},params:({params:{property:r,depsCount:e,deps:t,missingProperty:n}})=>(0,Yp._)`{property: ${r},
6
6
  missingProperty: ${n},
7
7
  depsCount: ${e},
8
- deps: ${t}}`};var BT={keyword:"dependencies",type:"object",schemaType:"object",error:pt.error,code(r){let[e,t]=LT(r);ic(r,e),oc(r,t)}};function LT({schema:r}){let e={},t={};for(let n in r){if(n==="__proto__")continue;let a=Array.isArray(r[n])?e:t;a[n]=r[n]}return[e,t]}function ic(r,e=r.schema){let{gen:t,data:n,it:a}=r;if(Object.keys(e).length===0)return;let s=t.let("missing");for(let i in e){let o=e[i];if(o.length===0)continue;let d=(0,dn.propertyInData)(t,n,i,a.opts.ownProperties);r.setParams({property:i,depsCount:o.length,deps:o.join(", ")}),a.allErrors?t.if(d,()=>{for(let g of o)(0,dn.checkReportMissingProp)(r,g)}):(t.if((0,Qp._)`${d} && (${(0,dn.checkMissingProp)(r,o,s)})`),(0,dn.reportMissingProp)(r,s),t.else())}}pt.validatePropertyDeps=ic;function oc(r,e=r.schema){let{gen:t,data:n,keyword:a,it:s}=r,i=t.name("valid");for(let o in e)(0,qT.alwaysValidSchema)(s,e[o])||(t.if((0,dn.propertyInData)(t,n,o,s.opts.ownProperties),()=>{let d=r.subschema({keyword:a,schemaProp:o},i);r.mergeValidEvaluated(d,i)},()=>t.var(i,!0)),r.ok(i))}pt.validateSchemaDeps=oc;pt.default=BT});var fc=G(Jp=>{"use strict";Object.defineProperty(Jp,"__esModule",{value:!0});var dc=V(),VT=re(),HT={message:"property name must be valid",params:({params:r})=>(0,dc._)`{propertyName: ${r.propertyName}}`},zT={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:HT,code(r){let{gen:e,schema:t,data:n,it:a}=r;if((0,VT.alwaysValidSchema)(a,t))return;let s=e.name("valid");e.forIn("key",n,i=>{r.setParams({propertyName:i}),r.subschema({keyword:"propertyNames",data:i,dataTypes:["string"],propertyName:i,compositeRule:!0},s),e.if((0,dc.not)(s),()=>{r.error(!0),a.allErrors||e.break()})}),r.ok(s)}};Jp.default=zT});var Yp=G(Xp=>{"use strict";Object.defineProperty(Xp,"__esModule",{value:!0});var mo=Le(),Xe=V(),KT=gt(),ho=re(),QT={message:"must NOT have additional properties",params:({params:r})=>(0,Xe._)`{additionalProperty: ${r.additionalProperty}}`},JT={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:QT,code(r){let{gen:e,schema:t,parentSchema:n,data:a,errsCount:s,it:i}=r;if(!s)throw new Error("ajv implementation error");let{allErrors:o,opts:d}=i;if(i.props=!0,d.removeAdditional!=="all"&&(0,ho.alwaysValidSchema)(i,t))return;let g=(0,mo.allSchemaProperties)(n.properties),h=(0,mo.allSchemaProperties)(n.patternProperties);T(),r.ok((0,Xe._)`${s} === ${KT.default.errors}`);function T(){e.forIn("key",a,I=>{!g.length&&!h.length?b(I):e.if(O(I),()=>b(I))})}function O(I){let j;if(g.length>8){let z=(0,ho.schemaRefOrVal)(i,n.properties,"properties");j=(0,mo.isOwnProperty)(e,z,I)}else g.length?j=(0,Xe.or)(...g.map(z=>(0,Xe._)`${I} === ${z}`)):j=Xe.nil;return h.length&&(j=(0,Xe.or)(j,...h.map(z=>(0,Xe._)`${(0,mo.usePattern)(r,z)}.test(${I})`))),(0,Xe.not)(j)}function w(I){e.code((0,Xe._)`delete ${a}[${I}]`)}function b(I){if(d.removeAdditional==="all"||d.removeAdditional&&t===!1){w(I);return}if(t===!1){r.setParams({additionalProperty:I}),r.error(),o||e.break();return}if(typeof t=="object"&&!(0,ho.alwaysValidSchema)(i,t)){let j=e.name("valid");d.removeAdditional==="failing"?($(I,j,!1),e.if((0,Xe.not)(j),()=>{r.reset(),w(I)})):($(I,j),o||e.if((0,Xe.not)(j),()=>e.break()))}}function $(I,j,z){let q={keyword:"additionalProperties",dataProp:I,dataPropType:ho.Type.Str};z===!1&&Object.assign(q,{compositeRule:!0,createErrors:!1,allErrors:!1}),r.subschema(q,j)}}};Xp.default=JT});var cc=G(ed=>{"use strict";Object.defineProperty(ed,"__esModule",{value:!0});var XT=Qr(),uc=Le(),Zp=re(),lc=Yp(),YT={keyword:"properties",type:"object",schemaType:"object",code(r){let{gen:e,schema:t,parentSchema:n,data:a,it:s}=r;s.opts.removeAdditional==="all"&&n.additionalProperties===void 0&&lc.default.code(new XT.KeywordCxt(s,lc.default,"additionalProperties"));let i=(0,uc.allSchemaProperties)(t);for(let T of i)s.definedProperties.add(T);s.opts.unevaluated&&i.length&&s.props!==!0&&(s.props=Zp.mergeEvaluated.props(e,(0,Zp.toHash)(i),s.props));let o=i.filter(T=>!(0,Zp.alwaysValidSchema)(s,t[T]));if(o.length===0)return;let d=e.name("valid");for(let T of o)g(T)?h(T):(e.if((0,uc.propertyInData)(e,a,T,s.opts.ownProperties)),h(T),s.allErrors||e.else().var(d,!0),e.endIf()),r.it.definedProperties.add(T),r.ok(d);function g(T){return s.opts.useDefaults&&!s.compositeRule&&t[T].default!==void 0}function h(T){r.subschema({keyword:"properties",schemaProp:T,dataProp:T},d)}}};ed.default=YT});var gc=G(td=>{"use strict";Object.defineProperty(td,"__esModule",{value:!0});var mc=Le(),_o=V(),hc=re(),_c=re(),ZT={keyword:"patternProperties",type:"object",schemaType:"object",code(r){let{gen:e,schema:t,data:n,parentSchema:a,it:s}=r,{opts:i}=s,o=(0,mc.allSchemaProperties)(t),d=o.filter($=>(0,hc.alwaysValidSchema)(s,t[$]));if(o.length===0||d.length===o.length&&(!s.opts.unevaluated||s.props===!0))return;let g=i.strictSchema&&!i.allowMatchingProperties&&a.properties,h=e.name("valid");s.props!==!0&&!(s.props instanceof _o.Name)&&(s.props=(0,_c.evaluatedPropsToName)(e,s.props));let{props:T}=s;O();function O(){for(let $ of o)g&&w($),s.allErrors?b($):(e.var(h,!0),b($),e.if(h))}function w($){for(let I in g)new RegExp($).test(I)&&(0,hc.checkStrictMode)(s,`property ${I} matches pattern ${$} (use allowMatchingProperties)`)}function b($){e.forIn("key",n,I=>{e.if((0,_o._)`${(0,mc.usePattern)(r,$)}.test(${I})`,()=>{let j=d.includes($);j||r.subschema({keyword:"patternProperties",schemaProp:$,dataProp:I,dataPropType:_c.Type.Str},h),s.opts.unevaluated&&T!==!0?e.assign((0,_o._)`${T}[${I}]`,!0):!j&&!s.allErrors&&e.if((0,_o.not)(h),()=>e.break())})})}}};td.default=ZT});var Tc=G(rd=>{"use strict";Object.defineProperty(rd,"__esModule",{value:!0});var ey=re(),ty={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(r){let{gen:e,schema:t,it:n}=r;if((0,ey.alwaysValidSchema)(n,t)){r.fail();return}let a=e.name("valid");r.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},a),r.failResult(a,()=>r.reset(),()=>r.error())},error:{message:"must NOT be valid"}};rd.default=ty});var yc=G(nd=>{"use strict";Object.defineProperty(nd,"__esModule",{value:!0});var ry=Le(),ny={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:ry.validateUnion,error:{message:"must match a schema in anyOf"}};nd.default=ny});var bc=G(ad=>{"use strict";Object.defineProperty(ad,"__esModule",{value:!0});var go=V(),ay=re(),sy={message:"must match exactly one schema in oneOf",params:({params:r})=>(0,go._)`{passingSchemas: ${r.passing}}`},iy={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:sy,code(r){let{gen:e,schema:t,parentSchema:n,it:a}=r;if(!Array.isArray(t))throw new Error("ajv implementation error");if(a.opts.discriminator&&n.discriminator)return;let s=t,i=e.let("valid",!1),o=e.let("passing",null),d=e.name("_valid");r.setParams({passing:o}),e.block(g),r.result(i,()=>r.reset(),()=>r.error(!0));function g(){s.forEach((h,T)=>{let O;(0,ay.alwaysValidSchema)(a,h)?e.var(d,!0):O=r.subschema({keyword:"oneOf",schemaProp:T,compositeRule:!0},d),T>0&&e.if((0,go._)`${d} && ${i}`).assign(i,!1).assign(o,(0,go._)`[${o}, ${T}]`).else(),e.if(d,()=>{e.assign(i,!0),e.assign(o,T),O&&r.mergeEvaluated(O,go.Name)})})}}};ad.default=iy});var Fc=G(sd=>{"use strict";Object.defineProperty(sd,"__esModule",{value:!0});var oy=re(),py={keyword:"allOf",schemaType:"array",code(r){let{gen:e,schema:t,it:n}=r;if(!Array.isArray(t))throw new Error("ajv implementation error");let a=e.name("valid");t.forEach((s,i)=>{if((0,oy.alwaysValidSchema)(n,s))return;let o=r.subschema({keyword:"allOf",schemaProp:i},a);r.ok(a),r.mergeEvaluated(o)})}};sd.default=py});var Oc=G(id=>{"use strict";Object.defineProperty(id,"__esModule",{value:!0});var To=V(),$c=re(),dy={message:({params:r})=>(0,To.str)`must match "${r.ifClause}" schema`,params:({params:r})=>(0,To._)`{failingKeyword: ${r.ifClause}}`},fy={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:dy,code(r){let{gen:e,parentSchema:t,it:n}=r;t.then===void 0&&t.else===void 0&&(0,$c.checkStrictMode)(n,'"if" without "then" and "else" is ignored');let a=xc(n,"then"),s=xc(n,"else");if(!a&&!s)return;let i=e.let("valid",!0),o=e.name("_valid");if(d(),r.reset(),a&&s){let h=e.let("ifClause");r.setParams({ifClause:h}),e.if(o,g("then",h),g("else",h))}else a?e.if(o,g("then")):e.if((0,To.not)(o),g("else"));r.pass(i,()=>r.error(!0));function d(){let h=r.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},o);r.mergeEvaluated(h)}function g(h,T){return()=>{let O=r.subschema({keyword:h},o);e.assign(i,o),r.mergeValidEvaluated(O,i),T?e.assign(T,(0,To._)`${h}`):r.setParams({ifClause:h})}}}};function xc(r,e){let t=r.schema[e];return t!==void 0&&!(0,$c.alwaysValidSchema)(r,t)}id.default=fy});var wc=G(od=>{"use strict";Object.defineProperty(od,"__esModule",{value:!0});var uy=re(),ly={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:r,parentSchema:e,it:t}){e.if===void 0&&(0,uy.checkStrictMode)(t,`"${r}" without "if" is ignored`)}};od.default=ly});var Ic=G(pd=>{"use strict";Object.defineProperty(pd,"__esModule",{value:!0});var cy=Lp(),my=rc(),hy=Vp(),_y=ac(),gy=sc(),Ty=pc(),yy=fc(),by=Yp(),Fy=cc(),xy=gc(),$y=Tc(),Oy=yc(),wy=bc(),Iy=Fc(),jy=Oc(),vy=wc();function ky(r=!1){let e=[$y.default,Oy.default,wy.default,Iy.default,jy.default,vy.default,yy.default,by.default,Ty.default,Fy.default,xy.default];return r?e.push(my.default,_y.default):e.push(cy.default,hy.default),e.push(gy.default),e}pd.default=ky});var jc=G(dd=>{"use strict";Object.defineProperty(dd,"__esModule",{value:!0});var ge=V(),Sy={message:({schemaCode:r})=>(0,ge.str)`must match format "${r}"`,params:({schemaCode:r})=>(0,ge._)`{format: ${r}}`},Cy={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:Sy,code(r,e){let{gen:t,data:n,$data:a,schema:s,schemaCode:i,it:o}=r,{opts:d,errSchemaPath:g,schemaEnv:h,self:T}=o;if(!d.validateFormats)return;a?O():w();function O(){let b=t.scopeValue("formats",{ref:T.formats,code:d.code.formats}),$=t.const("fDef",(0,ge._)`${b}[${i}]`),I=t.let("fType"),j=t.let("format");t.if((0,ge._)`typeof ${$} == "object" && !(${$} instanceof RegExp)`,()=>t.assign(I,(0,ge._)`${$}.type || "string"`).assign(j,(0,ge._)`${$}.validate`),()=>t.assign(I,(0,ge._)`"string"`).assign(j,$)),r.fail$data((0,ge.or)(z(),q()));function z(){return d.strictSchema===!1?ge.nil:(0,ge._)`${i} && !${j}`}function q(){let se=h.$async?(0,ge._)`(${$}.async ? await ${j}(${n}) : ${j}(${n}))`:(0,ge._)`${j}(${n})`,W=(0,ge._)`(typeof ${j} == "function" ? ${se} : ${j}.test(${n}))`;return(0,ge._)`${j} && ${j} !== true && ${I} === ${e} && !${W}`}}function w(){let b=T.formats[s];if(!b){z();return}if(b===!0)return;let[$,I,j]=q(b);$===e&&r.pass(se());function z(){if(d.strictSchema===!1){T.logger.warn(W());return}throw new Error(W());function W(){return`unknown format "${s}" ignored in schema at path "${g}"`}}function q(W){let We=W instanceof RegExp?(0,ge.regexpCode)(W):d.code.formats?(0,ge._)`${d.code.formats}${(0,ge.getProperty)(s)}`:void 0,ze=t.scopeValue("formats",{key:s,ref:W,code:We});return typeof W=="object"&&!(W instanceof RegExp)?[W.type||"string",W.validate,(0,ge._)`${ze}.validate`]:["string",W,ze]}function se(){if(typeof b=="object"&&!(b instanceof RegExp)&&b.async){if(!h.$async)throw new Error("async format in sync schema");return(0,ge._)`await ${j}(${n})`}return typeof I=="function"?(0,ge._)`${j}(${n})`:(0,ge._)`${j}.test(${n})`}}}};dd.default=Cy});var vc=G(fd=>{"use strict";Object.defineProperty(fd,"__esModule",{value:!0});var Py=jc(),Gy=[Py.default];fd.default=Gy});var kc=G(lr=>{"use strict";Object.defineProperty(lr,"__esModule",{value:!0});lr.contentVocabulary=lr.metadataVocabulary=void 0;lr.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];lr.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]});var Cc=G(ud=>{"use strict";Object.defineProperty(ud,"__esModule",{value:!0});var Dy=Wl(),Ey=Yl(),My=Ic(),Ry=vc(),Sc=kc(),Wy=[Dy.default,Ey.default,(0,My.default)(),Ry.default,Sc.metadataVocabulary,Sc.contentVocabulary];ud.default=Wy});var Gc=G(yo=>{"use strict";Object.defineProperty(yo,"__esModule",{value:!0});yo.DiscrError=void 0;var Pc;(function(r){r.Tag="tag",r.Mapping="mapping"})(Pc||(yo.DiscrError=Pc={}))});var Ec=G(cd=>{"use strict";Object.defineProperty(cd,"__esModule",{value:!0});var cr=V(),ld=Gc(),Dc=ro(),Ay=Jr(),Ny=re(),Uy={message:({params:{discrError:r,tagName:e}})=>r===ld.DiscrError.Tag?`tag "${e}" must be string`:`value of tag "${e}" must be in oneOf`,params:({params:{discrError:r,tag:e,tagName:t}})=>(0,cr._)`{error: ${r}, tag: ${t}, tagValue: ${e}}`},qy={keyword:"discriminator",type:"object",schemaType:"object",error:Uy,code(r){let{gen:e,data:t,schema:n,parentSchema:a,it:s}=r,{oneOf:i}=a;if(!s.opts.discriminator)throw new Error("discriminator: requires discriminator option");let o=n.propertyName;if(typeof o!="string")throw new Error("discriminator: requires propertyName");if(n.mapping)throw new Error("discriminator: mapping is not supported");if(!i)throw new Error("discriminator: requires oneOf keyword");let d=e.let("valid",!1),g=e.const("tag",(0,cr._)`${t}${(0,cr.getProperty)(o)}`);e.if((0,cr._)`typeof ${g} == "string"`,()=>h(),()=>r.error(!1,{discrError:ld.DiscrError.Tag,tag:g,tagName:o})),r.ok(d);function h(){let w=O();e.if(!1);for(let b in w)e.elseIf((0,cr._)`${g} === ${b}`),e.assign(d,T(w[b]));e.else(),r.error(!1,{discrError:ld.DiscrError.Mapping,tag:g,tagName:o}),e.endIf()}function T(w){let b=e.name("valid"),$=r.subschema({keyword:"oneOf",schemaProp:w},b);return r.mergeEvaluated($,cr.Name),b}function O(){var w;let b={},$=j(a),I=!0;for(let se=0;se<i.length;se++){let W=i[se];if(W!=null&&W.$ref&&!(0,Ny.schemaHasRulesButRef)(W,s.self.RULES)){let ze=W.$ref;if(W=Dc.resolveRef.call(s.self,s.schemaEnv.root,s.baseId,ze),W instanceof Dc.SchemaEnv&&(W=W.schema),W===void 0)throw new Ay.default(s.opts.uriResolver,s.baseId,ze)}let We=(w=W==null?void 0:W.properties)===null||w===void 0?void 0:w[o];if(typeof We!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${o}"`);I=I&&($||j(W)),z(We,se)}if(!I)throw new Error(`discriminator: "${o}" must be required`);return b;function j({required:se}){return Array.isArray(se)&&se.includes(o)}function z(se,W){if(se.const)q(se.const,W);else if(se.enum)for(let We of se.enum)q(We,W);else throw new Error(`discriminator: "properties/${o}" must have "const" or "enum"`)}function q(se,W){if(typeof se!="string"||se in b)throw new Error(`discriminator: "${o}" values must be unique strings`);b[se]=W}}}};cd.default=qy});var Mc=G((_j,By)=>{By.exports={$schema:"http://json-schema.org/draft-07/schema#",$id:"http://json-schema.org/draft-07/schema#",title:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:!0}});var Wc=G((le,md)=>{"use strict";Object.defineProperty(le,"__esModule",{value:!0});le.MissingRefError=le.ValidationError=le.CodeGen=le.Name=le.nil=le.stringify=le.str=le._=le.KeywordCxt=le.Ajv=void 0;var Ly=Pl(),Vy=Cc(),Hy=Ec(),Rc=Mc(),zy=["/properties"],bo="http://json-schema.org/draft-07/schema",mr=class extends Ly.default{_addVocabularies(){super._addVocabularies(),Vy.default.forEach(e=>this.addVocabulary(e)),this.opts.discriminator&&this.addKeyword(Hy.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;let e=this.opts.$data?this.$dataMetaSchema(Rc,zy):Rc;this.addMetaSchema(e,bo,!1),this.refs["http://json-schema.org/schema"]=bo}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(bo)?bo:void 0)}};le.Ajv=mr;md.exports=le=mr;md.exports.Ajv=mr;Object.defineProperty(le,"__esModule",{value:!0});le.default=mr;var Ky=Qr();Object.defineProperty(le,"KeywordCxt",{enumerable:!0,get:function(){return Ky.KeywordCxt}});var hr=V();Object.defineProperty(le,"_",{enumerable:!0,get:function(){return hr._}});Object.defineProperty(le,"str",{enumerable:!0,get:function(){return hr.str}});Object.defineProperty(le,"stringify",{enumerable:!0,get:function(){return hr.stringify}});Object.defineProperty(le,"nil",{enumerable:!0,get:function(){return hr.nil}});Object.defineProperty(le,"Name",{enumerable:!0,get:function(){return hr.Name}});Object.defineProperty(le,"CodeGen",{enumerable:!0,get:function(){return hr.CodeGen}});var Qy=eo();Object.defineProperty(le,"ValidationError",{enumerable:!0,get:function(){return Qy.default}});var Jy=Jr();Object.defineProperty(le,"MissingRefError",{enumerable:!0,get:function(){return Jy.default}})});var gw={};Bm(gw,{APIFunctions:()=>Cd,APIValidators:()=>Sd,AggregateTransferManyTxInputSchema:()=>Na,AggregateTransferManyTxOutputSchema:()=>Ua,AggregateTransfersFnInputSchema:()=>On,AggregateTransfersFnOutputSchema:()=>wn,AuthenticationCheckTxInputSchema:()=>qa,AuthenticationCheckTxOutputSchema:()=>Ba,Client:()=>br,ClientFunctions:()=>M,ClientFunctionsEnum:()=>em,ClientQueryBuilderFunctionsEnum:()=>tm,ClientValidators:()=>lw,ConstsSchema:()=>qt,CreateAccessTokenFnInputSchema:()=>In,CreateAccessTokenFnOutputSchema:()=>jn,CreateAccessTokenTxInputSchema:()=>La,CreateAccessTokenTxOutputSchema:()=>Va,CreateContractFnInputSchema:()=>vn,CreateContractFnOutputSchema:()=>kn,CreateContractTxInputSchema:()=>Ha,CreateContractTxOutputSchema:()=>za,CreateDepositFnInputSchema:()=>Sn,CreateDepositFnOutputSchema:()=>Cn,CreateDepositTxInputSchema:()=>Ka,CreateDepositTxOutputSchema:()=>Qa,CreateDistributionTxInputSchema:()=>Ja,CreateDistributionTxOutputSchema:()=>Xa,CreateExchangeFnInputSchema:()=>Pn,CreateExchangeFnOutputSchema:()=>Gn,CreateTokenFnInputSchema:()=>Dn,CreateTokenFnOutputSchema:()=>En,CreateTokenTxInputSchema:()=>Ya,CreateTokenTxOutputSchema:()=>Za,CreateTransferFnInputSchema:()=>Mn,CreateTransferFnOutputSchema:()=>Rn,CreateTransferGroupFnInputSchema:()=>Wn,CreateTransferGroupFnOutputSchema:()=>An,CreateTransferGroupTxInputSchema:()=>rs,CreateTransferGroupTxOutputSchema:()=>ns,CreateTransferManyTxInputSchema:()=>as,CreateTransferManyTxOutputSchema:()=>ss,CreateTransferTxInputSchema:()=>es,CreateTransferTxOutputSchema:()=>ts,CreateTransfersFnInputSchema:()=>Nn,CreateTransfersFnOutputSchema:()=>Un,CreateWalletFnInputSchema:()=>qn,CreateWalletFnOutputSchema:()=>Bn,CreateWalletTxInputSchema:()=>is,CreateWalletTxOutputSchema:()=>os,CreateWithdrawalFnInputSchema:()=>Ln,CreateWithdrawalFnOutputSchema:()=>Vn,CreateWithdrawalTxInputSchema:()=>ps,CreateWithdrawalTxOutputSchema:()=>ds,DbFilterFunctionBasicEnum:()=>Vd,DbFilterFunctionInEnum:()=>Hd,DbFilterFunctionMetadataBasicEnum:()=>Ld,DbFilterFunctionMetadataInEnum:()=>zd,DbFilterFunctionMetadataNullEnum:()=>Kd,DbFilterFunctionNullEnum:()=>Qd,DbFilterOperatorEnum:()=>Jd,DbFilterOperatorExtendedEnum:()=>Yd,DbFilterOperatorStringEnum:()=>Xd,DbModelNameEnum:()=>ff,ErrorMessage:()=>qe,Errors:()=>Gr,ExportDatabaseTxInputSchema:()=>fs,ExportDatabaseTxOutputSchema:()=>us,FindBalanceManyTxInputSchema:()=>ls,FindBalanceManyTxOutputSchema:()=>cs,FindBalancesFnInputSchema:()=>Hn,FindBalancesFnOutputSchema:()=>zn,FindTokenManyTxInputSchema:()=>ms,FindTokenManyTxOutputSchema:()=>hs,FindTokensFnInputSchema:()=>Kn,FindTokensFnOutputSchema:()=>Qn,FindTransferGroupManyTxInputSchema:()=>_s,FindTransferGroupManyTxOutputSchema:()=>gs,FindTransferGroupsFnInputSchema:()=>Jn,FindTransferGroupsFnOutputSchema:()=>Xn,FindTransferManyTxInputSchema:()=>Ts,FindTransferManyTxOutputSchema:()=>ys,FindTransfersFnInputSchema:()=>Yn,FindTransfersFnOutputSchema:()=>Zn,FindWalletManyTxInputSchema:()=>bs,FindWalletManyTxOutputSchema:()=>Fs,FindWalletsFnInputSchema:()=>ea,FindWalletsFnOutputSchema:()=>ta,FinishTransactionTxInputSchema:()=>xs,FinishTransactionTxOutputSchema:()=>$s,FnConstsSchema:()=>ra,GetBalanceFnInputSchema:()=>na,GetBalanceFnOutputSchema:()=>aa,GetBalanceHistoryFnInputSchema:()=>sa,GetBalanceHistoryFnOutputSchema:()=>ia,GetBalanceHistoryTxInputSchema:()=>Is,GetBalanceHistoryTxOutputSchema:()=>js,GetBalanceTxInputSchema:()=>Os,GetBalanceTxOutputSchema:()=>ws,GetDatabaseExportProgressTxInputSchema:()=>vs,GetDatabaseExportProgressTxOutputSchema:()=>ks,GetDatabaseImportProgressTxInputSchema:()=>Ss,GetDatabaseImportProgressTxOutputSchema:()=>Cs,GetFlagsFnInputSchema:()=>oa,GetFlagsFnOutputSchema:()=>pa,GetFlagsTxInputSchema:()=>Ps,GetFlagsTxOutputSchema:()=>Gs,GetStatisticsFnInputSchema:()=>da,GetStatisticsFnOutputSchema:()=>fa,GetStatisticsTxInputSchema:()=>Ds,GetStatisticsTxOutputSchema:()=>Es,GetTokenFnInputSchema:()=>ua,GetTokenFnOutputSchema:()=>la,GetTokenManyTxInputSchema:()=>Ws,GetTokenManyTxOutputSchema:()=>As,GetTokenTxInputSchema:()=>Ms,GetTokenTxOutputSchema:()=>Rs,GetTransferFnInputSchema:()=>ca,GetTransferFnOutputSchema:()=>ma,GetTransferGroupFnInputSchema:()=>ha,GetTransferGroupFnOutputSchema:()=>_a,GetTransferGroupTxInputSchema:()=>qs,GetTransferGroupTxOutputSchema:()=>Bs,GetTransferTxInputSchema:()=>Ns,GetTransferTxOutputSchema:()=>Us,GetWalletFnInputSchema:()=>ga,GetWalletFnOutputSchema:()=>Ta,GetWalletManyTxInputSchema:()=>Hs,GetWalletManyTxOutputSchema:()=>zs,GetWalletTxInputSchema:()=>Ls,GetWalletTxOutputSchema:()=>Vs,ITxAggregatorSimpleEnum:()=>Id,ITxDistributorLeftoverRuleEnum:()=>jd,ITxMetadataActionEnum:()=>vd,ITxMetadataActionForReverseEnum:()=>kd,ITxPeriodSimpleEnum:()=>Ci,ImportActionsTxInputSchema:()=>Lt,ImportActionsTxOutputSchema:()=>Ks,ImportDataFnInputSchema:()=>Bt,ImportDataFnOutputSchema:()=>ya,ImportDatabaseTxInputSchema:()=>Qs,ImportDatabaseTxOutputSchema:()=>Js,ListDatabaseExportsTxInputSchema:()=>Xs,ListDatabaseExportsTxOutputSchema:()=>Ys,QueryBuilder:()=>De,QueryLogsTxInputSchema:()=>ti,QueryLogsTxOutputSchema:()=>ri,QueryTxInputSchema:()=>Zs,QueryTxOutputSchema:()=>ei,ResetDatabaseTxInputSchema:()=>ni,ResetDatabaseTxOutputSchema:()=>ai,ReverseTransferFnInputSchema:()=>ba,ReverseTransferFnOutputSchema:()=>Fa,ReverseTransferGroupFnInputSchema:()=>xa,ReverseTransferGroupFnOutputSchema:()=>$a,ReverseTransferGroupManyTxInputSchema:()=>di,ReverseTransferGroupManyTxOutputSchema:()=>fi,ReverseTransferGroupTxInputSchema:()=>oi,ReverseTransferGroupTxOutputSchema:()=>pi,ReverseTransferManyTxInputSchema:()=>ui,ReverseTransferManyTxOutputSchema:()=>li,ReverseTransferTxInputSchema:()=>si,ReverseTransferTxOutputSchema:()=>ii,ReverseTransfersFnInputSchema:()=>Oa,ReverseTransfersFnOutputSchema:()=>wa,SetFlagsFnInputSchema:()=>Ia,SetFlagsFnOutputSchema:()=>ja,SetFlagsTxInputSchema:()=>ci,SetFlagsTxOutputSchema:()=>mi,StartTransactionTxInputSchema:()=>hi,StartTransactionTxOutputSchema:()=>_i,StreamPromise:()=>mt,TokenStatusEnum:()=>ef,TokenTableInputSchema:()=>fn,TokenTableSchema:()=>un,TokenTypeEnum:()=>Zd,TransferGroupStatusEnum:()=>tf,TransferGroupTableInputSchema:()=>mn,TransferGroupTableSchema:()=>hn,TransferGroupTypeEnum:()=>af,TransferLogTableInputSchema:()=>_n,TransferLogTableSchema:()=>gn,TransferStatusEnum:()=>rf,TransferStatusInputEnum:()=>nf,TransferTableInputSchema:()=>ln,TransferTableSchema:()=>cn,TransferTypeEnum:()=>sf,TxConstsSchema:()=>gi,UpdateTokenFnInputSchema:()=>va,UpdateTokenFnOutputSchema:()=>ka,UpdateTokenTxInputSchema:()=>Ti,UpdateTokenTxOutputSchema:()=>yi,UpdateTransferFnInputSchema:()=>Sa,UpdateTransferFnOutputSchema:()=>Ca,UpdateTransferGroupFnInputSchema:()=>Pa,UpdateTransferGroupFnOutputSchema:()=>Ga,UpdateTransferGroupManyTxInputSchema:()=>Oi,UpdateTransferGroupManyTxOutputSchema:()=>wi,UpdateTransferGroupTxInputSchema:()=>xi,UpdateTransferGroupTxOutputSchema:()=>$i,UpdateTransferGroupsFnInputSchema:()=>Da,UpdateTransferGroupsFnOutputSchema:()=>Ea,UpdateTransferManyTxInputSchema:()=>Ii,UpdateTransferManyTxOutputSchema:()=>ji,UpdateTransferTxInputSchema:()=>bi,UpdateTransferTxOutputSchema:()=>Fi,UpdateTransfersFnInputSchema:()=>Ma,UpdateTransfersFnOutputSchema:()=>Ra,UpdateWalletFnInputSchema:()=>Wa,UpdateWalletFnOutputSchema:()=>Aa,UpdateWalletTxInputSchema:()=>vi,UpdateWalletTxOutputSchema:()=>ki,Validator:()=>Si,WalletStatusEnum:()=>pf,WalletTableInputSchema:()=>Tn,WalletTableSchema:()=>yn,WalletTokenSettingTableInputSchema:()=>bn,WalletTokenSettingTableSchema:()=>Fn,WalletTypeEnum:()=>of,WapiClientType:()=>sm,WapiSettingTableInputSchema:()=>xn,WapiSettingTableSchema:()=>$n,WapiSettingTypeEnum:()=>df,aggregateTransfers:()=>Nd,create:()=>hw,createAccessToken:()=>Ud,createContract:()=>qd,createDeposit:()=>Bd,createExchange:()=>uf,createToken:()=>lf,createTransfer:()=>cf,createTransferGroup:()=>mf,createTransfers:()=>hf,createWallet:()=>_f,createWithdrawal:()=>gf,findBalances:()=>Tf,findTokens:()=>yf,findTransferGroups:()=>bf,findTransfers:()=>Ff,findWallets:()=>xf,getBalance:()=>$f,getBalanceHistory:()=>Of,getFlags:()=>wf,getStatistics:()=>If,getToken:()=>jf,getTransfer:()=>vf,getTransferGroup:()=>kf,getWallet:()=>Sf,importData:()=>Cf,reverseTransfer:()=>Pf,reverseTransferGroup:()=>Gf,reverseTransfers:()=>Df,setFlags:()=>Ef,updateToken:()=>Mf,updateTransfer:()=>Rf,updateTransferGroup:()=>Wf,updateTransferGroups:()=>Af,updateTransfers:()=>Nf,updateWallet:()=>Uf,utils:()=>_w});var lu=WebSocket;function K(...r){window.WAPI_DEBUG&&console.log(...r.map(e=>e&&typeof e=="object"?JSON.stringify(e):e))}var nt=class extends Error{constructor({code:e,message:t,data:n,description:a}){var s;super(t),this.code=e,this.message=t,this.data=n,this.description=(s=a!=null?a:Hm[t])!=null?s:""}toJSON(){return{code:this.code,message:this.message,description:this.description,data:this.data}}},ko=class extends nt{constructor({message:e,data:t,code:n}){super({message:e,data:t,code:n||"DatabaseError"})}},Re=class extends nt{constructor({message:e,data:t,code:n}){super({message:e,data:t,code:n||"SchemaValidationError"})}},oe=class extends nt{constructor({message:e,data:t,code:n}){super({message:e,data:t,code:n||"InputError"})}},So=class extends nt{constructor({message:e,data:t,code:n}){super({message:e,data:t,code:n||"ConstraintError"})}},Co=class extends nt{constructor({message:e,data:t,code:n}){super({message:e,data:t,code:n||"UnknownError"})}},Sr=class extends nt{constructor({message:e,data:t,code:n}){super({message:e,data:t,code:n||"ConnectionError"})}},Cr=class extends nt{constructor({message:e,data:t,code:n}){super({message:e,data:t,code:n||"StreamError"})}},Pr=class extends nt{constructor({message:e,data:t,code:n}){super({message:e,data:t,code:n||"AuthenticationError"})}};function Po({message:r,data:e,code:t}){switch(t){case"SchemaValidationError":return new Re({message:r,data:e,code:t});case"DatabaseError":return new ko({message:r,data:e,code:t});case"InputError":return new oe({message:r,data:e,code:t});case"ConstraintError":return new So({message:r,data:e,code:t});case"ConnectionError":return new Sr({message:r,data:e,code:t});case"StreamError":return new Cr({message:r,data:e,code:t});case"AuthenticationError":return new Pr({message:r,data:e,code:t});default:return new Co({message:r,data:e,code:t})}}var Gr=(d=>(d.SchemaValidationError="SchemaValidationError",d.DatabaseError="DatabaseError",d.InputError="InputError",d.UnknownError="UnknownError",d.ConstraintError="ConstraintError",d.ConnectionError="ConnectionError",d.StreamError="StreamError",d.AuthenticationError="AuthenticationError",d))(Gr||{}),qe=(k=>(k.AUTHENTICATION_FAILED="AUTHENTICATION_FAILED",k.BAL_FUTURE_DATETIME="BAL_FUTURE_DATETIME",k.CONFLICTING_OPTIONS="CONFLICTING_OPTIONS",k.CONTRACT_OWNER_NOT_FOUND="CONTRACT_OWNER_NOT_FOUND",k.DATABASE_ERROR="DATABASE_ERROR",k.DISTRIBUTION_MISSING_TARGETS="DISTRIBUTION_MISSING_TARGETS",k.EXCHANGE_MISSING_TARGETS="EXCHANGE_MISSING_TARGETS",k.IMPORT_MISSING_CONTRACT_TOKEN="IMPORT_MISSING_CONTRACT_TOKEN",k.IMPORT_MISSING_TOKEN_WALLET="IMPORT_MISSING_TOKEN_WALLET",k.IMPORT_OBJECT_DUPLICATE="IMPORT_OBJECT_DUPLICATE",k.IMPORT_OBJECT_EXISTS="IMPORT_OBJECT_EXISTS",k.IMPORT_PREDATED_TRANSFER="IMPORT_PREDATED_TRANSFER",k.IMPORT_USE_BEFORE_CREATE="IMPORT_USE_BEFORE_CREATE",k.INPUT_NEEDS_IDENTIFIER="INPUT_NEEDS_IDENTIFIER",k.INPUT_NEEDS_TOKEN="INPUT_NEEDS_TOKEN",k.INPUT_STREAM_ERROR="INPUT_STREAM_ERROR",k.INPUT_STREAM_TIMEOUT="INPUT_STREAM_TIMEOUT",k.INPUT_STREAM_INVALID="INPUT_STREAM_INVALID",k.INPUT_STREAM_NOT_ALLOWED="INPUT_STREAM_NOT_ALLOWED",k.INPUT_INVALID="INPUT_INVALID",k.INVALID_COMPLEX_FILTER="INVALID_COMPLEX_FILTER",k.INVALID_FIELD_AGR_COMB="INVALID_FIELD_AGR_COMB",k.INVALID_FIELD_FOR_MODEL="INVALID_FIELD_FOR_MODEL",k.INVALID_LATEST_HASH="INVALID_LATEST_HASH",k.INVALID_MODEL="INVALID_MODEL",k.NO_METADATA_ON_MODEL="NO_METADATA_ON_MODEL",k.RUNNING_BALANCE_WITHOUT_WALLET="RUNNING_BALANCE_WITHOUT_WALLET",k.SIGNED_AMOUNT_WITHOUT_WALLET="SIGNED_AMOUNT_WITHOUT_WALLET",k.TOKEN_INVALID_WALLET="TOKEN_INVALID_WALLET",k.TOKEN_LIMIT_REACHED="TOKEN_LIMIT_REACHED",k.TR_AMOUNT_NOT_DIVISIBLE="TR_AMOUNT_NOT_DIVISIBLE",k.TR_CANCELLED_CANT_RV="TR_CANCELLED_CANT_RV",k.TR_CANT_UPDATE_TO_PENDING="TR_CANT_UPDATE_TO_PENDING",k.TR_DEPOSIT_CANT_RV_WITHOUT_FLAG="TR_DEPOSIT_CANT_RV_WITHOUT_FLAG",k.TR_FROM_WALLET_DEPOSIT="TR_FROM_WALLET_DEPOSIT",k.TR_FROM_WALLET_STATUS_CONSTRAINT="TR_FROM_WALLET_STATUS_CONSTRAINT",k.TR_INVALID_BALANCE="TR_INVALID_BALANCE",k.TR_INVALID_CANCELLED="TR_INVALID_CANCELLED",k.TR_TIMESTAMP_IN_PAST="TR_TIMESTAMP_IN_PAST",k.TR_TO_WALLET_STATUS_CONSTRAINT="TR_TO_WALLET_STATUS_CONSTRAINT",k.TR_TO_WALLET_WITHDRAWAL="TR_TO_WALLET_WITHDRAWAL",k.TR_TOKEN_DISABLED="TR_TOKEN_DISABLED",k.TR_TOKEN_DWONLY="TR_TOKEN_DWONLY",k.TR_TRG_CLOSED="TR_TRG_CLOSED",k.TR_TRG_STATUS_MISMATCH="TR_TRG_STATUS_MISMATCH",k.TR_WITHDRAWAL_CANT_RV_WITHOUT_FLAG="TR_WITHDRAWAL_CANT_RV_WITHOUT_FLAG",k.TRANSACTION_NOT_FOUND="TRANSACTION_NOT_FOUND",k.TRANSACTION_TIMEOUT="TRANSACTION_TIMEOUT",k.TRG_BALANCE_CHECK_REQUIRED_WITHOUT_STATUS_LOCK="TRG_BALANCE_CHECK_REQUIRED_WITHOUT_STATUS_LOCK",k.TRG_CANCELLED_CANT_RV="TRG_CANCELLED_CANT_RV",k.TRG_DEPOSIT_CANT_RV_WITHOUT_FLAG="TRG_DEPOSIT_CANT_RV_WITHOUT_FLAG",k.TRG_SINGLE_PENDING_TR_CANT_RV="TRG_SINGLE_PENDING_TR_CANT_RV",k.TRG_WITHDRAWAL_CANT_RV_WITHOUT_FLAG="TRG_WITHDRAWAL_CANT_RV_WITHOUT_FLAG",k.UNCLEAR_AGGREGATOR="UNCLEAR_AGGREGATOR",k.TR_MISSING_FILTER="TR_MISSING_FILTER",k.TRG_MISSING_FILTER="TRG_MISSING_FILTER",k.HTTP_BODY_SIZE="HTTP_BODY_SIZE",k.METHOD_DISABLED="METHOD_DISABLED",k.DATABASE_IMPORT_UNEXPECTED_ERROR="DATABASE_IMPORT_UNEXPECTED_ERROR",k.DATABASE_IMPORT_NOT_FOUND="DATABASE_IMPORT_NOT_FOUND",k.DATABASE_EXPORT_CONFLICT="DATABASE_EXPORT_CONFLICT",k.DATABASE_IMPORT_CONFLICT="DATABASE_IMPORT_CONFLICT",k.DATABASE_EXPORT_UNEXPECTED_ERROR="DATABASE_EXPORT_UNEXPECTED_ERROR",k.DATABASE_EXPORT_LIST_UNEXPECTED_ERROR="DATABASE_EXPORT_LIST_UNEXPECTED_ERROR",k.DATABASE_IMPORT_PROGRESS_NOT_FOUND="DATABASE_IMPORT_PROGRESS_NOT_FOUND",k.DATABASE_IMPORT_PROGRESS_UNEXPECTED_ERROR="DATABASE_IMPORT_PROGRESS_UNEXPECTED_ERROR",k.DATABASE_EXPORT_PROGRESS_NOT_FOUND="DATABASE_EXPORT_PROGRESS_NOT_FOUND",k.DATABASE_EXPORT_PROGRESS_UNEXPECTED_ERROR="DATABASE_EXPORT_PROGRESS_UNEXPECTED_ERROR",k))(qe||{}),Hm={AUTHENTICATION_FAILED:"Provided credentials are invalid",BAL_FUTURE_DATETIME:"Balance datetime can't be in the future",CONFLICTING_OPTIONS:"return_running_balance and return_running_balance_for can't be specified together",CONTRACT_OWNER_NOT_FOUND:"Unable to find Wallet specified as Contract token owner",DATABASE_ERROR:"Something went wrong in the DB layer",DISTRIBUTION_MISSING_TARGETS:"Unable to resolve all targets (Wallets, Tokens) for distribution request",EXCHANGE_MISSING_TARGETS:"Unable to resolve all targets (Wallets, Token) for exchange request",IMPORT_MISSING_CONTRACT_TOKEN:"The import contract specifies Token that does not exist",IMPORT_MISSING_TOKEN_WALLET:"The import results in invalid Token without valid Wallet",IMPORT_OBJECT_DUPLICATE:"The import includes create directives for same object multiple times",IMPORT_OBJECT_EXISTS:"The import includes create directives for already existing objects",IMPORT_PREDATED_TRANSFER:"The oldest Transfer in the import file is older than already existing Transfers in the WAPI instance",IMPORT_USE_BEFORE_CREATE:"The import includes create directive for object that is used in Transfer before create dateTime",INPUT_NEEDS_IDENTIFIER:"Missing identifier - automatically calculated identifiers conflict on identical input for 30s To make an identical transfer during that window you need to provide a unique identifier",INPUT_NEEDS_TOKEN:"token must be specified on input or in client config",INPUT_STREAM_ERROR:"Input stream emitted an error",INPUT_STREAM_TIMEOUT:"No data provided to input stream in 30s",INPUT_STREAM_INVALID:"Invalid input stream identifier provided",INPUT_STREAM_NOT_ALLOWED:"Method does not support input stream",INPUT_INVALID:"Invalid input on stream",INVALID_COMPLEX_FILTER:"The provided complex filter does not pass validation",INVALID_FIELD_AGR_COMB:"Provided aggregation field was not found on Model",INVALID_FIELD_FOR_MODEL:"Provided groupBy field was not found on Model",INVALID_LATEST_HASH:"Provided latest_control_hash does not match the latest outgoing Transfer from Wallet",INVALID_MODEL:"Provided Model name is invalid",NO_METADATA_ON_MODEL:"Can't use metadata field for grouping as current Model does not have metadata",RUNNING_BALANCE_WITHOUT_WALLET:"return_running_balance option requires Wallet filter to be specified",SIGNED_AMOUNT_WITHOUT_WALLET:"return_signed_balance option requires Wallet filter to be specified",TOKEN_INVALID_WALLET:"Invalid belongs_to wallet provided",TOKEN_LIMIT_REACHED:"Unable to issue more tokens as Token.limit has been reached",TR_AMOUNT_NOT_DIVISIBLE:"Transfer amount is not divisible by specified Token.divisor",TR_CANCELLED_CANT_RV:"Cancelled Transfer can not be reversed",TR_CANT_UPDATE_TO_PENDING:"Transfer status can only move from 'pending'->'finished'/'cancelled",TR_DEPOSIT_CANT_RV_WITHOUT_FLAG:"Deposits are expected connection points with outside systems, thus extra validation is required. Reversing a Transfer.type = 'deposit' requires reverse_deposit option to be true.",TR_FROM_WALLET_DEPOSIT:"From wallet can't be specified when doing a deposit",TR_FROM_WALLET_STATUS_CONSTRAINT:"From wallet.status doesn't allow this type of transfers",TR_INVALID_BALANCE:"Transfer results in invalid balance for a Wallet",TR_INVALID_CANCELLED:"Cant create cancelled transfer",TR_TIMESTAMP_IN_PAST:"Transfer.created_at must be the latest",TR_TO_WALLET_STATUS_CONSTRAINT:"To wallet.status doesn't allow this type of transfers",TR_TO_WALLET_WITHDRAWAL:"To wallet can't be specified when doing a withdrawal",TR_TOKEN_DISABLED:"Token status is set to 'disabled' - no new transfers allowed",TR_TOKEN_DWONLY:"Token status is set to 'dw-only' - only deposits or withdrawals allowed",TR_TRG_CLOSED:"Cant add Transfer to group. TransferGroup is closed",TR_TRG_STATUS_MISMATCH:"Transfers in transfer_group must match transfer_group.transfer_status",TR_WITHDRAWAL_CANT_RV_WITHOUT_FLAG:"Withdrawals are expected connection points with outside systems, thus extra validation is required. Reversing a Transfer.type = 'withdrawal' requires reverse_withdrawal option to be true.",TRANSACTION_NOT_FOUND:"No open DB transaction with provided was found",TRANSACTION_TIMEOUT:"Transaction timed out",TRG_BALANCE_CHECK_REQUIRED_WITHOUT_STATUS_LOCK:"For integrity reasons running balance validations are required if TransferGroup.transfer_status_lock = false",TRG_CANCELLED_CANT_RV:"Cancelled TransferGroup can not be reversed",TRG_DEPOSIT_CANT_RV_WITHOUT_FLAG:"TransferGroup includes Transfer.type = 'deposit', thus for extra validation the reverse_deposit option must be set true",TRG_SINGLE_PENDING_TR_CANT_RV:"Transfer is part of TransferGroup and can not be reversed separately",TRG_WITHDRAWAL_CANT_RV_WITHOUT_FLAG:"TransferGroup includes Transfer.type = 'withdrawal', thus for extra validation the reverse_withdrawal option must be set true",UNCLEAR_AGGREGATOR:"Invalid aggregator function provided",TR_MISSING_FILTER:"Transactions can't reversed or updated without valid filter",TRG_MISSING_FILTER:"Transaction groups can't reversed or updated without valid filter",HTTP_BODY_SIZE:"Http body size can't be more than 100MB",METHOD_DISABLED:"Method is disabled",DATABASE_IMPORT_UNEXPECTED_ERROR:"Unexpected error while importing database",DATABASE_IMPORT_NOT_FOUND:"Database import file not found",DATABASE_EXPORT_CONFLICT:"Database export already in progress",DATABASE_IMPORT_CONFLICT:"Database import already in progress",DATABASE_EXPORT_UNEXPECTED_ERROR:"Unexpected error while creating database export",DATABASE_EXPORT_LIST_UNEXPECTED_ERROR:"Unexpected error while listing database backups",DATABASE_IMPORT_PROGRESS_NOT_FOUND:"Import database progress not found",DATABASE_IMPORT_PROGRESS_UNEXPECTED_ERROR:"Unexpected error while getting database import progress",DATABASE_EXPORT_PROGRESS_NOT_FOUND:"Database backup progress not found",DATABASE_EXPORT_PROGRESS_UNEXPECTED_ERROR:"Unexpected error while getting database backup progress"};var Wi,zm=new Uint8Array(16);function Go(){if(!Wi&&(Wi=typeof crypto!="undefined"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Wi))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Wi(zm)}var be=[];for(let r=0;r<256;++r)be.push((r+256).toString(16).slice(1));function cu(r,e=0){return be[r[e+0]]+be[r[e+1]]+be[r[e+2]]+be[r[e+3]]+"-"+be[r[e+4]]+be[r[e+5]]+"-"+be[r[e+6]]+be[r[e+7]]+"-"+be[r[e+8]]+be[r[e+9]]+"-"+be[r[e+10]]+be[r[e+11]]+be[r[e+12]]+be[r[e+13]]+be[r[e+14]]+be[r[e+15]]}var Km=typeof crypto!="undefined"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Do={randomUUID:Km};function Qm(r,e,t){if(Do.randomUUID&&!e&&!r)return Do.randomUUID();r=r||{};let n=r.random||(r.rng||Go)();if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,e){t=t||0;for(let a=0;a<16;++a)e[t+a]=n[a];return e}return cu(n)}var tr=Qm;function Ct(r=8){return tr().split("-").pop().substr(0,r)}var Eo={timeouts:{},values:{},set(r,e){this.timeouts[r]=setTimeout(()=>this.clear(r),3e4),this.values[r]=e},get(r){return this.values[r]},getKey(r){let e=JSON.parse(JSON.stringify(r)),t="";return Object.keys(e).sort().forEach(n=>{let a="";e[n]&&typeof e[n]=="object"&&!Array.isArray(e[n])?a=this.getKey(e[n]):a=JSON.stringify(e[n]),t+=n+":"+a}),t},clear(r){this.timeouts[r]&&clearTimeout(this.timeouts[r]),delete this.timeouts[r],delete this.values[r]},clearAll(){Object.keys(this.timeouts).forEach(r=>{clearTimeout(this.timeouts[r])}),this.timeouts={},this.values={}}};function je(r){if(!r)return tr();let e=Eo.getKey(r);if(Eo.get(e))throw new oe({message:"INPUT_NEEDS_IDENTIFIER",data:r});let t=tr();return Eo.set(e,t),t}function _u(r){return new Promise(e=>setTimeout(e,r))}function gu(){return je()}function Ai(r){return JSON.parse(JSON.stringify(r))}function at(r,e,t){if(e in r){if(r[e]===void 0)throw new Re({message:`undefined provided for ${e}`,data:r});return r}if(!t)throw new Re({message:`${e} is required if no default set`,data:r});let n=Ai(r);return n[e]=t,n}function v(r){let e=Tu(r);if(e!=null)return{foreign:e}}function Q(r){let e=Tu(r);if(e!=null)return{identifier:e}}function C({input:r,options:e,validate:t}){var a;let n=Ai(r);return(a=n.options)!=null||(n.options=e!=null?e:{}),t(n)}function Tu(r){return r==null?r:r+""}function Jm(r){return Object.keys(r).filter(e=>r[e]!==void 0).map(e=>`${encodeURIComponent(e)}=${encodeURIComponent(r[e])}`).join("&")}function mu(r){return r.host.replace(/^https:/,"wss:")+"?"+Jm({apikey:r.apikey,apisecret:r.apisecret,db:r.database,clientVersion:r.clientVersion})}function yu(r){return typeof window=="undefined"?[mu(r),{rejectUnauthorized:r.rejectUnauthorized}]:[mu(r)]}function Ni(r,e){let t={};return Object.keys(r).forEach(n=>{e[n]?typeof e[n]=="string"?t[e[n]]=r[n]:t[n]=e[n](r[n]):t[n]=r[n]}),t}function st(r){return r.split(",").map(e=>e.split(" ")).map(e=>{let[t,n]=e;return{field:t,direction:n==="desc"?"desc":"asc"}})}function bu(r){return new Date(r).setHours(0,0,0,0)>new Date().setHours(0,0,0,0)}function Xm(r){return r%4===0&&(r%100!==0||r%400===0)}var Ym=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,Zm=[0,31,28,31,30,31,30,31,31,30,31,30,31];function hu(r){let e=Ym.exec(r);if(!e)return!1;let t=+e[1],n=+e[2],a=+e[3];return n>=1&&n<=12&&a>=1&&a<=(n===2&&Xm(t)?29:Zm[n])}var eh=/^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i;function th(r,e){let t=eh.exec(r);if(!t)return!1;let n=+t[1],a=+t[2],s=+t[3],i=t[5];return(n<=23&&a<=59&&s<=59||n===23&&a===59&&s===60)&&(!e||i!=="")}var rh=/t|\s/i;function Fu(r){let e=r.split(rh);return e.length===1?hu(e[0]):e.length===2&&hu(e[0])&&th(e[1])}var Dr=class{constructor(e){this._data=[];this._error=[];this._end=[];this._finished=!1;this._options=e}on(e,t){switch(e){case"data":return this._data.push(t),this;case"end":return this._end.push(t),this;case"error":return this._error.push(t),this}}push(e){if(this._finished)throw new Error("Stream is closed");return e===null?this.end():(this._data.forEach(t=>t(e)),this)}error(e){if(this._finished)throw new Error("Stream is closed");return this._error.forEach(t=>t(e)),this}end(){if(this._finished)throw new Error("Stream is closed");return this._end.forEach(e=>e()),this._finished=!0,this}destroy(e){return this.error(e),this.end(),this}get destroyed(){return this._finished}},Ui=class{constructor(){throw new TypeError("used in node version")}pipe(...e){throw new TypeError("used in node version")}pause(){throw new TypeError("used in node version")}resume(){throw new TypeError("used in node version")}on(...e){throw new TypeError("used in node version")}};var mt=class{constructor(e){this.streamObject=new Dr({objectMode:!0});this.outStreamObject=new Dr({objectMode:!0});this.started=!1;this.makeRequest=e}start(e){if(K("start request as",e),this.mode&&this.mode!==e)throw new Error("Already in use as "+this.mode);if(this.started)return;if(this.promise=new Promise((n,a)=>{this.resolve=n,this.reject=a}),this.started=!0,this.mode=e,this.makeRequest===void 0){this.streamObject.push(null),this.resolve(void 0);return}this.makeRequest(this.streamObject).catch(this.reject);let t=[];if(this.mode==="stream"){this.streamObject.on("data",n=>{if(K("stream data",n),n||this.outStreamObject.push(n),n.error){let a=Po(n.error);return this.outStreamObject.destroy(a),this.streamObject.destroy(a)}if(!n.prop){t.push(n);return}if(n.dataArr){let a=P({},n);delete a.dataArr,n.dataArr.forEach(s=>{this.outStreamObject.push(ee(P({},a),{data:s}))});return}this.outStreamObject.push(n)}).on("end",()=>{K("stream ended");let n=t.pop();if(!n)return;let a=n.result;Object.keys(a).forEach(s=>{Array.isArray(a[s])&&(a[s].forEach(i=>{this.outStreamObject.push({type:"streamChunk",prop:s,data:i})}),a[s]=[])}),this.outStreamObject.push(n),this.outStreamObject.push(null)}).on("error",n=>{K("stream error",n),this.outStreamObject.destroy(n)});return}if(this.mode==="promise"){let n=new Map;this.streamObject.on("data",a=>{var i;if(K("streamPromise data",a),a===void 0)return;if(a.error){let o=Po(a.error);return this.streamObject.destroy(o)}if(!a.prop){t.push(a);return}let s=(i=n.get(a.prop))!=null?i:[];a.dataArr?s.push(...a.dataArr):s.push(a.data),n.set(a.prop,s)}).on("end",()=>{K("streamPromise end");let a=t.pop();if(!a)return;let s=a.result;if(!n.size)return this.resolve(s);let i=!1;n.forEach((o,d)=>{Array.isArray(s[d])?(o.push(...s[d]),s[d]=o):o.length===1?s[d]=o:(this.streamObject.destroy(new Cr({message:"Received multiple chunks for non-array property "+d,code:"StreamError",data:o})),i=!0)}),i||this.resolve(s)}).on("error",a=>(K("streamPromise error",a),this.reject(a)))}}then(e,t){return this.start("promise"),this.promise.then(e,t)}catch(e){return this.start("promise"),this.promise.catch(e)}stream(){return this.start("stream"),this.outStreamObject}};var Er=class extends mt{constructor(e,t){super(e),this.inputStream=t}input(e){return e?typeof e=="function"?(e(this.inputStream),this):(console.warn("currently disabled"),this):this.inputStream}};var Nc=Lm(Wc(),1);var hd={$schema:"http://json-schema.org/draft-07/schema",$id:"JSONRPCRequest",description:"A JSON RPC 2.0 request",oneOf:[{description:"An individual request",$ref:"#/definitions/request"}],definitions:{request:{type:"object",required:["jsonrpc","method"],properties:{jsonrpc:{enum:["2.0"]},method:{type:"string"},id:{type:["string","number","null"],note:["While allowed, null should be avoided: http://www.jsonrpc.org/specification#id1","While allowed, a number with a fractional part should be avoided: http://www.jsonrpc.org/specification#id2"]},params:{type:["array","object"]}}}}};var _d={$schema:"http://json-schema.org/draft-07/schema",$id:"JSONRPCResponse",description:"A JSON RPC 2.0 response",oneOf:[{$ref:"#/definitions/success"},{$ref:"#/definitions/error"}],definitions:{common:{required:["id","jsonrpc"],not:{description:"cannot have result and error at the same time",required:["result","error"]},type:"object",properties:{id:{type:["string","integer","null"],note:["spec says a number which should not contain a fractional part","We choose integer here, but this is unenforceable with some languages"]},jsonrpc:{enum:["2.0"]}}},success:{description:"A success. The result member is then required and can be anything.",allOf:[{$ref:"#/definitions/common"},{required:["result"]}]},error:{allOf:[{$ref:"#/definitions/common"},{required:["error"],properties:{error:{type:"object",required:["code","message"],properties:{code:{type:"integer",note:["unenforceable in some languages"]},message:{type:"string"},data:{description:"optional, can be anything"}}}}}]}}};var gd={$schema:"http://json-schema.org/draft-07/schema",$id:"ClientOptions",description:"Client input options",type:"object",properties:{client:{$ref:"#/definitions/ClientType"},connection:{anyOf:[{$ref:"#/definitions/ws_connection"},{$ref:"#/definitions/https_connection"}]}},required:["client","connection"],additionalProperties:!1,definitions:{ClientType:{$id:"ClientType",type:"string",enum:["ws","https"]},ws_connection:{description:"Connection options for ws api",type:"object",properties:{host:{description:"URL of the API",type:"string"},apikey:{description:"API key for the client",type:"string"},apisecret:{description:"API secret for the client",type:"string"}},required:["host","apikey","apisecret"]},https_connection:{description:"Connection options for https api",type:"object",properties:{host:{description:"URL of the API",type:"string"},jwt:{description:"Auth token for calling api",type:"string"}},required:["host"]}}};var qt={$schema:"http://json-schema.org/draft-07/schema",$id:"Consts",description:"Enums and consts used by the system",definitions:{Flags:{$id:"Flags",$comment:"knex|manual",description:"Allowed filtering functions",type:"object",properties:{allow_timestamps:{description:"Allow setting timestamps in transfer insert/update statements",type:"boolean"},production:{description:"Is running in production mode?",type:"boolean"}},$typescript:'{"additionalProperties":false}'},DbFilterMetadata:{$id:"FilterMetadata",$comment:"knex|manual",description:"Metadata filtering object",type:"object",propertyNames:{type:"string",format:"validkey"},patternProperties:{".*":{type:["string","boolean","number"]}}},DbFilterFunctionWherePrimitive:{$id:"DbFilterFunctionWherePrimitive",$comment:"knex|manual",description:"Filtering for where and orWhere",type:"object",properties:{function:{$ref:"#/definitions/DbFilterFunctionBasic"},field:{type:"string"},operator:{$ref:"#/definitions/DbFilterOperatorExtended"},value:{type:["string","number","boolean"]}},required:["function","field","value"],$typescript:'{"additionalProperties": false}'},DbFilterFunctionWherePrimitiveForeign:{$id:"DbFilterFunctionWherePrimitiveForeign",$comment:"knex|manual",description:"Filtering for where and orWhere",type:"object",properties:{function:{$ref:"#/definitions/DbFilterFunctionBasic"},field:{type:"string"},operator:{$ref:"#/definitions/DbFilterOperatorExtended"},value:{anyOf:[{type:["string","number","boolean"]},{type:"object",properties:{foreign:{type:["string","number"]}},required:["foreign"],$typescript:'{"additionalProperties": false}'}]}},required:["function","field","value"],$typescript:'{"additionalProperties": false}'},DbFilterFunctionWherePrimitiveIdentifier:{$id:"DbFilterFunctionWherePrimitiveIdentifier",$comment:"knex|manual",description:"Filtering for where and orWhere",type:"object",properties:{function:{$ref:"#/definitions/DbFilterFunctionBasic"},field:{type:"string"},operator:{$ref:"#/definitions/DbFilterOperatorExtended"},value:{anyOf:[{type:["string","number","boolean"]},{type:"object",properties:{identifier:{type:["string","number"]}},required:["identifier"],$typescript:'{"additionalProperties": false}'}]}},required:["function","field","value"],$typescript:'{"additionalProperties": false}'},DbFilterFunctionWhereMetadataPrimitive:{$id:"DbFilterFunctionWhereMetadataPrimitive",$comment:"knex|manual",description:"Filtering for where and orWhere",type:"object",properties:{function:{$ref:"#/definitions/DbFilterFunctionMetadataBasic"},field:{type:"string"},operator:{$ref:"#/definitions/DbFilterOperatorExtended"},value:{type:["string","number","boolean"]}},required:["function","field","value"],$typescript:'{"additionalProperties": false}'},DbFilterFunctionMetadataBasic:{$id:"DbFilterFunctionMetadataBasic",$comment:"knex|manual",type:"string",enum:["whereMetadata","orWhereMetadata"]},DbFilterFunctionWhereObject:{$id:"DbFilterFunctionWhereObject",$comment:"knex|manual",description:"Filtering for where and orWhere",type:"object",properties:{function:{$ref:"#/definitions/DbFilterFunctionBasic"},value:{type:"object",properties:{metadata:{$ref:"#/definitions/DbFilterMetadata"}}}},required:["function","value"],$typescript:'{"additionalProperties": false}'},DbFilterFunctionBasic:{$id:"DbFilterFunctionBasic",$comment:"knex|manual",type:"string",enum:["where","orWhere"]},DbFilterFunctionWhereIns:{$id:"DbFilterFunctionWhereIns",$comment:"knex|manual",description:"Filtering for whereIn and orWhereIn",type:"object",properties:{function:{$ref:"#/definitions/DbFilterFunctionIn"},field:{type:"string"},value:{anyOf:[{type:"array",items:{type:"string"},minItems:1},{type:"array",items:{type:"number"},minItems:1}]}},required:["function","field","value"],$typescript:'{"additionalProperties": false}'},DbFilterFunctionIn:{$id:"DbFilterFunctionIn",$comment:"knex|manual",type:"string",enum:["whereIn","orWhereIn"]},DbFilterFunctionWhereMetadataIns:{$id:"DbFilterFunctionWhereMetadataIns",$comment:"knex|manual",description:"Filtering for whereIn and orWhereIn for metadata",type:"object",properties:{function:{$ref:"#/definitions/DbFilterFunctionMetadataIn"},field:{type:"string"},value:{anyOf:[{type:"array",items:{type:"string"},minItems:1},{type:"array",items:{type:"number"},minItems:1}]}},required:["function","field","value"],$typescript:'{"additionalProperties": false}'},DbFilterFunctionMetadataIn:{$id:"DbFilterFunctionMetadataIn",$comment:"knex|manual",type:"string",enum:["whereMetadataIn","orWhereMetadataIn"]},DbFilterFunctionWhereMetadataNulls:{$id:"DbFilterFunctionWhereMetadataNulls",$comment:"knex|manual",description:"Filtering for whereNull and orWhereNull, whereNotNull and orWhereNotNull for metadata",type:"object",properties:{function:{$ref:"#/definitions/DbFilterFunctionMetadataNull"},field:{type:"string"}},required:["function","field"],$typescript:'{"additionalProperties": false}'},DbFilterFunctionMetadataNull:{$id:"DbFilterFunctionMetadataNull",$comment:"knex|manual",type:"string",enum:["whereMetadataNull","orWhereMetadataNull","whereMetadataNotNull","orWhereMetadataNotNull"]},DbFilterFunctionWhereNulls:{$id:"DbFilterFunctionWhereNulls",$comment:"knex|manual",description:"Filtering for whereNull and orWhereNull, whereNotNull and orWhereNotNull",type:"object",properties:{function:{$ref:"#/definitions/DbFilterFunctionNull"},field:{type:"string"}},required:["function","field"],$typescript:'{"additionalProperties": false}'},DbFilterFunctionNull:{$id:"DbFilterFunctionNull",$comment:"knex|manual",type:"string",enum:["whereNull","orWhereNull","whereNotNull","orWhereNotNull"]},DbFilterOperator:{$id:"DbFilterOperator",$comment:"knex|manual",description:"Allowed filtering operators, ignored when value is not primitive",type:"string",enum:["=",">=","<=","<",">"],default:"="},DbFilterOperatorString:{$id:"DbFilterOperatorString",$comment:"knex|manual",description:"Allowed filtering operators for strings",type:"string",enum:["like","ilike"]},DbFilterOperatorExtended:{$id:"DbFilterOperatorExtended",$comment:"knex|manual",description:"Allowed filtering operators, ignored when value is not primitive",type:"string",enum:["=",">=","<=","<",">","like","ilike"],default:"="},DbFilter:{$id:"DbFilter",$comment:"knex|manual",anyOf:[{$ref:"#/definitions/DbFilterMetadata"},{$ref:"#/definitions/DbFilterFunctionWhereInner"},{$ref:"#/definitions/DbFilterFunctionWherePrimitive"},{$ref:"#/definitions/DbFilterFunctionWherePrimitiveForeign"},{$ref:"#/definitions/DbFilterFunctionWherePrimitiveIdentifier"},{$ref:"#/definitions/DbFilterFunctionWhereMetadataPrimitive"},{$ref:"#/definitions/DbFilterFunctionWhereObject"},{$ref:"#/definitions/DbFilterFunctionWhereIns"},{$ref:"#/definitions/DbFilterFunctionWhereMetadataIns"},{$ref:"#/definitions/DbFilterFunctionWhereMetadataNulls"},{$ref:"#/definitions/DbFilterFunctionWhereNulls"}]},DbFilterFunctionWhereInner:{$id:"DbFilterFunctionWhereInner",$comment:"knex|manual",description:"Filtering for where and orWhere",type:"object",properties:{function:{$ref:"#/definitions/DbFilterFunctionBasic"},inner:{type:"array",items:{$ref:"#/definitions/DbFilter"}}},required:["function","inner"],$typescript:'{"additionalProperties": false}'},TokenType:{$id:"TokenType",$comment:"model",description:"DB type values for TokenType",type:"string",enum:["value","share","group","contract"]},TokenStatus:{$id:"TokenStatus",$comment:"model",description:"DB type values for TokenStatus",type:"string",enum:["active","dw-only","disabled"]},TransferGroupStatus:{$id:"TransferGroupStatus",$comment:"model",description:"DB type values for TransferGroupStatus",type:"string",enum:["open","closed"]},TransferStatus:{$id:"TransferStatus",$comment:"model",description:"DB type values for TransferStatus",type:"string",enum:["pending","finished","cancelled"]},TransferStatusInput:{$id:"TransferStatusInput",$comment:"model",description:"DB type input values for TransferStatus",type:"string",enum:["pending","finished"]},TransferGroupType:{$id:"TransferGroupType",$comment:"model",description:"DB type values for TransferGroupType",type:"string",enum:["regular","exchange","distribution"]},TransferType:{$id:"TransferType",$comment:"model",description:"DB type values for TransferType",type:"string",enum:["transfer","deposit","withdrawal"]},WalletType:{$id:"WalletType",$comment:"model",description:"DB type values for WalletType",type:"string",enum:["token","house","regular"]},WalletStatus:{$id:"WalletStatus",$comment:"model",description:"DB type values for WalletStatus",type:"string",enum:["active","disabled"]},WapiSettingType:{$id:"WapiSettingType",$comment:"model",description:"DB type values for WapiSettingType",type:"string",enum:["flag","setting"]},DbModelName:{$id:"DbModelName",$comment:"model",description:"DB Model Names",type:"string",enum:["Token","TransferGroup","TransferLog","Transfer","WalletTokenSetting","Wallet","WapiSetting"]}}};var fn={$schema:"http://json-schema.org/draft-07/schema",$id:"TokenTableInput",title:"TokenTableInput",description:"Units of value which can be transferred in this system",type:"object",properties:{foreign:{description:"Name of the token, used for name based token transfers. Must be unique",type:"string",maxLength:255,minLength:1},public:{description:"Boolean indicating if token can be traded with outside seed wallet",default:!0,type:"boolean"},metadata:{description:"Key/value object describing the token",type:["object","null"]},divisor:{description:"Minimum amount of token that can be transferred",type:["number","null"]},limit:{description:"Maximum amount of token that can be issued",type:["number","null"]},type:{description:"Type of the token",default:"value",$ref:"/db/consts.schema.json#/definitions/TokenType"},status:{description:"Current status for the token",default:"active",$ref:"/db/consts.schema.json#/definitions/TokenStatus"}},additionalProperties:!1,required:["foreign"]};var un={$schema:"http://json-schema.org/draft-07/schema",$id:"TokenTable",title:"TokenTable",description:"Units of value which can be transferred in this system",type:"object",properties:{id:{description:"System defined primary key",type:"integer"},foreign:{description:"Name of the token, used for name based token transfers. Must be unique",type:"string",maxLength:255,minLength:1},public:{description:"Boolean indicating if token can be traded with outside seed wallet",default:!0,type:"boolean"},belongs_to:{description:"Foreign key to seed wallet",type:"integer"},created_at:{description:"Datetime when the token was created",type:"string",format:"date-time"},updated_at:{description:"Datetime when the token was last updated",type:"string",format:"date-time"},metadata:{description:"Key/value object describing the token",type:["object","null"]},divisor:{description:"Minimum amount of token that can be transferred",type:["number","null"]},limit:{description:"Maximum amount of token that can be issued",type:["number","null"]},type:{description:"Type of the token",default:"value",$ref:"/db/consts.schema.json#/definitions/TokenType"},status:{description:"Current status for the token",default:"active",$ref:"/db/consts.schema.json#/definitions/TokenStatus"}},additionalProperties:!1,definitions:{TokenTableAccessibleFields:{$id:"TokenTableAccessibleFields",type:"string",enum:["id","foreign","public","metadata","divisor","limit","type","status"]},TokenTableFields:{$id:"TokenTableFields",type:"string",enum:["id","foreign","public","belongs_to","created_at","updated_at","metadata","divisor","limit","type","status"]},TokenTableStringFields:{$id:"TokenTableStringFields",type:"string",enum:["foreign","created_at","updated_at","type","status"]},TokenTableObjectFields:{$id:"TokenTableObjectFields",type:"string",enum:["metadata"]},TokenTableNumberFields:{$id:"TokenTableNumberFields",type:"string",enum:["id","belongs_to","divisor","limit"]},TokenTableBooleanFields:{$id:"TokenTableBooleanFields",type:"string",enum:["public"]}},required:["id","foreign","public","belongs_to","created_at","updated_at","type","status"]};var Td={$schema:"http://json-schema.org/draft-07/schema",$id:"TokenTableOptional",title:"TokenTableOptional",description:"Units of value which can be transferred in this system Only require id, other fields are optional",type:"object",properties:{id:{description:"System defined primary key",type:"integer"},foreign:{description:"Name of the token, used for name based token transfers. Must be unique",type:"string",maxLength:255,minLength:1},public:{description:"Boolean indicating if token can be traded with outside seed wallet",default:!0,type:"boolean"},belongs_to:{description:"Foreign key to seed wallet",type:"integer"},created_at:{description:"Datetime when the token was created",type:"string",format:"date-time"},updated_at:{description:"Datetime when the token was last updated",type:"string",format:"date-time"},metadata:{description:"Key/value object describing the token",type:["object","null"]},divisor:{description:"Minimum amount of token that can be transferred",type:["number","null"]},limit:{description:"Maximum amount of token that can be issued",type:["number","null"]},type:{description:"Type of the token",default:"value",$ref:"/db/consts.schema.json#/definitions/TokenType"},status:{description:"Current status for the token",default:"active",$ref:"/db/consts.schema.json#/definitions/TokenStatus"}},additionalProperties:!1,required:["id"]};var ln={$schema:"http://json-schema.org/draft-07/schema",$id:"TransferTableInput",title:"TransferTableInput",description:"A transfer of value from one wallet to another",type:"object",properties:{identifier:{description:"Identifier for this transfer. Must be unique",type:"string",maxLength:255,minLength:1},control_hash:{description:'Hash binding this transfer to the from_wallets transfer chain. It is calculated as sha256(latest_outgoing_hash + "-" + NEW.identifier)',type:["string","null"],maxLength:255},from_wallet_id:{description:"Foreign key to wallet funds originate from",type:"integer"},to_wallet_id:{description:"Foreign key to wallet where funds are going",type:"integer"},token_id:{description:"Foreign key to token this transfer refers to",type:"integer"},amount:{description:"The transfer amount",type:"number"},type:{description:"Type of the transfer",default:"transfer",$ref:"/db/consts.schema.json#/definitions/TransferType"},status:{description:"Status of the transfer",default:"finished",$ref:"/db/consts.schema.json#/definitions/TransferStatusInput"},force:{description:"Set to true to force transfer without checking for negative balance constraints",default:!1,type:"boolean"},created_at:{description:"Datetime when this transfer was created - can only be latest",type:"string",format:"date-time"},updated_at:{description:"Datetime when this transfer was updated - can only be latest",type:"string",format:"date-time"},metadata:{description:"Key/value object describing this transfer",type:["object","null"]},transfer_group_id:{description:"Foreign key pointing to the transfer_group this transfer belongs to",type:["integer","null"]},reverses_id:{description:"Foreign key pointing to the transfer this transfer reverses. Must be unique",type:["integer","null"]},status_finalized_at:{description:"DateTime transfer reached final status",type:["string","null"],format:"date-time"}},additionalProperties:!1,required:["identifier","from_wallet_id","to_wallet_id","token_id","amount"]};var cn={$schema:"http://json-schema.org/draft-07/schema",$id:"TransferTable",title:"TransferTable",description:"A transfer of value from one wallet to another",type:"object",properties:{id:{description:"System defined primary key",type:"integer"},identifier:{description:"Identifier for this transfer. Must be unique",type:"string",maxLength:255,minLength:1},control_hash:{description:'Hash binding this transfer to the from_wallets transfer chain. It is calculated as sha256(latest_outgoing_hash + "-" + NEW.identifier)',type:["string","null"],maxLength:255},from_wallet_id:{description:"Foreign key to wallet funds originate from",type:"integer"},to_wallet_id:{description:"Foreign key to wallet where funds are going",type:"integer"},token_id:{description:"Foreign key to token this transfer refers to",type:"integer"},amount:{description:"The transfer amount",type:"number"},type:{description:"Type of the transfer",default:"transfer",$ref:"/db/consts.schema.json#/definitions/TransferType"},status:{description:"Status of the transfer",default:"finished",$ref:"/db/consts.schema.json#/definitions/TransferStatus"},force:{description:"Set to true to force transfer without checking for negative balance constraints",default:!1,type:"boolean"},auto_hash:{description:"When set to true it will automatically calculate the control_hash",default:!1,type:"boolean"},created_at:{description:"Datetime when this transfer was created - can only be latest",type:"string",format:"date-time"},updated_at:{description:"Datetime when this transfer was updated - can only be latest",type:"string",format:"date-time"},metadata:{description:"Key/value object describing this transfer",type:["object","null"]},transfer_group_id:{description:"Foreign key pointing to the transfer_group this transfer belongs to",type:["integer","null"]},reverses_id:{description:"Foreign key pointing to the transfer this transfer reverses. Must be unique",type:["integer","null"]},status_finalized_at:{description:"DateTime transfer reached final status",type:["string","null"],format:"date-time"},group_validate:{description:"Boolean showing if the transfer_group has validate_final_balance_only",default:!1,type:"boolean"}},additionalProperties:!1,definitions:{TransferTableAccessibleFields:{$id:"TransferTableAccessibleFields",type:"string",enum:["id","identifier","control_hash","from_wallet_id","to_wallet_id","token_id","amount","type","status","force","created_at","updated_at","metadata","transfer_group_id","reverses_id","status_finalized_at"]},TransferTableFields:{$id:"TransferTableFields",type:"string",enum:["id","identifier","control_hash","from_wallet_id","to_wallet_id","token_id","amount","type","status","force","auto_hash","created_at","updated_at","metadata","transfer_group_id","reverses_id","status_finalized_at"]},TransferTableStringFields:{$id:"TransferTableStringFields",type:"string",enum:["identifier","control_hash","type","status","created_at","updated_at","status_finalized_at"]},TransferTableObjectFields:{$id:"TransferTableObjectFields",type:"string",enum:["metadata"]},TransferTableNumberFields:{$id:"TransferTableNumberFields",type:"string",enum:["id","from_wallet_id","to_wallet_id","token_id","amount","transfer_group_id","reverses_id"]},TransferTableBooleanFields:{$id:"TransferTableBooleanFields",type:"string",enum:["force","auto_hash"]}},required:["id","identifier","from_wallet_id","to_wallet_id","token_id","amount","type","status","force","auto_hash","created_at","updated_at"]};var yd={$schema:"http://json-schema.org/draft-07/schema",$id:"TransferTableOptional",title:"TransferTableOptional",description:"A transfer of value from one wallet to another Only require id, other fields are optional",type:"object",properties:{id:{description:"System defined primary key",type:"integer"},identifier:{description:"Identifier for this transfer. Must be unique",type:"string",maxLength:255,minLength:1},control_hash:{description:'Hash binding this transfer to the from_wallets transfer chain. It is calculated as sha256(latest_outgoing_hash + "-" + NEW.identifier)',type:["string","null"],maxLength:255},from_wallet_id:{description:"Foreign key to wallet funds originate from",type:"integer"},to_wallet_id:{description:"Foreign key to wallet where funds are going",type:"integer"},token_id:{description:"Foreign key to token this transfer refers to",type:"integer"},amount:{description:"The transfer amount",type:"number"},type:{description:"Type of the transfer",default:"transfer",$ref:"/db/consts.schema.json#/definitions/TransferType"},status:{description:"Status of the transfer",default:"finished",$ref:"/db/consts.schema.json#/definitions/TransferStatus"},force:{description:"Set to true to force transfer without checking for negative balance constraints",default:!1,type:"boolean"},auto_hash:{description:"When set to true it will automatically calculate the control_hash",default:!1,type:"boolean"},created_at:{description:"Datetime when this transfer was created - can only be latest",type:"string",format:"date-time"},updated_at:{description:"Datetime when this transfer was updated - can only be latest",type:"string",format:"date-time"},metadata:{description:"Key/value object describing this transfer",type:["object","null"]},transfer_group_id:{description:"Foreign key pointing to the transfer_group this transfer belongs to",type:["integer","null"]},reverses_id:{description:"Foreign key pointing to the transfer this transfer reverses. Must be unique",type:["integer","null"]},status_finalized_at:{description:"DateTime transfer reached final status",type:["string","null"],format:"date-time"},group_validate:{description:"Boolean showing if the transfer_group has validate_final_balance_only",default:!1,type:"boolean"}},additionalProperties:!1,required:["id"]};var mn={$schema:"http://json-schema.org/draft-07/schema",$id:"TransferGroupTableInput",title:"TransferGroupTableInput",description:"An entity collecting transfers into a group locked by status",type:"object",properties:{identifier:{description:"Identifier for this transfer. Must be unique",type:"string",maxLength:255,minLength:1},status:{description:"Lifecycle status for transfer group",default:"open",$ref:"/db/consts.schema.json#/definitions/TransferGroupStatus"},transfer_status:{description:"Status of the transfer",default:"pending",$ref:"/db/consts.schema.json#/definitions/TransferStatusInput"},metadata:{description:"Key/value object describing this transfer_group",type:["object","null"]},reverses_id:{description:"Foreign key pointing to the transfer_group this transfer_group reverses",type:["integer","null"]},status_finalized_at:{description:"Time transfer_group was closed",type:["string","null"],format:"date-time"},transfer_status_finalized_at:{description:"Time transfer_status reached final state. Must be unique",type:["string","null"],format:"date-time"},type:{description:"Type of the transfer group",default:"regular",$ref:"/db/consts.schema.json#/definitions/TransferGroupType"}},additionalProperties:!1,required:["identifier"]};var hn={$schema:"http://json-schema.org/draft-07/schema",$id:"TransferGroupTable",title:"TransferGroupTable",description:"An entity collecting transfers into a group locked by status",type:"object",properties:{id:{description:"System defined primary key",type:"integer"},identifier:{description:"Identifier for this transfer. Must be unique",type:"string",maxLength:255,minLength:1},status:{description:"Lifecycle status for transfer group",default:"open",$ref:"/db/consts.schema.json#/definitions/TransferGroupStatus"},transfer_status:{description:"Status of the transfer",default:"pending",$ref:"/db/consts.schema.json#/definitions/TransferStatus"},metadata:{description:"Key/value object describing this transfer_group",type:["object","null"]},created_at:{description:"Datetime when this transfer was created",type:"string",format:"date-time"},updated_at:{description:"Datetime when this transfer was updated",type:"string",format:"date-time"},reverses_id:{description:"Foreign key pointing to the transfer_group this transfer_group reverses",type:["integer","null"]},status_finalized_at:{description:"Time transfer_group was closed",type:["string","null"],format:"date-time"},transfer_status_finalized_at:{description:"Time transfer_status reached final state. Must be unique",type:["string","null"],format:"date-time"},type:{description:"Type of the transfer group",default:"regular",$ref:"/db/consts.schema.json#/definitions/TransferGroupType"},validate_final_balance_only:{description:"Boolean if only the final balances of wallets should be validated",default:!1,type:"boolean"}},additionalProperties:!1,definitions:{TransferGroupTableAccessibleFields:{$id:"TransferGroupTableAccessibleFields",type:"string",enum:["id","identifier","status","transfer_status","metadata","reverses_id","status_finalized_at","transfer_status_finalized_at","type"]},TransferGroupTableFields:{$id:"TransferGroupTableFields",type:"string",enum:["id","identifier","status","transfer_status","metadata","created_at","updated_at","reverses_id","status_finalized_at","transfer_status_finalized_at","type","validate_final_balance_only"]},TransferGroupTableStringFields:{$id:"TransferGroupTableStringFields",type:"string",enum:["identifier","status","transfer_status","created_at","updated_at","status_finalized_at","transfer_status_finalized_at","type"]},TransferGroupTableObjectFields:{$id:"TransferGroupTableObjectFields",type:"string",enum:["metadata"]},TransferGroupTableNumberFields:{$id:"TransferGroupTableNumberFields",type:"string",enum:["id","reverses_id"]},TransferGroupTableBooleanFields:{$id:"TransferGroupTableBooleanFields",type:"string",enum:["validate_final_balance_only"]}},required:["id","identifier","status","transfer_status","created_at","updated_at","type","validate_final_balance_only"]};var bd={$schema:"http://json-schema.org/draft-07/schema",$id:"TransferGroupTableOptional",title:"TransferGroupTableOptional",description:"An entity collecting transfers into a group locked by status Only require id, other fields are optional",type:"object",properties:{id:{description:"System defined primary key",type:"integer"},identifier:{description:"Identifier for this transfer. Must be unique",type:"string",maxLength:255,minLength:1},status:{description:"Lifecycle status for transfer group",default:"open",$ref:"/db/consts.schema.json#/definitions/TransferGroupStatus"},transfer_status:{description:"Status of the transfer",default:"pending",$ref:"/db/consts.schema.json#/definitions/TransferStatus"},metadata:{description:"Key/value object describing this transfer_group",type:["object","null"]},created_at:{description:"Datetime when this transfer was created",type:"string",format:"date-time"},updated_at:{description:"Datetime when this transfer was updated",type:"string",format:"date-time"},reverses_id:{description:"Foreign key pointing to the transfer_group this transfer_group reverses",type:["integer","null"]},status_finalized_at:{description:"Time transfer_group was closed",type:["string","null"],format:"date-time"},transfer_status_finalized_at:{description:"Time transfer_status reached final state. Must be unique",type:["string","null"],format:"date-time"},type:{description:"Type of the transfer group",default:"regular",$ref:"/db/consts.schema.json#/definitions/TransferGroupType"},validate_final_balance_only:{description:"Boolean if only the final balances of wallets should be validated",default:!1,type:"boolean"}},additionalProperties:!1,required:["id"]};var _n={$schema:"http://json-schema.org/draft-07/schema",$id:"TransferLogTableInput",title:"TransferLogTableInput",description:"This table is readonly, so no input is valid",$comment:"READONLY",type:"object",properties:{},additionalProperties:!1};var gn={$schema:"http://json-schema.org/draft-07/schema",$id:"TransferLogTable",title:"TransferLogTable",description:"Individual parts of a transfer, will be updated internally by db. Immutable",$comment:"READONLY",type:"object",properties:{id:{description:"System defined primary key",type:"integer"},transfer_id:{description:"Foreign key pointing to the transfer this log belongs to",type:"integer"},wallet_id:{description:"Foreign key pointing to the wallet this log refers to",type:"integer"},token_id:{description:"Foreign key pointing to the token this log refers to",type:"integer"},type:{description:"Type of this log",$ref:"/db/consts.schema.json#/definitions/TransferType"},amount:{description:"The amount the wallet balance is changed by",type:"number"},pending_amount:{description:"The pending balance of wallet after this transfer_log",type:"number"},finished_amount:{description:"The finished balance of wallet after this transfer_log",type:"number"},status:{description:"Status of this log - same as Transfer.status",$ref:"/db/consts.schema.json#/definitions/TransferStatus"},allow_negative:{description:"Boolean indicating if wallet (pending_amount + finished_amount) can be negative",default:!1,type:"boolean"},allow_positive:{description:"Boolean indicating if wallet (pending_amount + finished_amount) can be positive. Used for token balance to deny positive balance.",default:!0,type:"boolean"},force:{description:"Boolean indicating if the latest transfer from this wallet was forced to ignore negative balance checks",default:!1,type:"boolean"},created_at:{description:"Datetime this log was created",type:"string",format:"date-time"},latest_control_hash:{description:"Latest hash related to this wallet",type:["string","null"],maxLength:255},pending_amount_to:{description:"The incoming pending balance",type:"number"},pending_amount_from:{description:"The outgoing pending balance",type:"number"},group_balance:{description:"Running balance for the wallet in this group",type:["number","null"]},transfer_group_id:{description:"Foreign key pointing to the transfer_group this transfer_log belongs to",type:["integer","null"]},current:{description:"Boolean showing if this transfer_log is the latest for this wallet/token combination",default:!1,type:"boolean"},available_balance:{description:"Available balance that is sum of pending_amount_from and finished_amount",type:"number"},token_limit:{description:"If wallet = token.belongs_to and token has limit",type:["number","null"]}},additionalProperties:!1,definitions:{TransferLogTableAccessibleFields:{$id:"TransferLogTableAccessibleFields",type:"string",enum:["id","transfer_id","wallet_id","token_id","type","amount","pending_amount","finished_amount","status","created_at","pending_amount_to","pending_amount_from","available_balance","token_limit"]},TransferLogTableFields:{$id:"TransferLogTableFields",type:"string",enum:["id","transfer_id","wallet_id","token_id","type","amount","pending_amount","finished_amount","status","allow_negative","allow_positive","force","created_at","latest_control_hash","pending_amount_to","pending_amount_from","group_balance","current","available_balance","token_limit"]},TransferLogTableStringFields:{$id:"TransferLogTableStringFields",type:"string",enum:["type","status","created_at","latest_control_hash"]},TransferLogTableNumberFields:{$id:"TransferLogTableNumberFields",type:"string",enum:["id","transfer_id","wallet_id","token_id","amount","pending_amount","finished_amount","pending_amount_to","pending_amount_from","group_balance","available_balance","token_limit"]},TransferLogTableBooleanFields:{$id:"TransferLogTableBooleanFields",type:"string",enum:["allow_negative","allow_positive","force","current"]}},required:["id","transfer_id","wallet_id","token_id","type","amount","pending_amount","finished_amount","status","allow_negative","allow_positive","force","created_at","pending_amount_to","pending_amount_from","current","available_balance"]};var Fd={$schema:"http://json-schema.org/draft-07/schema",$id:"TransferLogTableOptional",title:"TransferLogTableOptional",description:"Individual parts of a transfer, will be updated internally by db. Immutable Only require id, other fields are optional",$comment:"READONLY",type:"object",properties:{id:{description:"System defined primary key",type:"integer"},transfer_id:{description:"Foreign key pointing to the transfer this log belongs to",type:"integer"},wallet_id:{description:"Foreign key pointing to the wallet this log refers to",type:"integer"},token_id:{description:"Foreign key pointing to the token this log refers to",type:"integer"},type:{description:"Type of this log",$ref:"/db/consts.schema.json#/definitions/TransferType"},amount:{description:"The amount the wallet balance is changed by",type:"number"},pending_amount:{description:"The pending balance of wallet after this transfer_log",type:"number"},finished_amount:{description:"The finished balance of wallet after this transfer_log",type:"number"},status:{description:"Status of this log - same as Transfer.status",$ref:"/db/consts.schema.json#/definitions/TransferStatus"},allow_negative:{description:"Boolean indicating if wallet (pending_amount + finished_amount) can be negative",default:!1,type:"boolean"},allow_positive:{description:"Boolean indicating if wallet (pending_amount + finished_amount) can be positive. Used for token balance to deny positive balance.",default:!0,type:"boolean"},force:{description:"Boolean indicating if the latest transfer from this wallet was forced to ignore negative balance checks",default:!1,type:"boolean"},created_at:{description:"Datetime this log was created",type:"string",format:"date-time"},latest_control_hash:{description:"Latest hash related to this wallet",type:["string","null"],maxLength:255},pending_amount_to:{description:"The incoming pending balance",type:"number"},pending_amount_from:{description:"The outgoing pending balance",type:"number"},group_balance:{description:"Running balance for the wallet in this group",type:["number","null"]},transfer_group_id:{description:"Foreign key pointing to the transfer_group this transfer_log belongs to",type:["integer","null"]},current:{description:"Boolean showing if this transfer_log is the latest for this wallet/token combination",default:!1,type:"boolean"},available_balance:{description:"Available balance that is sum of pending_amount_from and finished_amount",type:"number"},token_limit:{description:"If wallet = token.belongs_to and token has limit",type:["number","null"]}},additionalProperties:!1,required:["id"]};var Tn={$schema:"http://json-schema.org/draft-07/schema",$id:"WalletTableInput",title:"WalletTableInput",description:"Entities who can make transfers in this system",type:"object",properties:{foreign:{description:"User provided key for wallet. Must be unique",type:"string",maxLength:64,minLength:1},name:{description:"Name of the wallet",type:["string","null"],maxLength:255},metadata:{description:"Key/value metadata object",type:["object","null"]},type:{description:"Type of the wallet",default:"regular",$ref:"/db/consts.schema.json#/definitions/WalletType"},status:{description:"Current status for the wallet",default:"active",$ref:"/db/consts.schema.json#/definitions/WalletStatus"}},additionalProperties:!1,required:["foreign"]};var yn={$schema:"http://json-schema.org/draft-07/schema",$id:"WalletTable",title:"WalletTable",description:"Entities who can make transfers in this system",type:"object",properties:{id:{description:"System defined primary key",type:"integer"},foreign:{description:"User provided key for wallet. Must be unique",type:"string",maxLength:64,minLength:1},name:{description:"Name of the wallet",type:["string","null"],maxLength:255},metadata:{description:"Key/value metadata object",type:["object","null"]},type:{description:"Type of the wallet",default:"regular",$ref:"/db/consts.schema.json#/definitions/WalletType"},default_allow_negative:{description:"Boolean indicating if wallet (pending_amount + finished_amount) can be negative",default:!1,type:"boolean"},default_allow_positive:{description:"Boolean indicating if wallet (pending_amount + finished_amount) can be positive. Used for token balance to deny positive balance.",default:!0,type:"boolean"},created_at:{description:"Datetime when the wallet was created",type:"string",format:"date-time"},updated_at:{description:"Datetime when the wallet was last updated",type:"string",format:"date-time"},status:{description:"Current status for the wallet",default:"active",$ref:"/db/consts.schema.json#/definitions/WalletStatus"},default_dtw_to:{description:"Bitmap indicating default what types of transfers can originate from wallet",default:"110",type:"string",maxLength:255,minLength:1},default_dtw_from:{description:"Bitmap indicating default what types of transfers can end to wallet",default:"011",type:"string",maxLength:255,minLength:1}},additionalProperties:!1,definitions:{WalletTableAccessibleFields:{$id:"WalletTableAccessibleFields",type:"string",enum:["id","foreign","name","metadata","type","status"]},WalletTableFields:{$id:"WalletTableFields",type:"string",enum:["id","foreign","name","metadata","type","default_allow_negative","default_allow_positive","created_at","updated_at","status"]},WalletTableStringFields:{$id:"WalletTableStringFields",type:"string",enum:["foreign","name","type","created_at","updated_at","status"]},WalletTableObjectFields:{$id:"WalletTableObjectFields",type:"string",enum:["metadata"]},WalletTableNumberFields:{$id:"WalletTableNumberFields",type:"string",enum:["id"]},WalletTableBooleanFields:{$id:"WalletTableBooleanFields",type:"string",enum:["default_allow_negative","default_allow_positive"]}},required:["id","foreign","type","default_allow_negative","default_allow_positive","created_at","updated_at","status"]};var xd={$schema:"http://json-schema.org/draft-07/schema",$id:"WalletTableOptional",title:"WalletTableOptional",description:"Entities who can make transfers in this system Only require id, other fields are optional",type:"object",properties:{id:{description:"System defined primary key",type:"integer"},foreign:{description:"User provided key for wallet. Must be unique",type:"string",maxLength:64,minLength:1},name:{description:"Name of the wallet",type:["string","null"],maxLength:255},metadata:{description:"Key/value metadata object",type:["object","null"]},type:{description:"Type of the wallet",default:"regular",$ref:"/db/consts.schema.json#/definitions/WalletType"},default_allow_negative:{description:"Boolean indicating if wallet (pending_amount + finished_amount) can be negative",default:!1,type:"boolean"},default_allow_positive:{description:"Boolean indicating if wallet (pending_amount + finished_amount) can be positive. Used for token balance to deny positive balance.",default:!0,type:"boolean"},created_at:{description:"Datetime when the wallet was created",type:"string",format:"date-time"},updated_at:{description:"Datetime when the wallet was last updated",type:"string",format:"date-time"},status:{description:"Current status for the wallet",default:"active",$ref:"/db/consts.schema.json#/definitions/WalletStatus"},default_dtw_to:{description:"Bitmap indicating default what types of transfers can originate from wallet",default:"110",type:"string",maxLength:255,minLength:1},default_dtw_from:{description:"Bitmap indicating default what types of transfers can end to wallet",default:"011",type:"string",maxLength:255,minLength:1}},additionalProperties:!1,required:["id"]};var bn={$schema:"http://json-schema.org/draft-07/schema",$id:"WalletTokenSettingTableInput",title:"WalletTokenSettingTableInput",description:"Settings between a wallet and token",type:"object",properties:{},additionalProperties:!1};var Fn={$schema:"http://json-schema.org/draft-07/schema",$id:"WalletTokenSettingTable",title:"WalletTokenSettingTable",description:"Settings between a wallet and token",type:"object",properties:{id:{description:"System defined primary key",type:"integer"},wallet_id:{description:"Foreign key to wallet these settings refer to",type:"integer"},token_id:{description:"Foreign key to token these settings refer to",type:"integer"},allow_negative:{description:"Boolean indicating if wallet (pending_amount + finished_amount) can be negative",default:!1,type:"boolean"},allow_positive:{description:"Boolean indicating if wallet (pending_amount + finished_amount) can be positive. Used for token balance to deny positive balance.",default:!0,type:"boolean"},created_at:{description:"Datetime when the token was created",type:"string",format:"date-time"},updated_at:{description:"Datetime when the token was last updated",type:"string",format:"date-time"},dtw_to:{description:"Bitmap indicating default what types of transfers can originate from wallet",default:"110",type:"string",maxLength:255,minLength:1},dtw_from:{description:"Bitmap indicating default what types of transfers can end to wallet",default:"011",type:"string",maxLength:255,minLength:1}},additionalProperties:!1,definitions:{WalletTokenSettingTableAccessibleFields:{$id:"WalletTokenSettingTableAccessibleFields",type:"string",enum:["id"]},WalletTokenSettingTableFields:{$id:"WalletTokenSettingTableFields",type:"string",enum:["id","wallet_id","token_id","allow_negative","allow_positive","created_at","updated_at"]},WalletTokenSettingTableStringFields:{$id:"WalletTokenSettingTableStringFields",type:"string",enum:["created_at","updated_at"]},WalletTokenSettingTableNumberFields:{$id:"WalletTokenSettingTableNumberFields",type:"string",enum:["id","wallet_id","token_id"]},WalletTokenSettingTableBooleanFields:{$id:"WalletTokenSettingTableBooleanFields",type:"string",enum:["allow_negative","allow_positive"]}},required:["id","wallet_id","token_id","allow_negative","allow_positive","created_at","updated_at"]};var $d={$schema:"http://json-schema.org/draft-07/schema",$id:"WalletTokenSettingTableOptional",title:"WalletTokenSettingTableOptional",description:"Settings between a wallet and token Only require id, other fields are optional",type:"object",properties:{id:{description:"System defined primary key",type:"integer"},wallet_id:{description:"Foreign key to wallet these settings refer to",type:"integer"},token_id:{description:"Foreign key to token these settings refer to",type:"integer"},allow_negative:{description:"Boolean indicating if wallet (pending_amount + finished_amount) can be negative",default:!1,type:"boolean"},allow_positive:{description:"Boolean indicating if wallet (pending_amount + finished_amount) can be positive. Used for token balance to deny positive balance.",default:!0,type:"boolean"},created_at:{description:"Datetime when the token was created",type:"string",format:"date-time"},updated_at:{description:"Datetime when the token was last updated",type:"string",format:"date-time"},dtw_to:{description:"Bitmap indicating default what types of transfers can originate from wallet",default:"110",type:"string",maxLength:255,minLength:1},dtw_from:{description:"Bitmap indicating default what types of transfers can end to wallet",default:"011",type:"string",maxLength:255,minLength:1}},additionalProperties:!1,required:["id"]};var xn={$schema:"http://json-schema.org/draft-07/schema",$id:"WapiSettingTableInput",title:"WapiSettingTableInput",description:"Database settings",type:"object",properties:{type:{description:"",default:"flag",$ref:"/db/consts.schema.json#/definitions/WapiSettingType"},name:{description:"name of setting. Must be unique",type:"string",maxLength:32,minLength:1},value:{description:"value of setting",type:"string",minLength:1},applied:{description:"is setting applied",default:!1,type:"boolean"}},additionalProperties:!1,required:["name","value"]};var $n={$schema:"http://json-schema.org/draft-07/schema",$id:"WapiSettingTable",title:"WapiSettingTable",description:"Database settings",type:"object",properties:{id:{description:"System defined primary key",type:"integer"},type:{description:"",default:"flag",$ref:"/db/consts.schema.json#/definitions/WapiSettingType"},name:{description:"name of setting. Must be unique",type:"string",maxLength:32,minLength:1},value:{description:"value of setting",type:"string",minLength:1},applied:{description:"is setting applied",default:!1,type:"boolean"},created_at:{description:"Datetime when the flag was created",type:"string",format:"date-time"},updated_at:{description:"Datetime when the flag was last updated",type:"string",format:"date-time"}},additionalProperties:!1,definitions:{WapiSettingTableAccessibleFields:{$id:"WapiSettingTableAccessibleFields",type:"string",enum:["id","type","name","value","applied"]},WapiSettingTableFields:{$id:"WapiSettingTableFields",type:"string",enum:["id","type","name","value","applied","created_at","updated_at"]},WapiSettingTableStringFields:{$id:"WapiSettingTableStringFields",type:"string",enum:["type","name","value","created_at","updated_at"]},WapiSettingTableNumberFields:{$id:"WapiSettingTableNumberFields",type:"string",enum:["id"]},WapiSettingTableBooleanFields:{$id:"WapiSettingTableBooleanFields",type:"string",enum:["applied"]}},required:["id","type","name","value","applied","created_at","updated_at"]};var Od={$schema:"http://json-schema.org/draft-07/schema",$id:"WapiSettingTableOptional",title:"WapiSettingTableOptional",description:"Database settings Only require id, other fields are optional",type:"object",properties:{id:{description:"System defined primary key",type:"integer"},type:{description:"",default:"flag",$ref:"/db/consts.schema.json#/definitions/WapiSettingType"},name:{description:"name of setting. Must be unique",type:"string",maxLength:32,minLength:1},value:{description:"value of setting",type:"string",minLength:1},applied:{description:"is setting applied",default:!1,type:"boolean"},created_at:{description:"Datetime when the flag was created",type:"string",format:"date-time"},updated_at:{description:"Datetime when the flag was last updated",type:"string",format:"date-time"}},additionalProperties:!1,required:["id"]};var On={$schema:"http://json-schema.org/draft-07/schema",$id:"AggregateTransfersFnInput",title:"AggregateTransfersFnInput",description:"Input for aggregateTransfers",type:"object",properties:{wallet:{description:"Foreign of the wallet connected to transfers",type:["string","integer"]},token:{description:"Foreign of the token transferred",type:["string","integer"]},from_wallet:{description:"Foreign of the wallet transfers are made from",type:["string","integer"]},to_wallet:{description:"Foreign of the wallet transfers are made to",type:["string","integer"]},transfer_group:{description:"Foreign of the transfer_group the transfers are a part of",type:["string","integer"]},status:{description:"Status of the transfers",$ref:"/db/transfer/transfer.schema.input.json#/properties/status"},metadata:{description:"Metadata filter",$ref:"/db/consts.schema.json#/definitions/DbFilterMetadata"},aggregators:{description:"Array of aggregators to apply",type:"array",items:{$ref:"/txs/aggregate-transfer-many/aggregate-transfer-many.schema.input.json#/definitions/aggregate_transfer_many_aggregator"}},groups:{description:"Specifications on grouping the data",$ref:"/txs/aggregate-transfer-many/aggregate-transfer-many.schema.input.json#/definitions/aggregate_transfer_many_groups"},options:{description:"Optional flags for input",$ref:"#/definitions/aggregate_transfers_fn_options"}},definitions:{aggregate_transfers_fn_options:{description:"Optional flags for input",type:"object",allOf:[{$ref:"/txs/aggregate-transfer-many/aggregate-transfer-many.schema.input.json#/definitions/aggregate_transfer_many_tx_options"}]}},additionalProperties:!1,$aggregateQueryBuilder:!0};var wn={$schema:"http://json-schema.org/draft-07/schema",$id:"AggregateTransfersFnOutput",title:"AggregateTransfersFnOutput",description:"Output of aggregateTransfers",type:"object",$ref:"/txs/aggregate-transfer-many/aggregate-transfer-many.schema.output.json"};var In={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateAccessTokenFnInput",title:"CreateAccessTokenFnInput",description:"Input for createAccessToken",type:"object",properties:{token:{description:"Properties of the token to create",anyOf:[{$ref:"#/definitions/create_access_token_fn_limited"},{$ref:"/txs/create-access-token/create-access-token.schema.input.json#/definitions/create_access_token_admin"}]},options:{$ref:"#/definitions/create_access_token_fn_options"}},definitions:{create_access_token_fn_options:{description:"Optional flags for input",type:"object",allOf:[{$ref:"/txs/create-access-token/create-access-token.schema.input.json#/definitions/create_access_token_tx_options"}]},create_access_token_fn_limited:{type:"object",properties:{type:{enum:["limited"]},scopes:{type:"array",items:{type:"string",enum:["aggregateTransfers","findBalances","findTokens","findTransferGroups","findTransfers","findWallets","aggregateTransferMany","findBalanceMany","findTokenMany","findTransferGroupMany","findTransferMany","findWalletMany","getBalance","getBalanceHistory","getStatistics","getToken","getTokenMany","getTransfer","getTransferGroup","getWallet","getWalletMany"]}},filters:{description:"Forced filters for requests",type:"object",$ref:"/txs/create-access-token/create-access-token.schema.input.json#/definitions/create_access_token_forced_filters"},expiresIn:{description:"JWT expiration time in minutes",type:"number"}},required:["scopes","type","expiresIn"],additionalProperties:!1}},additionalProperties:!1};var jn={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateAccessTokenFnOutput",title:"CreateAccessTokenFnOutput",description:"Output of createAccessToken",type:"object",$ref:"/txs/create-access-token/create-access-token.schema.output.json"};var vn={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateContractFnInput",title:"CreateContractFnInput",description:"Input for createContract",type:"object",allOf:[{$ref:"#/definitions/create_contract_input"},{type:"object",properties:{options:{$ref:"#/definitions/create_contract_fn_options"}},$typescript:'{"additionalProperties": false}'}],definitions:{create_contract_fn_options:{description:"Optional flags for input",type:"object",allOf:[{$ref:"/txs/create-contract/create-contract.schema.input.json#/definitions/create_contract_tx_options"}],$typescript:'{"additionalProperties": false}'},create_contract_input:{type:"object",properties:{foreign:{description:"Unique foreign of the created Contract",type:["string","integer"]},metadata:{allOf:[{$ref:"/db/token/token.schema.input.json#/properties/metadata"}]},value_token:{description:"Foreign of the token this contract is valued in",type:["string","integer"]},value_amount:{description:"Amount of value this Contract has",type:"number"},owner:{description:"Foreign of the wallet this contract should initially belong to",type:["string","integer"]},buyer:{allOf:[{$ref:"#/definitions/create_contract_buyer_input"}]}},required:["foreign","value_amount","value_token"],$typescript:'{"additionalProperties": false}'},create_contract_buyer_input:{type:"object",description:"The properties of the contract from buyer side",properties:{wallet:{description:"Foreign of the wallet buying this contract",type:["string","integer"]},token:{description:"Foreign of the token buyer will buy with, defaults to Contract value token",type:["string","integer"]},amount:{description:"Amount the buyer will pay, defaults to contract value amount",type:"number"},metadata:{allOf:[{$ref:"/db/token/token.schema.input.json#/properties/metadata"}]},latest_control_hash:{description:"Latest control_hash on the buyer wallet",anyOf:[{$ref:"/db/transfer/transfer.schema.json#/properties/control_hash"},{type:"null"}]}},required:["wallet"],additionalProperties:!1}},$typescript:'{"additionalProperties": false}'};var kn={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateContractFnOutput",title:"CreateContractFnOutput",description:"Output of createContract",type:"object",$ref:"/txs/create-contract/create-contract.schema.output.json"};var Sn={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateDepositFnInput",title:"CreateDepositFnInput",description:"Input for createDeposit",type:"object",allOf:[{$ref:"#/definitions/create_deposit_input"},{type:"object",properties:{options:{$ref:"#/definitions/create_deposit_fn_options"}},$typescript:'{"additionalProperties": false}'}],definitions:{create_deposit_fn_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/create_deposit_fn_additional_options"}]},create_deposit_fn_additional_options:{type:"object",properties:{return_balance:{description:"return balance after deposit",type:"boolean",default:!1},create_wallet_if_not_exists:{type:"boolean",description:"If true then the wallet will be created if not found. Only valid with 'foreign'",default:!1}},$typescript:'{"additionalProperties": false}'},create_deposit_input:{type:"object",properties:{identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},token:{description:"Id of the token to deposit as",type:["string","integer"]},wallet:{description:"Id of the wallet to deposit to",type:["string","integer"]},amount:{description:"amount to deposit",type:"number"},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},status:{description:"status of the deposit",enum:["pending","finished"],default:"finished"},transfer_group:{description:"Id of the transfer_group this deposit is linked to",type:["string"]},created_at:{$ref:"/db/transfer/transfer.schema.input.json#/properties/created_at"}},required:["wallet","amount"],$typescript:'{"additionalProperties": false}'}},$typescript:'{"additionalProperties": false}'};var Cn={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateDepositFnOutput",title:"CreateDepositFnOutput",description:"Output of deposit",$ref:"/txs/create-deposit/create-deposit.schema.output.json"};var Pn={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateExchangeFnInput",title:"CreateExchangeFnInput",description:"Input for createExchange",type:"object",properties:{identifier:{$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/identifier"},from_identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},from_wallet:{description:"Foreign of Wallet where from_token is debited from/to_token is credited to",type:["string","integer"]},from_token:{description:"Foreign of Token that is transferred from->to",type:["string","integer"]},from_amount:{description:"Amount of from_token transferred",$ref:"/db/transfer/transfer.schema.input.json#/properties/amount"},to_identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},to_wallet:{description:"Foreign of Wallet where from_token is credited to/to_token is debited from. If not specified then to_token.belongs_to is used",type:["string","integer"]},to_token:{description:"Foreign of Token that is transferred to->from",type:["string","integer"]},to_amount:{description:"Amount of to_token transferred. If not specified then from_amount is used",$ref:"/db/transfer/transfer.schema.input.json#/properties/amount"},status:{description:"The state at which the exchange is created",type:"string",enum:["pending","finished"]},force:{$ref:"/db/transfer/transfer.schema.input.json#/properties/force"},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},options:{$ref:"#/definitions/create_exchange_fn_options"}},required:["from_wallet","from_token","from_amount","to_token","to_wallet"],definitions:{create_exchange_fn_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/create_exchange_additional_options"}]},exchange_data:{type:"object",properties:{identifier:{$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/identifier"},from_identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},from_latest_control_hash:{description:"Latest control_hash on the from_wallet+from_token combo. Not required if no from_wallet specified",anyOf:[{$ref:"/db/transfer/transfer.schema.json#/properties/control_hash"},{type:"null"}]},from_wallet:{description:"Wallet where from_token is debited from/to_token is credited to. If not specified then from_token.belongs_to is used",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},from_token:{description:"Token that is transferred from->to",$ref:"/txs/get-token/get-token.schema.input.json#/definitions/unique_token_filter"},from_amount:{description:"Amount of from_token transferred",$ref:"/db/transfer/transfer.schema.input.json#/properties/amount"},to_identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},to_latest_control_hash:{description:"Latest control_hash on the to_wallet+to_token combo. Not required if no to_wallet specified",anyOf:[{$ref:"/db/transfer/transfer.schema.json#/properties/control_hash"},{type:"null"}]},to_wallet:{description:"Wallet where from_token is credited to/to_token is debited from. If not specified then to_token.belongs_to is used",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},to_token:{description:"Token that is transferred to->from",$ref:"/txs/get-token/get-token.schema.input.json#/definitions/unique_token_filter"},to_amount:{description:"Amount of to_token transferred. If not specified then from_amount is used",$ref:"/db/transfer/transfer.schema.input.json#/properties/amount"},status:{description:"The state at which the exchange is created",type:"string",enum:["pending","finished"]},force:{$ref:"/db/transfer/transfer.schema.input.json#/properties/force"},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"}},additionalProperties:!1},create_exchange_additional_options:{description:"Optional flags for input",type:"object",default:{},$typescript:'{"additionalProperties":false}'}},additionalProperties:!1};var Gn={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateExchangeFnOutput",title:"CreateExchangeFnOutput",description:"Output of createExchange",$ref:"/txs/create-transfer-group/create-transfer-group.schema.output.json"};var Dn={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateTokenFnInput",title:"CreateTokenFnInput",description:"Input for createToken",allOf:[{$ref:"#/definitions/create_token_fn_input_data"},{$ref:"#/definitions/create_token_fn_options_property"}],definitions:{create_token_fn_options:{allOf:[{$ref:"/txs/create-token/create-token.schema.input.json#/definitions/create_token_tx_options"}]},create_token_fn_options_property:{type:"object",properties:{options:{$ref:"#/definitions/create_token_fn_options"}},$typescript:'{"additionalProperties": false}'},create_token_fn_input_data:{type:"object",properties:{foreign:{$ref:"/db/token/token.schema.input.json#/properties/foreign"},public:{$ref:"/db/token/token.schema.input.json#/properties/public"},metadata:{$ref:"/db/token/token.schema.input.json#/properties/metadata"},divisor:{$ref:"/db/token/token.schema.input.json#/properties/divisor"},limit:{$ref:"/db/token/token.schema.input.json#/properties/limit"},belongs_to:{description:"Id of the wallet this token belongs_to",type:["string","integer"]}},required:["foreign"],$typescript:'{"additionalProperties": false}'}},$typescript:'{"additionalProperties": false}'};var En={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateTokenFnOutput",title:"CreateTokenFnOutput",description:"Output of createToken",$ref:"/txs/create-token/create-token.schema.output.json"};var Mn={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateTransferFnInput",title:"CreateTransferFnInput",description:"Input for transfer",oneOf:[{$ref:"#/definitions/create_transfer_input"},{$ref:"#/definitions/create_transfer_withdrawal_input"},{$ref:"#/definitions/create_transfer_deposit_input"}],definitions:{create_transfer_fn_options:{$comment:"Using allOf so that references dont break",type:"object",allOf:[{$ref:"/txs/create-transfer/create-transfer.schema.input.json#/definitions/create_transfer_tx_options"}]},create_transfer_fn_options_property:{type:"object",properties:{options:{$ref:"#/definitions/create_transfer_fn_options"}},$typescript:'{"additionalProperties": false}'},create_transfer_input:{type:"object",properties:{identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},token:{description:"Foreign of the token to transfer as",type:["string","integer"]},from_wallet:{description:"Foreign of the wallet to deposit to",type:["string","integer"]},to_wallet:{description:"Foreign of the wallet to deposit to",type:["string","integer"]},latest_control_hash:{description:"Latest control_hash on the from_wallet",anyOf:[{$ref:"/db/transfer/transfer.schema.json#/properties/control_hash"},{type:"null"}]},amount:{description:"amount to deposit",type:"number"},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},type:{type:"string",enum:["transfer"]},status:{description:"status of the transfer",enum:["pending","finished"],default:"finished"},transfer_group:{description:"Id of the transfer_group this transfer is linked to",type:["string"]},created_at:{$ref:"/db/transfer/transfer.schema.input.json#/properties/created_at"},options:{$ref:"#/definitions/create_transfer_fn_options"}},required:["from_wallet","to_wallet","amount"],$typescript:'{"additionalProperties": false}'},create_transfer_withdrawal_input:{type:"object",properties:{identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},token:{description:"Foreign of the token to transfer as",type:["string","integer"]},wallet:{description:"Foreign of the wallet to withdraw from",type:["string","integer"]},latest_control_hash:{description:"Latest control_hash on the from_wallet",anyOf:[{$ref:"/db/transfer/transfer.schema.json#/properties/control_hash"},{type:"null"}]},amount:{description:"amount to deposit",type:"number"},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},type:{type:"string",enum:["withdrawal"]},status:{description:"status of the transfer",enum:["pending","finished"],default:"finished"},transfer_group:{description:"Id of the transfer_group this transfer is linked to",type:["string"]},created_at:{$ref:"/db/transfer/transfer.schema.input.json#/properties/created_at"},options:{$ref:"#/definitions/create_transfer_fn_options"}},required:["wallet","amount","type"],$typescript:'{"additionalProperties": false}'},create_transfer_deposit_input:{type:"object",properties:{identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},token:{description:"Foreign of the token to transfer as",type:["string","integer"]},wallet:{description:"Foreign of the wallet to deposit to",type:["string","integer"]},amount:{description:"amount to deposit",type:"number"},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},type:{type:"string",enum:["deposit"]},status:{description:"status of the transfer",enum:["pending","finished"],default:"finished"},transfer_group:{description:"Id of the transfer_group this transfer is linked to",type:["string"]},created_at:{$ref:"/db/transfer/transfer.schema.input.json#/properties/created_at"},options:{$ref:"#/definitions/create_transfer_fn_options"}},required:["wallet","amount","type"],$typescript:'{"additionalProperties": false}'},create_transfer_wild_input:{anyOf:[{$ref:"#/definitions/create_transfer_input"},{$ref:"#/definitions/create_transfer_withdrawal_input"},{$ref:"#/definitions/create_transfer_deposit_input"}]}},$typescript:'{"additionalProperties": false}'};var Rn={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateTransferFnOutput",title:"CreateTransferFnOutput",description:"Output of transfer",$ref:"/txs/create-transfer/create-transfer.schema.output.json"};var Wn={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateTransferGroupFnInput",title:"CreateTransferGroupFnInput",description:"Input for createTransferGroup",type:"object",allOf:[{$ref:"#/definitions/create_transfer_group_fn_input_data"},{$ref:"#/definitions/create_transfer_group_fn_options_property"}],definitions:{create_transfer_group_fn_options:{$comment:"Using allOf, because otherwise references break",type:"object",allOf:[{$ref:"/txs/create-transfer-group/create-transfer-group.schema.input.json#/definitions/create_transfer_group_tx_options"}]},create_transfer_group_fn_options_property:{type:"object",properties:{options:{$ref:"#/definitions/create_transfer_group_fn_options"}},$typescript:'{"additionalProperties": false}'},create_transfer_group_fn_input_data:{type:"object",properties:{identifier:{$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/identifier"},status:{$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/status"},transfer_status:{$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/transfer_status"},metadata:{$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/metadata"},children:{description:"Array of children",type:"array",items:{$ref:"#/definitions/child_transfer_data_fn"}}},$typescript:'{"additionalProperties": false}'},child_transfer_data_fn:{anyOf:[{$ref:"#/definitions/child_transfer_data_regular_fn"},{$ref:"#/definitions/child_transfer_data_withdrawal_fn"},{$ref:"#/definitions/child_transfer_data_deposit_fn"}]},child_transfer_data_regular_fn:{type:"object",properties:{identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},token:{description:"Foreign of the token to transfer as",type:["string","integer"]},from_wallet:{description:"Foreign of the wallet to deposit to",type:["string","integer"]},to_wallet:{description:"Foreign of the wallet to deposit to",type:["string","integer"]},latest_control_hash:{description:"Latest control_hash on the from_wallet",anyOf:[{$ref:"/db/transfer/transfer.schema.json#/properties/control_hash"},{type:"null"}]},amount:{description:"amount to deposit",type:"number"},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},type:{type:"string",enum:["transfer"]},created_at:{$ref:"/db/transfer/transfer.schema.input.json#/properties/created_at"}},required:["from_wallet","to_wallet","amount"],$typescript:'{"additionalProperties": false}'},child_transfer_data_withdrawal_fn:{type:"object",properties:{identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},token:{description:"Foreign of the token to transfer as",type:["string","integer"]},wallet:{description:"Foreign of the wallet to withdraw from",type:["string","integer"]},latest_control_hash:{description:"Latest control_hash on the from_wallet",anyOf:[{$ref:"/db/transfer/transfer.schema.json#/properties/control_hash"},{type:"null"}]},amount:{description:"amount to deposit",type:"number"},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},type:{type:"string",enum:["withdrawal"]},created_at:{$ref:"/db/transfer/transfer.schema.input.json#/properties/created_at"}},required:["wallet","amount","type"],$typescript:'{"additionalProperties": false}'},child_transfer_data_deposit_fn:{type:"object",properties:{identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},token:{description:"Foreign of the token to transfer as",type:["string","integer"]},wallet:{description:"Foreign of the wallet to deposit to",type:["string","integer"]},amount:{description:"amount to deposit",type:"number"},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},type:{type:"string",enum:["deposit"]},created_at:{$ref:"/db/transfer/transfer.schema.input.json#/properties/created_at"}},required:["wallet","amount","type"],$typescript:'{"additionalProperties": false}'}},$typescript:'{"additionalProperties": false}'};var An={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateTransferGroupFnOutput",title:"CreateTransferGroupFnOutput",description:"Output of createTransferGroup",type:"object",$ref:"/txs/create-transfer-group/create-transfer-group.schema.output.json"};var Nn={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateTransfersFnInput",title:"CreateTransfersFnInput",description:"Input for createTransfers",type:"object",properties:{transfers:{type:"array",description:"Array of transfer objects to create",minItems:1,items:{$ref:"/fns/create-transfer/create-transfer.schema.input.json#/definitions/create_transfer_wild_input"}},options:{$ref:"#/definitions/create_transfers_fn_options"}},definitions:{create_transfers_fn_options:{allOf:[{$ref:"/txs/create-transfer-many/create-transfer-many.schema.input.json#/definitions/create_transfer_many_tx_options"}]}},required:["transfers"],additionalProperties:!1};var Un={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateTransfersFnOutput",title:"CreateTransfersFnOutput",description:"Output of createTransfers",$ref:"/txs/create-transfer-many/create-transfer-many.schema.output.json"};var qn={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateWalletFnInput",title:"CreateWalletFnInput",description:"Input for createWallet",type:"object",allOf:[{$ref:"#/definitions/create_wallet_fn_input_data"},{$ref:"#/definitions/create_wallet_fn_options_property"}],definitions:{create_wallet_fn_options:{description:"Optional flags for input",type:"object",allOf:[{$ref:"/txs/create-wallet/create-wallet.schema.input.json#/definitions/create_wallet_tx_options"}]},create_wallet_fn_options_property:{type:"object",properties:{options:{$ref:"#/definitions/create_wallet_fn_options"}},$typescript:'{"additionalProperties": false}'},create_wallet_fn_input_data:{type:"object",properties:{foreign:{$ref:"/db/wallet/wallet.schema.input.json#/properties/foreign"},name:{$ref:"/db/wallet/wallet.schema.input.json#/properties/name"},metadata:{$ref:"/db/wallet/wallet.schema.input.json#/properties/metadata"},status:{$ref:"/db/wallet/wallet.schema.input.json#/properties/status"}},required:["foreign"],$typescript:'{"additionalProperties": false}'}},$typescript:'{"additionalProperties": false}'};var Bn={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateWalletFnOutput",title:"CreateWalletFnOutput",description:"Output of createWallet",type:"object",$ref:"/txs/create-wallet/create-wallet.schema.output.json"};var Ln={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateWithdrawalFnInput",title:"CreateWithdrawalFnInput",description:"Input for withdraw",type:"object",allOf:[{$ref:"#/definitions/create_withdrawal_input"},{type:"object",properties:{options:{$ref:"#/definitions/create_withdrawal_fn_options"}},$typescript:'{"additionalProperties": false}'}],definitions:{create_withdrawal_fn_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/create_withdrawal_fn_additional_options"}]},create_withdrawal_fn_additional_options:{type:"object",properties:{return_balance:{description:"Return balance after withdrawal",type:"boolean"}},default:{},$typescript:'{"additionalProperties": false}'},create_withdrawal_input:{type:"object",properties:{identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},token:{description:"Foreign of the token to deposit as",type:["string","integer"]},wallet:{description:"Foreign of the wallet to deposit to",type:["string","integer"]},latest_control_hash:{description:"Latest control_hash on the from_wallet",anyOf:[{$ref:"/db/transfer/transfer.schema.json#/properties/control_hash"},{type:"null"}]},amount:{description:"amount to deposit",type:"number"},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},status:{description:"status of the withdrawal",enum:["pending","finished"],default:"finished"},transfer_group:{description:"Id of the transfer_group this withdrawal is linked to",type:["string"]},created_at:{$ref:"/db/transfer/transfer.schema.input.json#/properties/created_at"}},required:["wallet","amount"],$typescript:'{"additionalProperties": false}'}},$typescript:'{"additionalProperties": false}'};var Vn={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateWithdrawalFnOutput",title:"CreateWithdrawalFnOutput",description:"Output of withdraw",$ref:"/txs/create-withdrawal/create-withdrawal.schema.output.json"};var Hn={$schema:"http://json-schema.org/draft-07/schema",$id:"FindBalancesFnInput",title:"FindBalancesFnInput",description:"Input for findBalances",type:"object",properties:{token:{description:"Id of the token to get balance",type:["string","integer"]},wallet:{description:"Id of the wallet to get balance from",type:["string","integer"]},options:{$ref:"#/definitions/find_balances_fn_options"}},definitions:{find_balances_fn_options:{description:"findBalances function options",allOf:[{$ref:"/fns/fn-consts.schema.json#/definitions/i_fn_find_options_extra"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_limiting_options"},{$ref:"/txs/find-balance-many/find-balance-many.schema.input.json#/definitions/find_balance_many_ordering_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_select_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_deselect_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_options"}]}},$queryBuilder:!0,additionalProperties:!1};var zn={$schema:"http://json-schema.org/draft-07/schema",$id:"FindBalancesFnOutput",title:"FindBalancesFnOutput",description:"Output of findBalances",type:"object",$ref:"/txs/find-balance-many/find-balance-many.schema.output.json"};var Kn={$schema:"http://json-schema.org/draft-07/schema",$id:"FindTokensFnInput",title:"FindTokensFnInput",description:"Input for findTokens",type:"object",properties:{foreign:{description:"Foreign of the token",type:["string","integer"]},type:{$ref:"/db/token/token.schema.json#/properties/type"},belongs_to:{description:"Foreign of the wallet connected to token",type:["string","integer"]},metadata:{description:"Metadata filter",$ref:"/db/consts.schema.json#/definitions/DbFilterMetadata"},options:{$ref:"#/definitions/find_tokens_fn_options"}},definitions:{find_tokens_fn_options:{description:"findtokens function options",allOf:[{$ref:"/fns/fn-consts.schema.json#/definitions/i_fn_find_options_extra"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_limiting_options"},{$ref:"/txs/find-token-many/find-token-many.schema.input.json#/definitions/find_token_many_ordering_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_select_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_deselect_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_options"}]}},$queryBuilder:!0,additionalProperties:!1};var Qn={$schema:"http://json-schema.org/draft-07/schema",$id:"FindTokensFnOutput",title:"FindTokensFnOutput",description:"Output of findTokens",type:"object",$ref:"/txs/find-token-many/find-token-many.schema.output.json"};var Jn={$schema:"http://json-schema.org/draft-07/schema",$id:"FindTransferGroupsFnInput",title:"FindTransferGroupsFnInput",description:"Input for findTransferGroups",type:"object",properties:{identifier:{description:"Identifier of the transfer_group",type:["string","integer"]},transfer_status:{description:"Status of the transfers",$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/transfer_status"},status:{description:"Status of the transfer_group",$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/status"},metadata:{description:"Metadata filter",$ref:"/db/consts.schema.json#/definitions/DbFilterMetadata"},reverses:{description:"Identifier of the transfer_group the transfer_group reverses",type:["string","integer"]},type:{description:"Type of the transfer group",$ref:"/db/consts.schema.json#/definitions/TransferGroupType"},options:{$ref:"#/definitions/find_transfer_groups_fn_options"}},definitions:{find_transfer_groups_fn_options:{description:"findTransferGroups function options",allOf:[{$ref:"/fns/fn-consts.schema.json#/definitions/i_fn_find_options_extra"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_limiting_options"},{$ref:"/txs/find-transfer-group-many/find-transfer-group-many.schema.input.json#/definitions/find_transfer_group_many_ordering_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/find_transfer_groups_fn_extra_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_select_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_deselect_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_options"}]},find_transfer_groups_fn_extra_options:{description:"simplified options for findTransferGroups",type:"object",properties:{},$typescript:'{"additionalProperties":false}'}},$queryBuilder:!0,additionalProperties:!1};var Xn={$schema:"http://json-schema.org/draft-07/schema",$id:"FindTransferGroupsFnOutput",title:"FindTransferGroupsFnOutput",description:"Output of findTransferGroups",type:"object",$ref:"/txs/find-transfer-group-many/find-transfer-group-many.schema.output.json"};var Yn={$schema:"http://json-schema.org/draft-07/schema",$id:"FindTransfersFnInput",title:"FindTransfersFnInput",description:"Input for findTransfers",type:"object",properties:{wallet:{description:"Foreign of the wallet connected to transfers",type:["string","integer"]},token:{description:"Foreign of the token transferred",type:["string","integer"]},from_wallet:{description:"Foreign of the wallet transfers are made from",type:["string","integer"]},to_wallet:{description:"Foreign of the wallet transfers are made to",type:["string","integer"]},transfer_group:{description:"Foreign of the transfer_group the transfers are a part of",type:["string","integer"]},status:{description:"Status of the transfers",$ref:"/db/transfer/transfer.schema.input.json#/properties/status"},metadata:{description:"Metadata filter",$ref:"/db/consts.schema.json#/definitions/DbFilterMetadata"},options:{$ref:"#/definitions/find_transfers_fn_options"}},definitions:{find_transfers_fn_options:{description:"findTransfers function options",allOf:[{$ref:"/fns/fn-consts.schema.json#/definitions/i_fn_find_options_extra"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_limiting_options"},{$ref:"/txs/find-transfer-many/find-transfer-many.schema.input.json#/definitions/find_transfer_many_ordering_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/find_transfers_fn_extra_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_select_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_deselect_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_options"}]},find_transfers_fn_extra_options:{description:"simplified options for findTransfers",type:"object",properties:{return_running_balance:{description:"return running balance for specified wallet under filter",type:"boolean"},return_signed_amount:{description:"return running balance for specified wallet under filter",type:"boolean"},return_running_balance_for_wallet:{description:"foreign key for which wallet should running balance be returned for",type:["string","integer"]},return_signed_amount_for_wallet:{description:"foreign key for which wallet should signed amounts be returned for",type:["string","integer"]}},$typescript:'{"additionalProperties":false}'}},$queryBuilder:!0,additionalProperties:!1};var Zn={$schema:"http://json-schema.org/draft-07/schema",$id:"FindTransfersFnOutput",title:"FindTransfersFnOutput",description:"Output of findTransfers",type:"object",$ref:"/txs/find-transfer-many/find-transfer-many.schema.output.json"};var ea={$schema:"http://json-schema.org/draft-07/schema",$id:"FindWalletsFnInput",title:"FindWalletsFnInput",description:"Input for findWallets",type:"object",properties:{foreign:{$ref:"/db/wallet/wallet.schema.json#/properties/foreign"},name:{$ref:"/db/wallet/wallet.schema.json#/properties/name"},type:{$ref:"/db/wallet/wallet.schema.json#/properties/type"},status:{$ref:"/db/wallet/wallet.schema.json#/properties/status"},metadata:{description:"Metadata filter",$ref:"/db/consts.schema.json#/definitions/DbFilterMetadata"},options:{$ref:"#/definitions/find_wallets_fn_options"}},definitions:{find_wallets_fn_options:{description:"Optional flags for input",type:"object",allOf:[{$ref:"/fns/fn-consts.schema.json#/definitions/i_fn_find_options_extra"},{$ref:"/txs/find-wallet-many/find-wallet-many.schema.input.json#/definitions/find_wallet_many_tx_options"},{$ref:"#/definitions/find_wallets_fn_extra_options"}]},find_wallets_fn_extra_options:{type:"object",properties:{include_balance_for_token:{description:"Foreign of token to include balance for",type:["string","number"]}},$typescript:'{"additionalProperties":false}'}},$queryBuilder:!0,additionalProperties:!1};var ta={$schema:"http://json-schema.org/draft-07/schema",$id:"FindWalletsFnOutput",title:"FindWalletsFnOutput",description:"Output of findWallets",type:"object",$ref:"/txs/find-wallet-many/find-wallet-many.schema.output.json"};var ra={$schema:"http://json-schema.org/draft-07/schema",$id:"FnConsts",description:"Generics used by functions",definitions:{i_fn_find_options:{description:"extended find options for client functions",allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_limiting_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_ordering_options"},{$ref:"#/definitions/i_fn_find_options_extra"}]},i_fn_find_options_extra:{description:"extra find options for client functions",$typescript:'{"additionalProperties":false}',type:"object",properties:{order_by:{description:"Ordering options in string format",type:"string"}}}}};var na={$schema:"http://json-schema.org/draft-07/schema",$id:"GetBalanceFnInput",title:"GetBalanceFnInput",description:"Input for Getbalance",type:"object",properties:{token:{description:"Id of the token to get balance",type:["string","integer"]},wallet:{description:"Id of the wallet to get balance from",type:["string","integer"]},datetime:{description:"Date and time this balance should be got",type:"string"},options:{$ref:"#/definitions/get_balance_fn_options"}},definitions:{get_balance_fn_options:{allOf:[{$ref:"/txs/get-balance/get-balance.schema.input.json#/definitions/get_balance_tx_options"}]}},required:["wallet"],additionalProperties:!1};var aa={$schema:"http://json-schema.org/draft-07/schema",$id:"GetBalanceFnOutput",title:"GetBalanceFnOutput",description:"Output of balance",type:"object",$ref:"/txs/get-balance/get-balance.schema.output.json"};var sa={$schema:"http://json-schema.org/draft-07/schema",$id:"GetBalanceHistoryFnInput",title:"GetBalanceHistoryFnInput",description:"Input for getBalanceHistory",type:"object",properties:{token:{description:"Id of the token to get balance",type:["string","integer"]},wallet:{description:"Id of the wallet to get balance from",type:["string","integer"]},options:{$ref:"#/definitions/get_balance_history_fn_options"}},definitions:{get_balance_history_fn_options:{description:"Optional flags for input",type:"object",allOf:[{$ref:"/txs/get-balance-history/get-balance-history.schema.input.json#/definitions/get_balance_history_tx_options"}]}},required:["wallet"],additionalProperties:!1};var ia={$schema:"http://json-schema.org/draft-07/schema",$id:"GetBalanceHistoryFnOutput",title:"GetBalanceHistoryFnOutput",description:"Output of getBalanceHistory",type:"object",$ref:"/txs/get-balance-history/get-balance-history.schema.output.json"};var oa={$schema:"http://json-schema.org/draft-07/schema",$id:"GetFlagsFnInput",title:"GetFlagsFnInput",description:"Input for getFlags",type:"object",properties:{options:{$ref:"#/definitions/get_flags_fn_options"}},default:{},definitions:{get_flags_fn_options:{allOf:[{$ref:"/txs/get-flags/get-flags.schema.input.json#/definitions/get_flags_tx_options"}]}},additionalProperties:!1};var pa={$schema:"http://json-schema.org/draft-07/schema",$id:"GetFlagsFnOutput",title:"GetFlagsFnOutput",description:"Output of getFlags",$ref:"/txs/get-flags/get-flags.schema.output.json"};var da={$schema:"http://json-schema.org/draft-07/schema",$id:"GetStatisticsFnInput",title:"GetStatisticsFnInput",description:"Input for getStatistics",type:"object",properties:{model:{$ref:"/txs/get-statistics/get-statistics.schema.input.json#/definitions/statistics_model"},groups:{$ref:"/txs/get-statistics/get-statistics.schema.input.json#/definitions/statistics_groups"},aggregator:{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_aggregator"},filter:{$ref:"/txs/get-statistics/get-statistics.schema.input.json#/definitions/statistics_filter"},options:{$ref:"#/definitions/get_statistics_fn_options"}},definitions:{get_statistics_fn_options:{description:"Optional flags for input",type:"object",allOf:[{$ref:"/txs/get-statistics/get-statistics.schema.input.json#/definitions/get_statistics_tx_options"}]}},additionalProperties:!1};var fa={$schema:"http://json-schema.org/draft-07/schema",$id:"GetStatisticsFnOutput",title:"GetStatisticsFnOutput",description:"Output of getStatistics",type:"object",$ref:"/txs/get-statistics/get-statistics.schema.output.json"};var ua={$schema:"http://json-schema.org/draft-07/schema",$id:"GetTokenFnInput",title:"GetTokenFnInput",description:"Input for getToken",type:"object",properties:{foreign:{$ref:"/db/token/token.schema.json#/properties/foreign"},options:{$ref:"#/definitions/get_token_fn_options"}},definitions:{get_token_fn_options:{allOf:[{$ref:"/txs/get-token/get-token.schema.input.json#/definitions/get_token_tx_options"}]}},additionalProperties:!1};var la={$schema:"http://json-schema.org/draft-07/schema",$id:"GetTokenFnOutput",title:"GetTokenFnOutput",description:"Output of getToken",$ref:"/txs/get-token/get-token.schema.output.json"};var ca={$schema:"http://json-schema.org/draft-07/schema",$id:"GetTransferFnInput",title:"GetTransferFnInput",description:"Input for getTransfer",type:"object",properties:{transfer:{description:"Transfer identifier",type:["string","integer"]},options:{$ref:"#/definitions/get_transfer_fn_options"}},definitions:{get_transfer_fn_options:{description:"Optional flags for input",allOf:[{$ref:"/txs/get-transfer/get-transfer.schema.input.json#/definitions/get_transfer_tx_options"}]}},required:["transfer"],additionalProperties:!1};var ma={$schema:"http://json-schema.org/draft-07/schema",$id:"GetTransferFnOutput",title:"GetTransferFnOutput",description:"Output of getTransfer",type:"object",$ref:"/txs/get-transfer/get-transfer.schema.output.json"};var ha={$schema:"http://json-schema.org/draft-07/schema",$id:"GetTransferGroupFnInput",title:"GetTransferGroupFnInput",description:"Input for getTransferGroup",type:"object",properties:{transfer_group:{description:"identifier of the transfer group to reverse",type:["string","number"]},options:{$ref:"#/definitions/get_transfer_group_fn_options"}},definitions:{get_transfer_group_fn_options:{description:"Optional flags for input",allOf:[{$ref:"/txs/get-transfer-group/get-transfer-group.schema.input.json#/definitions/get_transfer_group_tx_options"}]}},required:["transfer_group"],additionalProperties:!1};var _a={$schema:"http://json-schema.org/draft-07/schema",$id:"GetTransferGroupFnOutput",title:"GetTransferGroupFnOutput",description:"Output of getTransferGroup",type:"object",$ref:"/txs/get-transfer-group/get-transfer-group.schema.output.json"};var ga={$schema:"http://json-schema.org/draft-07/schema",$id:"GetWalletFnInput",title:"GetWalletFnInput",description:"Input for getWallet",type:"object",properties:{wallet:{description:"Wallet foreign",type:["string","integer"]},options:{$ref:"#/definitions/get_wallet_fn_options"}},definitions:{get_wallet_fn_options:{description:"Optional flags for input",type:"object",allOf:[{$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/get_wallet_tx_options"}]}},required:["wallet"],additionalProperties:!1};var Ta={$schema:"http://json-schema.org/draft-07/schema",$id:"GetWalletFnOutput",title:"GetWalletFnOutput",description:"Output of getWallet",type:"object",$ref:"/txs/get-wallet/get-wallet.schema.output.json"};var Bt={$schema:"http://json-schema.org/draft-07/schema",$id:"ImportDataFnInput",title:"ImportDataFnInput",description:"Input for import",type:"object",properties:{actions:{type:"array",items:{$ref:"#/definitions/import_data_fn_stream_chunk"}},options:{$ref:"#/definitions/import_data_fn_options"}},definitions:{import_data_fn_options:{description:"Optional flags for input",type:"object",allOf:[{$ref:"/txs/import-actions/import-actions.schema.input.json#/definitions/import_actions_tx_options"}]},import_data_fn_stream_chunk:{type:"object",anyOf:[{$ref:"#/definitions/import_wallet"},{$ref:"#/definitions/import_token"},{$ref:"#/definitions/import_transfer_group"},{$ref:"#/definitions/import_transfer"},{$ref:"#/definitions/import_reverse_transfer"},{$ref:"#/definitions/import_reverse_transfer_group"}]},import_wallet:{type:"object",properties:{target:{description:"Target of the action",type:"string",enum:["wallet"]},data:{allOf:[{$ref:"/fns/create-wallet/create-wallet.schema.input.json#/definitions/create_wallet_fn_input_data"}]}},required:["target","data"],$typescript:'{"additionalProperties": false}'},import_token:{type:"object",properties:{target:{description:"Target of the action",type:"string",enum:["token"]},data:{allOf:[{$ref:"/fns/create-token/create-token.schema.input.json#/definitions/create_token_fn_input_data"}]}},required:["target","data"],$typescript:'{"additionalProperties": false}'},import_transfer_group_extension:{type:"object",properties:{created_at:{type:"string",format:"date-time"},status_finalized_at:{type:"string",format:"date-time"},transfer_status_finalized_at:{type:"string",format:"date-time"}},$typescript:'{"additionalProperties": false}'},import_transfer_group_data:{allOf:[{$ref:"/fns/create-transfer-group/create-transfer-group.schema.input.json#/definitions/create_transfer_group_fn_input_data"},{$ref:"#/definitions/import_transfer_group_extension"}]},import_transfer_group:{type:"object",properties:{target:{description:"Target of the action",type:"string",enum:["transfer_group"]},data:{allOf:[{$ref:"#/definitions/import_transfer_group_data"}]}},required:["target","data"],$typescript:'{"additionalProperties": false}'},import_transfer_extension:{type:"object",properties:{created_at:{type:"string",format:"date-time"},status_finalized_at:{type:"string",format:"date-time"}},$typescript:'{"additionalProperties": false}'},import_transfer_data:{type:"object",properties:{identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},token:{description:"Foreign of the token to transfer as",type:["string","integer"]},from_wallet:{description:"Foreign of the wallet to deposit to",type:["string","integer"]},to_wallet:{description:"Foreign of the wallet to deposit to",type:["string","integer"]},latest_control_hash:{description:"Latest control_hash on the from_wallet",anyOf:[{$ref:"/db/transfer/transfer.schema.json#/properties/control_hash"},{type:"null"}]},amount:{description:"amount to deposit",type:"number"},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},type:{type:"string",enum:["transfer"]},status:{description:"status of the transfer",enum:["pending","cancelled","finished"],default:"finished"},transfer_group:{description:"Id of the transfer_group this transfer is linked to",type:["string"]},created_at:{$ref:"/db/transfer/transfer.schema.input.json#/properties/created_at"},status_finalized_at:{$ref:"/db/transfer/transfer.schema.input.json#/properties/status_finalized_at"}},required:["from_wallet","to_wallet","amount"],$typescript:'{"additionalProperties": false}'},import_withdrawal_data:{type:"object",properties:{identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},token:{description:"Foreign of the token to transfer as",type:["string","integer"]},wallet:{description:"Foreign of the wallet to withdraw from",type:["string","integer"]},latest_control_hash:{description:"Latest control_hash on the from_wallet",anyOf:[{$ref:"/db/transfer/transfer.schema.json#/properties/control_hash"},{type:"null"}]},amount:{description:"amount to deposit",type:"number"},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},type:{type:"string",enum:["withdrawal"]},status:{description:"status of the transfer",enum:["pending","cancelled","finished"],default:"finished"},transfer_group:{description:"Id of the transfer_group this transfer is linked to",type:["string"]},created_at:{$ref:"/db/transfer/transfer.schema.input.json#/properties/created_at"},status_finalized_at:{$ref:"/db/transfer/transfer.schema.input.json#/properties/status_finalized_at"}},required:["wallet","amount","type"],$typescript:'{"additionalProperties": false}'},import_deposit_data:{type:"object",properties:{identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},token:{description:"Foreign of the token to transfer as",type:["string","integer"]},wallet:{description:"Foreign of the wallet to deposit to",type:["string","integer"]},amount:{description:"amount to deposit",type:"number"},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},type:{type:"string",enum:["deposit"]},status:{description:"status of the transfer",enum:["pending","cancelled","finished"],default:"finished"},transfer_group:{description:"Id of the transfer_group this transfer is linked to",type:["string"]},created_at:{$ref:"/db/transfer/transfer.schema.input.json#/properties/created_at"},status_finalized_at:{$ref:"/db/transfer/transfer.schema.input.json#/properties/status_finalized_at"}},required:["wallet","amount","type"],$typescript:'{"additionalProperties": false}'},create_transfer_data_wild:{anyOf:[{$ref:"#/definitions/import_transfer_data"},{$ref:"#/definitions/import_withdrawal_data"},{$ref:"#/definitions/import_deposit_data"}]},import_transfer:{type:"object",properties:{target:{description:"Target of the action",type:"string",enum:["transfer"]},data:{allOf:[{$ref:"#/definitions/create_transfer_data_wild"}]}},required:["target","data"],$typescript:'{"additionalProperties": false}'},import_reverse_transfer_options:{type:"object",properties:{metadata_action:{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_action"}},$typescript:'{"additionalProperties": false}'},import_reverse_transfer_extension:{type:"object",properties:{options:{allOf:[{$ref:"#/definitions/import_reverse_transfer_options"}]}},$typescript:'{"additionalProperties": false}'},import_reverse_transfer_data:{allOf:[{$ref:"/fns/reverse-transfer/reverse-transfer.schema.input.json#/definitions/reverse_transfer_fn_input_data"},{$ref:"#/definitions/import_reverse_transfer_extension"}]},import_reverse_transfer:{type:"object",properties:{target:{description:"Target of the action",type:"string",enum:["reverse_transfer"]},data:{allOf:[{$ref:"#/definitions/import_reverse_transfer_data"}]}},required:["target","data"],$typescript:'{"additionalProperties": false}'},import_reverse_transfer_group_options:{type:"object",properties:{metadata_action:{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_action"},transfer_metadata_action:{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_action"}},$typescript:'{"additionalProperties": false}'},import_reverse_transfer_group_extension:{type:"object",properties:{options:{allOf:[{$ref:"#/definitions/import_reverse_transfer_group_options"}]}},$typescript:'{"additionalProperties": false}'},import_reverse_transfer_group_data:{allOf:[{$ref:"/fns/reverse-transfer-group/reverse-transfer-group.schema.input.json#/definitions/reverse_transfer_group_fn_input_data"},{$ref:"#/definitions/import_reverse_transfer_group_extension"}]},import_reverse_transfer_group:{type:"object",properties:{target:{description:"Target of the action",type:"string",enum:["reverse_transfer_group"]},data:{allOf:[{$ref:"#/definitions/import_reverse_transfer_group_data"}]}},required:["target","data"],$typescript:'{"additionalProperties": false}'}},$allowStreamInput:"import_data_fn_stream_chunk",additionalProperties:!1};var ya={$schema:"http://json-schema.org/draft-07/schema",$id:"ImportDataFnOutput",title:"ImportDataFnOutput",description:"Output of import",type:"object",$ref:"/txs/import-actions/import-actions.schema.output.json"};var ba={$schema:"http://json-schema.org/draft-07/schema",$id:"ReverseTransferFnInput",title:"ReverseTransferFnInput",description:"Input for reverseTransfer",allOf:[{$ref:"#/definitions/reverse_transfer_fn_input_data"},{$ref:"#/definitions/reverse_transfer_fn_options_property"}],definitions:{reverse_transfer_fn_options:{allOf:[{$ref:"/txs/reverse-transfer/reverse-transfer.schema.input.json#/definitions/reverse_transfer_tx_options"}]},reverse_transfer_fn_options_property:{type:"object",properties:{options:{$ref:"#/definitions/reverse_transfer_fn_options"}},$typescript:'{"additionalProperties": false}'},reverse_transfer_fn_input_data:{type:"object",properties:{transfer:{description:"Transfer identifier",type:["string","integer"]},status:{description:"Status of the created transfer",$ref:"/db/transfer/transfer.schema.input.json#/properties/status"},identifier:{description:"Identifier for the created transfer",$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},force:{description:"Force create the reverse transfer ignoring balance",$ref:"/db/transfer/transfer.schema.input.json#/properties/force"},metadata:{description:"Metadata for the reversed transfers",$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},extend_metadata:{description:"Key value object to extend metadata with on created transfer",$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/metadata"}},required:["transfer"],$typescript:'{"additionalProperties": false}'}},$typescript:'{"additionalProperties": false}'};var Fa={$schema:"http://json-schema.org/draft-07/schema",$id:"ReverseTransferFnOutput",title:"ReverseTransferFnOutput",description:"Output of reverseTransfer",$ref:"/txs/reverse-transfer/reverse-transfer.schema.output.json"};var xa={$schema:"http://json-schema.org/draft-07/schema",$id:"ReverseTransferGroupFnInput",title:"ReverseTransferGroupFnInput",description:"Input for reverseTransferGroup",allOf:[{$ref:"#/definitions/reverse_transfer_group_fn_input_data"},{$ref:"#/definitions/reverse_transfer_group_fn_options_property"}],definitions:{reverse_transfer_group_fn_options:{allOf:[{$ref:"/txs/reverse-transfer-group/reverse-transfer-group.schema.input.json#/definitions/reverse_transfer_group_tx_options"}]},reverse_transfer_group_fn_options_property:{type:"object",properties:{options:{$ref:"#/definitions/reverse_transfer_group_fn_options"}},$typescript:'{"additionalProperties": false}'},reverse_transfer_group_fn_input_data:{type:"object",properties:{transfer_group:{description:"identifier of the transfer group to reverse",type:["string","number"]},status:{$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/status"},transfer_status:{$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/transfer_status"},identifier:{$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/identifier"},force:{$ref:"/db/transfer/transfer.schema.input.json#/properties/force"},metadata:{$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/metadata"},transfer_metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},extend_metadata:{description:"Key value object to extend metadata with on created transfer",$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/metadata"},transfer_extend_metadata:{description:"Key value object to extend metadata with on created transfer",$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"}},required:["transfer_group"],$typescript:'{"additionalProperties": false}'}},$typescript:'{"additionalProperties": false}'};var $a={$schema:"http://json-schema.org/draft-07/schema",$id:"ReverseTransferGroupFnOutput",title:"ReverseTransferGroupFnOutput",description:"Output of reverseTransferGroup",$ref:"/txs/reverse-transfer-group/reverse-transfer-group.schema.output.json"};var Oa={$schema:"http://json-schema.org/draft-07/schema",$id:"ReverseTransfersFnInput",title:"ReverseTransfersFnInput",description:"Input for reverseTransfers",type:"object",properties:{wallet:{description:"Foreign of the wallet connected to transfers",type:["string","integer"]},token:{description:"Foreign of the token transferred",type:["string","integer"]},from_wallet:{description:"Foreign of the wallet transfers are made from",type:["string","integer"]},to_wallet:{description:"Foreign of the wallet transfers are made to",type:["string","integer"]},transfer_group:{description:"Foreign of the transfer_group the transfers are a part of",type:["string","integer"]},status:{description:"Status of the transfers",$ref:"/db/transfer/transfer.schema.input.json#/properties/status"},metadata:{description:"Metadata filter",$ref:"/db/consts.schema.json#/definitions/DbFilterMetadata"},reverse:{$ref:"/txs/reverse-transfer-many/reverse-transfer-many.schema.input.json#/definitions/reverse_transfer_many_modifications"},options:{$ref:"#/definitions/reverse_transfers_fn_options"}},definitions:{reverse_transfers_fn_options:{description:"findTransfers function options",allOf:[{$ref:"/txs/reverse-transfer-many/reverse-transfer-many.schema.input.json#/definitions/reverse_transfer_many_tx_options"}]},reverse_transfers_fn_modifications:{description:"In case the transfer will be made then apply these modifications",allOf:[{$ref:"/txs/reverse-transfer-many/reverse-transfer-many.schema.input.json#/definitions/reverse_transfer_many_modifications"}]}},$reverseQueryBuilder:!0,additionalProperties:!1};var wa={$schema:"http://json-schema.org/draft-07/schema",$id:"ReverseTransfersFnOutput",title:"ReverseTransfersFnOutput",description:"Output of reverseTransfers",type:"object",$ref:"/txs/reverse-transfer-many/reverse-transfer-many.schema.output.json"};var Ia={$schema:"http://json-schema.org/draft-07/schema",$id:"SetFlagsFnInput",title:"SetFlagsFnInput",description:"Input for setFlags",allOf:[{$ref:"#/definitions/set_flags_properties"}],definitions:{set_flags_fn_options:{allOf:[{$ref:"/txs/set-flags/set-flags.schema.input.json#/definitions/set_flags_tx_options"}]},set_flags_properties:{allOf:[{$ref:"/db/consts.schema.json#/definitions/Flags"},{$ref:"#/definitions/set_flags_options_property"}]},set_flags_options_property:{type:"object",properties:{options:{$ref:"#/definitions/set_flags_fn_options"}},$typescript:'{"additionalProperties": false}'}},$typescript:'{"additionalProperties": false}'};var ja={$schema:"http://json-schema.org/draft-07/schema",$id:"SetFlagsFnOutput",title:"SetFlagsFnOutput",description:"Output of setFlags",$ref:"/txs/set-flags/set-flags.schema.output.json"};var va={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateTokenFnInput",title:"UpdateTokenFnInput",description:"Input for updateToken",type:"object",properties:{token:{description:"Token foreign",type:["string","number"]},metadata:{$ref:"/db/token/token.schema.json#/properties/metadata"},public:{$ref:"/db/token/token.schema.json#/properties/public"},status:{$ref:"/db/token/token.schema.json#/properties/status"},options:{$ref:"#/definitions/update_token_fn_options"}},definitions:{update_token_fn_fields:{description:"Updateable fields",type:"object",allOf:[{$ref:"/txs/update-token/update-token.schema.input.json#/definitions/update_token_fields"}]},update_token_fn_options:{description:"Optional flags for input",type:"object",allOf:[{$ref:"/txs/update-token/update-token.schema.input.json#/definitions/update_token_tx_options"}]}},additionalProperties:!1,required:["token"]};var ka={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateTokenFnOutput",title:"UpdateTokenFnOutput",description:"Output of updateToken",type:"object",$ref:"/txs/update-token/update-token.schema.output.json"};var Sa={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateTransferFnInput",title:"UpdateTransferFnInput",description:"Input for updateTransfer",type:"object",properties:{transfer:{description:"Transfer identifier",type:["string","integer"]},status:{description:"Status the transfer should be set to",enum:["finished","cancelled"]},metadata:{$ref:"/db/transfer/transfer.schema.json#/properties/metadata"},options:{$ref:"#/definitions/update_transfer_fn_options"}},definitions:{update_transfer_fn_options:{allOf:[{$ref:"/txs/update-transfer/update-transfer.schema.input.json#/definitions/update_transfer_tx_options"}]}},additionalProperties:!1,required:["transfer"]};var Ca={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateTransferFnOutput",title:"UpdateTransferFnOutput",description:"Output of updateTransfer",type:"object",$ref:"/txs/update-transfer/update-transfer.schema.output.json"};var Pa={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateTransferGroupFnInput",title:"UpdateTransferGroupFnInput",description:"Input for updateTransferGroup",anyOf:[{$ref:"#/definitions/update_transfer_group_fn_status"},{$ref:"#/definitions/update_transfer_group_fn_transfer_status"},{$ref:"#/definitions/update_transfer_group_fn_metadata"}],definitions:{update_transfer_group_fn_options:{$comment:"Using allOf so that references dont break",type:"object",allOf:[{$ref:"/txs/update-transfer-group/update-transfer-group.schema.input.json#/definitions/update_transfer_group_tx_options"}]},update_transfer_group_fn_status:{type:"object",properties:{transfer_group:{description:"identifier of the transfer group to reverse",type:["string","number"]},status:{description:"Lifecycle status of the TransferGroup",$ref:"/db/consts.schema.json#/definitions/TransferGroupStatus"},transfer_status:{description:"Status all the transfers should be set at.",$ref:"/db/consts.schema.json#/definitions/TransferStatus"},metadata:{description:"Key value object to be replaced or extended with existing TransferGroup metadata",$ref:"/db/transfer/transfer.schema.json#/properties/metadata"},options:{$ref:"#/definitions/update_transfer_group_fn_options"}},required:["transfer_group","status"],$typescript:'{"additionalProperties": false}'},update_transfer_group_fn_transfer_status:{type:"object",properties:{transfer_group:{description:"identifier of the transfer group to update",type:["string","number"]},status:{description:"Lifecycle status of the TransferGroup",$ref:"/db/consts.schema.json#/definitions/TransferGroupStatus"},transfer_status:{description:"Status all the transfers should be set at.",$ref:"/db/consts.schema.json#/definitions/TransferStatus"},metadata:{description:"Key value object to be replaced or extended with existing TransferGroup metadata",$ref:"/db/transfer/transfer.schema.json#/properties/metadata"},options:{$ref:"#/definitions/update_transfer_group_fn_options"}},required:["transfer_group","transfer_status"],$typescript:'{"additionalProperties": false}'},update_transfer_group_fn_metadata:{type:"object",properties:{transfer_group:{description:"identifier of the transfer group to update",type:["string","number"]},status:{description:"Lifecycle status of the TransferGroup",$ref:"/db/consts.schema.json#/definitions/TransferGroupStatus"},transfer_status:{description:"Status all the transfers should be set at.",$ref:"/db/consts.schema.json#/definitions/TransferStatus"},metadata:{description:"Key value object to be replaced or extended with existing TransferGroup metadata",$ref:"/db/transfer/transfer.schema.json#/properties/metadata"},options:{$ref:"#/definitions/update_transfer_group_fn_options"}},required:["transfer_group","metadata"],$typescript:'{"additionalProperties": false}'}}};var Ga={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateTransferGroupFnOutput",title:"UpdateTransferGroupFnOutput",description:"Output of updateTransferGroup",type:"object",$ref:"/txs/update-transfer-group/update-transfer-group.schema.output.json"};var Da={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateTransferGroupsFnInput",title:"UpdateTransferGroupsFnInput",description:"Input for updateTransferGroups",type:"object",properties:{transfer_status:{description:"Status of the transfers",$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/transfer_status"},status:{description:"Status of the transfer_group",$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/status"},metadata:{description:"Metadata filter",$ref:"/db/consts.schema.json#/definitions/DbFilterMetadata"},reverses:{description:"Identifier of the transfer_group the transfer_group reverses",type:["string","integer"]},type:{description:"Type of the transfer group",$ref:"/db/consts.schema.json#/definitions/TransferGroupType"},update:{$ref:"#/definitions/update_transfer_groups_fn_update_fields"},options:{$ref:"#/definitions/update_transfer_groups_fn_options"}},definitions:{update_transfer_groups_fn_update_fields:{type:"object",allOf:[{$ref:"/txs/update-transfer-group/update-transfer-group.schema.input.json#/definitions/update_transfer_group_data"}]},update_transfer_groups_fn_options:{description:"Optional flags for input",type:"object",allOf:[{$ref:"/txs/update-transfer-group/update-transfer-group.schema.input.json#/definitions/update_transfer_group_tx_options"}]}},$updateQueryBuilder:!0,additionalProperties:!1};var Ea={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateTransferGroupsFnOutput",title:"UpdateTransferGroupsFnOutput",description:"Output of updateTransferGroups",type:"object",$ref:"/txs/update-transfer-group-many/update-transfer-group-many.schema.output.json"};var Ma={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateTransfersFnInput",title:"UpdateTransfersFnInput",description:"Input for updateTransfers",type:"object",properties:{wallet:{description:"Foreign of the wallet connected to transfers",type:["string","integer"]},token:{description:"Foreign of the token transferred",type:["string","integer"]},from_wallet:{description:"Foreign of the wallet transfers are made from",type:["string","integer"]},to_wallet:{description:"Foreign of the wallet transfers are made to",type:["string","integer"]},transfer_group:{description:"Foreign of the transfer_group the transfers are a part of",type:["string","integer"]},status:{description:"Status of the transfers",$ref:"/db/transfer/transfer.schema.input.json#/properties/status"},metadata:{description:"Metadata filter",$ref:"/db/consts.schema.json#/definitions/DbFilterMetadata"},update:{$ref:"/txs/update-transfer/update-transfer.schema.input.json#/definitions/update_transfer_fields"},options:{$ref:"#/definitions/update_transfers_fn_options"}},definitions:{update_transfers_fn_options:{description:"Optional flags for input",type:"object",allOf:[{$ref:"/txs/update-transfer-many/update-transfer-many.schema.input.json#/definitions/update_transfer_many_tx_options"}]},update_transfers_fn_update_fields:{type:"object",allOf:[{$ref:"/txs/update-transfer/update-transfer.schema.input.json#/definitions/update_transfer_fields"}]}},$updateQueryBuilder:!0,additionalProperties:!1};var Ra={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateTransfersFnOutput",title:"UpdateTransfersFnOutput",description:"Output of updateTransfers",type:"object",$ref:"/txs/update-transfer-many/update-transfer-many.schema.output.json"};var Wa={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateWalletFnInput",title:"UpdateWalletFnInput",description:"Input for updateWallet",type:"object",properties:{wallet:{description:"Wallet foreign",type:["string","integer"]},metadata:{$ref:"/db/wallet/wallet.schema.json#/properties/metadata"},name:{$ref:"/db/wallet/wallet.schema.input.json#/properties/name"},status:{$ref:"/db/wallet/wallet.schema.input.json#/properties/status"},options:{$ref:"#/definitions/update_wallet_fn_options"}},definitions:{update_wallet_fn_fields:{description:"Updatable fields",type:"object",allOf:[{$ref:"/txs/update-wallet/update-wallet.schema.input.json#/definitions/update_wallet_fields"}]},update_wallet_fn_options:{description:"Optional flags for input",type:"object",allOf:[{$ref:"/txs/update-wallet/update-wallet.schema.input.json#/definitions/update_wallet_tx_options"}]}},additionalProperties:!1,required:["wallet"]};var Aa={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateWalletFnOutput",title:"UpdateWalletFnOutput",description:"Output of updateWallet",type:"object",$ref:"/txs/update-wallet/update-wallet.schema.output.json"};var Na={$schema:"http://json-schema.org/draft-07/schema",$id:"AggregateTransferManyTxInput",title:"AggregateTransferManyTxInput",description:"Input for aggregateTransferMany",type:"object",properties:{transfer:{$ref:"/txs/find-transfer-many/find-transfer-many.schema.input.json#/definitions/find_transfer_many_filter"},aggregators:{description:"Array of aggregators to apply",type:"array",items:{$ref:"#/definitions/aggregate_transfer_many_aggregator"}},groups:{$ref:"#/definitions/aggregate_transfer_many_groups"},options:{$ref:"#/definitions/aggregate_transfer_many_tx_options"}},definitions:{aggregate_transfer_many_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/aggregate_transfer_many_additional_options"}]},aggregate_transfer_many_additional_options:{$typescript:'{"additionalProperties":false}',description:"Optional flags to aggregate data",type:"object",properties:{return_all_intervals:{description:"Add empty values for each interval if no matching data",type:"object",properties:{start_time:{type:"string"},end_time:{type:"string"}},additionalProperties:!1,required:["start_time","end_time"]}}},aggregate_transfer_many_groups:{type:"array",maxItems:5,items:{$ref:"#/definitions/aggregate_transfer_many_group"}},aggregate_transfer_many_group:{anyOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_group_period"},{$ref:"#/definitions/aggregate_transfer_many_group_field"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_group_metadata_field"}]},aggregate_transfer_many_group_field:{type:"object",properties:{type:{type:"string",enum:["field"]},field:{$ref:"#/definitions/aggregate_transfer_many_group_by_fields"},alias:{type:"string"}},required:["type","field"],additionalProperties:!1},aggregate_transfer_many_group_by_fields:{type:"string",enum:["type","status","from_wallet","to_wallet","wallet","token","transfer_group"]},aggregate_transfer_many_aggregator:{description:"Aggregator description",anyOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_aggregator_simple"},{$ref:"#/definitions/aggregate_transfer_many_aggregator_complex"}]},aggregate_transfer_many_aggregator_complex:{description:"Function and field to group",type:"object",properties:{function:{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_aggregator_simple"},field:{description:"Field to group by",type:"string",enum:["from.amount","to.amount","amount","abs.amount","transfer_group","from_wallet","to_wallet","wallet","token","id"]},alias:{description:"Alias to group under",type:"string"}},$typescript:'{"additionalProperties":false}'}},additionalProperties:!1};var Ua={$schema:"http://json-schema.org/draft-07/schema",$id:"AggregateTransferManyTxOutput",title:"AggregateTransferManyTxOutput",description:"Output of aggregateTransferMany",type:"object",properties:{rows:{description:"The results of the aggregation",$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_aggregate_results"},metadata:{description:"Information about the aggregation",$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_aggregating_metadata"}},additionalProperties:!1};var qa={$schema:"http://json-schema.org/draft-07/schema",$id:"AuthenticationCheckTxInput",title:"AuthenticationCheckTxInput",description:"Input for authenticationCheck",type:"object",properties:{options:{$ref:"#/definitions/authentication_check_tx_options"}},definitions:{authentication_check_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/authentication_check_additional_options"}]},authentication_check_additional_options:{description:"Optional flags for input",type:"object",default:{},$typescript:'{"additionalProperties":false}'}},additionalProperties:!1};var Ba={$schema:"http://json-schema.org/draft-07/schema",$id:"AuthenticationCheckTxOutput",title:"AuthenticationCheckTxOutput",description:"Output of authenticationCheck",type:"object",properties:{},additionalProperties:!1};var La={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateAccessTokenTxInput",title:"CreateAccessTokenTxInput",description:"Input for createAccessToken",type:"object",properties:{token:{anyOf:[{$ref:"#/definitions/create_access_token_limited"},{$ref:"#/definitions/create_access_token_admin"}]},options:{$ref:"#/definitions/create_access_token_tx_options"}},definitions:{create_access_token_limited:{type:"object",properties:{type:{enum:["limited"]},scopes:{type:"array",items:{type:"string",enum:["aggregateTransferMany","findBalanceMany","findTokenMany","findTransferGroupMany","findTransferMany","findWalletMany","getBalance","getBalanceHistory","getStatistics","getToken","getTokenMany","getTransfer","getTransferGroup","getWallet","getWalletMany"]}},filters:{description:"Forced filters for requests",type:"object",$ref:"#/definitions/create_access_token_forced_filters"},expiresIn:{description:"JWT expiration time in minutes",type:"number"}},required:["scopes","type","expiresIn"],additionalProperties:!1},create_access_token_admin:{type:"object",properties:{type:{enum:["admin"]},expiresIn:{description:"JWT expiration time in minutes",type:"number"}},required:["type","expiresIn"],additionalProperties:!1},create_access_token_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/create_access_token_additional_options"}]},create_access_token_additional_options:{description:"Optional flags for input",type:"object",default:{},$typescript:'{"additionalProperties":false}'},create_access_token_forced_filters:{type:"object",properties:{wallet_foreign:{type:"string"},from_wallet_foreign:{type:"string"},to_wallet_foreign:{type:"string"},token_foreign:{type:"string"}},additionalProperties:!1}},additionalProperties:!1};var Va={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateAccessTokenTxOutput",title:"CreateAccessTokenTxOutput",description:"Output of createAccessToken",type:"object",properties:{authToken:{description:"The JWT token",type:"string"}},required:["token"],additionalProperties:!1};var Ha={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateContractTxInput",title:"CreateContractTxInput",description:"Input for createContract",type:"object",properties:{token:{allOf:[{$ref:"#/definitions/create_contract_token"}]},exchange:{allOf:[{$ref:"#/definitions/create_contract_exchange"}]},options:{$ref:"#/definitions/create_contract_tx_options"}},definitions:{create_contract_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/create_contract_additional_options"}]},create_contract_additional_options:{description:"Optional flags for input",type:"object",default:{},$typescript:'{"additionalProperties":false}'},create_contract_token:{type:"object",properties:{foreign:{allOf:[{$ref:"/db/token/token.schema.input.json#/properties/foreign"}]},metadata:{allOf:[{$ref:"/db/token/token.schema.input.json#/properties/metadata"}]},deposits:{allOf:[{$ref:"#/definitions/create_contract_deposits"}]},owner:{description:"The inital owner of the contract, defaults to foreign = 'house'",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"}},additionalProperties:!1,required:["foreign","deposits"]},create_contract_deposit:{type:"object",properties:{token:{description:"Token that is moved",allOf:[{$ref:"/txs/get-token/get-token.schema.input.json#/definitions/unique_token_filter"}]},amount:{allOf:[{$ref:"/db/transfer/transfer.schema.input.json#/properties/amount"}]}},additionalProperties:!1,required:["token","amount"]},create_contract_deposits:{type:"array",items:{allOf:[{$ref:"#/definitions/create_contract_deposit"}]},minItems:1},create_contract_exchange:{type:"object",properties:{from_wallet:{description:"Wallet the contract will belong to at the end (buyer)",allOf:[{$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"}]},from_latest_control_hash:{description:"Latest control_hash on the from_wallet+from_token combo",anyOf:[{$ref:"/db/transfer/transfer.schema.json#/properties/control_hash"},{type:"null"}]},from_token:{description:"Token that is transferred from from_wallet in exchange of the contract",$ref:"/txs/get-token/get-token.schema.input.json#/definitions/unique_token_filter"},to_wallet:{description:"Wallet the payment for the contract is sent to (seller)",allOf:[{$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"}]},amount:{allOf:[{$ref:"/db/transfer/transfer.schema.input.json#/properties/amount"}]},status:{description:"The state at which the exchange is created",type:"string",enum:["pending","finished"]},force:{allOf:[{$ref:"/db/transfer/transfer.schema.input.json#/properties/force"}]},metadata:{allOf:[{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"}]}},additionalProperties:!1,required:["from_wallet","amount"]}},required:["token"],additionalProperties:!1};var za={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateContractTxOutput",title:"CreateContractTxOutput",description:"Output of createContract",type:"object",properties:{token:{$ref:"/db/token/token.schema.json"},exchange:{description:"Created exchange for the Contract",allOf:[{$ref:"/txs/create-transfer-group/create-transfer-group.schema.output.json"}]}},required:["token"],additionalProperties:!1};var Ka={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateDepositTxInput",title:"CreateDepositTxInput",description:"Input for createDeposit",type:"object",properties:{deposit:{$ref:"/txs/create-transfer/create-transfer.schema.input.json#/definitions/transfer_data_deposit"},options:{$ref:"#/definitions/create_deposit_tx_options"}},definitions:{create_deposit_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"/txs/create-transfer/create-transfer.schema.input.json#/definitions/create_transfer_additional_options"}]}},additionalProperties:!1,required:["deposit"]};var Qa={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateDepositTxOutput",title:"CreateDepositTxOutput",description:"The transfer of funds and optionally the destination wallet balance",allOf:[{$ref:"/txs/create-transfer/create-transfer.schema.output.json"}]};var Ja={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateDistributionTxInput",title:"CreateDistributionTxInput",description:"Input for createDistribution",type:"object",properties:{distribution:{$ref:"#/definitions/distribution"},options:{$ref:"#/definitions/create_distribution_tx_options"}},definitions:{create_distribution_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/create_distribution_additional_options"}]},create_distribution_additional_options:{description:"Optional flags for input",type:"object",default:{dryrun:!1},properties:{dryrun:{type:"boolean",default:!1}},$typescript:'{"additionalProperties":false}'},leftover_target:{type:"object",properties:{rule:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_distributor_leftover_rule"}]},target:{type:"object",properties:{wallet:{allOf:[{$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"}]},metadata:{allOf:[{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"}]}},required:["wallet"],additionalProperties:!1}},required:["rule"],additionalProperties:!1},distribution:{description:"Distribute funds from one wallet between multiple wallets",type:"object",properties:{identifier:{description:"Unique identifier for this distribution",type:"string"},latest_control_hash:{description:"Latest control_hash on the from_wallet",anyOf:[{$ref:"/db/transfer/transfer.schema.json#/properties/control_hash"},{type:"null"}]},from_wallet:{description:"Wallet where funds are debited",allOf:[{$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"}]},token:{description:"Token that is moved",allOf:[{$ref:"/txs/get-token/get-token.schema.input.json#/definitions/unique_token_filter"}]},amount:{allOf:[{$ref:"/db/transfer/transfer.schema.input.json#/properties/amount"}]},status:{allOf:[{$ref:"/db/transfer/transfer.schema.input.json#/properties/status"}]},force:{allOf:[{$ref:"/db/transfer/transfer.schema.input.json#/properties/force"}]},metadata:{allOf:[{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"}]},copy_wallet_metadata_fields:{description:"Copy metadata information from Wallet metadata to transfer metadata",type:"array",items:{$ref:"#/definitions/copy_metadata_field"}},transfer_group:{description:"TransferGroup the transfer belongs to",allOf:[{$ref:"/txs/get-transfer-group/get-transfer-group.schema.input.json#/definitions/unique_transfer_group_filter"}]},targets:{anyOf:[{$ref:"#/definitions/target_wallets"},{$ref:"#/definitions/target_token"}]},leftover:{allOf:[{$ref:"#/definitions/leftover_target"}]}},required:["identifier","from_wallet","token","amount","targets","leftover"],additionalProperties:!1},copy_metadata_field:{description:"Copy metadata info from property to property",type:"object",properties:{from_property:{type:"string"},to_property:{type:"string"}},required:["from_property"],additionalProperties:!1},target_token:{description:"Wallets will receive funds based on their balance of this token",allOf:[{$ref:"/txs/get-token/get-token.schema.input.json#/definitions/unique_token_filter"}]},target_wallet:{type:"object",properties:{wallet:{description:"Wallet where funds are credited",allOf:[{$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"}]},portion:{description:"Number specifying the portion of funds to be credited",type:["string","number"]},metadata:{allOf:[{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"}]}},required:["wallet"],additionalProperties:!1},target_wallets:{type:"array",items:{$ref:"#/definitions/target_wallet"},minItems:1}},required:["distribution"],additionalProperties:!1};var Xa={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateDistributionTxOutput",title:"CreateDistributionTxOutput",description:"Output of createDistribution",type:"object",properties:{transfer_group:{description:"Created distribution transfer group",allOf:[{$ref:"/db/transfer-group/transfer-group.schema.json"}]},transfers:{description:"Created transfers",type:"array",items:{$ref:"/db/transfer/transfer.schema.json"}}},required:["transfer_group","transfers"],additionalProperties:!1};var Ya={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateTokenTxInput",title:"CreateTokenTxInput",description:"Input for createToken function",type:"object",properties:{token:{$ref:"#/definitions/create_token_input"},options:{$ref:"#/definitions/create_token_tx_options"}},definitions:{create_token_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"}]},create_token_input:{type:"object",properties:{foreign:{$ref:"/db/token/token.schema.json#/properties/foreign"},public:{$ref:"/db/token/token.schema.json#/properties/public"},metadata:{$ref:"/db/token/token.schema.json#/properties/metadata"},divisor:{$ref:"/db/token/token.schema.json#/properties/divisor"},limit:{$ref:"/db/token/token.schema.json#/properties/limit"},type:{$ref:"/db/token/token.schema.json#/properties/type"},belongs_to:{description:"Wallet this token belongs_to",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"}},additionalProperties:!1,required:["foreign"]}},required:["token"],additionalProperties:!1};var Za={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateTokenTxOutput",title:"CreateTokenTxOutput",description:"The created token and respective wallet",type:"object",properties:{token:{$ref:"/db/token/token.schema.json"},wallet:{$ref:"/db/wallet/wallet.schema.json"}},additionalProperties:!1,required:["token","wallet"]};var es={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateTransferTxInput",title:"CreateTransferTxInput",description:"Input for createTransfer",type:"object",properties:{transfer:{$ref:"#/definitions/transfer_data"},options:{$ref:"#/definitions/create_transfer_tx_options"}},definitions:{create_transfer_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/create_transfer_additional_options"}]},create_transfer_additional_options:{description:"Additional flags to determine the return",type:"object",default:{},properties:{return_from_balance:{$id:"return_from_balance",description:"Whether the request should also return from wallet balance",type:"boolean",default:!1},return_to_balance:{$id:"return_to_balance",description:"Whether the request should also return to wallet balance",type:"boolean",default:!1},create_to_wallet_if_not_exists:{type:"boolean",description:"If true then the wallet will be created if not found. Only valid with 'foreign'",default:!1}},$typescript:'{"additionalProperties": false}'},transfer_data:{anyOf:[{$ref:"#/definitions/transfer_data_regular"},{$ref:"#/definitions/transfer_data_deposit"},{$ref:"#/definitions/transfer_data_withdrawal"}]},transfer_data_regular:{type:"object",properties:{identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},latest_control_hash:{description:"Latest control_hash on the from_wallet",anyOf:[{$ref:"/db/transfer/transfer.schema.json#/properties/control_hash"},{type:"null"}]},from_wallet:{description:"Wallet where funds are debited",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},to_wallet:{description:"Wallet where funds are credited",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},token:{description:"Token that is moved",$ref:"/txs/get-token/get-token.schema.input.json#/definitions/unique_token_filter"},amount:{$ref:"/db/transfer/transfer.schema.input.json#/properties/amount"},type:{description:"Type of transfer",enum:["transfer"]},status:{$ref:"/db/transfer/transfer.schema.input.json#/properties/status"},force:{$ref:"/db/transfer/transfer.schema.input.json#/properties/force"},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},transfer_group:{description:"TransferGroup the transfer belongs to",$ref:"/txs/get-transfer-group/get-transfer-group.schema.input.json#/definitions/unique_transfer_group_filter"},created_at:{$ref:"/db/transfer/transfer.schema.input.json#/properties/created_at"}},required:["from_wallet","to_wallet","token","amount","type"],$typescript:'{"additionalProperties": false}'},transfer_data_deposit:{type:"object",properties:{identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},latest_control_hash:{description:"Latest control_hash on the from_wallet",anyOf:[{$ref:"/db/transfer/transfer.schema.json#/properties/control_hash"},{type:"null"}]},from_wallet:{description:"Wallet where funds are debited",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},to_wallet:{description:"Wallet where funds are credited",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},token:{description:"Token that is moved",$ref:"/txs/get-token/get-token.schema.input.json#/definitions/unique_token_filter"},amount:{$ref:"/db/transfer/transfer.schema.input.json#/properties/amount"},type:{description:"Type of transfer",enum:["deposit"]},status:{$ref:"/db/transfer/transfer.schema.input.json#/properties/status"},force:{$ref:"/db/transfer/transfer.schema.input.json#/properties/force"},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},transfer_group:{description:"TransferGroup the transfer belongs to",$ref:"/txs/get-transfer-group/get-transfer-group.schema.input.json#/definitions/unique_transfer_group_filter"},created_at:{$ref:"/db/transfer/transfer.schema.input.json#/properties/created_at"}},required:["to_wallet","token","amount"],$typescript:'{"additionalProperties": false}'},transfer_data_withdrawal:{type:"object",properties:{identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},latest_control_hash:{description:"Latest control_hash on the from_wallet",anyOf:[{$ref:"/db/transfer/transfer.schema.json#/properties/control_hash"},{type:"null"}]},from_wallet:{description:"Wallet where funds are debited",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},to_wallet:{description:"Wallet where funds are credited",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},token:{description:"Token that is moved",$ref:"/txs/get-token/get-token.schema.input.json#/definitions/unique_token_filter"},amount:{$ref:"/db/transfer/transfer.schema.input.json#/properties/amount"},type:{description:"Type of transfer",enum:["withdrawal"]},status:{$ref:"/db/transfer/transfer.schema.input.json#/properties/status"},force:{$ref:"/db/transfer/transfer.schema.input.json#/properties/force"},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},transfer_group:{description:"TransferGroup the transfer belongs to",$ref:"/txs/get-transfer-group/get-transfer-group.schema.input.json#/definitions/unique_transfer_group_filter"},created_at:{$ref:"/db/transfer/transfer.schema.input.json#/properties/created_at"}},required:["from_wallet","token","amount"],$typescript:'{"additionalProperties": false}'}},required:["transfer"],additionalProperties:!1};var ts={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateTransferTxOutput",title:"CreateTransferTxOutput",description:"Output of createTransfer",type:"object",properties:{transfer:{description:"Created transfer object",$ref:"/txs/get-transfer/get-transfer.schema.output.json#/definitions/transfer"},from_balance:{description:"Debited wallet balance",$ref:"/txs/get-balance/get-balance.schema.output.json#/definitions/balance"},to_balance:{description:"Credited wallet balance",$ref:"/txs/get-balance/get-balance.schema.output.json#/definitions/balance"}},additionalProperties:!1,required:["transfer"]};var rs={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateTransferGroupTxInput",title:"CreateTransferGroupTxInput",description:"Input for createTransferGroup",type:"object",properties:{transfer_group:{$ref:"#/definitions/transfer_group_data"},options:{$ref:"#/definitions/create_transfer_group_tx_options"}},definitions:{create_transfer_group_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/create_transfer_group_additional_options"}]},create_transfer_group_additional_options:{description:"Optional flags for input",type:"object",default:{},properties:{create_to_wallet_if_not_exists:{type:"boolean",description:"If true then the wallet will be created if not found. Only valid with 'foreign'",default:!1},validate_final_balance_only:{type:"boolean",description:"If true then transfers within a group will ignore balance restrictions. Only final transfers for wallets are checked. Only valid with transfer_status_lock",default:!1}},$typescript:'{"additionalProperties": false}'},transfer_group_data:{type:"object",description:"Input for the transferGroup to create",properties:{identifier:{$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/identifier"},status:{$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/status"},transfer_status:{$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/transfer_status"},metadata:{$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/metadata"},children:{description:"Array of children",type:"array",items:{$ref:"#/definitions/child_transfer_data"}}},additionalProperties:!1},child_transfer_data:{anyOf:[{$ref:"#/definitions/child_transfer_data_regular"},{$ref:"#/definitions/child_transfer_data_deposit"},{$ref:"#/definitions/child_transfer_data_withdrawal"}]},child_transfer_data_regular:{type:"object",properties:{identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},latest_control_hash:{description:"Latest control_hash on the from_wallet",anyOf:[{$ref:"/db/transfer/transfer.schema.json#/properties/control_hash"},{type:"null"}]},from_wallet:{description:"Wallet where funds are debited",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},to_wallet:{description:"Wallet where funds are credited",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},token:{description:"Token that is moved",$ref:"/txs/get-token/get-token.schema.input.json#/definitions/unique_token_filter"},amount:{$ref:"/db/transfer/transfer.schema.input.json#/properties/amount"},type:{description:"Type of transfer",enum:["transfer"]},force:{$ref:"/db/transfer/transfer.schema.input.json#/properties/force"},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},created_at:{$ref:"/db/transfer/transfer.schema.input.json#/properties/created_at"}},required:["from_wallet","to_wallet","token","amount","type"],$typescript:'{"additionalProperties": false}'},child_transfer_data_deposit:{type:"object",properties:{identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},latest_control_hash:{description:"Latest control_hash on the from_wallet",anyOf:[{$ref:"/db/transfer/transfer.schema.json#/properties/control_hash"},{type:"null"}]},from_wallet:{description:"Wallet where funds are debited",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},to_wallet:{description:"Wallet where funds are credited",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},token:{description:"Token that is moved",$ref:"/txs/get-token/get-token.schema.input.json#/definitions/unique_token_filter"},amount:{$ref:"/db/transfer/transfer.schema.input.json#/properties/amount"},type:{description:"Type of transfer",enum:["deposit"]},force:{$ref:"/db/transfer/transfer.schema.input.json#/properties/force"},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},created_at:{$ref:"/db/transfer/transfer.schema.input.json#/properties/created_at"}},required:["to_wallet","token","amount"],$typescript:'{"additionalProperties": false}'},child_transfer_data_withdrawal:{type:"object",properties:{identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},latest_control_hash:{description:"Latest control_hash on the from_wallet",anyOf:[{$ref:"/db/transfer/transfer.schema.json#/properties/control_hash"},{type:"null"}]},from_wallet:{description:"Wallet where funds are debited",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},to_wallet:{description:"Wallet where funds are credited",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},token:{description:"Token that is moved",$ref:"/txs/get-token/get-token.schema.input.json#/definitions/unique_token_filter"},amount:{$ref:"/db/transfer/transfer.schema.input.json#/properties/amount"},type:{description:"Type of transfer",enum:["withdrawal"]},force:{$ref:"/db/transfer/transfer.schema.input.json#/properties/force"},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},created_at:{$ref:"/db/transfer/transfer.schema.input.json#/properties/created_at"}},required:["from_wallet","token","amount"],$typescript:'{"additionalProperties": false}'}},required:[],additionalProperties:!1};var ns={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateTransferGroupTxOutput",title:"CreateTransferGroupTxOutput",description:"Output of createTransferGroup",type:"object",properties:{transfer_group:{$ref:"/db/transfer-group/transfer-group.schema.json"},transfers:{description:"Created transfer objects",type:"array",items:{$ref:"/txs/get-transfer/get-transfer.schema.output.json#/definitions/transfer"}}},required:["transfer_group"],additionalProperties:!1};var as={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateTransferManyTxInput",title:"CreateTransferManyTxInput",description:"Input for CreateTransferMany",type:"object",properties:{transfers:{description:"An array of transfers",type:"array",items:{$ref:"/txs/create-transfer/create-transfer.schema.input.json#/definitions/transfer_data"}},options:{$ref:"#/definitions/create_transfer_many_tx_options"}},definitions:{create_transfer_many_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/create_transfer_many_additional_options"}]},create_transfer_many_additional_options:{description:"Optional flags for input",type:"object",default:{},properties:{return_from_balance:{$id:"return_from_balance",description:"Whether the request should also return from wallet balance",type:"boolean",default:!1},return_to_balance:{$id:"return_to_balance",description:"Whether the request should also return to wallet balance",type:"boolean",default:!1},create_to_wallet_if_not_exists:{type:"boolean",description:"If true then the wallet will be created if not found. Only valid with 'foreign'",default:!1}},$typescript:'{"additionalProperties": false}'}},required:["transfers"],additionalProperties:!1};var ss={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateTransferManyTxOutput",title:"CreateTransferManyTxOutput",description:"Output of CreateTransferMany",type:"object",properties:{transfers:{description:"Created transfer objects",type:"array",items:{$ref:"/txs/get-transfer/get-transfer.schema.output.json#/definitions/transfer"}},from_balances:{description:"Debited wallet balances",type:"array",items:{$ref:"/txs/get-balance/get-balance.schema.output.json#/definitions/balance"}},to_balances:{description:"Credited wallet balances",type:"array",items:{$ref:"/txs/get-balance/get-balance.schema.output.json#/definitions/balance"}}},required:["transfers"],additionalProperties:!1};var is={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateWalletTxInput",title:"CreateWalletTxInput",description:"Input for createWallet",type:"object",properties:{wallet:{$ref:"/db/wallet/wallet.schema.input.json"},options:{$ref:"#/definitions/create_wallet_tx_options"}},definitions:{create_wallet_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"}]}},additionalProperties:!1,required:["wallet"]};var os={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateWalletTxOutput",title:"CreateWalletTxOutput",description:"The created wallet",type:"object",properties:{wallet:{$ref:"/db/wallet/wallet.schema.json"}},additionalProperties:!1,required:["wallet"]};var ps={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateWithdrawalTxInput",title:"CreateWithdrawalTxInput",description:"Input for createWithdrawal",type:"object",properties:{withdrawal:{$ref:"/txs/create-transfer/create-transfer.schema.input.json#/definitions/transfer_data_withdrawal"},options:{$ref:"#/definitions/create_withdrawal_tx_options"}},definitions:{create_withdrawal_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"/txs/create-transfer/create-transfer.schema.input.json#/definitions/create_transfer_additional_options"}]}},required:["withdrawal"],additionalProperties:!1};var ds={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateWithdrawalTxOutput",title:"CreateWithdrawalTxOutput",description:"Output of createWithdrawal",allOf:[{$ref:"/txs/create-transfer/create-transfer.schema.output.json"}]};var fs={$schema:"http://json-schema.org/draft-07/schema",$id:"ExportDatabaseTxInput",title:"ExportDatabaseTxInput",description:"Input for exportDatabase",type:"object",properties:{export_name:{description:"Name of the created export file",type:"string"}},definitions:{},additionalProperties:!1};var us={$schema:"http://json-schema.org/draft-07/schema",$id:"ExportDatabaseTxOutput",title:"ExportDatabaseTxOutput",description:"Output of exportDatabase",type:"object",properties:{message:{type:"string"}},additionalProperties:!1};var ls={$schema:"http://json-schema.org/draft-07/schema",$id:"FindBalanceManyTxInput",title:"FindBalanceManyTxInput",description:"Input for findBalanceMany",type:"object",properties:{balance:{$ref:"#/definitions/find_balance_many_filter"},options:{$ref:"#/definitions/find_balance_many_tx_options"}},definitions:{find_balance_many_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_limiting_options"},{$ref:"#/definitions/find_balance_many_ordering_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/find_balance_many_additional_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_select_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_deselect_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_options"}]},find_balance_many_additional_options:{description:"Optional flags for input",type:"object",default:{},$typescript:'{"additionalProperties":false}'},find_balance_many_ordering_options:{$typescript:'{"additionalProperties":false}',description:"Optional flags for input ordering",type:"object",properties:{order:{description:"Ordering options",type:"array",items:{$ref:"#/definitions/find_balance_many_ordering_input"}}}},find_balance_many_ordering_input:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_ordering_input"},{$ref:"#/definitions/find_balance_many_ordering_input_field"}]},find_balance_many_ordering_input_field:{type:"object",properties:{field:{$ref:"/db/transfer-log/transfer-log.schema.json#/definitions/TransferLogTableFields"}},$typescript:'{"additionalProperties": false}'},balance_filter_foreign_fields:{type:"string",enum:["wallet","token"]},advanced_balance_filter_fields_foreign:{type:"object",properties:{field:{$ref:"#/definitions/balance_filter_foreign_fields"}},required:["field"],$typescript:'{"additionalProperties": false}'},balance_filter:{type:"object",properties:{wallet:{$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},token:{$ref:"/txs/get-token/get-token.schema.input.json#/definitions/unique_token_filter"},transfer:{$ref:"/txs/get-transfer/get-transfer.schema.input.json#/definitions/unique_transfer_filter"},type:{$ref:"/db/transfer-log/transfer-log.schema.json#/properties/type"},amount:{$ref:"/db/transfer-log/transfer-log.schema.json#/properties/amount"},pending_amount:{$ref:"/db/transfer-log/transfer-log.schema.json#/properties/pending_amount"},finished_amount:{$ref:"/db/transfer-log/transfer-log.schema.json#/properties/finished_amount"},status:{$ref:"/db/transfer-log/transfer-log.schema.json#/properties/status"},metadata:{$ref:"/db/consts.schema.json#/definitions/DbFilterMetadata"}},$typescript:'{"additionalProperties": false}'},advanced_balance_filter_inner:{type:"object",properties:{inner:{type:"array",items:{$ref:"#/definitions/advanced_balance_filter"}}},$typescript:'{"additionalProperties":false}'},advanced_balance_filter_where_inner:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereInner"},{$ref:"#/definitions/advanced_balance_filter_inner"}]},advanced_balance_filter_where_primitive:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWherePrimitive"},{$ref:"#/definitions/advanced_balance_filter_fields"}]},advanced_balance_filter_where_primitive_foreign:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWherePrimitiveForeign"},{$ref:"#/definitions/advanced_balance_filter_fields_foreign"}]},advanced_balance_filter_where_object:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereObject"},{$ref:"#/definitions/advanced_balance_filter_values"}]},advanced_balance_filter_where_in:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereIns"},{$ref:"#/definitions/advanced_balance_filter_fields_w_foreign"}]},advanced_balance_filter_where_null:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereNulls"},{$ref:"#/definitions/advanced_balance_filter_fields"}]},advanced_balance_filter_fields:{type:"object",properties:{field:{type:"string",enum:["type","amount","pending_amount","finished_amount","status","metadata","updated_at"]}},required:["field"],$typescript:'{"additionalProperties": false}'},advanced_balance_filter_fields_w_foreign:{type:"object",properties:{field:{anyOf:[{$ref:"/db/transfer-log/transfer-log.schema.json#/definitions/TransferLogTableFields"},{$ref:"#/definitions/balance_filter_foreign_fields"}]}},required:["field"],$typescript:'{"additionalProperties": false}'},advanced_balance_filter_values:{type:"object",properties:{value:{$ref:"#/definitions/balance_filter"}},required:["value"],$typescript:'{"additionalProperties": false}'},advanced_balance_filter:{anyOf:[{$ref:"#/definitions/advanced_balance_filter_where_inner"},{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereMetadataIns"},{$ref:"#/definitions/advanced_balance_filter_where_object"},{$ref:"#/definitions/advanced_balance_filter_where_primitive"},{$ref:"#/definitions/advanced_balance_filter_where_primitive_foreign"},{$ref:"#/definitions/advanced_balance_filter_where_in"},{$ref:"#/definitions/advanced_balance_filter_where_null"},{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereMetadataNulls"}]},advanced_balance_filter_array:{type:"array",items:{$ref:"#/definitions/advanced_balance_filter"}},find_balance_many_filter:{oneOf:[{$ref:"#/definitions/balance_filter"},{$ref:"#/definitions/advanced_balance_filter_array"}]}},additionalProperties:!1};var cs={$schema:"http://json-schema.org/draft-07/schema",$id:"FindBalanceManyTxOutput",title:"FindBalanceManyTxOutput",description:"Output of findBalanceMany",type:"object",properties:{balances:{description:"Found balances",type:"array",items:{$ref:"/txs/get-balance/get-balance.schema.output.json#/definitions/balance"}},metadata:{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_find_metadata"}},required:["balances","metadata"],additionalProperties:!1};var ms={$schema:"http://json-schema.org/draft-07/schema",$id:"FindTokenManyTxInput",title:"FindTokenManyTxInput",description:"Input for findTokenMany",type:"object",properties:{token:{$ref:"#/definitions/find_token_many_filter"},options:{$ref:"#/definitions/find_token_many_tx_options"}},definitions:{find_token_many_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_limiting_options"},{$ref:"#/definitions/find_token_many_ordering_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/find_token_many_additional_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_select_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_deselect_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_options"}]},find_token_many_additional_options:{description:"Optional flags for input",type:"object",default:{},$typescript:'{"additionalProperties":false}'},find_token_many_ordering_options:{$typescript:'{"additionalProperties":false}',description:"Optional flags for input ordering",type:"object",properties:{order:{description:"Ordering options",type:"array",items:{$ref:"#/definitions/find_token_many_ordering_input"}}}},find_token_many_ordering_input:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_ordering_input"},{$ref:"#/definitions/find_token_many_ordering_input_field"}]},find_token_many_ordering_input_field:{type:"object",properties:{field:{$ref:"/db/token/token.schema.json#/definitions/TokenTableFields"}},$typescript:'{"additionalProperties": false}'},token_filter_foreign_fields:{type:"string",enum:["belongs_to"]},token_filter:{type:"object",properties:{foreign:{description:"Foreign of token to return",$ref:"/db/token/token.schema.json#/properties/foreign"},type:{$ref:"/db/token/token.schema.json#/properties/type"},metadata:{$ref:"/db/consts.schema.json#/definitions/DbFilterMetadata"},belongs_to:{$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"}},$typescript:'{"additionalProperties": false}'},advanced_token_filter_inner:{type:"object",properties:{inner:{type:"array",items:{$ref:"#/definitions/advanced_token_filter"}}},$typescript:'{"additionalProperties":false}'},advanced_token_filter_where_inner:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereInner"},{$ref:"#/definitions/advanced_token_filter_inner"}]},advanced_token_filter_where_primitive:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWherePrimitive"},{$ref:"#/definitions/advanced_token_filter_fields"}]},advanced_token_filter_where_primitive_foreign:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWherePrimitiveForeign"},{$ref:"#/definitions/advanced_token_filter_fields_foreign"}]},advanced_token_filter_where_object:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereObject"},{$ref:"#/definitions/advanced_token_filter_values"}]},advanced_token_filter_where_in:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereIns"},{$ref:"#/definitions/advanced_token_filter_fields_w_foreign"}]},advanced_token_filter_where_null:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereNulls"},{$ref:"#/definitions/advanced_token_filter_fields"}]},advanced_token_filter_fields:{type:"object",properties:{field:{$ref:"/db/token/token.schema.json#/definitions/TokenTableFields"}},required:["field"],$typescript:'{"additionalProperties": false}'},advanced_token_filter_fields_foreign:{type:"object",properties:{field:{$ref:"#/definitions/token_filter_foreign_fields"}},required:["field"],$typescript:'{"additionalProperties": false}'},advanced_token_filter_fields_w_foreign:{type:"object",properties:{field:{anyOf:[{$ref:"/db/token/token.schema.json#/definitions/TokenTableFields"},{$ref:"#/definitions/token_filter_foreign_fields"}]}},required:["field"],$typescript:'{"additionalProperties": false}'},advanced_token_filter_values:{type:"object",properties:{value:{$ref:"#/definitions/token_filter"}},required:["value"],$typescript:'{"additionalProperties": false}'},advanced_token_filter:{anyOf:[{$ref:"#/definitions/advanced_token_filter_where_inner"},{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereMetadataIns"},{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereMetadataPrimitive"},{$ref:"#/definitions/advanced_token_filter_where_object"},{$ref:"#/definitions/advanced_token_filter_where_primitive"},{$ref:"#/definitions/advanced_token_filter_where_primitive_foreign"},{$ref:"#/definitions/advanced_token_filter_where_in"},{$ref:"#/definitions/advanced_token_filter_where_null"},{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereMetadataNulls"}]},advanced_token_filter_array:{type:"array",items:{$ref:"#/definitions/advanced_token_filter"}},find_token_many_filter:{oneOf:[{$ref:"#/definitions/token_filter"},{$ref:"#/definitions/advanced_token_filter_array"}]}},additionalProperties:!1};var hs={$schema:"http://json-schema.org/draft-07/schema",$id:"FindTokenManyTxOutput",title:"FindTokenManyTxOutput",description:"Output of findTokenMany",type:"object",properties:{tokens:{description:"Found tokens",type:"array",items:{$ref:"/txs/get-token/get-token.schema.output.json#/definitions/token"}},metadata:{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_find_metadata"}},required:["tokens","metadata"],additionalProperties:!1};var _s={$schema:"http://json-schema.org/draft-07/schema",$id:"FindTransferGroupManyTxInput",title:"FindTransferGroupManyTxInput",description:"Input for findTransferGroupMany",type:"object",properties:{transfer_group:{$ref:"#/definitions/find_transfer_group_many_filter"},options:{$ref:"#/definitions/find_transfer_group_many_tx_options"}},definitions:{find_transfer_group_many_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_limiting_options"},{$ref:"#/definitions/find_transfer_group_many_ordering_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/find_transfer_group_many_additional_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_select_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_deselect_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_options"}]},find_transfer_group_many_additional_options:{$typescript:'{"additionalProperties":false}',type:"object",properties:{return_transfers:{description:"Return running balance for each transfer_group for wallet in question",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"}}},find_transfer_group_many_ordering_options:{$typescript:'{"additionalProperties":false}',description:"Optional flags for input ordering",type:"object",properties:{order:{description:"Ordering options",type:"array",items:{$ref:"#/definitions/find_transfer_group_many_ordering_input"}}}},find_transfer_group_many_ordering_input:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_ordering_input"},{$ref:"#/definitions/find_transfer_group_many_ordering_input_field"}]},find_transfer_group_many_ordering_input_field:{type:"object",properties:{field:{$ref:"/db/transfer-group/transfer-group.schema.json#/definitions/TransferGroupTableFields"}},$typescript:'{"additionalProperties": false}'},transfer_group_filter_identifier_fields:{type:"string",enum:["transfer_group","reverses"]},advanced_transfer_group_filter_fields_identifier:{type:"object",properties:{field:{$ref:"#/definitions/transfer_group_filter_identifier_fields"}},required:["field"],$typescript:'{"additionalProperties": false}'},transfer_group_filter:{type:"object",properties:{identifier:{$ref:"/db/transfer-group/transfer-group.schema.json#/properties/identifier"},status:{$ref:"/db/transfer-group/transfer-group.schema.json#/properties/status"},type:{$ref:"/db/transfer-group/transfer-group.schema.json#/properties/type"},transfer_status:{$ref:"/db/transfer-group/transfer-group.schema.json#/properties/transfer_status"},reverses:{$ref:"/txs/get-transfer-group/get-transfer-group.schema.input.json#/definitions/unique_transfer_group_filter"},metadata:{$ref:"/db/consts.schema.json#/definitions/DbFilterMetadata"}},$typescript:'{"additionalProperties": false}'},advanced_transfer_group_filter_inner:{type:"object",properties:{inner:{type:"array",items:{$ref:"#/definitions/advanced_transfer_group_filter"}}},$typescript:'{"additionalProperties":false}'},advanced_transfer_group_filter_where_inner:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereInner"},{$ref:"#/definitions/advanced_transfer_group_filter_inner"}]},advanced_transfer_group_filter_where_primitive:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWherePrimitive"},{$ref:"#/definitions/advanced_transfer_group_filter_fields"}]},advanced_transfer_group_filter_where_primitive_identifier:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWherePrimitiveIdentifier"},{$ref:"#/definitions/advanced_transfer_group_filter_fields_identifier"}]},advanced_transfer_group_filter_where_object:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereObject"},{$ref:"#/definitions/advanced_transfer_group_filter_values"}]},advanced_transfer_group_filter_where_in:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereIns"},{$ref:"#/definitions/advanced_transfer_group_filter_fields_w_foreign"}]},advanced_transfer_group_filter_where_null:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereNulls"},{$ref:"#/definitions/advanced_transfer_group_filter_fields"}]},advanced_transfer_group_filter_fields:{type:"object",properties:{field:{$ref:"/db/transfer-group/transfer-group.schema.json#/definitions/TransferGroupTableFields"}},required:["field"],$typescript:'{"additionalProperties": false}'},advanced_transfer_group_filter_fields_w_foreign:{type:"object",properties:{field:{anyOf:[{$ref:"/db/transfer-group/transfer-group.schema.json#/definitions/TransferGroupTableFields"},{$ref:"#/definitions/transfer_group_filter_identifier_fields"}]}},required:["field"],$typescript:'{"additionalProperties": false}'},advanced_transfer_group_filter_values:{type:"object",properties:{value:{$ref:"#/definitions/transfer_group_filter"}},required:["value"],$typescript:'{"additionalProperties": false}'},advanced_transfer_group_filter:{anyOf:[{$ref:"#/definitions/advanced_transfer_group_filter_where_inner"},{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereMetadataIns"},{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereMetadataPrimitive"},{$ref:"#/definitions/advanced_transfer_group_filter_where_object"},{$ref:"#/definitions/advanced_transfer_group_filter_where_primitive"},{$ref:"#/definitions/advanced_transfer_group_filter_where_primitive_identifier"},{$ref:"#/definitions/advanced_transfer_group_filter_where_in"},{$ref:"#/definitions/advanced_transfer_group_filter_where_null"},{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereMetadataNulls"}]},advanced_transfer_group_filter_array:{type:"array",items:{$ref:"#/definitions/advanced_transfer_group_filter"}},find_transfer_group_many_filter:{oneOf:[{$ref:"#/definitions/transfer_group_filter"},{$ref:"#/definitions/advanced_transfer_group_filter_array"}]}},required:["transfer_group"],additionalProperties:!1};var gs={$schema:"http://json-schema.org/draft-07/schema",$id:"FindTransferGroupManyTxOutput",title:"FindTransferGroupManyTxOutput",description:"Output of find-transfer-group-many",type:"object",properties:{transfer_groups:{description:"Found transfers",type:"array",items:{$ref:"/txs/get-transfer-group/get-transfer-group.schema.output.json#/definitions/transfer_group"}},metadata:{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_find_metadata"}},required:["transfer_groups","metadata"],additionalProperties:!1};var Ts={$schema:"http://json-schema.org/draft-07/schema",$id:"FindTransferManyTxInput",title:"FindTransferManyTxInput",description:"Input for findTransferMany",type:"object",properties:{transfer:{$ref:"#/definitions/find_transfer_many_filter"},options:{$ref:"#/definitions/find_transfer_many_tx_options"}},definitions:{find_transfer_many_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_limiting_options"},{$ref:"#/definitions/find_transfer_many_ordering_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/find_transfer_many_additional_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_select_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_deselect_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_options"}]},find_transfer_many_additional_options:{$typescript:'{"additionalProperties":false}',type:"object",properties:{return_running_balance_for_wallet:{description:"Return running balance for each transfer for wallet in question",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},return_signed_amount_for_wallet:{description:"Return amount as signed value for each transfer for wallet in question",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"}}},find_transfer_many_ordering_options:{$typescript:'{"additionalProperties":false}',description:"Optional flags for input ordering",type:"object",properties:{order:{description:"Ordering options",type:"array",items:{$ref:"#/definitions/find_transfer_many_ordering_input"}}}},find_transfer_many_ordering_input:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_ordering_input"},{$ref:"#/definitions/find_transfer_many_ordering_input_field"}]},find_transfer_many_ordering_input_field:{type:"object",properties:{field:{$ref:"/db/transfer/transfer.schema.json#/definitions/TransferTableAccessibleFields"}},$typescript:'{"additionalProperties": false}'},transfer_filter_foreign_fields:{type:"string",enum:["from_wallet","to_wallet","wallet","token"]},transfer_filter_identifier_fields:{type:"string",enum:["transfer_group"]},transfer_filter:{type:"object",properties:{from_wallet:{$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},to_wallet:{$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},wallet:{$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},token:{$ref:"/txs/get-token/get-token.schema.input.json#/definitions/unique_token_filter"},status:{$ref:"/db/transfer/transfer.schema.json#/properties/status"},transfer_group:{$ref:"/txs/get-transfer-group/get-transfer-group.schema.input.json#/definitions/unique_transfer_group_filter"},metadata:{$ref:"/db/consts.schema.json#/definitions/DbFilterMetadata"}},$typescript:'{"additionalProperties": false}'},advanced_transfer_filter_inner:{type:"object",properties:{inner:{type:"array",items:{$ref:"#/definitions/advanced_transfer_filter"}}},$typescript:'{"additionalProperties":false}'},advanced_transfer_filter_where_inner:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereInner"},{$ref:"#/definitions/advanced_transfer_filter_inner"}]},advanced_transfer_filter_where_primitive:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWherePrimitive"},{$ref:"#/definitions/advanced_transfer_filter_fields"}]},advanced_transfer_filter_where_primitive_foreign:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWherePrimitiveForeign"},{$ref:"#/definitions/advanced_transfer_filter_fields_foreign"}]},advanced_transfer_filter_where_primitive_identifier:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWherePrimitiveIdentifier"},{$ref:"#/definitions/advanced_transfer_filter_fields_identifier"}]},advanced_transfer_filter_where_object:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereObject"},{$ref:"#/definitions/advanced_transfer_filter_values"}]},advanced_transfer_filter_where_in:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereIns"},{$ref:"#/definitions/advanced_transfer_filter_fields_w_foreign"}]},advanced_transfer_filter_where_null:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereNulls"},{$ref:"#/definitions/advanced_transfer_filter_fields"}]},advanced_transfer_filter_fields:{type:"object",properties:{field:{$ref:"/db/transfer/transfer.schema.json#/definitions/TransferTableAccessibleFields"}},required:["field"],$typescript:'{"additionalProperties": false}'},advanced_transfer_filter_fields_foreign:{type:"object",properties:{field:{$ref:"#/definitions/transfer_filter_foreign_fields"}},required:["field"],$typescript:'{"additionalProperties": false}'},advanced_transfer_filter_fields_identifier:{type:"object",properties:{field:{$ref:"#/definitions/transfer_filter_identifier_fields"}},required:["field"],$typescript:'{"additionalProperties": false}'},advanced_transfer_filter_fields_w_foreign:{type:"object",properties:{field:{anyOf:[{$ref:"/db/transfer/transfer.schema.json#/definitions/TransferTableAccessibleFields"},{$ref:"#/definitions/transfer_filter_foreign_fields"}]}},required:["field"],$typescript:'{"additionalProperties": false}'},advanced_transfer_filter_values:{type:"object",properties:{value:{$ref:"#/definitions/transfer_filter"}},required:["value"],$typescript:'{"additionalProperties": false}'},advanced_transfer_filter:{anyOf:[{$ref:"#/definitions/advanced_transfer_filter_where_inner"},{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereMetadataIns"},{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereMetadataPrimitive"},{$ref:"#/definitions/advanced_transfer_filter_where_object"},{$ref:"#/definitions/advanced_transfer_filter_where_primitive"},{$ref:"#/definitions/advanced_transfer_filter_where_primitive_foreign"},{$ref:"#/definitions/advanced_transfer_filter_where_primitive_identifier"},{$ref:"#/definitions/advanced_transfer_filter_where_in"},{$ref:"#/definitions/advanced_transfer_filter_where_null"},{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereMetadataNulls"}]},advanced_transfer_filter_array:{type:"array",items:{$ref:"#/definitions/advanced_transfer_filter"}},find_transfer_many_filter:{oneOf:[{$ref:"#/definitions/transfer_filter"},{$ref:"#/definitions/advanced_transfer_filter_array"}]}},required:["transfer"],additionalProperties:!1};var ys={$schema:"http://json-schema.org/draft-07/schema",$id:"FindTransferManyTxOutput",title:"FindTransferManyTxOutput",description:"Output of findTransferMany",type:"object",properties:{transfers:{description:"Found transfers",type:"array",items:{$ref:"/txs/get-transfer/get-transfer.schema.output.json#/definitions/transfer"}},metadata:{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_find_metadata"}},required:["transfers","metadata"],additionalProperties:!1};var bs={$schema:"http://json-schema.org/draft-07/schema",$id:"FindWalletManyTxInput",title:"FindWalletManyTxInput",description:"Input for findWalletMany",type:"object",properties:{wallet:{$ref:"#/definitions/find_wallet_many_filter"},options:{$ref:"#/definitions/find_wallet_many_tx_options"}},definitions:{find_wallet_many_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_limiting_options"},{$ref:"#/definitions/find_wallet_many_ordering_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/find_wallet_many_additional_options"},{$ref:"#/definitions/find_wallet_many_select_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_options"}]},find_wallet_many_additional_options:{description:"Optional flags for input",type:"object",properties:{include_balance_for_token:{description:"If specified each wallet will have its balance included",$ref:"/txs/get-token/get-token.schema.input.json#/definitions/unique_token_filter"}},default:{},$typescript:'{"additionalProperties":false}'},find_wallet_many_ordering_options:{$typescript:'{"additionalProperties":false}',description:"Optional flags for input ordering",type:"object",properties:{order:{description:"Ordering options",type:"array",items:{$ref:"#/definitions/find_wallet_many_ordering_input"}}}},find_wallet_many_ordering_input:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_ordering_input"},{$ref:"#/definitions/find_wallet_many_ordering_input_field"}]},find_wallet_many_ordering_input_field:{type:"object",properties:{field:{$ref:"#/definitions/advanced_wallet_filter_fields"}},$typescript:'{"additionalProperties": false}'},find_wallet_many_filter:{oneOf:[{$ref:"#/definitions/wallet_filter"},{$ref:"#/definitions/advanced_wallet_filter_array"}]},wallet_filter:{type:"object",properties:{foreign:{$ref:"/db/wallet/wallet.schema.json#/properties/foreign"},name:{$ref:"/db/wallet/wallet.schema.json#/properties/name"},type:{$ref:"/db/wallet/wallet.schema.json#/properties/type"},status:{$ref:"/db/wallet/wallet.schema.json#/properties/status"},metadata:{$ref:"/db/consts.schema.json#/definitions/DbFilterMetadata"}},$typescript:'{"additionalProperties":false}'},advanced_wallet_filter_where_inner:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereInner"},{$ref:"#/definitions/advanced_wallet_filter_inner"}]},advanced_wallet_filter_inner:{type:"object",properties:{inner:{type:"array",items:{$ref:"#/definitions/advanced_wallet_filter"}}},$typescript:'{"additionalProperties":false}'},advanced_wallet_filter_where_primitive:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWherePrimitive"},{$ref:"#/definitions/advanced_wallet_filter_fields_object"}]},advanced_wallet_filter_where_object:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereObject"},{$ref:"#/definitions/advanced_wallet_filter_values"}]},advanced_wallet_filter_where_in:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereIns"},{$ref:"#/definitions/advanced_wallet_filter_fields_object"}]},advanced_wallet_filter_where_null:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereNulls"},{$ref:"#/definitions/advanced_wallet_filter_fields_object"}]},advanced_wallet_filter_fields_object:{type:"object",properties:{field:{$ref:"#/definitions/advanced_wallet_filter_fields"}},required:["field"],$typescript:'{"additionalProperties": false}'},advanced_wallet_filter_fields:{type:"string",enum:["id","balance_pending_amount","balance_finished_amount","balance_available_balance","foreign","name","type","status","created_at"]},advanced_wallet_filter_string_fields:{type:"string",enum:["foreign","name","type","status","created_at"]},advanced_wallet_filter_number_fields:{type:"string",enum:["id","balance_pending_amount","balance_finished_amount","balance_available_balance"]},advanced_wallet_filter_values:{type:"object",properties:{value:{$ref:"#/definitions/wallet_filter"}},required:["value"],$typescript:'{"additionalProperties": false}'},advanced_wallet_filter:{anyOf:[{$ref:"#/definitions/advanced_wallet_filter_where_inner"},{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereMetadataIns"},{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereMetadataPrimitive"},{$ref:"#/definitions/advanced_wallet_filter_where_primitive"},{$ref:"#/definitions/advanced_wallet_filter_where_object"},{$ref:"#/definitions/advanced_wallet_filter_where_in"},{$ref:"#/definitions/advanced_wallet_filter_where_null"}]},advanced_wallet_filter_array:{type:"array",items:{$ref:"#/definitions/advanced_wallet_filter"}},find_wallet_many_select_options:{$typescript:'{"additionalProperties":false}',description:"Optional flags to limit search result",type:"object",properties:{select:{description:"Select options",type:"array",items:{$ref:"/txs/find-wallet-many/find-wallet-many.schema.output.json#/definitions/wallet_with_balance_fields"}}}}},additionalProperties:!1};var Fs={$schema:"http://json-schema.org/draft-07/schema",$id:"FindWalletManyTxOutput",title:"FindWalletManyTxOutput",description:"Output of findWalletMany",type:"object",properties:{wallets:{description:"Wallets matching the query",type:"array",items:{anyOf:[{$ref:"/db/wallet/wallet.schema.json"},{type:"null"},{$ref:"#/definitions/wallet_with_balance"}]}},metadata:{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_find_metadata"}},definitions:{wallet_with_balance:{type:"object",properties:{id:{description:"System defined primary key",type:"integer"},foreign:{description:"User provided key for wallet. Must be unique",type:"string"},name:{description:"Name of the wallet",type:["string","null"]},metadata:{description:"Key/value metadata object",type:["object","null"]},type:{description:"Type of the wallet",default:"regular",$ref:"/db/consts.schema.json#/definitions/WalletType"},status:{description:"Current status for the wallet",default:"active",type:"string"},default_allow_negative:{description:"Boolean indicating if wallet (pending_amount + finished_amount) can be negative",default:!1,type:"boolean"},default_allow_positive:{description:"Boolean indicating if wallet (pending_amount + finished_amount) can be positive. Used for token balance to deny positive balance.",default:!0,type:"boolean"},created_at:{description:"Datetime when the wallet was created",type:"string",format:"date-time"},updated_at:{description:"Datetime when the wallet was last updated",type:"string",format:"date-time"},balance_transfer_id:{description:"Latest transfer id",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/transfer_id"},balance_token_id:{description:"Token ID of balance",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/token_id"},balance_token_foreign:{description:"Token Foreign of balance",$ref:"/db/token/token.schema.json#/properties/foreign"},balance_pending_amount:{description:"Current pending balance",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/pending_amount"},balance_pending_amount_to:{description:"Sum of incoming pending transfers",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/pending_amount_to"},balance_pending_amount_from:{description:"Sum of outgoing pending transfers",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/pending_amount_from"},balance_finished_amount:{description:"Current finished balance",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/finished_amount"},balance_amount:{description:"Current finished and pending balance sum",type:"number"},balance_available_balance:{description:"Available balance that is sum of pending_amount_from and finished_amount",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/available_balance"},balance_latest_control_hash:{description:"Latest control_hash associated with wallet token combination",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/latest_control_hash"},balance_updated_at:{description:"Last modification date of balance",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/created_at"}},additionalProperties:!1},wallet_with_balance_fields:{type:"string",enum:["id","foreign","name","metadata","type","status","default_allow_negative","default_allow_positive","created_at","updated_at","balance_transfer_id","balance_token_id","balance_token_foreign","balance_pending_amount","balance_pending_amount_to","balance_pending_amount_from","balance_finished_amount","balance_amount","balance_latest_control_hash","balance_updated_at","balance_available_balance"]}},required:["wallets","metadata"],additionalProperties:!1};var xs={$schema:"http://json-schema.org/draft-07/schema",$id:"FinishTransactionTxInput",title:"FinishTransactionTxInput",description:"Input for finishTransaction",type:"object",properties:{action:{description:"Finish transaction with commit/rollback",default:"commit",type:"string",enum:["commit","rollback"]},options:{$ref:"#/definitions/finish_transaction_tx_options"}},definitions:{finish_transaction_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/finish_transaction_additional_options"}]},finish_transaction_additional_options:{type:"object",properties:{transaction_id:{description:"Id of the transaction context to run the query in",type:"string"}},required:["transaction_id"],$typescript:'{"additionalProperties": false}'}},required:["action","options"],additionalProperties:!1};var $s={$schema:"http://json-schema.org/draft-07/schema",$id:"FinishTransactionTxOutput",title:"FinishTransactionTxOutput",description:"Output of finishTransaction",type:"object",properties:{success:{type:"boolean"},message:{description:"Error message when success is false",type:"string"}},required:["success"],additionalProperties:!1};var Os={$schema:"http://json-schema.org/draft-07/schema",$id:"GetBalanceTxInput",title:"GetBalanceTxInput",description:"Input for getBalance",type:"object",properties:{balance:{$ref:"#/definitions/unique_balance_filter"},options:{$ref:"#/definitions/get_balance_tx_options"}},definitions:{get_balance_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/get_balance_additional_options"}]},get_balance_additional_options:{description:"Optional flags for input",type:"object",properties:{create_wallet_if_not_exists:{type:"boolean",description:"If true then the missing wallet will be created if not found. Only valid with 'foreign'",default:!1},create_token_if_not_exists:{type:"boolean",description:"If true then the missing token will be created if not found. Only valid with 'foreign'",default:!1},create_if_not_exists:{type:"boolean",description:"If true then the missing balance will be created if not found. ",default:!1}},default:{},$typescript:'{"additionalProperties": false}'},unique_balance_filter:{type:"object",properties:{wallet:{$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},token:{$ref:"/txs/get-token/get-token.schema.input.json#/definitions/unique_token_filter"},datetime:{description:"Time the balance should be retrieved at",type:"string"}},required:["wallet","token"],additionalProperties:!1}},required:["balance"],additionalProperties:!1};var ws={$schema:"http://json-schema.org/draft-07/schema",$id:"GetBalanceTxOutput",title:"GetBalanceTxOutput",description:"Output of getBalance",type:"object",properties:{balance:{description:"requested balance",$ref:"#/definitions/balance"}},definitions:{balance:{type:"object",properties:{transfer_id:{description:"Latest transfer id",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/transfer_id"},token_id:{description:"Token ID of balance",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/token_id"},token_foreign:{description:"Token Foreign of balance",$ref:"/db/token/token.schema.json#/properties/foreign"},wallet_id:{description:"Wallet ID of balance",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/wallet_id"},wallet_foreign:{description:"Wallet Foreign of balance",$ref:"/db/wallet/wallet.schema.json#/properties/foreign"},pending_amount:{description:"Current pending balance",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/pending_amount"},pending_amount_to:{description:"Sum of incoming pending transfers",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/pending_amount_to"},pending_amount_from:{description:"Sum of outgoing pending transfers",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/pending_amount_from"},available_balance:{description:"Available balance that is sum of pending_amount_from and finished_amount",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/available_balance"},finished_amount:{description:"Current finished balance",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/finished_amount"},amount:{description:"Current finished and pending balance sum",type:"number"},latest_control_hash:{description:"Latest control_hash associated with wallet token combination",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/latest_control_hash"},updated_at:{description:"Last modification date of balance",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/created_at"}},required:["token_id","token_foreign","wallet_id","wallet_foreign","pending_amount","finished_amount","amount","latest_control_hash","updated_at"],additionalProperties:!1},balance_fields:{description:"Fields on the balance object",type:"string",enum:["transfer_id","token_id","token_foreign","wallet_id","wallet_foreign","pending_amount","pending_amount_to","pending_amount_from","finished_amount","available_balance","amount","latest_control_hash","updated_at"]}},additionalProperties:!1};var Is={$schema:"http://json-schema.org/draft-07/schema",$id:"GetBalanceHistoryTxInput",title:"GetBalanceHistoryTxInput",description:"Input for getBalanceHistory",type:"object",properties:{balance:{$ref:"/txs/get-balance/get-balance.schema.input.json#/definitions/unique_balance_filter"},options:{$ref:"#/definitions/get_balance_history_tx_options"}},definitions:{get_balance_history_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/get_balance_history_additional_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_limiting_options"},{$ref:"#/definitions/get_balance_history_ordering_options"},{$ref:"#/definitions/balance_history_select_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_options"}]},get_balance_history_additional_options:{description:"Optional flags for input",type:"object",properties:{create_wallet_if_not_exists:{type:"boolean",description:"If true then the missing wallet will be created if not found. Only valid with 'foreign'",default:!1},create_token_if_not_exists:{type:"boolean",description:"If true then the missing token will be created if not found. Only valid with 'foreign'",default:!1}},default:{},$typescript:'{"additionalProperties":false}'},get_balance_history_ordering_options:{$typescript:'{"additionalProperties":false}',description:"Optional flags for input ordering",type:"object",properties:{order:{description:"Ordering options",type:"string",enum:["asc","desc"]}}},balance_history_select_options:{$typescript:'{"additionalProperties":false}',description:"Optional flags to limit search result",type:"object",properties:{select:{description:"Select options",type:"array",items:{$ref:"/txs/get-balance-history/get-balance-history.schema.output.json#/definitions/balance_history_fields"}}}}},additionalProperties:!1};var js={$schema:"http://json-schema.org/draft-07/schema",$id:"GetBalanceHistoryTxOutput",title:"GetBalanceHistoryTxOutput",description:"Output of getBalanceHistory",type:"object",properties:{balances:{description:"Resolved balance change objects",type:"array",items:{$ref:"#/definitions/balance_history"}},metadata:{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_find_metadata"}},definitions:{balance_history:{type:"object",properties:{balance_id:{description:"The internal ID of the balance",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/id"},token_id:{description:"Token ID of balance",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/token_id"},token_foreign:{description:"Token Foreign of balance",$ref:"/db/token/token.schema.json#/properties/foreign"},wallet_id:{description:"Wallet ID of balance",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/wallet_id"},wallet_foreign:{description:"Wallet Foreign of balance",$ref:"/db/wallet/wallet.schema.json#/properties/foreign"},pending_amount:{description:"Current pending balance",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/pending_amount"},pending_amount_to:{description:"Sum of incoming pending transfers",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/pending_amount_to"},pending_amount_from:{description:"Sum of outgoing pending transfers",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/pending_amount_from"},available_balance:{description:"Available balance that is sum of pending_amount_from and finished_amount",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/available_balance"},finished_amount:{description:"Current finished balance",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/finished_amount"},amount:{description:"Current finished and pending balance sum",type:"number"},latest_control_hash:{description:"Latest control_hash associated with wallet token combination",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/latest_control_hash"},updated_at:{description:"Last modification date of balance",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/created_at"},transfer_id:{$ref:"/db/transfer/transfer.schema.json#/properties/id"},transfer_identifier:{$ref:"/db/transfer/transfer.schema.json#/properties/identifier"},transfer_control_hash:{$ref:"/db/transfer/transfer.schema.json#/properties/control_hash"},transfer_from_wallet_id:{$ref:"/db/transfer/transfer.schema.json#/properties/from_wallet_id"},transfer_from_wallet_foreign:{$ref:"/db/wallet/wallet.schema.json#/properties/foreign"},transfer_to_wallet_id:{$ref:"/db/transfer/transfer.schema.json#/properties/to_wallet_id"},transfer_to_wallet_foreign:{$ref:"/db/wallet/wallet.schema.json#/properties/foreign"},transfer_amount:{$ref:"/db/transfer/transfer.schema.json#/properties/amount"},transfer_type:{$ref:"/db/transfer/transfer.schema.json#/properties/type"},transfer_status:{$ref:"/db/transfer/transfer.schema.json#/properties/status"},transfer_force:{$ref:"/db/transfer/transfer.schema.json#/properties/force"},transfer_created_at:{$ref:"/db/transfer/transfer.schema.json#/properties/created_at"},transfer_updated_at:{$ref:"/db/transfer/transfer.schema.json#/properties/updated_at"},transfer_metadata:{$ref:"/db/transfer/transfer.schema.json#/properties/metadata"},transfer_transfer_group_id:{$ref:"/db/transfer/transfer.schema.json#/properties/transfer_group_id"},transfer_transfer_group_identifier:{description:"Transfer Group identifier if transfer belongs to a group",type:"string"},transfer_reverses_id:{$ref:"/db/transfer/transfer.schema.json#/properties/reverses_id"},transfer_reverses_identifier:{description:"Reverses identifier if transfer reverses another transfer",type:"string"},transfer_status_finalized_at:{description:"DateTime transfer reached final status",type:["string","null"],format:"date-time"}},$typescript:'{"additionalProperties": false}'},balance_history_fields:{type:"string",enum:["transfer_id","transfer_identifier","transfer_control_hash","transfer_from_wallet_id","transfer_from_wallet_foreign","transfer_to_wallet_id","transfer_to_wallet_foreign","transfer_amount","transfer_type","transfer_status","transfer_force","transfer_created_at","transfer_updated_at","transfer_metadata","transfer_transfer_group_id","transfer_transfer_group_identifier","transfer_reverses_id","transfer_reverses_identifier","transfer_status_finalized_at","balance_id","token_id","token_foreign","wallet_id","wallet_foreign","pending_amount","pending_amount_to","pending_amount_from","finished_amount","amount","latest_control_hash","updated_at","status"]}},additionalProperties:!1};var vs={$schema:"http://json-schema.org/draft-07/schema",$id:"GetDatabaseExportProgressTxInput",title:"GetDatabaseExportProgressTxInput",description:"Input for getDatabaseExportProgress",type:"object",properties:{options:{$ref:"#/definitions/get_database_backup_progress_tx_options"}},definitions:{get_database_backup_progress_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/get_database_backup_progress_additional_options"}]},get_database_backup_progress_additional_options:{description:"Optional flags for input",type:"object",default:{},$typescript:'{"additionalProperties":false}'}},additionalProperties:!1};var ks={$schema:"http://json-schema.org/draft-07/schema",$id:"GetDatabaseExportProgressTxOutput",title:"GetDatabaseExportProgressTxOutput",description:"Output of getDatabaseExportProgress",type:"object",properties:{size:{type:"number",description:"Size of a exported backup in MB"},started:{type:"boolean",description:"Boolean indicating if export has started"},finished:{type:"boolean",description:"Boolean indicating if export has finished"},error:{type:"string",description:"Error message in case one occurs"}},required:["size","started","finished"],additionalProperties:!1};var Ss={$schema:"http://json-schema.org/draft-07/schema",$id:"GetDatabaseImportProgressTxInput",title:"GetDatabaseImportProgressTxInput",description:"Input for GetDatabaseImportProgress",type:"object",properties:{options:{$ref:"#/definitions/import_database_progress_tx_options"}},definitions:{import_database_progress_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"}]}},additionalProperties:!1};var Cs={$schema:"http://json-schema.org/draft-07/schema",$id:"GetDatabaseImportProgressTxOutput",title:"GetDatabaseImportProgressTxOutput",description:"Output of GetDatabaseImportProgress",type:"object",properties:{progress:{type:"number",description:"Percentage of imported database"},started:{type:"boolean",description:"Boolean indicating if import has started"},finished:{type:"boolean",description:"Boolean indicating if import has finished"},error:{type:"string",description:"Error message in case one occurs"}},required:["progress","started","finished"],additionalProperties:!1};var Ps={$schema:"http://json-schema.org/draft-07/schema",$id:"GetFlagsTxInput",title:"GetFlagsTxInput",description:"Input for getFlags",type:"object",properties:{options:{$ref:"#/definitions/get_flags_tx_options"}},definitions:{get_flags_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options_without_tx"}]}},additionalProperties:!1};var Gs={$schema:"http://json-schema.org/draft-07/schema",$id:"GetFlagsTxOutput",title:"GetFlagsTxOutput",description:"Output of getFlags",type:"object",properties:{flags:{$ref:"/db/consts.schema.json#/definitions/Flags"}},additionalProperties:!1};var Ds={$schema:"http://json-schema.org/draft-07/schema",$id:"GetStatisticsTxInput",title:"GetStatisticsTxInput",description:"Input for getStatistics",type:"object",properties:{model:{$ref:"#/definitions/statistics_model"},groups:{$ref:"#/definitions/statistics_groups"},aggregator:{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_aggregator"},filter:{$ref:"#/definitions/statistics_filter"},options:{$ref:"#/definitions/get_statistics_tx_options"}},definitions:{get_statistics_tx_options:{description:"Optional flags for input",type:"object",default:{},properties:{tracking_id:{description:"User provided id added to logs for debugging",type:"string"}},additionalProperties:!1},statistics_groups:{type:"array",description:"Array of grouping definitions",maxItems:5,items:{$ref:"#/definitions/statistics_group"}},statistics_group:{anyOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_group"},{$ref:"#/definitions/statistics_group_field"}]},statistics_group_field:{type:"object",properties:{type:{type:"string",enum:["field"]},value:{$ref:"#/definitions/statistics_field"},alias:{type:"string"}},required:["type","value"],additionalProperties:!1},statistics_model:{description:"Model to return statistics about",type:"string",enum:["Transfer","TransferGroup","Wallet","Token"],default:"Transfer"},statistics_field:{description:"Field to group statistics about. Only used with group_by_field type",type:"string",enum:["type","status","transfer_status"],default:"type"},statistics_filter:{description:"Filter to apply to transfers before grouping",anyOf:[{$ref:"#/definitions/statistics_general_filter"},{$ref:"#/definitions/statistics_transfer_filter"}]},statistics_general_filter:{type:"object",properties:{start_time:{type:"string",format:"date-time"},end_time:{type:"string",format:"date-time"}},$typescript:'{"additionalProperties":false}'},statistics_transfer_filter:{type:"object",properties:{status:{$ref:"/db/transfer/transfer.schema.json#/properties/status"},start_time:{type:"string",format:"date-time"},end_time:{type:"string",format:"date-time"}},$typescript:'{"additionalProperties":false}'}},additionalProperties:!1};var Es={$schema:"http://json-schema.org/draft-07/schema",$id:"GetStatisticsTxOutput",title:"GetStatisticsTxOutput",description:"Output of getStatistics",type:"object",properties:{rows:{description:"Results of the aggregation",$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_aggregate_results"}},definitions:{},required:["rows"],additionalProperties:!1};var Ms={$schema:"http://json-schema.org/draft-07/schema",$id:"GetTokenTxInput",title:"GetTokenTxInput",description:"Input for getToken",type:"object",properties:{token:{$ref:"#/definitions/unique_token_filter"},options:{$ref:"#/definitions/get_token_tx_options"}},definitions:{get_token_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/get_token_additional_options"}]},get_token_additional_options:{description:"Optional flags for input",type:"object",properties:{ignore_cache:{description:"If true then result is returned from cache layer if possible",type:"boolean",default:!1},create_if_not_exists:{type:"boolean",description:"If true then the token will be created if not found. Only valid with 'foreign'",default:!1},return_only_id:{type:"boolean",description:"If true then the returning object is only guaranteed to have id",default:!1}},default:{},$typescript:'{"additionalProperties": false}'},unique_token_filter:{description:"UNIQUE filtering options for token",anyOf:[{$ref:"#/definitions/unique_token_filter_id"},{$ref:"#/definitions/unique_token_filter_foreign"}]},unique_token_filter_id:{type:"object",description:"ID based filter for token",properties:{id:{description:"Id of wallet to return",$ref:"/db/wallet/wallet.schema.json#/properties/id"},foreign:{description:"Foreign of wallet to return",$ref:"/db/wallet/wallet.schema.json#/properties/name"}},required:["id"],additionalProperties:!1},unique_token_filter_foreign:{type:"object",description:"Foreign based filter for token",properties:{id:{description:"Id of wallet to return",$ref:"/db/wallet/wallet.schema.json#/properties/id"},foreign:{description:"Foreign of wallet to return",$ref:"/db/wallet/wallet.schema.json#/properties/name"}},required:["foreign"],additionalProperties:!1}},required:["token"],additionalProperties:!1};var Rs={$schema:"http://json-schema.org/draft-07/schema",$id:"GetTokenTxOutput",title:"GetTokenTxOutput",description:"Output of getToken",type:"object",properties:{token:{description:"requested token",$ref:"#/definitions/token"}},definitions:{token:{properties:{id:{$ref:"/db/token/token.schema.json#/properties/id"},foreign:{$ref:"/db/token/token.schema.json#/properties/foreign"},public:{$ref:"/db/token/token.schema.json#/properties/public"},belongs_to:{$ref:"/db/token/token.schema.json#/properties/belongs_to"},created_at:{$ref:"/db/token/token.schema.json#/properties/created_at"},updated_at:{$ref:"/db/token/token.schema.json#/properties/updated_at"},metadata:{$ref:"/db/token/token.schema.json#/properties/metadata"},divisor:{$ref:"/db/token/token.schema.json#/properties/divisor"},limit:{$ref:"/db/token/token.schema.json#/properties/limit"},type:{$ref:"/db/token/token.schema.json#/properties/type"},belongs_to_foreign:{description:"Foreign of the belongs_to wallet if exists",type:["string","null"]}},required:["id"],additionalProperties:!1}},additionalProperties:!1};var Ws={$schema:"http://json-schema.org/draft-07/schema",$id:"GetTokenManyTxInput",title:"GetTokenManyTxInput",description:"Input for getTokenMany",type:"object",properties:{tokens:{type:"array",items:{$ref:"/txs/get-token/get-token.schema.input.json#/definitions/unique_token_filter"}},options:{$ref:"#/definitions/get_token_many_tx_options"}},definitions:{get_token_many_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/get_token_many_additional_options"}]},get_token_many_additional_options:{description:"Optional flags for input",type:"object",properties:{ignore_cache:{type:"boolean",default:!1},create_if_not_exists:{type:"boolean",description:"If true then the token will be created if not found. Only valid with 'foreign'",default:!1},return_only_id:{type:"boolean",description:"If true then the returning object is only guaranteed to have id",default:!1}},default:{},$typescript:'{"additionalProperties": false}'}},required:["tokens"],additionalProperties:!1};var As={$schema:"http://json-schema.org/draft-07/schema",$id:"GetTokenManyTxOutput",title:"GetTokenManyTxOutput",description:"Output of getTokenMany",type:"object",properties:{tokens:{type:"array",items:{$ref:"#/definitions/TokenResult"}}},definitions:{TokenResult:{anyOf:[{$ref:"/db/token/token.schema.json"},{$ref:"/db/token/token.schema.optional.json"},{type:"null"}]}},required:["tokens"],additionalProperties:!1};var Ns={$schema:"http://json-schema.org/draft-07/schema",$id:"GetTransferTxInput",title:"GetTransferTxInput",description:"Input for getTransfer",type:"object",properties:{transfer:{$ref:"#/definitions/unique_transfer_filter"},options:{$ref:"#/definitions/get_transfer_tx_options"}},definitions:{get_transfer_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"}]},unique_transfer_filter:{description:"UNIQUE filtering options for transfer",anyOf:[{$ref:"#/definitions/unique_transfer_filter_id"},{$ref:"#/definitions/unique_transfer_filter_identifier"}]},unique_transfer_filter_id:{type:"object",description:"ID based filter of transfer",properties:{id:{description:"Id of transfer to return",$ref:"/db/transfer/transfer.schema.json#/properties/id"},identifier:{description:"Identifier of transfer to return",$ref:"/db/transfer/transfer.schema.json#/properties/identifier"}},required:["id"],additionalProperties:!1},unique_transfer_filter_identifier:{type:"object",description:"identifier based filter of transfer",properties:{id:{description:"Id of transfer to return",$ref:"/db/transfer/transfer.schema.json#/properties/id"},identifier:{description:"Identifier of transfer to return",$ref:"/db/transfer/transfer.schema.json#/properties/identifier"}},required:["identifier"],additionalProperties:!1}},required:["transfer"],additionalProperties:!1};var Us={$schema:"http://json-schema.org/draft-07/schema",$id:"GetTransferTxOutput",title:"GetTransferTxOutput",description:"Output of getTransfer",type:"object",properties:{transfer:{$ref:"#/definitions/transfer"}},definitions:{transfer:{type:"object",description:"requested transfer",properties:{id:{$ref:"/db/transfer/transfer.schema.json#/properties/id"},identifier:{$ref:"/db/transfer/transfer.schema.json#/properties/identifier"},control_hash:{$ref:"/db/transfer/transfer.schema.json#/properties/control_hash"},from_wallet_id:{$ref:"/db/transfer/transfer.schema.json#/properties/from_wallet_id"},from_wallet_foreign:{$ref:"/db/wallet/wallet.schema.json#/properties/foreign"},to_wallet_id:{$ref:"/db/transfer/transfer.schema.json#/properties/to_wallet_id"},to_wallet_foreign:{$ref:"/db/wallet/wallet.schema.json#/properties/foreign"},token_id:{$ref:"/db/transfer/transfer.schema.json#/properties/token_id"},token_foreign:{$ref:"/db/token/token.schema.json#/properties/foreign"},amount:{$ref:"/db/transfer/transfer.schema.json#/properties/amount"},type:{$ref:"/db/transfer/transfer.schema.json#/properties/type"},status:{$ref:"/db/transfer/transfer.schema.json#/properties/status"},force:{$ref:"/db/transfer/transfer.schema.json#/properties/force"},auto_hash:{$ref:"/db/transfer/transfer.schema.json#/properties/auto_hash"},created_at:{$ref:"/db/transfer/transfer.schema.json#/properties/created_at"},updated_at:{$ref:"/db/transfer/transfer.schema.json#/properties/updated_at"},metadata:{$ref:"/db/transfer/transfer.schema.json#/properties/metadata"},transfer_group_id:{$ref:"/db/transfer/transfer.schema.json#/properties/transfer_group_id"},transfer_group_identifier:{description:"Transfer Group identifier if transfer belongs to a group",type:"string"},reverses_id:{$ref:"/db/transfer/transfer.schema.json#/properties/reverses_id"},reverses_identifier:{description:"Reverses identifier if transfer reverses another transfer",type:"string"},balance_id:{description:"Iterator marking the position of the balance in the continuum",type:["number","null"]},balance_pending:{description:"Wallet pending balance after transfer",type:["number","null"]},balance_pending_to:{description:"Wallet pending_to balance after transfer",type:["number","null"]},balance_pending_from:{description:"Wallet pending_from balance after transfer",type:["number","null"]},balance_finished:{description:"Wallet finished balance after transfer",type:["number","null"]},signed_amount:{description:"amount with a sign according to transfer direction",type:["number","null"]},status_finalized_at:{description:"DateTime transfer reached final status",type:["string","null"],format:"date-time"}},additionalProperties:!1,required:["id","identifier","from_wallet_id","from_wallet_foreign","to_wallet_id","to_wallet_foreign","token_id","token_foreign","amount","type","status","force","created_at"]},transfer_optional:{type:"object",description:"requested transfer",properties:{id:{$ref:"/db/transfer/transfer.schema.json#/properties/id"},identifier:{$ref:"/db/transfer/transfer.schema.json#/properties/identifier"},control_hash:{$ref:"/db/transfer/transfer.schema.json#/properties/control_hash"},from_wallet_id:{$ref:"/db/transfer/transfer.schema.json#/properties/from_wallet_id"},from_wallet_foreign:{$ref:"/db/wallet/wallet.schema.json#/properties/foreign"},to_wallet_id:{$ref:"/db/transfer/transfer.schema.json#/properties/to_wallet_id"},to_wallet_foreign:{$ref:"/db/wallet/wallet.schema.json#/properties/foreign"},token_id:{$ref:"/db/transfer/transfer.schema.json#/properties/token_id"},token_foreign:{$ref:"/db/token/token.schema.json#/properties/foreign"},amount:{$ref:"/db/transfer/transfer.schema.json#/properties/amount"},type:{$ref:"/db/transfer/transfer.schema.json#/properties/type"},status:{$ref:"/db/transfer/transfer.schema.json#/properties/status"},force:{$ref:"/db/transfer/transfer.schema.json#/properties/force"},auto_hash:{$ref:"/db/transfer/transfer.schema.json#/properties/auto_hash"},created_at:{$ref:"/db/transfer/transfer.schema.json#/properties/created_at"},updated_at:{$ref:"/db/transfer/transfer.schema.json#/properties/updated_at"},metadata:{$ref:"/db/transfer/transfer.schema.json#/properties/metadata"},transfer_group_id:{$ref:"/db/transfer/transfer.schema.json#/properties/transfer_group_id"},transfer_group_identifier:{description:"Transfer Group identifier if transfer belongs to a group",type:"string"},reverses_id:{$ref:"/db/transfer/transfer.schema.json#/properties/reverses_id"},balance_id:{description:"Iterator marking the position of the balance in the continuum",type:["number","null"]},balance_pending:{description:"Wallet pending balance after transfer",type:["number","null"]},balance_pending_to:{description:"Wallet pending_to balance after transfer",type:["number","null"]},balance_pending_from:{description:"Wallet pending_from balance after transfer",type:["number","null"]},balance_finished:{description:"Wallet finished balance after transfer",type:["number","null"]},signed_amount:{description:"amount with a sign according to transfer direction",type:["number","null"]},status_finalized_at:{description:"DateTime transfer reached final status",type:["string","null"],format:"date-time"}},additionalProperties:!1}},additionalProperties:!1};var qs={$schema:"http://json-schema.org/draft-07/schema",$id:"GetTransferGroupTxInput",title:"GetTransferGroupTxInput",description:"Input for getTransferGroup",type:"object",properties:{transfer_group:{$ref:"#/definitions/unique_transfer_group_filter"},options:{$ref:"#/definitions/get_transfer_group_tx_options"}},definitions:{get_transfer_group_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/get_transfer_group_additional_options"}]},get_transfer_group_additional_options:{description:"Optional flags for input",type:"object",properties:{create_if_not_exists:{type:"boolean",description:"If true then the transfer_group will be created if not found. Only valid with 'identifier'",default:!1},return_only_id:{type:"boolean",description:"If true then the returning object is only guaranteed to have id",default:!1}},default:{},$typescript:'{"additionalProperties": false}'},unique_transfer_group_filter:{description:"UNIQUE filtering options for transfer",anyOf:[{$ref:"#/definitions/unique_transfer_group_filter_id"},{$ref:"#/definitions/unique_transfer_group_filter_identifier"}]},unique_transfer_group_filter_id:{type:"object",description:"ID based filter of transfer",properties:{id:{description:"Id of transfer_group to return",$ref:"/db/transfer-group/transfer-group.schema.json#/properties/id"},identifier:{description:"Identifier of transfer_group to return",$ref:"/db/transfer-group/transfer-group.schema.json#/properties/identifier"}},required:["id"],additionalProperties:!1},unique_transfer_group_filter_identifier:{type:"object",description:"identifier based filter of transfer",properties:{id:{description:"Id of transfer_group to return",$ref:"/db/transfer-group/transfer-group.schema.json#/properties/id"},identifier:{description:"Identifier of transfer_group to return",$ref:"/db/transfer-group/transfer-group.schema.json#/properties/identifier"}},required:["identifier"],additionalProperties:!1}},required:["transfer_group"],additionalProperties:!1};var Bs={$schema:"http://json-schema.org/draft-07/schema",$id:"GetTransferGroupTxOutput",title:"GetTransferGroupTxOutput",description:"Output of getTransferGroup",type:"object",properties:{transfer_group:{$ref:"#/definitions/transfer_group"}},definitions:{transfer_group:{description:"requested transfer_group",properties:{id:{$ref:"/db/transfer-group/transfer-group.schema.json#/properties/id"},identifier:{$ref:"/db/transfer-group/transfer-group.schema.json#/properties/identifier"},status:{$ref:"/db/transfer-group/transfer-group.schema.json#/properties/status"},transfer_status:{$ref:"/db/transfer-group/transfer-group.schema.json#/properties/transfer_status"},metadata:{$ref:"/db/transfer-group/transfer-group.schema.json#/properties/metadata"},created_at:{$ref:"/db/transfer-group/transfer-group.schema.json#/properties/created_at"},updated_at:{$ref:"/db/transfer-group/transfer-group.schema.json#/properties/updated_at"},reverses_id:{$ref:"/db/transfer-group/transfer-group.schema.json#/properties/reverses_id"},status_finalized_at:{$ref:"/db/transfer-group/transfer-group.schema.json#/properties/status_finalized_at"},transfer_status_finalized_at:{$ref:"/db/transfer-group/transfer-group.schema.json#/properties/transfer_status_finalized_at"},type:{$ref:"/db/transfer-group/transfer-group.schema.json#/properties/type"},validate_final_balance_only:{$ref:"/db/transfer-group/transfer-group.schema.json#/properties/validate_final_balance_only"},reverses_identifier:{description:"Identifier of the transfer group this reverses",type:["string","null"]}},additionalProperties:!1,required:["id"]}},additionalProperties:!1};var Ls={$schema:"http://json-schema.org/draft-07/schema",$id:"GetWalletTxInput",title:"GetWalletTxInput",description:"Input for getWallet",type:"object",properties:{wallet:{$ref:"#/definitions/unique_wallet_filter"},options:{$ref:"#/definitions/get_wallet_tx_options"}},definitions:{get_wallet_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/get_wallet_additional_options"}]},get_wallet_additional_options:{description:"Optional flags for input",type:"object",properties:{ignore_cache:{description:"If true the wallet is returned from cache layer if possible",type:"boolean",default:!1},create_if_not_exists:{type:"boolean",description:"If true then the wallet will be created if not found. Only valid with 'foreign'",default:!1},return_only_id:{type:"boolean",description:"If true then the returning object is only guaranteed to have id",default:!1}},default:{},$typescript:'{"additionalProperties": false}'},unique_wallet_filter:{type:"object",description:"UNIQUE filtering options for wallet",anyOf:[{$ref:"#/definitions/unique_wallet_filter_id"},{$ref:"#/definitions/unique_wallet_filter_foreign"}]},unique_wallet_filter_id:{type:"object",description:"ID based filter for wallet",properties:{id:{description:"Id of wallet to return",$ref:"/db/wallet/wallet.schema.json#/properties/id"},foreign:{description:"Foreign of wallet to return",$ref:"/db/wallet/wallet.schema.json#/properties/name"}},required:["id"],additionalProperties:!1},unique_wallet_filter_foreign:{type:"object",description:"Foreign based filter for wallet",properties:{id:{description:"Id of wallet to return",$ref:"/db/wallet/wallet.schema.json#/properties/id"},foreign:{description:"Foreign of wallet to return",$ref:"/db/wallet/wallet.schema.json#/properties/name"}},required:["foreign"],additionalProperties:!1}},required:["wallet"],additionalProperties:!1};var Vs={$schema:"http://json-schema.org/draft-07/schema",$id:"GetWalletTxOutput",title:"GetWalletTxOutput",description:"Output of getWallet",type:"object",properties:{wallet:{description:"requested wallet",anyOf:[{$ref:"/db/wallet/wallet.schema.json"},{$ref:"/db/wallet/wallet.schema.optional.json"}]}},additionalProperties:!1};var Hs={$schema:"http://json-schema.org/draft-07/schema",$id:"GetWalletManyTxInput",title:"GetWalletManyTxInput",description:"Input for getWalletMany",type:"object",properties:{wallets:{type:"array",items:{$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"}},options:{$ref:"#/definitions/get_wallet_many_tx_options"}},definitions:{get_wallet_many_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/get_wallet_many_additional_options"}]},get_wallet_many_additional_options:{description:"Optional flags for input",type:"object",properties:{ignore_cache:{type:"boolean",default:!1},create_if_not_exists:{type:"boolean",description:"If true then the wallet will be created if not found. Only valid with 'foreign'",default:!1},return_only_id:{type:"boolean",description:"If true then the returning object is only guaranteed to have id",default:!1}},default:{},$typescript:'{"additionalProperties": false}'}},additionalProperties:!1};var zs={$schema:"http://json-schema.org/draft-07/schema",$id:"GetWalletManyTxOutput",title:"GetWalletManyTxOutput",description:"Output of getWalletMany",type:"object",properties:{wallets:{type:"array",items:{$ref:"#/definitions/WalletResult"}}},definitions:{WalletResult:{anyOf:[{$ref:"/db/wallet/wallet.schema.json"},{$ref:"/db/wallet/wallet.schema.optional.json"},{type:"null"}]}},required:["wallets"],additionalProperties:!1};var Lt={$schema:"http://json-schema.org/draft-07/schema",$id:"ImportActionsTxInput",title:"ImportActionsTxInput",description:"Input for importActions",type:"object",properties:{actions:{description:"Array of actions to import.",type:"array",items:{$ref:"#/definitions/import_actions_tx_stream_chunk"}},options:{$ref:"#/definitions/import_actions_tx_options"}},required:["actions"],definitions:{import_actions_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"}]},import_actions_tx_stream_chunk:{type:"object",anyOf:[{$ref:"#/definitions/import_action_wallet"},{$ref:"#/definitions/import_action_token"},{$ref:"#/definitions/import_action_transfer_group"},{$ref:"#/definitions/import_action_transfer"}]},import_action_wallet:{type:"object",properties:{target:{description:"Target of the action",type:"string",enum:["wallet"]},data:{$ref:"/db/wallet/wallet.schema.input.json"}},required:["target","data"],additionalProperties:!1},import_action_token:{type:"object",properties:{target:{description:"Target of the action",type:"string",enum:["token"]},data:{$ref:"/txs/create-token/create-token.schema.input.json#/definitions/create_token_input"}},required:["target","data"],additionalProperties:!1},import_action_transfer_group_extension:{type:"object",properties:{created_at:{type:"string",format:"date-time"},status_finalized_at:{type:"string",format:"date-time"},transfer_status_finalized_at:{type:"string",format:"date-time"}},$typescript:'{"additionalProperties": false}'},import_action_transfer_group_data:{allOf:[{$ref:"/txs/create-transfer-group/create-transfer-group.schema.input.json#/definitions/transfer_group_data"},{$ref:"#/definitions/import_action_transfer_group_extension"}]},import_action_transfer_group:{type:"object",properties:{target:{description:"Target of the action",type:"string",enum:["transfer_group"]},data:{allOf:[{$ref:"#/definitions/import_action_transfer_group_data"}]}},required:["target","data"],additionalProperties:!1},import_action_transfer_data:{anyOf:[{$ref:"#/definitions/import_action_transfer_data_regular"},{$ref:"#/definitions/import_action_transfer_data_deposit"},{$ref:"#/definitions/import_action_transfer_data_withdrawal"}]},import_action_transfer_data_regular:{type:"object",properties:{identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},from_wallet:{description:"Wallet where funds are debited",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},to_wallet:{description:"Wallet where funds are credited",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},token:{description:"Token that is moved",$ref:"/txs/get-token/get-token.schema.input.json#/definitions/unique_token_filter"},amount:{$ref:"/db/transfer/transfer.schema.input.json#/properties/amount"},type:{description:"Type of transfer",enum:["transfer"]},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},status:{$ref:"/db/consts.schema.json#/definitions/TransferStatus"},transfer_group:{description:"TransferGroup the transfer belongs to",$ref:"/txs/get-transfer-group/get-transfer-group.schema.input.json#/definitions/unique_transfer_group_filter"},created_at:{type:"string",format:"date-time"},status_finalized_at:{type:"string",format:"date-time"}},required:["from_wallet","to_wallet","token","amount","type"],$typescript:'{"additionalProperties": false}'},import_action_transfer_data_deposit:{type:"object",properties:{identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},from_wallet:{description:"Wallet where funds are debited",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},to_wallet:{description:"Wallet where funds are credited",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},token:{description:"Token that is moved",$ref:"/txs/get-token/get-token.schema.input.json#/definitions/unique_token_filter"},amount:{$ref:"/db/transfer/transfer.schema.input.json#/properties/amount"},type:{description:"Type of transfer",enum:["deposit"]},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},status:{$ref:"/db/consts.schema.json#/definitions/TransferStatus"},transfer_group:{description:"TransferGroup the transfer belongs to",$ref:"/txs/get-transfer-group/get-transfer-group.schema.input.json#/definitions/unique_transfer_group_filter"},created_at:{type:"string",format:"date-time"},status_finalized_at:{type:"string",format:"date-time"}},required:["to_wallet","token","amount"],$typescript:'{"additionalProperties": false}'},import_action_transfer_data_withdrawal:{type:"object",properties:{identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},from_wallet:{description:"Wallet where funds are debited",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},to_wallet:{description:"Wallet where funds are credited",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},token:{description:"Token that is moved",$ref:"/txs/get-token/get-token.schema.input.json#/definitions/unique_token_filter"},amount:{$ref:"/db/transfer/transfer.schema.input.json#/properties/amount"},type:{description:"Type of transfer",enum:["withdrawal"]},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},status:{$ref:"/db/consts.schema.json#/definitions/TransferStatus"},transfer_group:{description:"TransferGroup the transfer belongs to",$ref:"/txs/get-transfer-group/get-transfer-group.schema.input.json#/definitions/unique_transfer_group_filter"},created_at:{type:"string",format:"date-time"},status_finalized_at:{type:"string",format:"date-time"}},required:["from_wallet","token","amount"],$typescript:'{"additionalProperties": false}'},import_action_transfer:{type:"object",properties:{target:{description:"Target of the action",type:"string",enum:["transfer"]},data:{allOf:[{$ref:"#/definitions/import_action_transfer_data"}]}},required:["target","data"],additionalProperties:!1}},$allowStreamInput:"import_actions_tx_stream_chunk",additionalProperties:!1};var Ks={$schema:"http://json-schema.org/draft-07/schema",$id:"ImportActionsTxOutput",title:"ImportActionsTxOutput",description:"Output of importActions",type:"object",properties:{progress:{type:"array"},erroneous:{type:"array"}},additionalProperties:!1};var Qs={$schema:"http://json-schema.org/draft-07/schema",$id:"ImportDatabaseTxInput",title:"ImportDatabaseTxInput",description:"Input for importDatabase",type:"object",properties:{name:{type:"string"}},definitions:{},additionalProperties:!1};var Js={$schema:"http://json-schema.org/draft-07/schema",$id:"ImportDatabaseTxOutput",title:"ImportDatabaseTxOutput",description:"Output of importDatabase",type:"object",properties:{message:{type:"string"}},additionalProperties:!1};var Xs={$schema:"http://json-schema.org/draft-07/schema",$id:"ListDatabaseExportsTxInput",title:"ListDatabaseExportsTxInput",description:"Input for listDatabaseExports",type:"object",properties:{},definitions:{},additionalProperties:!1};var Ys={$schema:"http://json-schema.org/draft-07/schema",$id:"ListDatabaseExportsTxOutput",title:"ListDatabaseExportsTxOutput",description:"Output of listDatabaseExports",type:"object",properties:{exports:{type:"array",items:{$ref:"#/definitions/database_export"}}},required:["exports"],definitions:{database_export:{type:"object",properties:{name:{description:"Name of the export",type:"string"},size:{description:"Size of the export",type:"number"}},required:["name","size"]}},additionalProperties:!1};var Zs={$schema:"http://json-schema.org/draft-07/schema",$id:"QueryTxInput",title:"QueryTxInput",description:"Input for query",type:"object",properties:{query:{description:"SELECT query",type:"string"},params:{description:"Parameters for the query",type:"array"},options:{$ref:"#/definitions/query_tx_options"}},definitions:{query_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options_without_tx"}]}},required:["query","params"],additionalProperties:!1};var ei={$schema:"http://json-schema.org/draft-07/schema",$id:"QueryTxOutput",title:"QueryTxOutput",description:"Output of query",type:"object",properties:{results:{description:"The query results",type:"array"}},required:["results"],additionalProperties:!1};var ti={$schema:"http://json-schema.org/draft-07/schema",$id:"QueryLogsTxInput",title:"QueryLogsTxInput",description:"Input for queryLogs",type:"object",properties:{startTime:{description:"Log entries start time",type:"string"},endTime:{description:"Log entries end time",type:"string"},tracking_id:{type:"string"},level:{type:"string",enum:["debug","info","warning","error"]},options:{$ref:"#/definitions/query_logs_tx_options"}},definitions:{query_logs_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/query_logs_additional_options"}]},query_logs_additional_options:{description:"Optional flags for input",type:"object",default:{exact_level:!1},properties:{exact_level:{description:"Should query be limited to exactly defined level or greater than",type:"boolean"}},$typescript:'{"additionalProperties":false}'}},additionalProperties:!1};var ri={$schema:"http://json-schema.org/draft-07/schema",$id:"QueryLogsTxOutput",title:"QueryLogsTxOutput",description:"Output of queryLogs",type:"object",properties:{logs:{type:"array",items:{$ref:"#/definitions/query_log_entry"}}},definitions:{query_log_entry:{type:"object",properties:{level:{description:"Log level",type:"string",enum:["debug","info","warning","error"]},timestamp:{description:"Timestamp when log was created",type:"string"},payload:{description:"Log payload",type:"object"}},additionalProperties:!1}},required:["logs"],additionalProperties:!1};var ni={$schema:"http://json-schema.org/draft-07/schema",$id:"ResetDatabaseTxInput",title:"ResetDatabaseTxInput",description:"Input for resetDatabase",type:"object",properties:{confirmation:{description:"hash to confirm database delete",type:"string"},version:{description:"target semver for the database",type:"string"},options:{$ref:"#/definitions/reset_database_tx_options"}},definitions:{reset_database_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options_without_tx"}]}},additionalProperties:!1};var ai={$schema:"http://json-schema.org/draft-07/schema",$id:"ResetDatabaseTxOutput",title:"ResetDatabaseTxOutput",description:"Output of resetDatabase",type:"object",properties:{message:{description:"Message about operation",type:"string"},confirmation:{description:"confirmation hash to resend",type:"string"}},additionalProperties:!1};var si={$schema:"http://json-schema.org/draft-07/schema",$id:"ReverseTransferTxInput",title:"ReverseTransferTxInput",description:"Input for reverseTransfer",type:"object",properties:{transfer:{$ref:"/txs/get-transfer/get-transfer.schema.input.json#/definitions/unique_transfer_filter"},reverse:{$ref:"#/definitions/transfer_reverse_modifications"},options:{$ref:"#/definitions/reverse_transfer_tx_options"}},definitions:{reverse_transfer_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/reverse_transfer_additional_options"}]},reverse_transfer_additional_options:{description:"Optional flags for input",type:"object",default:{},properties:{reverse_deposit:{$id:"reverse_deposit",description:"Whether to create withdrawal transaction for deposit (will default to pending)",type:"boolean",default:!1},reverse_withdrawal:{$id:"reverse_withdrawal",description:"Whether to create deposit transaction for withdrawal (will default to pending)",type:"boolean",default:!1},return_from_balance:{$id:"return_from_balance",description:"Whether the request should also return from wallet balance",type:"boolean",default:!1},return_to_balance:{$id:"return_to_balance",description:"Whether the request should also return to wallet balance",type:"boolean",default:!1},metadata_action:{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_action_for_reverse"}},$typescript:'{"additionalProperties": false}'},transfer_reverse_modifications:{description:"In case the transfer will be made then apply these modifications",type:"object",properties:{status:{$ref:"/db/transfer/transfer.schema.input.json#/properties/status"},identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},force:{$ref:"/db/transfer/transfer.schema.input.json#/properties/force"},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},extend_metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"}},default:{},additionalProperties:!1}},required:["transfer"],additionalProperties:!1};var ii={$schema:"http://json-schema.org/draft-07/schema",$id:"ReverseTransferTxOutput",title:"ReverseTransferTxOutput",description:"Output of reverseTransfer",allOf:[{$ref:"/txs/update-transfer/update-transfer.schema.output.json"}]};var oi={$schema:"http://json-schema.org/draft-07/schema",$id:"ReverseTransferGroupTxInput",title:"ReverseTransferGroupTxInput",description:"Input for reverseTransferGroup",type:"object",properties:{transfer_group:{$ref:"/txs/get-transfer-group/get-transfer-group.schema.input.json#/definitions/unique_transfer_group_filter"},reverse:{$ref:"#/definitions/reverse_transfer_group_modifications"},options:{$ref:"#/definitions/reverse_transfer_group_tx_options"}},definitions:{reverse_transfer_group_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/reverse_transfer_group_additional_options"}]},reverse_transfer_group_additional_options:{description:"Optional flags for input",type:"object",default:{},properties:{reverse_deposit:{$id:"reverse_deposit",description:"Whether to create withdrawal transaction for deposits (will default to pending)",type:"boolean",default:!1},reverse_withdrawal:{$id:"reverse_withdrawal",description:"Whether to create deposit transaction for withdrawals (will default to pending)",type:"boolean",default:!1},return_transfers:{description:"Should the update return all transfers belonging to group",type:"boolean"},validate_final_balance_only:{type:"boolean",description:"If true then transfers within a group will ignore balance restrictions. Only final transfers for wallets are checked.",default:!1},metadata_action:{$id:"metadata_action",$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_action_for_reverse"},transfer_metadata_action:{$id:"transfer_metadata_action",$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_action_for_reverse"}},$typescript:'{"additionalProperties": false}'},reverse_transfer_group_modifications:{description:"In case the transferGroup will be made then apply these modifications",type:"object",properties:{status:{$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/status"},transfer_status:{$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/transfer_status"},identifier:{$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/identifier"},force:{$ref:"/db/transfer/transfer.schema.input.json#/properties/force"},metadata:{$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/metadata"},transfer_metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},extend_metadata:{description:"Key value object to be merged with existing metadata",$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/metadata"},transfer_extend_metadata:{description:"Key value object to be merged with each transfers existing metadata",$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"}},default:{},additionalProperties:!1}},additionalProperties:!1};var pi={$schema:"http://json-schema.org/draft-07/schema",$id:"ReverseTransferGroupTxOutput",title:"ReverseTransferGroupTxOutput",description:"Output of reverseTransferGroup",type:"object",properties:{transfer_group:{$ref:"/db/transfer-group/transfer-group.schema.json"},transfers:{description:"Created transfer objects",type:"array",items:{$ref:"/txs/get-transfer/get-transfer.schema.output.json#/definitions/transfer"}}},additionalProperties:!1};var di={$schema:"http://json-schema.org/draft-07/schema",$id:"ReverseTransferGroupManyTxInput",title:"ReverseTransferGroupManyTxInput",description:"Input for reverseTransferGroupMany",type:"object",properties:{transfer_group:{$ref:"/txs/find-transfer-group-many/find-transfer-group-many.schema.input.json#/definitions/find_transfer_group_many_filter"},reverse:{$ref:"#/definitions/reverse_transfer_group_many_modifications"},options:{$ref:"#/definitions/reverse_transfer_group_many_tx_options"}},definitions:{reverse_transfer_group_many_modifications:{description:"In case the transferGroup will be made then apply these modifications",type:"object",properties:{status:{$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/status"},transfer_status:{$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/transfer_status"},force:{$ref:"/db/transfer/transfer.schema.input.json#/properties/force"},metadata:{$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/metadata"},transfer_metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},extend_metadata:{description:"Key value object to be merged with existing metadata",$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/metadata"},transfer_extend_metadata:{description:"Key value object to be merged with each transfers existing metadata",$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"}},default:{},additionalProperties:!1},reverse_transfer_group_many_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"/txs/reverse-transfer-group/reverse-transfer-group.schema.input.json#/definitions/reverse_transfer_group_additional_options"}]},reverse_transfer_group_many_additional_options:{description:"Optional flags for input",type:"object",default:{},$typescript:'{"additionalProperties":false}'}},required:["transfer_group"],additionalProperties:!1};var fi={$schema:"http://json-schema.org/draft-07/schema",$id:"ReverseTransferGroupManyTxOutput",title:"ReverseTransferGroupManyTxOutput",description:"Output of reverseTransferGroupMany",type:"object",properties:{transfer_groups:{description:"Reversed transfer groups",type:"array",items:{$ref:"/db/transfer-group/transfer-group.schema.json"}},transfers:{description:"Created transfer objects",type:"array",items:{$ref:"/txs/get-transfer/get-transfer.schema.output.json#/definitions/transfer"}}},additionalProperties:!1};var ui={$schema:"http://json-schema.org/draft-07/schema",$id:"ReverseTransferManyTxInput",title:"ReverseTransferManyTxInput",description:"Input for reverseTransferMany",type:"object",properties:{transfer:{$ref:"/txs/find-transfer-many/find-transfer-many.schema.input.json#/definitions/find_transfer_many_filter"},reverse:{$ref:"#/definitions/reverse_transfer_many_modifications"},options:{$ref:"#/definitions/reverse_transfer_many_tx_options"}},definitions:{reverse_transfer_many_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/reverse_transfer_many_additional_options"}]},reverse_transfer_many_additional_options:{description:"Optional flags for input",type:"object",default:{},properties:{reverse_deposit:{$id:"reverse_deposit",description:"Whether to create withdrawal transaction for deposit (will default to pending)",type:"boolean",default:!1},reverse_withdrawal:{$id:"reverse_withdrawal",description:"Whether to create deposit transaction for withdrawal (will default to pending)",type:"boolean",default:!1},metadata_action:{$id:"metadata_action",$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_action_for_reverse"}},$typescript:'{"additionalProperties": false}'},reverse_transfer_many_modifications:{description:"In case the transfer will be made then apply these modifications",type:"object",properties:{status:{$ref:"/db/transfer/transfer.schema.input.json#/properties/status"},force:{$ref:"/db/transfer/transfer.schema.input.json#/properties/force"},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"}},default:{},additionalProperties:!1}},required:["transfer"],additionalProperties:!1};var li={$schema:"http://json-schema.org/draft-07/schema",$id:"ReverseTransferManyTxOutput",title:"ReverseTransferManyTxOutput",description:"Output of reverseTransferMany",properties:{transfers:{description:"Created transfer array",type:"array",items:{$ref:"/txs/get-transfer/get-transfer.schema.output.json#/definitions/transfer"}}},additionalProperties:!1};var ci={$schema:"http://json-schema.org/draft-07/schema",$id:"SetFlagsTxInput",title:"SetFlagsTxInput",description:"Input for setFlags",type:"object",properties:{flags:{$ref:"/db/consts.schema.json#/definitions/Flags"},options:{$ref:"#/definitions/set_flags_tx_options"}},definitions:{set_flags_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options_without_tx"}]}},required:["flags"],additionalProperties:!1};var mi={$schema:"http://json-schema.org/draft-07/schema",$id:"SetFlagsTxOutput",title:"SetFlagsTxOutput",description:"Output of setFlags",type:"object",properties:{flags:{$ref:"/db/consts.schema.json#/definitions/Flags"},message:{description:"optional message",type:"string"}},required:["flags"],additionalProperties:!1};var hi={$schema:"http://json-schema.org/draft-07/schema",$id:"StartTransactionTxInput",title:"StartTransactionTxInput",description:"Input for startTransaction",type:"object",properties:{options:{$ref:"#/definitions/start_transaction_tx_options"}},definitions:{start_transaction_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options_without_tx"}]}},additionalProperties:!1};var _i={$schema:"http://json-schema.org/draft-07/schema",$id:"StartTransactionTxOutput",title:"StartTransactionTxOutput",description:"Output of startTransaction",type:"object",properties:{transaction_id:{type:"string"}},additionalProperties:!1};var gi={$schema:"http://json-schema.org/draft-07/schema",$id:"TxConsts",description:"Generics used by functions",definitions:{i_tx_general_options_without_tx:{description:"Generic flags for input",type:"object",default:{},properties:{tracking_id:{description:"User provided id added to logs for debugging",type:"string"}},$typescript:'{"additionalProperties":false}'},i_tx_general_options:{description:"Generic flags for input",type:"object",default:{},properties:{transaction_id:{description:"Id of the transaction context to run the query in",type:"string"},tracking_id:{description:"User provided id added to logs for debugging",type:"string"}},$typescript:'{"additionalProperties":false}'},i_tx_metadata_options:{description:"Metadata flags for input",type:"object",default:{},properties:{return_metadata_total:{description:"Return the total rows count in metadata",type:"boolean"}},$typescript:'{"additionalProperties":false}'},i_tx_limiting_options:{$typescript:'{"additionalProperties":false}',description:"Optional flags for input limiting",type:"object",properties:{limit:{description:"Number of records to return",type:"integer"},offset:{description:"Number of records to omit from the beginning",type:"integer"}},default:{limit:20,offset:0}},i_tx_ordering_options:{$typescript:'{"additionalProperties":false}',description:"Optional flags for input ordering",type:"object",properties:{order:{description:"Ordering options",type:"array",items:{$ref:"#/definitions/i_tx_ordering_input"}}}},i_tx_select_options:{$typescript:'{"additionalProperties":false}',description:"Optional flags to limit search result",type:"object",properties:{select:{description:"Select options",type:"array",items:{type:"string"}}}},i_tx_deselect_options:{$typescript:'{"additionalProperties":false}',description:"Optional flag to remove field from select",type:"object",properties:{deselect:{description:"Deselect options",type:"array",items:{type:"string"}}}},i_tx_aggregating_options:{$typescript:'{"additionalProperties":false}',description:"Optional flags to aggregate data",type:"object",properties:{aggregator:{$ref:"#/definitions/i_tx_aggregator"},aggregators:{type:"array",items:{$ref:"#/definitions/i_tx_aggregator"}},groups:{$ref:"#/definitions/i_tx_groups"}}},i_tx_find_metadata:{description:"Metadata about the search",type:"object",properties:{total:{description:"Total number of records matching the query",type:"integer"},offset:{description:"Current query offset",type:"integer"},limit:{description:"Current query limit",type:"integer"},more_rows:{description:"Boolean showing if there would be more rows to return with a higher offset/limit",type:"boolean"},order:{description:"Ordering options",type:"array",items:{$ref:"#/definitions/i_tx_ordering_input"}}},required:["offset","limit","more_rows"],additionalProperties:!1},i_tx_aggregating_metadata:{description:"Metadata about the aggregation",type:"object",properties:{aggregators:{type:"array",items:{$ref:"#/definitions/i_tx_aggregator"}},groups:{$ref:"#/definitions/i_tx_groups"}},required:["aggregators"],additionalProperties:!1},i_tx_ordering_input:{description:"Input for orderBy",type:"object",properties:{field:{description:"Field to order by",type:"string"},direction:{description:"Direction to order",default:"asc",type:"string",enum:["asc","desc"]},nulls:{description:"Should nulls be first or last",type:"string",enum:["first","last"]}},required:["field"],additionalProperties:!1},i_tx_groups:{type:"array",maxItems:5,items:{$ref:"#/definitions/i_tx_group"}},i_tx_group:{anyOf:[{$ref:"#/definitions/i_tx_group_period"},{$ref:"#/definitions/i_tx_group_field"},{$ref:"#/definitions/i_tx_group_metadata_field"}]},i_tx_group_period:{type:"object",properties:{type:{type:"string",enum:["period"]},field:{$ref:"#/definitions/i_tx_period"},alias:{type:"string"}},required:["type","field"],additionalProperties:!1},i_tx_group_field:{type:"object",properties:{type:{type:"string",enum:["field"]},field:{type:"string"},alias:{type:"string"}},required:["type","field"],additionalProperties:!1},i_tx_group_metadata_field:{type:"object",properties:{type:{type:"string",enum:["metadata_field"]},field:{type:"string"},alias:{type:"string"}},required:["type","field"],additionalProperties:!1},i_tx_period:{anyOf:[{$ref:"#/definitions/i_tx_period_simple"},{$ref:"#/definitions/i_tx_period_timezone"}]},i_tx_period_simple:{description:"Time period rows should be grouped by",type:"string",enum:["year","month","week","day","hour","minute"],default:"day"},i_tx_period_timezone:{type:"object",properties:{period:{$ref:"#/definitions/i_tx_period_simple"},timezone:{description:"",type:"string"}},required:["period","timezone"],additionalProperties:!1},i_tx_time_filter:{type:"object",properties:{start_time:{type:"string",format:"date-time"},end_time:{type:"string",format:"date-time"}},$typescript:'{"additionalProperties":false}'},i_tx_aggregator:{description:"Aggregator description",anyOf:[{$ref:"#/definitions/i_tx_aggregator_simple"},{$ref:"#/definitions/i_tx_aggregator_complex"}]},i_tx_aggregator_simple:{description:"Function to use for grouping",type:"string",enum:["count","countDistinct","sum","average","min","max"],default:"count"},i_tx_aggregator_complex:{description:"Function and field to group",type:"object",properties:{function:{$ref:"#/definitions/i_tx_aggregator_simple"},field:{description:"Field to group by",type:"string"},alias:{description:"Alias to group under",type:"string"}},$typescript:'{"additionalProperties":false}'},i_tx_aggregate_results:{type:"array",items:{$ref:"#/definitions/i_tx_aggregate_result"}},i_tx_aggregate_result:{type:"object",additionalProperties:{type:["string","number"]}},i_tx_distributor_leftover_rule:{description:"Rule for distribution grouping",type:"string",enum:["keep","random","largest","target"]},i_tx_metadata_action:{description:"Whether to replace or extend current metadata with new value",type:"string",enum:["replace","extend"],default:"replace"},i_tx_metadata_action_for_reverse:{description:"Whether to replace or extend current metadata with new value",type:"string",enum:["replace","replace_create_only","replace_cancel_only","extend","extend_create_only","extend_cancel_only"],default:"replace"}}};var Ti={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateTokenTxInput",title:"UpdateTokenTxInput",description:"Input for updateToken",type:"object",properties:{token:{$ref:"/txs/get-token/get-token.schema.input.json#/definitions/unique_token_filter"},update:{$ref:"#/definitions/update_token_fields"},options:{$ref:"#/definitions/update_token_tx_options"}},definitions:{update_token_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/update_token_additional_options"}]},update_token_additional_options:{description:"Optional flags for input",type:"object",default:{},$typescript:'{"additionalProperties":false}',properties:{return_when_not_updated:{$id:"return_when_not_updated",description:"Whether the request should return the token object even if it was not updated",type:"boolean",default:!1}}},update_token_fields:{type:"object",$typescript:'{"additionalProperties":false}',properties:{metadata:{$ref:"/db/token/token.schema.json#/properties/metadata"},public:{$ref:"/db/token/token.schema.json#/properties/public"},status:{$ref:"/db/token/token.schema.json#/properties/status"}}}},required:["token"],additionalProperties:!1};var yi={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateTokenTxOutput",title:"UpdateTokenTxOutput",description:"Output of updateToken",type:"object",properties:{token:{description:"Token object",$ref:"/db/token/token.schema.json"},updated:{description:"Boolean showing if the token was updated",type:"boolean"}},additionalProperties:!1};var bi={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateTransferTxInput",title:"UpdateTransferTxInput",description:"Input for updateTransfer",type:"object",properties:{transfer:{$ref:"/txs/get-transfer/get-transfer.schema.input.json#/definitions/unique_transfer_filter"},update:{$ref:"#/definitions/update_transfer_fields"},options:{$ref:"#/definitions/update_transfer_tx_options"}},definitions:{update_transfer_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/update_transfer_additional_options"}]},update_transfer_additional_options:{description:"Optional flags for input",type:"object",default:{},properties:{return_from_balance:{$id:"return_from_balance",description:"Whether the request should also return from wallet balance",type:"boolean",default:!1},return_to_balance:{$id:"return_to_balance",description:"Whether the request should also return to wallet balance",type:"boolean",default:!1},return_when_not_updated:{$id:"return_when_not_updated",description:"Whether the request should return the transfer object even if it was not updated",type:"boolean",default:!1},metadata_action:{$id:"metadata_action",$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_action"}},$typescript:'{"additionalProperties": false}'},update_transfer_fields:{type:"object",description:"Changes to be made to the transfer",properties:{status:{description:"Status the transfer should be set as. Only pending transfers can be updated",default:"finished",$ref:"/db/consts.schema.json#/definitions/TransferStatus"},metadata:{$ref:"/db/transfer/transfer.schema.json#/properties/metadata"},extend_metadata:{$ref:"/db/transfer/transfer.schema.json#/properties/metadata"},updated_at:{$ref:"/db/transfer/transfer.schema.json#/properties/updated_at"}},default:{status:"finished"},additionalProperties:!1}},required:["transfer"],additionalProperties:!1};var Fi={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateTransferTxOutput",title:"UpdateTransferTxOutput",description:"Output of updateTransfer",type:"object",properties:{transfer:{description:"Updated transfer object",$ref:"/txs/get-transfer/get-transfer.schema.output.json#/definitions/transfer"},updated:{description:"Boolean showing if the transfer was updated",type:"boolean"},from_balance:{description:"Debited wallet balance",$ref:"/txs/get-balance/get-balance.schema.output.json#/definitions/balance"},to_balance:{description:"Credited wallet balance",$ref:"/txs/get-balance/get-balance.schema.output.json#/definitions/balance"}},additionalProperties:!1};var xi={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateTransferGroupTxInput",title:"UpdateTransferGroupTxInput",description:"Input for updateTransferGroup",type:"object",properties:{transfer_group:{$ref:"/txs/get-transfer-group/get-transfer-group.schema.input.json#/definitions/unique_transfer_group_filter"},update:{$ref:"#/definitions/update_transfer_group_data"},options:{$ref:"#/definitions/update_transfer_group_tx_options"}},definitions:{update_transfer_group_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options_without_tx"},{$ref:"#/definitions/update_transfer_group_additional_options"}]},update_transfer_group_additional_options:{description:"Optional flags for input",type:"object",default:{},properties:{return_transfers:{description:"Should the update return all transfers belonging to group",type:"boolean"},return_when_not_updated:{$id:"return_to_balance",description:"Whether the request should return the transfer_group object even if it was not updated",type:"boolean",default:!1},metadata_action:{$id:"metadata_action",$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_action"},transfer_metadata_action:{$id:"transfer_metadata_action",$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_action"}},$typescript:'{"additionalProperties": false}'},update_transfer_group_data:{description:"Changes to be made to the transfer_group",anyOf:[{$ref:"#/definitions/update_transfer_group_status"},{$ref:"#/definitions/update_transfer_group_transfer_status"},{$ref:"#/definitions/update_transfer_group_metadata"}]},update_transfer_group_status:{type:"object",properties:{status:{description:"Lifecycle status of the TransferGroup",$ref:"/db/consts.schema.json#/definitions/TransferGroupStatus"},transfer_status:{description:"Status all the transfers should be set at.",$ref:"/db/consts.schema.json#/definitions/TransferStatus"},metadata:{description:"Key value object to be replaced or extended with existing TransferGroup metadata",$ref:"/db/transfer/transfer.schema.json#/properties/metadata"},transfer_metadata:{description:"Key value object to be replaced or extended with existing Transfer metadata",$ref:"/db/transfer/transfer.schema.json#/properties/metadata"}},required:["status"],additionalProperties:!1},update_transfer_group_transfer_status:{type:"object",properties:{status:{description:"Lifecycle status of the TransferGroup",$ref:"/db/consts.schema.json#/definitions/TransferGroupStatus"},transfer_status:{description:"Status all the transfers should be set at. Changing transfer_status will also close the group",$ref:"/db/consts.schema.json#/definitions/TransferStatus"},metadata:{description:"Key value object to be replaced or extended with existing TransferGroup metadata",$ref:"/db/transfer/transfer.schema.json#/properties/metadata"},transfer_metadata:{description:"Key value object to be replaced or extended with existing Transfer metadata",$ref:"/db/transfer/transfer.schema.json#/properties/metadata"}},required:["transfer_status"],additionalProperties:!1},update_transfer_group_metadata:{type:"object",properties:{status:{description:"Lifecycle status of the TransferGroup",$ref:"/db/consts.schema.json#/definitions/TransferGroupStatus"},transfer_status:{description:"Status all the transfers should be set at.",$ref:"/db/consts.schema.json#/definitions/TransferStatus"},metadata:{description:"Key value object to be replaced or extended with existing TransferGroup metadata",$ref:"/db/transfer/transfer.schema.json#/properties/metadata"},transfer_metadata:{description:"Key value object to be replaced or extended with existing Transfer metadata",$ref:"/db/transfer/transfer.schema.json#/properties/metadata"}},required:["metadata"],additionalProperties:!1}},required:["transfer_group"],additionalProperties:!1};var $i={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateTransferGroupTxOutput",title:"UpdateTransferGroupTxOutput",description:"Output of updateTransferGroup",type:"object",properties:{transfer_group:{$ref:"/db/transfer-group/transfer-group.schema.json"},updated:{description:"Boolean showing if the transfer_group was updated",type:"boolean"},transfers:{description:"Updated transfers",type:"array",items:{$ref:"/txs/get-transfer/get-transfer.schema.output.json#/definitions/transfer"}}},additionalProperties:!1};var Oi={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateTransferGroupManyTxInput",title:"UpdateTransferGroupManyTxInput",description:"Input for updateTransferGroupMany",type:"object",properties:{transfer_group:{$ref:"/txs/find-transfer-group-many/find-transfer-group-many.schema.input.json#/definitions/find_transfer_group_many_filter"},update:{$ref:"/txs/update-transfer-group/update-transfer-group.schema.input.json#/definitions/update_transfer_group_data"},options:{$ref:"/txs/update-transfer-group/update-transfer-group.schema.input.json#/definitions/update_transfer_group_tx_options"}},definitions:{update_transfer_group_many_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/update_transfer_group_many_additional_options"}]},update_transfer_group_many_additional_options:{description:"Optional flags for input",type:"object",default:{},$typescript:'{"additionalProperties":false}'}},required:["transfer_group"],additionalProperties:!1};var wi={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateTransferGroupManyTxOutput",title:"UpdateTransferGroupManyTxOutput",description:"Output of updateTransferGroupMany",type:"object",properties:{transfer_groups:{description:"Updated transfer groups",type:"array",items:{$ref:"/db/transfer-group/transfer-group.schema.json"}},updated:{description:"Boolean showing if the transfer_group was updated",type:"boolean"},transfers:{description:"Updated transfers",type:"array",items:{$ref:"/txs/get-transfer/get-transfer.schema.output.json#/definitions/transfer"}}},required:["transfer_groups"],additionalProperties:!1};var Ii={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateTransferManyTxInput",title:"UpdateTransferManyTxInput",description:"Input for updateTransferMany",type:"object",properties:{transfer:{$ref:"/txs/find-transfer-many/find-transfer-many.schema.input.json#/definitions/find_transfer_many_filter"},update:{$ref:"/txs/update-transfer/update-transfer.schema.input.json#/definitions/update_transfer_fields"},options:{$ref:"#/definitions/update_transfer_many_tx_options"}},definitions:{update_transfer_many_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options_without_tx"},{$ref:"#/definitions/update_transfer_many_additional_options"}]},update_transfer_many_additional_options:{description:"Optional flags for input",type:"object",default:{},properties:{metadata_action:{$id:"metadata_action",$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_action"}},$typescript:'{"additionalProperties": false}'}},required:["transfer","update"],additionalProperties:!1};var ji={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateTransferManyTxOutput",title:"UpdateTransferManyTxOutput",description:"Output of updateTransferMany",type:"object",properties:{transfers:{description:"Updated transfers array",type:"array",items:{$ref:"/txs/get-transfer/get-transfer.schema.output.json#/definitions/transfer"}},updated:{description:"Boolean showing if the transfers were updated",type:"boolean"}},additionalProperties:!1};var vi={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateWalletTxInput",title:"UpdateWalletTxInput",description:"Input for updateWallet",type:"object",properties:{wallet:{$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},update:{$ref:"#/definitions/update_wallet_fields"},options:{$ref:"#/definitions/update_wallet_tx_options"}},definitions:{update_wallet_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/update_wallet_additional_options"}]},update_wallet_additional_options:{description:"Optional flags for input",type:"object",default:{},properties:{return_when_not_updated:{description:"Whether the request should return the wallet object even if it was not updated",type:"boolean",default:!1}},$typescript:'{"additionalProperties":false}'},update_wallet_fields:{type:"object",properties:{metadata:{$ref:"/db/wallet/wallet.schema.json#/properties/metadata"},name:{$ref:"/db/wallet/wallet.schema.json#/properties/name"},status:{$ref:"/db/wallet/wallet.schema.json#/properties/status"}},$typescript:'{"additionalProperties":false}'}},required:["wallet"],additionalProperties:!1};var ki={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateWalletTxOutput",title:"UpdateWalletTxOutput",description:"Output of updateWallet",type:"object",properties:{wallet:{description:"Wallet object",anyOf:[{$ref:"/db/wallet/wallet.schema.json"},{$ref:"/db/wallet/wallet.schema.optional.json"}]},updated:{description:"Boolean showing if the wallet was updated",type:"boolean"}},additionalProperties:!1};var u=new Nc.default({removeAdditional:!0,useDefaults:!0,coerceTypes:!0,formats:{validkey:/^[A-Za-z_][A-Za-z0-9_-]+?$/},strict:!1});u.addFormat("date-time",{validate:Fu});function wd(r,e){if(e!==void 0)return new Re({message:e,data:r})}function Ac(r){return function(e){if(r===void 0)return{isValid:!1,inputCopy:e,error:wd([new Error("Undefined validator")],"Undefined validator")};try{let t=Ai(e),n=r(t),a=n?void 0:r.errors,s=n?void 0:u.errorsText(a),i=wd(a,s);return{isValid:n,inputCopy:t,error:i}}catch(t){return{isValid:!1,inputCopy:e,error:wd([t],t.message)}}}}function m(r,e){let t=JSON.parse(JSON.stringify(r));return Uc(t,e)}function Uc(r,e){return typeof r!="object"||Object.keys(r).forEach(t=>{t==="$ref"&&r.$ref.startsWith("#")?r.$ref=e+r.$ref:r[t]=Uc(r[t],e)}),r}function qc(r,e){let t=m(r,e),n=t.properties.options;return P({$id:t.$id.replace("Input","Options"),definitions:t.definitions},n)}function Bc(r,e){let t=m(r,e),n=t.definitions[r.$allowStreamInput];return P({$id:t.$id.replace("Input","StreamChunk"),definitions:t.definitions},n)}var l={};u.addSchema(m(hd,"/api/jsonrpc/jsonrpc.request.schema.json"),"/api/jsonrpc/jsonrpc.request.schema.json");l.JSONRPCRequest=hd;u.addSchema(m(_d,"/api/jsonrpc/jsonrpc.response.schema.json"),"/api/jsonrpc/jsonrpc.response.schema.json");l.JSONRPCResponse=_d;u.addSchema(m(gd,"/client-options.schema.json"),"/client-options.schema.json");l.ClientOptions=gd;u.addSchema(m(qt,"/db/consts.schema.json"),"/db/consts.schema.json");l.Consts=qt;u.addSchema(m(fn,"/db/token/token.schema.input.json"),"/db/token/token.schema.input.json");l.TokenTableInput=fn;u.addSchema(m(un,"/db/token/token.schema.json"),"/db/token/token.schema.json");l.TokenTable=un;u.addSchema(m(Td,"/db/token/token.schema.optional.json"),"/db/token/token.schema.optional.json");l.TokenTableOptional=Td;u.addSchema(m(ln,"/db/transfer/transfer.schema.input.json"),"/db/transfer/transfer.schema.input.json");l.TransferTableInput=ln;u.addSchema(m(cn,"/db/transfer/transfer.schema.json"),"/db/transfer/transfer.schema.json");l.TransferTable=cn;u.addSchema(m(yd,"/db/transfer/transfer.schema.optional.json"),"/db/transfer/transfer.schema.optional.json");l.TransferTableOptional=yd;u.addSchema(m(mn,"/db/transfer-group/transfer-group.schema.input.json"),"/db/transfer-group/transfer-group.schema.input.json");l.TransferGroupTableInput=mn;u.addSchema(m(hn,"/db/transfer-group/transfer-group.schema.json"),"/db/transfer-group/transfer-group.schema.json");l.TransferGroupTable=hn;u.addSchema(m(bd,"/db/transfer-group/transfer-group.schema.optional.json"),"/db/transfer-group/transfer-group.schema.optional.json");l.TransferGroupTableOptional=bd;u.addSchema(m(_n,"/db/transfer-log/transfer-log.schema.input.json"),"/db/transfer-log/transfer-log.schema.input.json");l.TransferLogTableInput=_n;u.addSchema(m(gn,"/db/transfer-log/transfer-log.schema.json"),"/db/transfer-log/transfer-log.schema.json");l.TransferLogTable=gn;u.addSchema(m(Fd,"/db/transfer-log/transfer-log.schema.optional.json"),"/db/transfer-log/transfer-log.schema.optional.json");l.TransferLogTableOptional=Fd;u.addSchema(m(Tn,"/db/wallet/wallet.schema.input.json"),"/db/wallet/wallet.schema.input.json");l.WalletTableInput=Tn;u.addSchema(m(yn,"/db/wallet/wallet.schema.json"),"/db/wallet/wallet.schema.json");l.WalletTable=yn;u.addSchema(m(xd,"/db/wallet/wallet.schema.optional.json"),"/db/wallet/wallet.schema.optional.json");l.WalletTableOptional=xd;u.addSchema(m(bn,"/db/wallet-token-setting/wallet-token-setting.schema.input.json"),"/db/wallet-token-setting/wallet-token-setting.schema.input.json");l.WalletTokenSettingTableInput=bn;u.addSchema(m(Fn,"/db/wallet-token-setting/wallet-token-setting.schema.json"),"/db/wallet-token-setting/wallet-token-setting.schema.json");l.WalletTokenSettingTable=Fn;u.addSchema(m($d,"/db/wallet-token-setting/wallet-token-setting.schema.optional.json"),"/db/wallet-token-setting/wallet-token-setting.schema.optional.json");l.WalletTokenSettingTableOptional=$d;u.addSchema(m(xn,"/db/wapi-setting/wapi-setting.schema.input.json"),"/db/wapi-setting/wapi-setting.schema.input.json");l.WapiSettingTableInput=xn;u.addSchema(m($n,"/db/wapi-setting/wapi-setting.schema.json"),"/db/wapi-setting/wapi-setting.schema.json");l.WapiSettingTable=$n;u.addSchema(m(Od,"/db/wapi-setting/wapi-setting.schema.optional.json"),"/db/wapi-setting/wapi-setting.schema.optional.json");l.WapiSettingTableOptional=Od;u.addSchema(m(On,"/fns/aggregate-transfers/aggregate-transfers.schema.input.json"),"/fns/aggregate-transfers/aggregate-transfers.schema.input.json");l.AggregateTransfersFnInput=On;u.addSchema(m(wn,"/fns/aggregate-transfers/aggregate-transfers.schema.output.json"),"/fns/aggregate-transfers/aggregate-transfers.schema.output.json");l.AggregateTransfersFnOutput=wn;u.addSchema(m(In,"/fns/create-access-token/create-access-token.schema.input.json"),"/fns/create-access-token/create-access-token.schema.input.json");l.CreateAccessTokenFnInput=In;u.addSchema(m(jn,"/fns/create-access-token/create-access-token.schema.output.json"),"/fns/create-access-token/create-access-token.schema.output.json");l.CreateAccessTokenFnOutput=jn;u.addSchema(m(vn,"/fns/create-contract/create-contract.schema.input.json"),"/fns/create-contract/create-contract.schema.input.json");l.CreateContractFnInput=vn;u.addSchema(m(kn,"/fns/create-contract/create-contract.schema.output.json"),"/fns/create-contract/create-contract.schema.output.json");l.CreateContractFnOutput=kn;u.addSchema(m(Sn,"/fns/create-deposit/create-deposit.schema.input.json"),"/fns/create-deposit/create-deposit.schema.input.json");l.CreateDepositFnInput=Sn;u.addSchema(m(Cn,"/fns/create-deposit/create-deposit.schema.output.json"),"/fns/create-deposit/create-deposit.schema.output.json");l.CreateDepositFnOutput=Cn;u.addSchema(m(Pn,"/fns/create-exchange/create-exchange.schema.input.json"),"/fns/create-exchange/create-exchange.schema.input.json");l.CreateExchangeFnInput=Pn;u.addSchema(m(Gn,"/fns/create-exchange/create-exchange.schema.output.json"),"/fns/create-exchange/create-exchange.schema.output.json");l.CreateExchangeFnOutput=Gn;u.addSchema(m(Dn,"/fns/create-token/create-token.schema.input.json"),"/fns/create-token/create-token.schema.input.json");l.CreateTokenFnInput=Dn;u.addSchema(m(En,"/fns/create-token/create-token.schema.output.json"),"/fns/create-token/create-token.schema.output.json");l.CreateTokenFnOutput=En;u.addSchema(m(Mn,"/fns/create-transfer/create-transfer.schema.input.json"),"/fns/create-transfer/create-transfer.schema.input.json");l.CreateTransferFnInput=Mn;u.addSchema(m(Rn,"/fns/create-transfer/create-transfer.schema.output.json"),"/fns/create-transfer/create-transfer.schema.output.json");l.CreateTransferFnOutput=Rn;u.addSchema(m(Wn,"/fns/create-transfer-group/create-transfer-group.schema.input.json"),"/fns/create-transfer-group/create-transfer-group.schema.input.json");l.CreateTransferGroupFnInput=Wn;u.addSchema(m(An,"/fns/create-transfer-group/create-transfer-group.schema.output.json"),"/fns/create-transfer-group/create-transfer-group.schema.output.json");l.CreateTransferGroupFnOutput=An;u.addSchema(m(Nn,"/fns/create-transfers/create-transfers.schema.input.json"),"/fns/create-transfers/create-transfers.schema.input.json");l.CreateTransfersFnInput=Nn;u.addSchema(m(Un,"/fns/create-transfers/create-transfers.schema.output.json"),"/fns/create-transfers/create-transfers.schema.output.json");l.CreateTransfersFnOutput=Un;u.addSchema(m(qn,"/fns/create-wallet/create-wallet.schema.input.json"),"/fns/create-wallet/create-wallet.schema.input.json");l.CreateWalletFnInput=qn;u.addSchema(m(Bn,"/fns/create-wallet/create-wallet.schema.output.json"),"/fns/create-wallet/create-wallet.schema.output.json");l.CreateWalletFnOutput=Bn;u.addSchema(m(Ln,"/fns/create-withdrawal/create-withdrawal.schema.input.json"),"/fns/create-withdrawal/create-withdrawal.schema.input.json");l.CreateWithdrawalFnInput=Ln;u.addSchema(m(Vn,"/fns/create-withdrawal/create-withdrawal.schema.output.json"),"/fns/create-withdrawal/create-withdrawal.schema.output.json");l.CreateWithdrawalFnOutput=Vn;u.addSchema(m(Hn,"/fns/find-balances/find-balances.schema.input.json"),"/fns/find-balances/find-balances.schema.input.json");l.FindBalancesFnInput=Hn;u.addSchema(m(zn,"/fns/find-balances/find-balances.schema.output.json"),"/fns/find-balances/find-balances.schema.output.json");l.FindBalancesFnOutput=zn;u.addSchema(m(Kn,"/fns/find-tokens/find-tokens.schema.input.json"),"/fns/find-tokens/find-tokens.schema.input.json");l.FindTokensFnInput=Kn;u.addSchema(m(Qn,"/fns/find-tokens/find-tokens.schema.output.json"),"/fns/find-tokens/find-tokens.schema.output.json");l.FindTokensFnOutput=Qn;u.addSchema(m(Jn,"/fns/find-transfer-groups/find-transfer-groups.schema.input.json"),"/fns/find-transfer-groups/find-transfer-groups.schema.input.json");l.FindTransferGroupsFnInput=Jn;u.addSchema(m(Xn,"/fns/find-transfer-groups/find-transfer-groups.schema.output.json"),"/fns/find-transfer-groups/find-transfer-groups.schema.output.json");l.FindTransferGroupsFnOutput=Xn;u.addSchema(m(Yn,"/fns/find-transfers/find-transfers.schema.input.json"),"/fns/find-transfers/find-transfers.schema.input.json");l.FindTransfersFnInput=Yn;u.addSchema(m(Zn,"/fns/find-transfers/find-transfers.schema.output.json"),"/fns/find-transfers/find-transfers.schema.output.json");l.FindTransfersFnOutput=Zn;u.addSchema(m(ea,"/fns/find-wallets/find-wallets.schema.input.json"),"/fns/find-wallets/find-wallets.schema.input.json");l.FindWalletsFnInput=ea;u.addSchema(m(ta,"/fns/find-wallets/find-wallets.schema.output.json"),"/fns/find-wallets/find-wallets.schema.output.json");l.FindWalletsFnOutput=ta;u.addSchema(m(ra,"/fns/fn-consts.schema.json"),"/fns/fn-consts.schema.json");l.FnConsts=ra;u.addSchema(m(na,"/fns/get-balance/get-balance.schema.input.json"),"/fns/get-balance/get-balance.schema.input.json");l.GetBalanceFnInput=na;u.addSchema(m(aa,"/fns/get-balance/get-balance.schema.output.json"),"/fns/get-balance/get-balance.schema.output.json");l.GetBalanceFnOutput=aa;u.addSchema(m(sa,"/fns/get-balance-history/get-balance-history.schema.input.json"),"/fns/get-balance-history/get-balance-history.schema.input.json");l.GetBalanceHistoryFnInput=sa;u.addSchema(m(ia,"/fns/get-balance-history/get-balance-history.schema.output.json"),"/fns/get-balance-history/get-balance-history.schema.output.json");l.GetBalanceHistoryFnOutput=ia;u.addSchema(m(oa,"/fns/get-flags/get-flags.schema.input.json"),"/fns/get-flags/get-flags.schema.input.json");l.GetFlagsFnInput=oa;u.addSchema(m(pa,"/fns/get-flags/get-flags.schema.output.json"),"/fns/get-flags/get-flags.schema.output.json");l.GetFlagsFnOutput=pa;u.addSchema(m(da,"/fns/get-statistics/get-statistics.schema.input.json"),"/fns/get-statistics/get-statistics.schema.input.json");l.GetStatisticsFnInput=da;u.addSchema(m(fa,"/fns/get-statistics/get-statistics.schema.output.json"),"/fns/get-statistics/get-statistics.schema.output.json");l.GetStatisticsFnOutput=fa;u.addSchema(m(ua,"/fns/get-token/get-token.schema.input.json"),"/fns/get-token/get-token.schema.input.json");l.GetTokenFnInput=ua;u.addSchema(m(la,"/fns/get-token/get-token.schema.output.json"),"/fns/get-token/get-token.schema.output.json");l.GetTokenFnOutput=la;u.addSchema(m(ca,"/fns/get-transfer/get-transfer.schema.input.json"),"/fns/get-transfer/get-transfer.schema.input.json");l.GetTransferFnInput=ca;u.addSchema(m(ma,"/fns/get-transfer/get-transfer.schema.output.json"),"/fns/get-transfer/get-transfer.schema.output.json");l.GetTransferFnOutput=ma;u.addSchema(m(ha,"/fns/get-transfer-group/get-transfer-group.schema.input.json"),"/fns/get-transfer-group/get-transfer-group.schema.input.json");l.GetTransferGroupFnInput=ha;u.addSchema(m(_a,"/fns/get-transfer-group/get-transfer-group.schema.output.json"),"/fns/get-transfer-group/get-transfer-group.schema.output.json");l.GetTransferGroupFnOutput=_a;u.addSchema(m(ga,"/fns/get-wallet/get-wallet.schema.input.json"),"/fns/get-wallet/get-wallet.schema.input.json");l.GetWalletFnInput=ga;u.addSchema(m(Ta,"/fns/get-wallet/get-wallet.schema.output.json"),"/fns/get-wallet/get-wallet.schema.output.json");l.GetWalletFnOutput=Ta;u.addSchema(m(Bt,"/fns/import-data/import-data.schema.input.json"),"/fns/import-data/import-data.schema.input.json");l.ImportDataFnInput=Bt;var Lc=qc(Bt,"/fns/import-data/import-data.schema.input.json");u.addSchema(Lc,"/fns/import-data/import-data.schema.options.json");l.ImportDataFnOptions=Lc;var Vc=Bc(Bt,"/fns/import-data/import-data.schema.input.json");u.addSchema(Vc,"/fns/import-data/import-data.schema.chunk.json");l.ImportDataFnStreamChunk=Vc;u.addSchema(m(ya,"/fns/import-data/import-data.schema.output.json"),"/fns/import-data/import-data.schema.output.json");l.ImportDataFnOutput=ya;u.addSchema(m(ba,"/fns/reverse-transfer/reverse-transfer.schema.input.json"),"/fns/reverse-transfer/reverse-transfer.schema.input.json");l.ReverseTransferFnInput=ba;u.addSchema(m(Fa,"/fns/reverse-transfer/reverse-transfer.schema.output.json"),"/fns/reverse-transfer/reverse-transfer.schema.output.json");l.ReverseTransferFnOutput=Fa;u.addSchema(m(xa,"/fns/reverse-transfer-group/reverse-transfer-group.schema.input.json"),"/fns/reverse-transfer-group/reverse-transfer-group.schema.input.json");l.ReverseTransferGroupFnInput=xa;u.addSchema(m($a,"/fns/reverse-transfer-group/reverse-transfer-group.schema.output.json"),"/fns/reverse-transfer-group/reverse-transfer-group.schema.output.json");l.ReverseTransferGroupFnOutput=$a;u.addSchema(m(Oa,"/fns/reverse-transfers/reverse-transfers.schema.input.json"),"/fns/reverse-transfers/reverse-transfers.schema.input.json");l.ReverseTransfersFnInput=Oa;u.addSchema(m(wa,"/fns/reverse-transfers/reverse-transfers.schema.output.json"),"/fns/reverse-transfers/reverse-transfers.schema.output.json");l.ReverseTransfersFnOutput=wa;u.addSchema(m(Ia,"/fns/set-flags/set-flags.schema.input.json"),"/fns/set-flags/set-flags.schema.input.json");l.SetFlagsFnInput=Ia;u.addSchema(m(ja,"/fns/set-flags/set-flags.schema.output.json"),"/fns/set-flags/set-flags.schema.output.json");l.SetFlagsFnOutput=ja;u.addSchema(m(va,"/fns/update-token/update-token.schema.input.json"),"/fns/update-token/update-token.schema.input.json");l.UpdateTokenFnInput=va;u.addSchema(m(ka,"/fns/update-token/update-token.schema.output.json"),"/fns/update-token/update-token.schema.output.json");l.UpdateTokenFnOutput=ka;u.addSchema(m(Sa,"/fns/update-transfer/update-transfer.schema.input.json"),"/fns/update-transfer/update-transfer.schema.input.json");l.UpdateTransferFnInput=Sa;u.addSchema(m(Ca,"/fns/update-transfer/update-transfer.schema.output.json"),"/fns/update-transfer/update-transfer.schema.output.json");l.UpdateTransferFnOutput=Ca;u.addSchema(m(Pa,"/fns/update-transfer-group/update-transfer-group.schema.input.json"),"/fns/update-transfer-group/update-transfer-group.schema.input.json");l.UpdateTransferGroupFnInput=Pa;u.addSchema(m(Ga,"/fns/update-transfer-group/update-transfer-group.schema.output.json"),"/fns/update-transfer-group/update-transfer-group.schema.output.json");l.UpdateTransferGroupFnOutput=Ga;u.addSchema(m(Da,"/fns/update-transfer-groups/update-transfer-groups.schema.input.json"),"/fns/update-transfer-groups/update-transfer-groups.schema.input.json");l.UpdateTransferGroupsFnInput=Da;u.addSchema(m(Ea,"/fns/update-transfer-groups/update-transfer-groups.schema.output.json"),"/fns/update-transfer-groups/update-transfer-groups.schema.output.json");l.UpdateTransferGroupsFnOutput=Ea;u.addSchema(m(Ma,"/fns/update-transfers/update-transfers.schema.input.json"),"/fns/update-transfers/update-transfers.schema.input.json");l.UpdateTransfersFnInput=Ma;u.addSchema(m(Ra,"/fns/update-transfers/update-transfers.schema.output.json"),"/fns/update-transfers/update-transfers.schema.output.json");l.UpdateTransfersFnOutput=Ra;u.addSchema(m(Wa,"/fns/update-wallet/update-wallet.schema.input.json"),"/fns/update-wallet/update-wallet.schema.input.json");l.UpdateWalletFnInput=Wa;u.addSchema(m(Aa,"/fns/update-wallet/update-wallet.schema.output.json"),"/fns/update-wallet/update-wallet.schema.output.json");l.UpdateWalletFnOutput=Aa;u.addSchema(m(Na,"/txs/aggregate-transfer-many/aggregate-transfer-many.schema.input.json"),"/txs/aggregate-transfer-many/aggregate-transfer-many.schema.input.json");l.AggregateTransferManyTxInput=Na;u.addSchema(m(Ua,"/txs/aggregate-transfer-many/aggregate-transfer-many.schema.output.json"),"/txs/aggregate-transfer-many/aggregate-transfer-many.schema.output.json");l.AggregateTransferManyTxOutput=Ua;u.addSchema(m(qa,"/txs/authentication-check/authentication-check.schema.input.json"),"/txs/authentication-check/authentication-check.schema.input.json");l.AuthenticationCheckTxInput=qa;u.addSchema(m(Ba,"/txs/authentication-check/authentication-check.schema.output.json"),"/txs/authentication-check/authentication-check.schema.output.json");l.AuthenticationCheckTxOutput=Ba;u.addSchema(m(La,"/txs/create-access-token/create-access-token.schema.input.json"),"/txs/create-access-token/create-access-token.schema.input.json");l.CreateAccessTokenTxInput=La;u.addSchema(m(Va,"/txs/create-access-token/create-access-token.schema.output.json"),"/txs/create-access-token/create-access-token.schema.output.json");l.CreateAccessTokenTxOutput=Va;u.addSchema(m(Ha,"/txs/create-contract/create-contract.schema.input.json"),"/txs/create-contract/create-contract.schema.input.json");l.CreateContractTxInput=Ha;u.addSchema(m(za,"/txs/create-contract/create-contract.schema.output.json"),"/txs/create-contract/create-contract.schema.output.json");l.CreateContractTxOutput=za;u.addSchema(m(Ka,"/txs/create-deposit/create-deposit.schema.input.json"),"/txs/create-deposit/create-deposit.schema.input.json");l.CreateDepositTxInput=Ka;u.addSchema(m(Qa,"/txs/create-deposit/create-deposit.schema.output.json"),"/txs/create-deposit/create-deposit.schema.output.json");l.CreateDepositTxOutput=Qa;u.addSchema(m(Ja,"/txs/create-distribution/create-distribution.schema.input.json"),"/txs/create-distribution/create-distribution.schema.input.json");l.CreateDistributionTxInput=Ja;u.addSchema(m(Xa,"/txs/create-distribution/create-distribution.schema.output.json"),"/txs/create-distribution/create-distribution.schema.output.json");l.CreateDistributionTxOutput=Xa;u.addSchema(m(Ya,"/txs/create-token/create-token.schema.input.json"),"/txs/create-token/create-token.schema.input.json");l.CreateTokenTxInput=Ya;u.addSchema(m(Za,"/txs/create-token/create-token.schema.output.json"),"/txs/create-token/create-token.schema.output.json");l.CreateTokenTxOutput=Za;u.addSchema(m(es,"/txs/create-transfer/create-transfer.schema.input.json"),"/txs/create-transfer/create-transfer.schema.input.json");l.CreateTransferTxInput=es;u.addSchema(m(ts,"/txs/create-transfer/create-transfer.schema.output.json"),"/txs/create-transfer/create-transfer.schema.output.json");l.CreateTransferTxOutput=ts;u.addSchema(m(rs,"/txs/create-transfer-group/create-transfer-group.schema.input.json"),"/txs/create-transfer-group/create-transfer-group.schema.input.json");l.CreateTransferGroupTxInput=rs;u.addSchema(m(ns,"/txs/create-transfer-group/create-transfer-group.schema.output.json"),"/txs/create-transfer-group/create-transfer-group.schema.output.json");l.CreateTransferGroupTxOutput=ns;u.addSchema(m(as,"/txs/create-transfer-many/create-transfer-many.schema.input.json"),"/txs/create-transfer-many/create-transfer-many.schema.input.json");l.CreateTransferManyTxInput=as;u.addSchema(m(ss,"/txs/create-transfer-many/create-transfer-many.schema.output.json"),"/txs/create-transfer-many/create-transfer-many.schema.output.json");l.CreateTransferManyTxOutput=ss;u.addSchema(m(is,"/txs/create-wallet/create-wallet.schema.input.json"),"/txs/create-wallet/create-wallet.schema.input.json");l.CreateWalletTxInput=is;u.addSchema(m(os,"/txs/create-wallet/create-wallet.schema.output.json"),"/txs/create-wallet/create-wallet.schema.output.json");l.CreateWalletTxOutput=os;u.addSchema(m(ps,"/txs/create-withdrawal/create-withdrawal.schema.input.json"),"/txs/create-withdrawal/create-withdrawal.schema.input.json");l.CreateWithdrawalTxInput=ps;u.addSchema(m(ds,"/txs/create-withdrawal/create-withdrawal.schema.output.json"),"/txs/create-withdrawal/create-withdrawal.schema.output.json");l.CreateWithdrawalTxOutput=ds;u.addSchema(m(fs,"/txs/export-database/export-database.schema.input.json"),"/txs/export-database/export-database.schema.input.json");l.ExportDatabaseTxInput=fs;u.addSchema(m(us,"/txs/export-database/export-database.schema.output.json"),"/txs/export-database/export-database.schema.output.json");l.ExportDatabaseTxOutput=us;u.addSchema(m(ls,"/txs/find-balance-many/find-balance-many.schema.input.json"),"/txs/find-balance-many/find-balance-many.schema.input.json");l.FindBalanceManyTxInput=ls;u.addSchema(m(cs,"/txs/find-balance-many/find-balance-many.schema.output.json"),"/txs/find-balance-many/find-balance-many.schema.output.json");l.FindBalanceManyTxOutput=cs;u.addSchema(m(ms,"/txs/find-token-many/find-token-many.schema.input.json"),"/txs/find-token-many/find-token-many.schema.input.json");l.FindTokenManyTxInput=ms;u.addSchema(m(hs,"/txs/find-token-many/find-token-many.schema.output.json"),"/txs/find-token-many/find-token-many.schema.output.json");l.FindTokenManyTxOutput=hs;u.addSchema(m(_s,"/txs/find-transfer-group-many/find-transfer-group-many.schema.input.json"),"/txs/find-transfer-group-many/find-transfer-group-many.schema.input.json");l.FindTransferGroupManyTxInput=_s;u.addSchema(m(gs,"/txs/find-transfer-group-many/find-transfer-group-many.schema.output.json"),"/txs/find-transfer-group-many/find-transfer-group-many.schema.output.json");l.FindTransferGroupManyTxOutput=gs;u.addSchema(m(Ts,"/txs/find-transfer-many/find-transfer-many.schema.input.json"),"/txs/find-transfer-many/find-transfer-many.schema.input.json");l.FindTransferManyTxInput=Ts;u.addSchema(m(ys,"/txs/find-transfer-many/find-transfer-many.schema.output.json"),"/txs/find-transfer-many/find-transfer-many.schema.output.json");l.FindTransferManyTxOutput=ys;u.addSchema(m(bs,"/txs/find-wallet-many/find-wallet-many.schema.input.json"),"/txs/find-wallet-many/find-wallet-many.schema.input.json");l.FindWalletManyTxInput=bs;u.addSchema(m(Fs,"/txs/find-wallet-many/find-wallet-many.schema.output.json"),"/txs/find-wallet-many/find-wallet-many.schema.output.json");l.FindWalletManyTxOutput=Fs;u.addSchema(m(xs,"/txs/finish-transaction/finish-transaction.schema.input.json"),"/txs/finish-transaction/finish-transaction.schema.input.json");l.FinishTransactionTxInput=xs;u.addSchema(m($s,"/txs/finish-transaction/finish-transaction.schema.output.json"),"/txs/finish-transaction/finish-transaction.schema.output.json");l.FinishTransactionTxOutput=$s;u.addSchema(m(Os,"/txs/get-balance/get-balance.schema.input.json"),"/txs/get-balance/get-balance.schema.input.json");l.GetBalanceTxInput=Os;u.addSchema(m(ws,"/txs/get-balance/get-balance.schema.output.json"),"/txs/get-balance/get-balance.schema.output.json");l.GetBalanceTxOutput=ws;u.addSchema(m(Is,"/txs/get-balance-history/get-balance-history.schema.input.json"),"/txs/get-balance-history/get-balance-history.schema.input.json");l.GetBalanceHistoryTxInput=Is;u.addSchema(m(js,"/txs/get-balance-history/get-balance-history.schema.output.json"),"/txs/get-balance-history/get-balance-history.schema.output.json");l.GetBalanceHistoryTxOutput=js;u.addSchema(m(vs,"/txs/get-database-export-progress/get-database-export-progress.schema.input.json"),"/txs/get-database-export-progress/get-database-export-progress.schema.input.json");l.GetDatabaseExportProgressTxInput=vs;u.addSchema(m(ks,"/txs/get-database-export-progress/get-database-export-progress.schema.output.json"),"/txs/get-database-export-progress/get-database-export-progress.schema.output.json");l.GetDatabaseExportProgressTxOutput=ks;u.addSchema(m(Ss,"/txs/get-database-import-progress/get-database-import-progress.schema.input.json"),"/txs/get-database-import-progress/get-database-import-progress.schema.input.json");l.GetDatabaseImportProgressTxInput=Ss;u.addSchema(m(Cs,"/txs/get-database-import-progress/get-database-import-progress.schema.output.json"),"/txs/get-database-import-progress/get-database-import-progress.schema.output.json");l.GetDatabaseImportProgressTxOutput=Cs;u.addSchema(m(Ps,"/txs/get-flags/get-flags.schema.input.json"),"/txs/get-flags/get-flags.schema.input.json");l.GetFlagsTxInput=Ps;u.addSchema(m(Gs,"/txs/get-flags/get-flags.schema.output.json"),"/txs/get-flags/get-flags.schema.output.json");l.GetFlagsTxOutput=Gs;u.addSchema(m(Ds,"/txs/get-statistics/get-statistics.schema.input.json"),"/txs/get-statistics/get-statistics.schema.input.json");l.GetStatisticsTxInput=Ds;u.addSchema(m(Es,"/txs/get-statistics/get-statistics.schema.output.json"),"/txs/get-statistics/get-statistics.schema.output.json");l.GetStatisticsTxOutput=Es;u.addSchema(m(Ms,"/txs/get-token/get-token.schema.input.json"),"/txs/get-token/get-token.schema.input.json");l.GetTokenTxInput=Ms;u.addSchema(m(Rs,"/txs/get-token/get-token.schema.output.json"),"/txs/get-token/get-token.schema.output.json");l.GetTokenTxOutput=Rs;u.addSchema(m(Ws,"/txs/get-token-many/get-token-many.schema.input.json"),"/txs/get-token-many/get-token-many.schema.input.json");l.GetTokenManyTxInput=Ws;u.addSchema(m(As,"/txs/get-token-many/get-token-many.schema.output.json"),"/txs/get-token-many/get-token-many.schema.output.json");l.GetTokenManyTxOutput=As;u.addSchema(m(Ns,"/txs/get-transfer/get-transfer.schema.input.json"),"/txs/get-transfer/get-transfer.schema.input.json");l.GetTransferTxInput=Ns;u.addSchema(m(Us,"/txs/get-transfer/get-transfer.schema.output.json"),"/txs/get-transfer/get-transfer.schema.output.json");l.GetTransferTxOutput=Us;u.addSchema(m(qs,"/txs/get-transfer-group/get-transfer-group.schema.input.json"),"/txs/get-transfer-group/get-transfer-group.schema.input.json");l.GetTransferGroupTxInput=qs;u.addSchema(m(Bs,"/txs/get-transfer-group/get-transfer-group.schema.output.json"),"/txs/get-transfer-group/get-transfer-group.schema.output.json");l.GetTransferGroupTxOutput=Bs;u.addSchema(m(Ls,"/txs/get-wallet/get-wallet.schema.input.json"),"/txs/get-wallet/get-wallet.schema.input.json");l.GetWalletTxInput=Ls;u.addSchema(m(Vs,"/txs/get-wallet/get-wallet.schema.output.json"),"/txs/get-wallet/get-wallet.schema.output.json");l.GetWalletTxOutput=Vs;u.addSchema(m(Hs,"/txs/get-wallet-many/get-wallet-many.schema.input.json"),"/txs/get-wallet-many/get-wallet-many.schema.input.json");l.GetWalletManyTxInput=Hs;u.addSchema(m(zs,"/txs/get-wallet-many/get-wallet-many.schema.output.json"),"/txs/get-wallet-many/get-wallet-many.schema.output.json");l.GetWalletManyTxOutput=zs;u.addSchema(m(Lt,"/txs/import-actions/import-actions.schema.input.json"),"/txs/import-actions/import-actions.schema.input.json");l.ImportActionsTxInput=Lt;var Hc=qc(Lt,"/txs/import-actions/import-actions.schema.input.json");u.addSchema(Hc,"/txs/import-actions/import-actions.schema.options.json");l.ImportActionsTxOptions=Hc;var zc=Bc(Lt,"/txs/import-actions/import-actions.schema.input.json");u.addSchema(zc,"/txs/import-actions/import-actions.schema.chunk.json");l.ImportActionsTxStreamChunk=zc;u.addSchema(m(Ks,"/txs/import-actions/import-actions.schema.output.json"),"/txs/import-actions/import-actions.schema.output.json");l.ImportActionsTxOutput=Ks;u.addSchema(m(Qs,"/txs/import-database/import-database.schema.input.json"),"/txs/import-database/import-database.schema.input.json");l.ImportDatabaseTxInput=Qs;u.addSchema(m(Js,"/txs/import-database/import-database.schema.output.json"),"/txs/import-database/import-database.schema.output.json");l.ImportDatabaseTxOutput=Js;u.addSchema(m(Xs,"/txs/list-database-exports/list-database-exports.schema.input.json"),"/txs/list-database-exports/list-database-exports.schema.input.json");l.ListDatabaseExportsTxInput=Xs;u.addSchema(m(Ys,"/txs/list-database-exports/list-database-exports.schema.output.json"),"/txs/list-database-exports/list-database-exports.schema.output.json");l.ListDatabaseExportsTxOutput=Ys;u.addSchema(m(Zs,"/txs/query/query.schema.input.json"),"/txs/query/query.schema.input.json");l.QueryTxInput=Zs;u.addSchema(m(ei,"/txs/query/query.schema.output.json"),"/txs/query/query.schema.output.json");l.QueryTxOutput=ei;u.addSchema(m(ti,"/txs/query-logs/query-logs.schema.input.json"),"/txs/query-logs/query-logs.schema.input.json");l.QueryLogsTxInput=ti;u.addSchema(m(ri,"/txs/query-logs/query-logs.schema.output.json"),"/txs/query-logs/query-logs.schema.output.json");l.QueryLogsTxOutput=ri;u.addSchema(m(ni,"/txs/reset-database/reset-database.schema.input.json"),"/txs/reset-database/reset-database.schema.input.json");l.ResetDatabaseTxInput=ni;u.addSchema(m(ai,"/txs/reset-database/reset-database.schema.output.json"),"/txs/reset-database/reset-database.schema.output.json");l.ResetDatabaseTxOutput=ai;u.addSchema(m(si,"/txs/reverse-transfer/reverse-transfer.schema.input.json"),"/txs/reverse-transfer/reverse-transfer.schema.input.json");l.ReverseTransferTxInput=si;u.addSchema(m(ii,"/txs/reverse-transfer/reverse-transfer.schema.output.json"),"/txs/reverse-transfer/reverse-transfer.schema.output.json");l.ReverseTransferTxOutput=ii;u.addSchema(m(oi,"/txs/reverse-transfer-group/reverse-transfer-group.schema.input.json"),"/txs/reverse-transfer-group/reverse-transfer-group.schema.input.json");l.ReverseTransferGroupTxInput=oi;u.addSchema(m(pi,"/txs/reverse-transfer-group/reverse-transfer-group.schema.output.json"),"/txs/reverse-transfer-group/reverse-transfer-group.schema.output.json");l.ReverseTransferGroupTxOutput=pi;u.addSchema(m(di,"/txs/reverse-transfer-group-many/reverse-transfer-group-many.schema.input.json"),"/txs/reverse-transfer-group-many/reverse-transfer-group-many.schema.input.json");l.ReverseTransferGroupManyTxInput=di;u.addSchema(m(fi,"/txs/reverse-transfer-group-many/reverse-transfer-group-many.schema.output.json"),"/txs/reverse-transfer-group-many/reverse-transfer-group-many.schema.output.json");l.ReverseTransferGroupManyTxOutput=fi;u.addSchema(m(ui,"/txs/reverse-transfer-many/reverse-transfer-many.schema.input.json"),"/txs/reverse-transfer-many/reverse-transfer-many.schema.input.json");l.ReverseTransferManyTxInput=ui;u.addSchema(m(li,"/txs/reverse-transfer-many/reverse-transfer-many.schema.output.json"),"/txs/reverse-transfer-many/reverse-transfer-many.schema.output.json");l.ReverseTransferManyTxOutput=li;u.addSchema(m(ci,"/txs/set-flags/set-flags.schema.input.json"),"/txs/set-flags/set-flags.schema.input.json");l.SetFlagsTxInput=ci;u.addSchema(m(mi,"/txs/set-flags/set-flags.schema.output.json"),"/txs/set-flags/set-flags.schema.output.json");l.SetFlagsTxOutput=mi;u.addSchema(m(hi,"/txs/start-transaction/start-transaction.schema.input.json"),"/txs/start-transaction/start-transaction.schema.input.json");l.StartTransactionTxInput=hi;u.addSchema(m(_i,"/txs/start-transaction/start-transaction.schema.output.json"),"/txs/start-transaction/start-transaction.schema.output.json");l.StartTransactionTxOutput=_i;u.addSchema(m(gi,"/txs/tx-consts.schema.json"),"/txs/tx-consts.schema.json");l.TxConsts=gi;u.addSchema(m(Ti,"/txs/update-token/update-token.schema.input.json"),"/txs/update-token/update-token.schema.input.json");l.UpdateTokenTxInput=Ti;u.addSchema(m(yi,"/txs/update-token/update-token.schema.output.json"),"/txs/update-token/update-token.schema.output.json");l.UpdateTokenTxOutput=yi;u.addSchema(m(bi,"/txs/update-transfer/update-transfer.schema.input.json"),"/txs/update-transfer/update-transfer.schema.input.json");l.UpdateTransferTxInput=bi;u.addSchema(m(Fi,"/txs/update-transfer/update-transfer.schema.output.json"),"/txs/update-transfer/update-transfer.schema.output.json");l.UpdateTransferTxOutput=Fi;u.addSchema(m(xi,"/txs/update-transfer-group/update-transfer-group.schema.input.json"),"/txs/update-transfer-group/update-transfer-group.schema.input.json");l.UpdateTransferGroupTxInput=xi;u.addSchema(m($i,"/txs/update-transfer-group/update-transfer-group.schema.output.json"),"/txs/update-transfer-group/update-transfer-group.schema.output.json");l.UpdateTransferGroupTxOutput=$i;u.addSchema(m(Oi,"/txs/update-transfer-group-many/update-transfer-group-many.schema.input.json"),"/txs/update-transfer-group-many/update-transfer-group-many.schema.input.json");l.UpdateTransferGroupManyTxInput=Oi;u.addSchema(m(wi,"/txs/update-transfer-group-many/update-transfer-group-many.schema.output.json"),"/txs/update-transfer-group-many/update-transfer-group-many.schema.output.json");l.UpdateTransferGroupManyTxOutput=wi;u.addSchema(m(Ii,"/txs/update-transfer-many/update-transfer-many.schema.input.json"),"/txs/update-transfer-many/update-transfer-many.schema.input.json");l.UpdateTransferManyTxInput=Ii;u.addSchema(m(ji,"/txs/update-transfer-many/update-transfer-many.schema.output.json"),"/txs/update-transfer-many/update-transfer-many.schema.output.json");l.UpdateTransferManyTxOutput=ji;u.addSchema(m(vi,"/txs/update-wallet/update-wallet.schema.input.json"),"/txs/update-wallet/update-wallet.schema.input.json");l.UpdateWalletTxInput=vi;u.addSchema(m(ki,"/txs/update-wallet/update-wallet.schema.output.json"),"/txs/update-wallet/update-wallet.schema.output.json");l.UpdateWalletTxOutput=ki;var U=(c=>(c.JSONRPCRequest="JSONRPCRequest",c.JSONRPCResponse="JSONRPCResponse",c.ClientOptions="ClientOptions",c.Consts="Consts",c.TokenTableInput="TokenTableInput",c.TokenTable="TokenTable",c.TokenTableOptional="TokenTableOptional",c.TransferTableInput="TransferTableInput",c.TransferTable="TransferTable",c.TransferTableOptional="TransferTableOptional",c.TransferGroupTableInput="TransferGroupTableInput",c.TransferGroupTable="TransferGroupTable",c.TransferGroupTableOptional="TransferGroupTableOptional",c.TransferLogTableInput="TransferLogTableInput",c.TransferLogTable="TransferLogTable",c.TransferLogTableOptional="TransferLogTableOptional",c.WalletTableInput="WalletTableInput",c.WalletTable="WalletTable",c.WalletTableOptional="WalletTableOptional",c.WalletTokenSettingTableInput="WalletTokenSettingTableInput",c.WalletTokenSettingTable="WalletTokenSettingTable",c.WalletTokenSettingTableOptional="WalletTokenSettingTableOptional",c.WapiSettingTableInput="WapiSettingTableInput",c.WapiSettingTable="WapiSettingTable",c.WapiSettingTableOptional="WapiSettingTableOptional",c.AggregateTransfersFnInput="AggregateTransfersFnInput",c.AggregateTransfersFnOutput="AggregateTransfersFnOutput",c.CreateAccessTokenFnInput="CreateAccessTokenFnInput",c.CreateAccessTokenFnOutput="CreateAccessTokenFnOutput",c.CreateContractFnInput="CreateContractFnInput",c.CreateContractFnOutput="CreateContractFnOutput",c.CreateDepositFnInput="CreateDepositFnInput",c.CreateDepositFnOutput="CreateDepositFnOutput",c.CreateExchangeFnInput="CreateExchangeFnInput",c.CreateExchangeFnOutput="CreateExchangeFnOutput",c.CreateTokenFnInput="CreateTokenFnInput",c.CreateTokenFnOutput="CreateTokenFnOutput",c.CreateTransferFnInput="CreateTransferFnInput",c.CreateTransferFnOutput="CreateTransferFnOutput",c.CreateTransferGroupFnInput="CreateTransferGroupFnInput",c.CreateTransferGroupFnOutput="CreateTransferGroupFnOutput",c.CreateTransfersFnInput="CreateTransfersFnInput",c.CreateTransfersFnOutput="CreateTransfersFnOutput",c.CreateWalletFnInput="CreateWalletFnInput",c.CreateWalletFnOutput="CreateWalletFnOutput",c.CreateWithdrawalFnInput="CreateWithdrawalFnInput",c.CreateWithdrawalFnOutput="CreateWithdrawalFnOutput",c.FindBalancesFnInput="FindBalancesFnInput",c.FindBalancesFnOutput="FindBalancesFnOutput",c.FindTokensFnInput="FindTokensFnInput",c.FindTokensFnOutput="FindTokensFnOutput",c.FindTransferGroupsFnInput="FindTransferGroupsFnInput",c.FindTransferGroupsFnOutput="FindTransferGroupsFnOutput",c.FindTransfersFnInput="FindTransfersFnInput",c.FindTransfersFnOutput="FindTransfersFnOutput",c.FindWalletsFnInput="FindWalletsFnInput",c.FindWalletsFnOutput="FindWalletsFnOutput",c.FnConsts="FnConsts",c.GetBalanceFnInput="GetBalanceFnInput",c.GetBalanceFnOutput="GetBalanceFnOutput",c.GetBalanceHistoryFnInput="GetBalanceHistoryFnInput",c.GetBalanceHistoryFnOutput="GetBalanceHistoryFnOutput",c.GetFlagsFnInput="GetFlagsFnInput",c.GetFlagsFnOutput="GetFlagsFnOutput",c.GetStatisticsFnInput="GetStatisticsFnInput",c.GetStatisticsFnOutput="GetStatisticsFnOutput",c.GetTokenFnInput="GetTokenFnInput",c.GetTokenFnOutput="GetTokenFnOutput",c.GetTransferFnInput="GetTransferFnInput",c.GetTransferFnOutput="GetTransferFnOutput",c.GetTransferGroupFnInput="GetTransferGroupFnInput",c.GetTransferGroupFnOutput="GetTransferGroupFnOutput",c.GetWalletFnInput="GetWalletFnInput",c.GetWalletFnOutput="GetWalletFnOutput",c.ImportDataFnInput="ImportDataFnInput",c.ImportDataFnOptions="ImportDataFnOptions",c.ImportDataFnStreamChunk="ImportDataFnStreamChunk",c.ImportDataFnOutput="ImportDataFnOutput",c.ReverseTransferFnInput="ReverseTransferFnInput",c.ReverseTransferFnOutput="ReverseTransferFnOutput",c.ReverseTransferGroupFnInput="ReverseTransferGroupFnInput",c.ReverseTransferGroupFnOutput="ReverseTransferGroupFnOutput",c.ReverseTransfersFnInput="ReverseTransfersFnInput",c.ReverseTransfersFnOutput="ReverseTransfersFnOutput",c.SetFlagsFnInput="SetFlagsFnInput",c.SetFlagsFnOutput="SetFlagsFnOutput",c.UpdateTokenFnInput="UpdateTokenFnInput",c.UpdateTokenFnOutput="UpdateTokenFnOutput",c.UpdateTransferFnInput="UpdateTransferFnInput",c.UpdateTransferFnOutput="UpdateTransferFnOutput",c.UpdateTransferGroupFnInput="UpdateTransferGroupFnInput",c.UpdateTransferGroupFnOutput="UpdateTransferGroupFnOutput",c.UpdateTransferGroupsFnInput="UpdateTransferGroupsFnInput",c.UpdateTransferGroupsFnOutput="UpdateTransferGroupsFnOutput",c.UpdateTransfersFnInput="UpdateTransfersFnInput",c.UpdateTransfersFnOutput="UpdateTransfersFnOutput",c.UpdateWalletFnInput="UpdateWalletFnInput",c.UpdateWalletFnOutput="UpdateWalletFnOutput",c.AggregateTransferManyTxInput="AggregateTransferManyTxInput",c.AggregateTransferManyTxOutput="AggregateTransferManyTxOutput",c.AuthenticationCheckTxInput="AuthenticationCheckTxInput",c.AuthenticationCheckTxOutput="AuthenticationCheckTxOutput",c.CreateAccessTokenTxInput="CreateAccessTokenTxInput",c.CreateAccessTokenTxOutput="CreateAccessTokenTxOutput",c.CreateContractTxInput="CreateContractTxInput",c.CreateContractTxOutput="CreateContractTxOutput",c.CreateDepositTxInput="CreateDepositTxInput",c.CreateDepositTxOutput="CreateDepositTxOutput",c.CreateDistributionTxInput="CreateDistributionTxInput",c.CreateDistributionTxOutput="CreateDistributionTxOutput",c.CreateTokenTxInput="CreateTokenTxInput",c.CreateTokenTxOutput="CreateTokenTxOutput",c.CreateTransferTxInput="CreateTransferTxInput",c.CreateTransferTxOutput="CreateTransferTxOutput",c.CreateTransferGroupTxInput="CreateTransferGroupTxInput",c.CreateTransferGroupTxOutput="CreateTransferGroupTxOutput",c.CreateTransferManyTxInput="CreateTransferManyTxInput",c.CreateTransferManyTxOutput="CreateTransferManyTxOutput",c.CreateWalletTxInput="CreateWalletTxInput",c.CreateWalletTxOutput="CreateWalletTxOutput",c.CreateWithdrawalTxInput="CreateWithdrawalTxInput",c.CreateWithdrawalTxOutput="CreateWithdrawalTxOutput",c.ExportDatabaseTxInput="ExportDatabaseTxInput",c.ExportDatabaseTxOutput="ExportDatabaseTxOutput",c.FindBalanceManyTxInput="FindBalanceManyTxInput",c.FindBalanceManyTxOutput="FindBalanceManyTxOutput",c.FindTokenManyTxInput="FindTokenManyTxInput",c.FindTokenManyTxOutput="FindTokenManyTxOutput",c.FindTransferGroupManyTxInput="FindTransferGroupManyTxInput",c.FindTransferGroupManyTxOutput="FindTransferGroupManyTxOutput",c.FindTransferManyTxInput="FindTransferManyTxInput",c.FindTransferManyTxOutput="FindTransferManyTxOutput",c.FindWalletManyTxInput="FindWalletManyTxInput",c.FindWalletManyTxOutput="FindWalletManyTxOutput",c.FinishTransactionTxInput="FinishTransactionTxInput",c.FinishTransactionTxOutput="FinishTransactionTxOutput",c.GetBalanceTxInput="GetBalanceTxInput",c.GetBalanceTxOutput="GetBalanceTxOutput",c.GetBalanceHistoryTxInput="GetBalanceHistoryTxInput",c.GetBalanceHistoryTxOutput="GetBalanceHistoryTxOutput",c.GetDatabaseExportProgressTxInput="GetDatabaseExportProgressTxInput",c.GetDatabaseExportProgressTxOutput="GetDatabaseExportProgressTxOutput",c.GetDatabaseImportProgressTxInput="GetDatabaseImportProgressTxInput",c.GetDatabaseImportProgressTxOutput="GetDatabaseImportProgressTxOutput",c.GetFlagsTxInput="GetFlagsTxInput",c.GetFlagsTxOutput="GetFlagsTxOutput",c.GetStatisticsTxInput="GetStatisticsTxInput",c.GetStatisticsTxOutput="GetStatisticsTxOutput",c.GetTokenTxInput="GetTokenTxInput",c.GetTokenTxOutput="GetTokenTxOutput",c.GetTokenManyTxInput="GetTokenManyTxInput",c.GetTokenManyTxOutput="GetTokenManyTxOutput",c.GetTransferTxInput="GetTransferTxInput",c.GetTransferTxOutput="GetTransferTxOutput",c.GetTransferGroupTxInput="GetTransferGroupTxInput",c.GetTransferGroupTxOutput="GetTransferGroupTxOutput",c.GetWalletTxInput="GetWalletTxInput",c.GetWalletTxOutput="GetWalletTxOutput",c.GetWalletManyTxInput="GetWalletManyTxInput",c.GetWalletManyTxOutput="GetWalletManyTxOutput",c.ImportActionsTxInput="ImportActionsTxInput",c.ImportActionsTxOptions="ImportActionsTxOptions",c.ImportActionsTxStreamChunk="ImportActionsTxStreamChunk",c.ImportActionsTxOutput="ImportActionsTxOutput",c.ImportDatabaseTxInput="ImportDatabaseTxInput",c.ImportDatabaseTxOutput="ImportDatabaseTxOutput",c.ListDatabaseExportsTxInput="ListDatabaseExportsTxInput",c.ListDatabaseExportsTxOutput="ListDatabaseExportsTxOutput",c.QueryTxInput="QueryTxInput",c.QueryTxOutput="QueryTxOutput",c.QueryLogsTxInput="QueryLogsTxInput",c.QueryLogsTxOutput="QueryLogsTxOutput",c.ResetDatabaseTxInput="ResetDatabaseTxInput",c.ResetDatabaseTxOutput="ResetDatabaseTxOutput",c.ReverseTransferTxInput="ReverseTransferTxInput",c.ReverseTransferTxOutput="ReverseTransferTxOutput",c.ReverseTransferGroupTxInput="ReverseTransferGroupTxInput",c.ReverseTransferGroupTxOutput="ReverseTransferGroupTxOutput",c.ReverseTransferGroupManyTxInput="ReverseTransferGroupManyTxInput",c.ReverseTransferGroupManyTxOutput="ReverseTransferGroupManyTxOutput",c.ReverseTransferManyTxInput="ReverseTransferManyTxInput",c.ReverseTransferManyTxOutput="ReverseTransferManyTxOutput",c.SetFlagsTxInput="SetFlagsTxInput",c.SetFlagsTxOutput="SetFlagsTxOutput",c.StartTransactionTxInput="StartTransactionTxInput",c.StartTransactionTxOutput="StartTransactionTxOutput",c.TxConsts="TxConsts",c.UpdateTokenTxInput="UpdateTokenTxInput",c.UpdateTokenTxOutput="UpdateTokenTxOutput",c.UpdateTransferTxInput="UpdateTransferTxInput",c.UpdateTransferTxOutput="UpdateTransferTxOutput",c.UpdateTransferGroupTxInput="UpdateTransferGroupTxInput",c.UpdateTransferGroupTxOutput="UpdateTransferGroupTxOutput",c.UpdateTransferGroupManyTxInput="UpdateTransferGroupManyTxInput",c.UpdateTransferGroupManyTxOutput="UpdateTransferGroupManyTxOutput",c.UpdateTransferManyTxInput="UpdateTransferManyTxInput",c.UpdateTransferManyTxOutput="UpdateTransferManyTxOutput",c.UpdateWalletTxInput="UpdateWalletTxInput",c.UpdateWalletTxOutput="UpdateWalletTxOutput",c))(U||{}),Si={ajv:u,createValidator(r){let e=u.compile(r);return Ac(e)},getValidator(r){let e=u.getSchema(r);return Ac(e)},getSchema(r){return l[r]},Schemas:l,SchemaNames:U},GD=Si.createValidator,y=Si.getValidator;var Ci=(i=>(i.year="year",i.month="month",i.week="week",i.day="day",i.hour="hour",i.minute="minute",i))(Ci||{}),Id=(i=>(i.count="count",i.countDistinct="countDistinct",i.sum="sum",i.average="average",i.min="min",i.max="max",i))(Id||{}),jd=(a=>(a.keep="keep",a.random="random",a.largest="largest",a.target="target",a))(jd||{}),vd=(t=>(t.replace="replace",t.extend="extend",t))(vd||{}),kd=(i=>(i.replace="replace",i.replace_create_only="replace_create_only",i.replace_cancel_only="replace_cancel_only",i.extend="extend",i.extend_create_only="extend_create_only",i.extend_cancel_only="extend_cancel_only",i))(kd||{});var S$=y("AggregateTransferManyTxInput");var C$=y("AuthenticationCheckTxInput");var P$=y("CreateAccessTokenTxInput");var G$=y("CreateContractTxInput");var D$=y("CreateDepositTxInput");var E$=y("CreateDistributionTxInput");var M$=y("CreateTokenTxInput");var R$=y("CreateTransferTxInput");var W$=y("CreateTransferGroupTxInput");var A$=y("CreateTransferManyTxInput");var N$=y("CreateWalletTxInput");var U$=y("CreateWithdrawalTxInput");var q$=y("ExportDatabaseTxInput");var B$=y("FindBalanceManyTxInput");var L$=y("FindTokenManyTxInput");var V$=y("FindTransferGroupManyTxInput");var H$=y("FindTransferManyTxInput");var z$=y("FindWalletManyTxInput");var K$=y("FinishTransactionTxInput");var Q$=y("GetBalanceTxInput");var J$=y("GetBalanceHistoryTxInput");var X$=y("GetDatabaseExportProgressTxInput");var Y$=y("GetDatabaseImportProgressTxInput");var Z$=y("GetFlagsTxInput");var eO=y("GetStatisticsTxInput");var tO=y("GetTokenTxInput");var rO=y("GetTokenManyTxInput");var nO=y("GetTransferTxInput");var aO=y("GetTransferGroupTxInput");var sO=y("GetWalletTxInput");var iO=y("GetWalletManyTxInput");var oO=y("ImportActionsTxInput");var pO=y("ImportDatabaseTxInput");var dO=y("ListDatabaseExportsTxInput");var fO=y("QueryTxInput");var uO=y("QueryLogsTxInput");var lO=y("ResetDatabaseTxInput");var cO=y("ReverseTransferTxInput");var mO=y("ReverseTransferGroupTxInput");var hO=y("ReverseTransferGroupManyTxInput");var _O=y("ReverseTransferManyTxInput");var gO=y("SetFlagsTxInput");var TO=y("StartTransactionTxInput");var yO=y("UpdateTokenTxInput");var bO=y("UpdateTransferTxInput");var FO=y("UpdateTransferGroupTxInput");var xO=y("UpdateTransferGroupManyTxInput");var $O=y("UpdateTransferManyTxInput");var OO=y("UpdateWalletTxInput"),Sd={aggregateTransferMany:S$,authenticationCheck:C$,createAccessToken:P$,createContract:G$,createDeposit:D$,createDistribution:E$,createToken:M$,createTransfer:R$,createTransferGroup:W$,createTransferMany:A$,createWallet:N$,createWithdrawal:U$,exportDatabase:q$,findBalanceMany:B$,findTokenMany:L$,findTransferGroupMany:V$,findTransferMany:H$,findWalletMany:z$,finishTransaction:K$,getBalance:Q$,getBalanceHistory:J$,getDatabaseExportProgress:X$,getDatabaseImportProgress:Y$,getFlags:Z$,getStatistics:eO,getToken:tO,getTokenMany:rO,getTransfer:nO,getTransferGroup:aO,getWallet:sO,getWalletMany:iO,importActions:oO,importDatabase:pO,listDatabaseExports:dO,query:fO,queryLogs:uO,resetDatabase:lO,reverseTransfer:cO,reverseTransferGroup:mO,reverseTransferGroupMany:hO,reverseTransferMany:_O,setFlags:gO,startTransaction:TO,updateToken:yO,updateTransfer:bO,updateTransferGroup:FO,updateTransferGroupMany:xO,updateTransferMany:$O,updateWallet:OO},Cd=(E=>(E.aggregateTransferMany="aggregateTransferMany",E.authenticationCheck="authenticationCheck",E.createAccessToken="createAccessToken",E.createContract="createContract",E.createDeposit="createDeposit",E.createDistribution="createDistribution",E.createToken="createToken",E.createTransfer="createTransfer",E.createTransferGroup="createTransferGroup",E.createTransferMany="createTransferMany",E.createWallet="createWallet",E.createWithdrawal="createWithdrawal",E.exportDatabase="exportDatabase",E.findBalanceMany="findBalanceMany",E.findTokenMany="findTokenMany",E.findTransferGroupMany="findTransferGroupMany",E.findTransferMany="findTransferMany",E.findWalletMany="findWalletMany",E.finishTransaction="finishTransaction",E.getBalance="getBalance",E.getBalanceHistory="getBalanceHistory",E.getDatabaseExportProgress="getDatabaseExportProgress",E.getDatabaseImportProgress="getDatabaseImportProgress",E.getFlags="getFlags",E.getStatistics="getStatistics",E.getToken="getToken",E.getTokenMany="getTokenMany",E.getTransfer="getTransfer",E.getTransferGroup="getTransferGroup",E.getWallet="getWallet",E.getWalletMany="getWalletMany",E.importActions="importActions",E.importDatabase="importDatabase",E.listDatabaseExports="listDatabaseExports",E.query="query",E.queryLogs="queryLogs",E.resetDatabase="resetDatabase",E.reverseTransfer="reverseTransfer",E.reverseTransferGroup="reverseTransferGroup",E.reverseTransferGroupMany="reverseTransferGroupMany",E.reverseTransferMany="reverseTransferMany",E.setFlags="setFlags",E.startTransaction="startTransaction",E.updateToken="updateToken",E.updateTransfer="updateTransfer",E.updateTransferGroup="updateTransferGroup",E.updateTransferGroupMany="updateTransferGroupMany",E.updateTransferMany="updateTransferMany",E.updateWallet="updateWallet",E))(Cd||{});var wO=y("ImportActionsTxInput");function Kc(r){let{error:e}=wO(r);return e===void 0}var PM=y("ImportActionsTxOutput");var GM=y("ImportActionsTxStreamChunk");var IO=y("ImportActionsTxOptions");function Qc(r){let{error:e}=IO(r);return e===void 0}var _r=class{constructor(e,t,n){this.isConnected=!1;this.hooks=new Proxy({},{set(e,t,n){if(typeof n!="function")throw new TypeError("Hooks can only be functions");return e[t]=n,!0}});this._requests=new Map;this._error=!1;this._sending=new Set;this.type=t,this._connection=e,this.connectionType=t,this.$connect=n}_setConnected(e){this.isConnected=e,this.isConnected&&this._error!==!1&&(this._error=!1),this.isConnected&&this.hooks.connected&&this.hooks.connected(this.socId),!this.isConnected&&this.hooks.disconnected&&this.hooks.disconnected()}_setErrored(e){this._error=e,this.isConnected&&this._setConnected(!1)}_send(e){throw new Error("This method must be implemented by child class")}_reconnect(){throw new Error("This method must be implemented by child class")}close(){return _e(this,null,function*(){throw new Error("This method must be implemented by child class")})}_connectionLost(){this._requests.forEach((e,t)=>{"stream"in e&&e.stream.destroy(new Sr({message:"connection lost"})),this._requests.delete(t)}),this.socId=void 0}_handleMessage(e){var o,d,g;if(this.hooks.message&&this.hooks.message(e),"method"in e){let h=e;if(h.method==="ping"){this._send({jsonrpc:"2.0",result:"pong",id:h.id});return}K("Unexpected JSONRPCRequest",e);return}let t=e;if(this.hooks.message&&this.hooks.message(t),t.id===null){K("Unexpected JSONRPCResponse",e);return}if(t.result==="ack"){this._sending.delete(t.id);return}let n=this._requests.get(t.id);if(!n){K("No Request found for incoming",e);return}if("handle"in n){n.handle(t),delete n.handle;return}t.error&&"error"in n&&n.error(t.error);let a=t;if(((o=a.result)==null?void 0:o.type)==="streamPause"&&"pause"in n){n.pause();return}if(((d=a.result)==null?void 0:d.type)==="streamResume"&&"resume"in n){n.resume();return}let{stream:s,start:i}=n;if(((g=a.result)==null?void 0:g.type)==="streamChunk"){s.push(a.result);return}s.push(a),s.destroyed||s.push(null),this._requests.delete(a.id),this.connectionType==="ws"&&this._send({jsonrpc:"2.0",method:"ack",params:Date.now()-i,id:a.id})}_sendTransaction(e,t){let{isValid:n,inputCopy:a,error:s}=Sd[e](t);if(!n)throw s;let i={jsonrpc:"2.0",method:e,params:a,id:Ct()};return this.hooks.preflight&&this.hooks.preflight(i)===!1?new mt:new mt(o=>_e(this,null,function*(){this._error&&this._reconnect(),this.isConnected||(yield this.$connect),this._requests.set(i.id,{stream:o,start:Date.now()}),this._sending.add(i.id),this._send(i)}))}_streamTransaction(e,t,n,a){let s=Date.now(),i=Ct(),o,d=({method:w,params:b})=>{if(o)return;let $={jsonrpc:"2.0",method:w,params:P({streamId:i},b),id:Ct()};this._sending.add($.id),this._send($)},g=(w,b)=>{o||(d({method:"streamError",params:{error:b}}),o=b,w.push({error:b}))},h=new Ui,T=a?h.pipe(a):h,O={jsonrpc:"2.0",method:"streamStart",params:{method:e,options:n},id:i};return this.hooks.preflight&&this.hooks.preflight(O)===!1?new Er:new Er(w=>_e(this,null,function*(){this._error&&this._reconnect(),this.isConnected||(yield this.$connect);let b=setTimeout(()=>{w.push({error:new oe({message:"INPUT_STREAM_TIMEOUT"})})},3e4);this._requests.set(O.id,{stream:w,start:s,error($){o=$,K("stream:error()>",$)},pause(){h.pause()},resume(){h.resume()},handle($){if($.error){w.push($);return}T.on("data",I=>{if(!o){if(b&&(clearTimeout(b),b=null),!t(I)){g(w,new Re({message:"INPUT_INVALID",data:I}));return}d({method:"streamData",params:{data:I}})}}).on("error",I=>{o||(b&&(clearTimeout(b),b=null),d({method:"streamError",params:{error:I}}),w.push({error:new oe({message:"INPUT_STREAM_ERROR",data:I})}))}).on("end",()=>{b&&(clearTimeout(b),b=null),d({method:"streamEnd",params:{}})})}}),this._sending.add(O.id),this._send(O)}),h)}aggregateTransferMany(e){return this._sendTransaction("aggregateTransferMany",e)}authenticationCheck(e){return this._sendTransaction("authenticationCheck",e)}createAccessToken(e){return this._sendTransaction("createAccessToken",e)}createContract(e){return this._sendTransaction("createContract",e)}createDeposit(e){return this._sendTransaction("createDeposit",e)}createDistribution(e){return this._sendTransaction("createDistribution",e)}createToken(e){return this._sendTransaction("createToken",e)}createTransfer(e){return this._sendTransaction("createTransfer",e)}createTransferGroup(e){return this._sendTransaction("createTransferGroup",e)}createTransferMany(e){return this._sendTransaction("createTransferMany",e)}createWallet(e){return this._sendTransaction("createWallet",e)}createWithdrawal(e){return this._sendTransaction("createWithdrawal",e)}exportDatabase(e){return this._sendTransaction("exportDatabase",e)}findBalanceMany(e){return this._sendTransaction("findBalanceMany",e)}findTokenMany(e){return this._sendTransaction("findTokenMany",e)}findTransferGroupMany(e){return this._sendTransaction("findTransferGroupMany",e)}findTransferMany(e){return this._sendTransaction("findTransferMany",e)}findWalletMany(e){return this._sendTransaction("findWalletMany",e)}finishTransaction(e){return this._sendTransaction("finishTransaction",e)}getBalance(e){return this._sendTransaction("getBalance",e)}getBalanceHistory(e){return this._sendTransaction("getBalanceHistory",e)}getDatabaseExportProgress(e){return this._sendTransaction("getDatabaseExportProgress",e)}getDatabaseImportProgress(e){return this._sendTransaction("getDatabaseImportProgress",e)}getFlags(e){return this._sendTransaction("getFlags",e)}getStatistics(e){return this._sendTransaction("getStatistics",e)}getToken(e){return this._sendTransaction("getToken",e)}getTokenMany(e){return this._sendTransaction("getTokenMany",e)}getTransfer(e){return this._sendTransaction("getTransfer",e)}getTransferGroup(e){return this._sendTransaction("getTransferGroup",e)}getWallet(e){return this._sendTransaction("getWallet",e)}getWalletMany(e){return this._sendTransaction("getWalletMany",e)}importActions(e){return this._sendTransaction("importActions",e)}importActionsStream(e,t){if(e!==void 0&&!Qc(e))throw new Re({message:"INPUT_INVALID",data:e});return this._streamTransaction("importActions",Kc,e,t)}importDatabase(e){return this._sendTransaction("importDatabase",e)}listDatabaseExports(e){return this._sendTransaction("listDatabaseExports",e)}query(e){return this._sendTransaction("query",e)}queryLogs(e){return this._sendTransaction("queryLogs",e)}resetDatabase(e){return this._sendTransaction("resetDatabase",e)}reverseTransfer(e){return this._sendTransaction("reverseTransfer",e)}reverseTransferGroup(e){return this._sendTransaction("reverseTransferGroup",e)}reverseTransferGroupMany(e){return this._sendTransaction("reverseTransferGroupMany",e)}reverseTransferMany(e){return this._sendTransaction("reverseTransferMany",e)}setFlags(e){return this._sendTransaction("setFlags",e)}startTransaction(e){return this._sendTransaction("startTransaction",e)}updateToken(e){return this._sendTransaction("updateToken",e)}updateTransfer(e){return this._sendTransaction("updateTransfer",e)}updateTransferGroup(e){return this._sendTransaction("updateTransferGroup",e)}updateTransferGroupMany(e){return this._sendTransaction("updateTransferGroupMany",e)}updateTransferMany(e){return this._sendTransaction("updateTransferMany",e)}updateWallet(e){return this._sendTransaction("updateWallet",e)}};var Jc,jO=(Jc=window.WAPI_VERSION)!=null?Jc:"";function Gd(r){let e=Xc(r);return new Pd(e,r)}function Xc(r){var w;let e=Object.assign({rejectUnauthorized:(w=r.rejectUnauthorized)!=null?w:!0,clientVersion:jO},r),t=yu(e),n=new lu(...t),a,s,i=!1,o;n.onclose=d,n.onerror=g,n.onmessage=h;function d(b){if(K(`createConnection>close(reason:${b.reason},code:${b.code},wasClean:${b.wasClean})`),b.code===4030)return T(new Pr({message:"AUTHENTICATION_FAILED",code:"AuthenticationError"}));T(new Error("WS closed"))}function g(b){K(`createConnection>error(message:${b.message},error:${b.error},type:${b.type})`),T(b.error)}function h(b){K(`createConnection>message(type:${b.type},data:${b.data})`);let{data:$}=b,I;try{I=JSON.parse($.toString())}catch(j){return K("Invalid JSON response",j),T(new Error("Invalid JSON response"))}if(I.result!=="ready")return K("Invalid first message"),T(new Error("Invalid first message - "+JSON.stringify(I)));T()}function T(b){i||(delete n.onmessage,delete n.onerror,delete n.onclose,b?(s(b),n.close()):a(o),i=!0)}let O=new Promise((b,$)=>{a=b,s=$});return{ws:n,$connect:O}}var Pd=class extends _r{constructor(t,n){super(t.ws,"ws",t.$connect);this._tryToReconnect=!0;this._config=n,this.host=n.host,this.$connect.then(a=>(this.socId=a,this._ready())).catch(a=>{this.socId||this._setErrored(a)})}_setErrored(t){super._setErrored(t),t.hasOwnProperty("code")&&t.code==="AuthenticationError"&&(this._tryToReconnect=!1)}_ready(){this._setConnected(!0),this._connection.onmessage=t=>{let{data:n,type:a}=t;if(K(`message(type:${a},data:$0)`,n),a==="message"){let s=JSON.parse(n.toString());this._handleMessage(s),this._heartbeat()}},this._connection.onerror=t=>{let{message:n,error:a,type:s}=t;K(`error(message:$0,error:$1,type:${s})`,n,a)},this._connection.onclose=t=>{let{reason:n,code:a,wasClean:s}=t;K(`close(reason:$0,code:${a},wasClean:${s})`,n),this._setConnected(!1),clearTimeout(this._pingTimeout),this._connectionLost(),this._reconnect()},this._heartbeat()}_reconnect(){if(K("reconnect(),tryToReconnect:",this._tryToReconnect),!this._tryToReconnect)return;if(this.hooks.reconnect&&!this.hooks.reconnect()){K("reconnect hook returned false");return}let t=window.WAPI_RECONNECT_ATTEMPTS&&parseInt(window.WAPI_RECONNECT_ATTEMPTS)||10,n=window.WAPI_MAX_RECONNECT_WAIT&&parseInt(window.WAPI_MAX_RECONNECT_WAIT)||1e4;this.$connect=_e(this,null,function*(){let a;for(let s=0;s<t+1;s++)try{K("Trying to connect, attempt:",s);let{ws:i,$connect:o}=Xc(this._config);a=yield o,this.socId=a,this._connection=i,this._ready();break}catch(i){if(i.code==="AuthenticationError"||s>t-1)throw i;yield _u(Math.min(Math.pow(1.5,s)*1e3,n))}return a})}_heartbeat(){K("heartbeat"),clearTimeout(this._pingTimeout),this._pingTimeout=setTimeout(()=>{if(this._sending.size)return K("pingTimeout reached, but sending.size:",this._sending.size),this._heartbeat();K("timeout"),this._connection.close(),this._setConnected(!1),this._reconnect()},31e3)}_send(t){K("send()",t),this._connection.send(JSON.stringify(t))}close(){return _e(this,null,function*(){return K("close()"),this._tryToReconnect=!1,clearTimeout(this._pingTimeout),this._setConnected(!1),this._connection.close()})}};var Dd=typeof globalThis!="undefined"&&globalThis||typeof self!="undefined"&&self||typeof Dd!="undefined"&&Dd,Ed=Dd.fetch;function Rd(r){let e=vO(r);return new Md(e,r)}function vO(r){let e=r.host.replace(/^wss:/,"https:"),t="x-wapi-req-id";function n(o){return _e(this,null,function*(){K("http_createConnection>message(body:$0)",o)})}function a(o,d){return _e(this,null,function*(){let g=JSON.parse(o),T=yield(yield Ed(`${e}/api`,{keepalive:!0,method:"POST",headers:{Authorization:`Bearer ${d}`,[t]:g==null?void 0:g.id},body:o})).json();this.onmessage(ee(P({},T),{id:g.id}))})}let s=Ct(),i=Ed(`${e}/api`,{method:"POST",headers:{Authorization:`Bearer ${r.jwt}`,[t]:s},body:JSON.stringify({jsonrpc:"2.0",method:"authenticationCheck",params:{},id:s})}).then(o=>o.json()).then(o=>{if(o.error)throw new Error(o.error.message)});return{send:a,onmessage:n,$connect:i}}var Md=class extends _r{constructor(e,t){super(e,"https",e.$connect),this.host=t.host,this.jwt=t.jwt,this.$connect.then(()=>{this._ready()}).catch(n=>{this._setErrored(n)})}_send(e){K("send()",e),this._connection.send(JSON.stringify(e),this.jwt)}_ready(){this._setConnected(!0),this._connection.onmessage=e=>_e(this,null,function*(){K("http_message($0)>",e),this._handleMessage(e)})}close(){return _e(this,null,function*(){K("close()"),this._setConnected(!1)})}_reconnect(){return _e(this,null,function*(){K("reconnect()")})}};var Ad=class r{constructor(e){this.filter=[];this.modifierFn=e}add(e){return this.filter.push(e),this}addWhere(e,t,n,a){if(typeof t=="object"){let s={};for(let[i,o]of Object.entries(t))s[i]=this.modifierFn?this.modifierFn(i,o):o;return this.add({function:e,value:s})}if(typeof t=="function"){let s=new r(this.modifierFn);return t.call(s,s),this.add({function:e,inner:s.toJSON().filter})}if(a!==void 0)return this.add({function:e,field:t,operator:n,value:a});if(typeof n=="object")return this.add({function:e,value:{[t]:n}});if(n!==void 0){let s=this.modifierFn?this.modifierFn(t,n):n;return this.add({function:e,field:t,value:s})}throw TypeError("Invalid input")}where(e,t,n){return this.addWhere("where",e,t,n)}orWhere(e,t,n){return this.addWhere("orWhere",e,t,n)}whereIn(e,t){return this.add({function:"whereIn",field:e,value:t})}orWhereIn(e,t){return this.add({function:"orWhereIn",field:e,value:t})}whereNull(e){return this.add({function:"whereNull",field:e})}orWhereNull(e){return this.add({function:"orWhereNull",field:e})}whereNotNull(e){return this.add({function:"whereNotNull",field:e})}orWhereNotNull(e){return this.add({function:"orWhereNotNull",field:e})}whereMetadata(e,t,n){return n===void 0?this.add({function:"whereMetadata",field:e,operator:"=",value:t}):this.add({function:"whereMetadata",field:e,operator:t,value:n})}orWhereMetadata(e,t,n){return n===void 0?this.add({function:"orWhereMetadata",field:e,operator:"=",value:t}):this.add({function:"orWhereMetadata",field:e,operator:t,value:n})}whereMetadataIn(e,t){return this.add({function:"whereMetadataIn",field:e,value:t})}orWhereMetadataIn(e,t){return this.add({function:"orWhereMetadataIn",field:e,value:t})}whereMetadataNull(e){return this.add({function:"whereMetadataNull",field:e})}orWhereMetadataNull(e){return this.add({function:"orWhereMetadataNull",field:e})}whereMetadataNotNull(e){return this.add({function:"whereMetadataNotNull",field:e})}orWhereMetadataNotNull(e){return this.add({function:"orWhereMetadataNotNull",field:e})}toJSON(){return{filter:JSON.parse(JSON.stringify(this.filter))}}};function Wd(r){return r.map(e=>{if(typeof e=="string"){if(e.includes(" "))throw new TypeError("invalid order option: "+e);return{field:e,direction:"asc"}}return{field:e.column,direction:e.order,nulls:e.nulls}})}var Tr=class extends Ad{constructor({start:t,modifiers:n,optionsModifiers:a}){super(n);this.optionsObject={};this.execFn=t,this.optionsModifiers=a}start(){return this.execFn(this.toJSON())}toJSON(){return ee(P({},super.toJSON()),{options:P({},this.optionsObject)})}options(t){if(this.optionsModifiers===void 0)return this.optionsObject=P(P({},this.optionsObject),t),this;this.optionsObject=P({},this.optionsObject);for(let[n,a]of Object.entries(t))this.optionsObject[n]=this.optionsModifiers(n,a);return this}then(t,n){return this.start().then(t,n)}catch(t){return this.start().catch(t)}stream(){return this.start().stream()}},De=class extends Tr{constructor({start:e,modifiers:t,optionsModifiers:n}){super({start:a=>e(a),modifiers:t,optionsModifiers:n})}limit(e){return this.optionsObject.limit=e,this}offset(e){return this.optionsObject.offset=e,this}orderBy(e,t,n){if(!Array.isArray(e)&&typeof e!="string")throw new TypeError("invalid input");if(Array.isArray(e))return this.optionsObject.order=Wd(e),this;if(!e.includes(" "))return this.optionsObject.order=Wd([{column:e,order:t||"asc",nulls:n}]),this;let[a,s,i,o]=e.split(" ");if(s!=="asc"&&s!=="desc")throw new TypeError("invalid order");let d={column:a,order:s};if(i==="nulls"){if(!["first","last"].includes(o))throw new TypeError("invalid nulls order");d.nulls=o}return this.optionsObject.order=Wd([e]),this}select(...e){return this.optionsObject.select=e,this}deselect(...e){return this.optionsObject.deselect=e,this}};function gr(r,e){if(!e)return{function:r,alias:r};if(!e.includes(" "))return{function:r,field:e,alias:r};if(!e.includes(" as "))throw new oe({message:"Invalid Aggregator"});let[t,n]=e.split(" as ");return{function:r,field:t,alias:n||t}}var Fo=class extends Tr{constructor({start:t,modifiers:n,optionsModifiers:a}){super({start:s=>t(s),modifiers:n,optionsModifiers:a});this.aggregatorObject={aggregators:[]};this.timezoneString=""}toJSON(){return ee(P({},super.toJSON()),{aggregators:JSON.parse(JSON.stringify(this.aggregatorObject.aggregators)),groups:JSON.parse(JSON.stringify(this.aggregatorObject.groups||[]))})}timezone(t){return this.timezoneString=t,this.aggregatorObject.groups&&Array.isArray(this.aggregatorObject.groups)&&this.aggregatorObject.groups.forEach(n=>{n.type==="period"&&(n.field={period:n.field,timezone:t})}),this}groupBy(t,...n){let a={};if(typeof t!="string")throw new TypeError("expected string as input, got"+typeof t);let[s,i]=t.split(" as ");if(Ci.hasOwnProperty(s))a.type="period",a.alias=i||s,this.timezoneString?a.field={period:s,timezone:this.timezoneString}:a.field=s;else if(s.startsWith("metadata.")){let[,o]=s.split(".");a.type="metadata_field",a.field=o,a.alias=i||o}else a.type="field",a.field=s,a.alias=i||s;return this.aggregatorObject.groups?this.aggregatorObject.groups.push(a):this.aggregatorObject.groups=[a],n.length&&n.forEach(o=>this.groupBy(o)),this}count(t){return this.aggregatorObject.aggregators.push(gr("count",t)),this}distinct(t){return this.aggregatorObject.aggregators.push(gr("countDistinct",t)),this}avg(t){return this.aggregatorObject.aggregators.push(gr("average",t)),this}min(t){return this.aggregatorObject.aggregators.push(gr("min",t)),this}max(t){return this.aggregatorObject.aggregators.push(gr("max",t)),this}sum(t){return this.aggregatorObject.aggregators.push(gr("sum",t)),this}},yr=class extends Tr{constructor({start:t,modifiers:n,optionsModifiers:a}){super({start:t,modifiers:n,optionsModifiers:a});this.updateObject={}}toJSON(){return ee(P({},super.toJSON()),{update:JSON.parse(JSON.stringify(this.updateObject))})}update(t){return this.updateObject=Object.assign(this.updateObject,t),this}},xo=class extends Tr{constructor({start:t,modifiers:n,optionsModifiers:a}){super({start:t,modifiers:n,optionsModifiers:a});this.reverseModifications={}}toJSON(){return ee(P({},super.toJSON()),{reverse:JSON.parse(JSON.stringify(this.reverseModifications))})}reverse(t){return this.reverseModifications=Object.assign(this.reverseModifications,t),this}};var kO=y("AggregateTransfersFnInput");function Nd(r,e,t){let{client:n}=r;if(e===void 0)return new Fo({start(b){return n.api.aggregateTransferMany({transfer:b.filter,options:b.options,groups:b.groups,aggregators:b.aggregators})},modifiers(b,$){return["token","wallet","from_wallet","to_wallet"].includes(b)?v($):b==="transfer_group"?Q($):$}});let{inputCopy:a,error:s}=C({input:e,options:t,validate:kO});if(s)throw s;let{token:i,wallet:o,from_wallet:d,to_wallet:g,transfer_group:h,status:T,metadata:O}=a,w={token:v(i),wallet:v(o),from_wallet:v(d),to_wallet:v(g),transfer_group:Q(h),status:T,metadata:O};return n.api.aggregateTransferMany({transfer:w,groups:a.groups,aggregators:a.aggregators})}var SO=new Map(Object.entries({aggregateTransfers:"aggregateTransferMany",findBalances:"findBalanceMany",findTokens:"findTokenMany",findTransferGroups:"findTransferGroupMany",findTransfers:"findTransferMany",findWallets:"findWalletMany"})),CO=y("CreateAccessTokenFnInput");function Ud(r,e,t){var i;let{client:n}=r,{inputCopy:a,error:s}=C({input:e,options:t,validate:CO});if(s)throw s;return a.token&&"scopes"in a.token&&(a.token.scopes=Array.from(new Set((i=a.token)==null?void 0:i.scopes.map(o=>{var d;return(d=SO.get(o))!=null?d:o})))),n.api.createAccessToken({token:a.token,options:t})}var PO=y("CreateContractFnInput");function qd(r,e,t){let{client:n}=r,{inputCopy:a,error:s}=C({input:e,options:t,validate:PO});if(s)throw s;let i={token:{foreign:a.foreign+"",metadata:a.metadata,owner:v(a.owner),deposits:[{token:v(a.value_token),amount:a.value_amount}]}};return a.buyer&&(a.buyer.latest_control_hash&&console.warn("deprecated: latest_control_hash is deprecated and will be ignored"),i.exchange={from_wallet:v(a.buyer.wallet),amount:a.buyer.amount||a.value_amount,from_token:v(a.buyer.token||a.value_token),metadata:a.buyer.metadata}),n.api.createContract(i)}var GO=y("CreateDepositFnInput");function Bd(r,e,t){let{client:n}=r,a=at(e,"token",n.getConfig("token")),{inputCopy:s,error:i}=C({input:a,options:t,validate:GO});if(i)throw i;let o=s.token||n.getConfig("token");if(o===void 0)throw new oe({message:"INPUT_NEEDS_TOKEN",data:e});let d=s.options;delete s.options;let g=ee(P({},s),{identifier:s.identifier,transfer_group:Q(s.transfer_group),token:v(o),to_wallet:v(s.wallet),type:"deposit"});return g.identifier||(g.identifier=je(g)),n.api.createTransfer({transfer:g,options:Ni(d,{return_balance:"return_to_balance",create_wallet_if_not_exists:"create_to_wallet_if_not_exists"})})}var Ld=(t=>(t.whereMetadata="whereMetadata",t.orWhereMetadata="orWhereMetadata",t))(Ld||{}),Vd=(t=>(t.where="where",t.orWhere="orWhere",t))(Vd||{}),Hd=(t=>(t.whereIn="whereIn",t.orWhereIn="orWhereIn",t))(Hd||{}),zd=(t=>(t.whereMetadataIn="whereMetadataIn",t.orWhereMetadataIn="orWhereMetadataIn",t))(zd||{}),Kd=(a=>(a.whereMetadataNull="whereMetadataNull",a.orWhereMetadataNull="orWhereMetadataNull",a.whereMetadataNotNull="whereMetadataNotNull",a.orWhereMetadataNotNull="orWhereMetadataNotNull",a))(Kd||{}),Qd=(a=>(a.whereNull="whereNull",a.orWhereNull="orWhereNull",a.whereNotNull="whereNotNull",a.orWhereNotNull="orWhereNotNull",a))(Qd||{}),Jd=(r=>(r["="]="=",r[">="]=">=",r["<="]="<=",r["<"]="<",r[">"]=">",r))(Jd||{}),Xd=(t=>(t.like="like",t.ilike="ilike",t))(Xd||{}),Yd=(t=>(t["="]="=",t[">="]=">=",t["<="]="<=",t["<"]="<",t[">"]=">",t.like="like",t.ilike="ilike",t))(Yd||{}),Zd=(a=>(a.value="value",a.share="share",a.group="group",a.contract="contract",a))(Zd||{}),ef=(t=>(t.active="active",t["dw-only"]="dw-only",t.disabled="disabled",t))(ef||{}),tf=(t=>(t.open="open",t.closed="closed",t))(tf||{}),rf=(n=>(n.pending="pending",n.finished="finished",n.cancelled="cancelled",n))(rf||{}),nf=(t=>(t.pending="pending",t.finished="finished",t))(nf||{}),af=(n=>(n.regular="regular",n.exchange="exchange",n.distribution="distribution",n))(af||{}),sf=(n=>(n.transfer="transfer",n.deposit="deposit",n.withdrawal="withdrawal",n))(sf||{}),of=(n=>(n.token="token",n.house="house",n.regular="regular",n))(of||{}),pf=(t=>(t.active="active",t.disabled="disabled",t))(pf||{}),df=(t=>(t.flag="flag",t.setting="setting",t))(df||{}),ff=(o=>(o.Token="Token",o.TransferGroup="TransferGroup",o.TransferLog="TransferLog",o.Transfer="Transfer",o.WalletTokenSetting="WalletTokenSetting",o.Wallet="Wallet",o.WapiSetting="WapiSetting",o))(ff||{});var DO=y("CreateExchangeFnInput");function uf(r,e,t){var o,d,g,h,T;let{client:n}=r,{inputCopy:a,error:s}=C({input:e,options:t,validate:DO});if(s)throw s;let i=a.options;return delete a.options,(o=a.identifier)!=null||(a.identifier=je(a)),n.api.createTransferGroup({transfer_group:{identifier:a.identifier,status:"closed",transfer_status:(d=a.status)!=null?d:"pending",metadata:a.metadata,children:[{identifier:(g=a.from_identifier)!=null?g:je(),from_wallet:v(a.from_wallet),to_wallet:v(a.to_wallet),token:v(a.from_token),type:a.from_wallet?"transfer":"deposit",amount:a.from_amount,metadata:a.metadata,force:a.force},{identifier:(h=a.to_identifier)!=null?h:je(),from_wallet:v(a.to_wallet),to_wallet:v(a.from_wallet),token:v(a.to_token),type:a.to_wallet?"transfer":"deposit",amount:(T=a.to_amount)!=null?T:a.from_amount,metadata:a.metadata,force:a.force}]},options:i})}var EO=y("CreateTokenFnInput");function lf(r,e,t){let{client:n}=r,{inputCopy:a,error:s}=C({input:e,options:t,validate:EO});if(s)throw s;let i=a.options;return delete a.options,n.api.createToken({token:ee(P({},a),{belongs_to:v(a.belongs_to)}),options:i})}var MO=y("CreateTransferFnInput");function cf(r,e,t){let{client:n}=r,a=at(e,"token",n.getConfig("token")),{inputCopy:s,error:i}=C({input:a,options:t,validate:MO});if(i)throw i;let o=Pi(s,n.getConfig("token"));return o.identifier||(o.identifier=je(o)),n.api.createTransfer({transfer:o,options:s.options})}function Pi(r,e){r.type=r.type||"transfer";let t={identifier:r.identifier,token:v(r.token||e),amount:r.amount,metadata:r.metadata,status:r.status,type:r.type,transfer_group:Q(r.transfer_group),created_at:r.created_at};if(r.type==="transfer")return r.latest_control_hash&&console.warn("deprecated: latest_control_hash is deprecated"),ee(P({},t),{from_wallet:v(r.from_wallet),to_wallet:v(r.to_wallet)});if(r.type==="withdrawal")return r.latest_control_hash&&console.warn("deprecated: latest_control_hash is deprecated"),ee(P({},t),{from_wallet:v(r.wallet)});if(r.type==="deposit")return ee(P({},t),{to_wallet:v(r.wallet)})}var RO=y("CreateTransferGroupFnInput");function mf(r,e,t){let{client:n}=r,{inputCopy:a,error:s}=C({input:e,options:t,validate:RO});if(s)throw s;let i=JSON.parse(JSON.stringify(a));return delete i.options,i.children&&(i.children=i.children.map(o=>Pi(o,n.getConfig("token")))),i.identifier||(i.identifier=je(i)),n.api.createTransferGroup({transfer_group:i,options:a.options})}var WO=y("CreateTransfersFnInput");function hf(r,e,t){let{client:n}=r,{inputCopy:a,error:s}=C({input:e,options:t,validate:WO});if(s)throw s;let i=a.transfers.map(o=>Pi(o,n.getConfig("token")));for(let o of i)o.identifier||(o.identifier=je(o));return n.api.createTransferMany({transfers:i,options:a.options})}var AO=y("CreateWalletFnInput");function _f(r,e,t){let{client:n}=r,{inputCopy:a,error:s}=C({input:e,options:t,validate:AO});if(s)throw s;let i=a.options;return delete a.options,n.api.createWallet({wallet:P({},a),options:i})}var NO=y("CreateWithdrawalFnInput");function gf(r,e,t){let{client:n}=r,a=at(e,"token",n.getConfig("token")),{inputCopy:s,error:i}=C({input:a,options:t,validate:NO});if(i)throw i;let o=s.options;delete s.options,s.latest_control_hash&&(console.warn("deprecated: latest_control_hash is deprecated"),delete s.latest_control_hash);let d=s.token||n.getConfig("token");if(d===void 0)throw new oe({message:"INPUT_NEEDS_TOKEN",data:e});let g=ee(P({},s),{identifier:s.identifier,transfer_group:Q(s.transfer_group),token:v(d),from_wallet:v(s.wallet),type:"withdrawal"});return g.identifier||(g.identifier=je(g)),n.api.createTransfer({transfer:g,options:Ni(o,{return_balance:"return_from_balance"})})}var UO=y("FindBalancesFnInput");function Tf(r,e,t){var g,h;let{client:n}=r;if(e===void 0)return new De({start(T){return n.api.findBalanceMany({balance:T.filter,options:T.options})},modifiers(T,O){return["wallet","token"].includes(T)?v(O):O}});let{inputCopy:a,error:s}=C({input:e,options:t,validate:UO});if(s)throw s;let i={};a.wallet&&(i.wallet=v(a.wallet)),a.token&&(i.token=v(a.token));let o=(g=a.options)==null?void 0:g.order_by;(h=a.options)==null||delete h.order_by;let d=P({},a.options);return!d.order&&o&&(d.order=st(o)),n.api.findBalanceMany({balance:i,options:d})}var qO=y("FindTokensFnInput");function yf(r,e,t){var g,h;let{client:n}=r;if(e===void 0)return new De({start(T){return n.api.findTokenMany({token:T.filter,options:T.options})},modifiers(T,O){return["belongs_to"].includes(T)?v(O):O}});let{inputCopy:a,error:s}=C({input:e,options:t,validate:qO});if(s)throw s;let i={foreign:a.foreign?a.foreign+"":void 0,type:a.type,metadata:a.metadata};a.belongs_to&&(i.belongs_to=v(a.belongs_to));let o=(g=a.options)==null?void 0:g.order_by;(h=a.options)==null||delete h.order_by;let d=P({},a.options);return!d.order&&o&&(d.order=st(o)),n.api.findTokenMany({token:i,options:d})}var BO=y("FindTransferGroupsFnInput");function bf(r,e,t){var b,$;let{client:n}=r;if(e===void 0)return new De({start(I){return n.api.findTransferGroupMany({transfer_group:I.filter,options:I.options})},modifiers(I,j){return["transfer_group","reverses"].includes(I)?Q(j):j}});let{inputCopy:a,error:s}=C({input:e,options:t,validate:BO});if(s)throw s;let{identifier:i,transfer_status:o,status:d,metadata:g,type:h}=a,T={identifier:i,transfer_status:o,status:d,metadata:g,type:h};a.reverses&&(T.reverses=Q(a.reverses));let O=(b=a.options)==null?void 0:b.order_by;($=a.options)==null||delete $.order_by;let w=P({},a.options);return!w.order&&O&&(w.order=st(O)),n.api.findTransferGroupMany({transfer_group:T,options:w})}var LO=y("FindTransfersFnInput");function Ff(r,e,t){var $;let{client:n}=r;if(e===void 0)return new De({start(I){return n.api.findTransferMany({transfer:I.filter,options:I.options})},modifiers(I,j){return["token","wallet","from_wallet","to_wallet"].includes(I)?v(j):I==="transfer_group"?Q(j):j}});let{inputCopy:a,error:s}=C({input:e,options:t,validate:LO});if(s)throw s;let{token:i,wallet:o,from_wallet:d,to_wallet:g}=a,h={token:v(i),wallet:v(o),from_wallet:v(d),to_wallet:v(g)};a.transfer_group&&(h.transfer_group=Q(a.transfer_group)),a.status&&(h.status=a.status),a.metadata&&(h.metadata=a.metadata),($=a.options)!=null||(a.options={});let T=a.options.order_by;if(delete a.options.order_by,a.options.return_running_balance){if(a.options.return_running_balance_for_wallet)throw new oe({message:"CONFLICTING_OPTIONS",data:{options:a.options}});if(!h.wallet)throw new oe({message:"RUNNING_BALANCE_WITHOUT_WALLET",data:{input:a}});a.options.return_running_balance_for_wallet=a.wallet}let O=a.options.return_running_balance_for_wallet;if(delete a.options.return_running_balance_for_wallet,a.options.return_signed_amount){if(a.options.return_signed_amount_for_wallet)throw new oe({message:"CONFLICTING_OPTIONS",data:{options:a.options}});if(!h.wallet)throw new oe({message:"SIGNED_AMOUNT_WITHOUT_WALLET",data:{input:a}});a.options.return_signed_amount_for_wallet=a.wallet}let w=a.options.return_signed_amount_for_wallet;delete a.options.return_signed_amount_for_wallet;let b=P({},a.options);return!b.order&&T&&(b.order=st(T)),O&&(b.return_running_balance_for_wallet=v(O)),w&&(b.return_signed_amount_for_wallet=v(w)),n.api.findTransferMany({transfer:h,options:b})}var VO=y("FindWalletsFnInput");function xf(r,e,t){var h;let{client:n}=r;if(e===void 0)return new De({start(T){return n.api.findWalletMany({wallet:T.filter,options:T.options})},optionsModifiers(T,O){return T==="include_balance_for_token"&&typeof O!="object"?v(O):O}});let{inputCopy:a,error:s}=C({input:e,options:t,validate:VO});if(s)throw s;let i=(h=a.options)!=null?h:{};delete a.options;let o=P({},a),d=i.order_by;delete i.order_by;let g=P({},i);return!g.order&&d&&(g.order=st(d)),n.api.findWalletMany({wallet:o,options:g})}var HO=y("GetBalanceFnInput");function $f(r,e,t){let{client:n}=r,a=at(e,"token",n.getConfig("token")),{inputCopy:s,error:i}=C({input:a,options:t,validate:HO});if(i)throw i;if(s.datetime&&bu(s.datetime))throw new oe({message:"BAL_FUTURE_DATETIME",data:s});let o=s.token||n.getConfig("token");if(o===void 0)throw new oe({message:"INPUT_NEEDS_TOKEN",data:e});return n.api.getBalance({balance:{wallet:v(s.wallet),token:v(o),datetime:s.datetime},options:s.options})}var zO=y("GetBalanceHistoryFnInput");function Of(r,e,t){let{client:n}=r,{inputCopy:a,error:s}=C({input:e,options:t,validate:zO});if(s)throw s;let i=a.token||n.getConfig("token");if(i===void 0)throw new oe({message:"INPUT_NEEDS_TOKEN",data:e});return n.api.getBalanceHistory({balance:{wallet:v(a.wallet),token:v(i)},options:a.options})}var KO=y("GetFlagsFnInput");function wf(r,e,t){let{client:n}=r,{error:a,inputCopy:s}=C({input:e||{},options:t,validate:KO});if(a)throw a;return n.api.getFlags({options:s.options})}var QO=y("GetStatisticsFnInput");function If(r,e,t){let{client:n}=r,{inputCopy:a,error:s}=C({input:e||{},options:t,validate:QO});if(s)throw s;return n.api.getStatistics({model:a.model||"Transfer",aggregator:a.aggregator||"count",groups:a.groups,filter:a.filter,options:a.options})}var JO=y("GetTokenFnInput");function jf(r,e={},t){let{client:n}=r,a=at(e,"foreign",n.getConfig("token")),{inputCopy:s,error:i}=C({input:a,options:t,validate:JO});if(i)throw i;let o=s.foreign||n.getConfig("token");if(o===void 0)throw new oe({message:"INPUT_NEEDS_TOKEN",data:e});return n.api.getToken({token:v(o),options:s.options})}var XO=y("GetTransferFnInput");function vf(r,e,t){let{client:n}=r,{inputCopy:a,error:s}=C({input:e,options:t,validate:XO});if(s)throw s;return n.api.getTransfer({transfer:Q(a.transfer),options:a.options})}var YO=y("GetTransferGroupFnInput");function kf(r,e,t){let{client:n}=r,{inputCopy:a,error:s}=C({input:e,options:t,validate:YO});if(s)throw s;return n.api.getTransferGroup({transfer_group:Q(a.transfer_group),options:a.options})}var ZO=y("GetWalletFnInput");function Sf(r,e,t){let{client:n}=r,{inputCopy:a,error:s}=C({input:e,options:t,validate:ZO});if(s)throw s;return n.api.getWallet({wallet:v(a.wallet),options:a.options})}var ew=y("ImportDataFnInput");function Yc(r){let{error:e}=ew(r);return e===void 0}var mW=y("ImportDataFnOutput");var hW=y("ImportDataFnStreamChunk");var tw=y("ImportDataFnOptions");function Zc(r){let{error:e}=tw(r);return e===void 0}function Cf(){throw new Error("import-data available only in node client")}var rw=y("ReverseTransferFnInput");function Pf(r,e,t){let{client:n}=r,{inputCopy:a,error:s}=C({input:e,options:t,validate:rw});if(s)throw s;return a.extend_metadata&&console.warn("deprecated: extend_metadata is deprecated. Use metadata_action instead"),n.api.reverseTransfer({transfer:Q(a.transfer),reverse:{force:a.force,metadata:a.metadata,extend_metadata:a.extend_metadata,identifier:a.identifier,status:a.status},options:a.options})}var nw=y("ReverseTransferGroupFnInput");function Gf(r,e,t){let{client:n}=r,{inputCopy:a,error:s}=C({input:e,options:t,validate:nw});if(s)throw s;return a.extend_metadata&&console.warn("deprecated: extend_metadata is deprecated. Use metadata_action instead"),n.api.reverseTransferGroup({transfer_group:Q(a.transfer_group),reverse:{status:a.status,force:a.force,transfer_status:a.transfer_status,identifier:a.identifier,metadata:a.metadata,transfer_metadata:a.transfer_metadata,extend_metadata:a.extend_metadata,transfer_extend_metadata:a.transfer_extend_metadata},options:a.options})}var aw=y("ReverseTransfersFnInput");function Df(r,e,t){let{client:n}=r;if(e===void 0)return new xo({start(T){return n.api.reverseTransferMany({transfer:T.filter,reverse:T.reverse,options:T.options})},modifiers(T,O){return["token","wallet","from_wallet","to_wallet"].includes(T)?v(O):T==="transfer_group"?Q(O):O}});let{inputCopy:a,error:s}=C({input:e,options:t,validate:aw});if(s)throw s;let{token:i,wallet:o,from_wallet:d,to_wallet:g}=a,h={token:v(i),wallet:v(o),from_wallet:v(d),to_wallet:v(g)};return a.transfer_group&&(h.transfer_group=Q(a.transfer_group)),a.status&&(h.status=a.status),a.metadata&&(h.metadata=a.metadata),n.api.reverseTransferMany({transfer:h,reverse:a.reverse,options:a.options})}var sw=y("SetFlagsFnInput");function Ef(r,e,t){let{client:n}=r,{inputCopy:a,error:s}=C({input:e,options:t,validate:sw});if(s)throw s;let i=Object.keys(qt.definitions.Flags.properties),o={};if(i.forEach(d=>{d in a&&(o[d]=a[d])}),Object.keys(o).length<1)throw new oe({message:`One of [${i.join()}] is required`,data:e});return n.api.setFlags({flags:o,options:a.options})}var iw=y("UpdateTokenFnInput");function Mf(r,e,t){let{client:n}=r,{inputCopy:a,error:s}=C({input:e,options:t,validate:iw});if(s)throw s;return n.api.updateToken({token:v(a.token),update:{public:a.public,metadata:a.metadata,status:a.status},options:a.options})}var ow=y("UpdateTransferFnInput");function Rf(r,e,t){let{client:n}=r,{inputCopy:a,error:s}=C({input:e,options:t,validate:ow});if(s)throw s;return n.api.updateTransfer({transfer:Q(a.transfer),update:{status:a.status,metadata:a.metadata},options:a.options})}var pw=y("UpdateTransferGroupFnInput");function Wf(r,e,t){let{client:n}=r,{inputCopy:a,error:s}=C({input:e,options:t,validate:pw});if(s)throw s;return n.api.updateTransferGroup({transfer_group:Q(a.transfer_group),update:{transfer_status:a.transfer_status,status:a.status,metadata:a.metadata},options:a.options})}var dw=y("UpdateTransferGroupsFnInput");function Af(r,e,t){let{client:n}=r;if(e===void 0)return new yr({start(O){return n.api.updateTransferGroupMany({transfer_group:O.filter,update:O.update,options:O.options})},modifiers(O,w){return["transfer_group","reverses"].includes(O)?Q(w):w}});let{inputCopy:a,error:s}=C({input:e,options:t,validate:dw});if(s)throw s;let{transfer_status:i,status:o,metadata:d,type:g,update:h}=a,T={transfer_status:i,status:o,metadata:d,type:g};return a.reverses&&(T.reverses=Q(a.reverses)),n.api.updateTransferGroupMany({transfer_group:T,update:h,options:a.options})}var fw=y("UpdateTransfersFnInput");function Nf(r,e,t){let{client:n}=r;if(e===void 0)return new yr({start(T){return n.api.updateTransferMany({transfer:T.filter,update:T.update,options:T.options})},modifiers(T,O){return["token","wallet","from_wallet","to_wallet"].includes(T)?v(O):T==="transfer_group"?Q(O):O}});let{inputCopy:a,error:s}=C({input:e,options:t,validate:fw});if(s)throw s;let{token:i,wallet:o,from_wallet:d,to_wallet:g}=a,h={token:v(i),wallet:v(o),from_wallet:v(d),to_wallet:v(g)};return a.transfer_group&&(h.transfer_group=Q(a.transfer_group)),a.status&&(h.status=a.status),a.metadata&&(h.metadata=a.metadata),n.api.updateTransferMany({transfer:h,update:a.update,options:a.options})}var uw=y("UpdateWalletFnInput");function Uf(r,e,t){let{client:n}=r,{inputCopy:a,error:s}=C({input:e,options:t,validate:uw});if(s)throw s;return n.api.updateWallet({wallet:v(a.wallet),update:{metadata:a.metadata,status:a.status,name:a.name},options:a.options})}var lw={aggregateTransfers:y("AggregateTransfersFnInput"),createAccessToken:y("CreateAccessTokenFnInput"),createContract:y("CreateContractFnInput"),createDeposit:y("CreateDepositFnInput"),createExchange:y("CreateExchangeFnInput"),createToken:y("CreateTokenFnInput"),createTransfer:y("CreateTransferFnInput"),createTransferGroup:y("CreateTransferGroupFnInput"),createTransfers:y("CreateTransfersFnInput"),createWallet:y("CreateWalletFnInput"),createWithdrawal:y("CreateWithdrawalFnInput"),findBalances:y("FindBalancesFnInput"),findTokens:y("FindTokensFnInput"),findTransferGroups:y("FindTransferGroupsFnInput"),findTransfers:y("FindTransfersFnInput"),findWallets:y("FindWalletsFnInput"),getBalance:y("GetBalanceFnInput"),getBalanceHistory:y("GetBalanceHistoryFnInput"),getFlags:y("GetFlagsFnInput"),getStatistics:y("GetStatisticsFnInput"),getToken:y("GetTokenFnInput"),getTransfer:y("GetTransferFnInput"),getTransferGroup:y("GetTransferGroupFnInput"),getWallet:y("GetWalletFnInput"),importData:y("ImportDataFnInput"),reverseTransfer:y("ReverseTransferFnInput"),reverseTransferGroup:y("ReverseTransferGroupFnInput"),reverseTransfers:y("ReverseTransfersFnInput"),setFlags:y("SetFlagsFnInput"),updateToken:y("UpdateTokenFnInput"),updateTransfer:y("UpdateTransferFnInput"),updateTransferGroup:y("UpdateTransferGroupFnInput"),updateTransferGroups:y("UpdateTransferGroupsFnInput"),updateTransfers:y("UpdateTransfersFnInput"),updateWallet:y("UpdateWalletFnInput")},M={aggregateTransfers:Nd,createAccessToken:Ud,createContract:qd,createDeposit:Bd,createExchange:uf,createToken:lf,createTransfer:cf,createTransferGroup:mf,createTransfers:hf,createWallet:_f,createWithdrawal:gf,findBalances:Tf,findTokens:yf,findTransferGroups:bf,findTransfers:Ff,findWallets:xf,getBalance:$f,getBalanceHistory:Of,getFlags:wf,getStatistics:If,getToken:jf,getTransfer:vf,getTransferGroup:kf,getWallet:Sf,importData:Cf,reverseTransfer:Pf,reverseTransferGroup:Gf,reverseTransfers:Df,setFlags:Ef,updateToken:Mf,updateTransfer:Rf,updateTransferGroup:Wf,updateTransferGroups:Af,updateTransfers:Nf,updateWallet:Uf},em=(L=>(L.aggregateTransfers="aggregateTransfers",L.createAccessToken="createAccessToken",L.createContract="createContract",L.createDeposit="createDeposit",L.createExchange="createExchange",L.createToken="createToken",L.createTransfer="createTransfer",L.createTransferGroup="createTransferGroup",L.createTransfers="createTransfers",L.createWallet="createWallet",L.createWithdrawal="createWithdrawal",L.findBalances="findBalances",L.findTokens="findTokens",L.findTransferGroups="findTransferGroups",L.findTransfers="findTransfers",L.findWallets="findWallets",L.getBalance="getBalance",L.getBalanceHistory="getBalanceHistory",L.getFlags="getFlags",L.getStatistics="getStatistics",L.getToken="getToken",L.getTransfer="getTransfer",L.getTransferGroup="getTransferGroup",L.getWallet="getWallet",L.importData="importData",L.reverseTransfer="reverseTransfer",L.reverseTransferGroup="reverseTransferGroup",L.reverseTransfers="reverseTransfers",L.setFlags="setFlags",L.updateToken="updateToken",L.updateTransfer="updateTransfer",L.updateTransferGroup="updateTransferGroup",L.updateTransferGroups="updateTransferGroups",L.updateTransfers="updateTransfers",L.updateWallet="updateWallet",L))(em||{}),tm=(t=>(t.findTransfers="findTransfers",t.findWallets="findWallets",t))(tm||{});var rm,cw=(rm=window.WAPI_VERSION)!=null?rm:"",br=class{constructor(e,t){this.config={};if(this.api=e,this.$connect=e.$connect,t&&(t.token&&(this.config=ee(P({},this.config),{token:t.token})),t.hooks))for(let[n,a]of Object.entries(t.hooks))this.setHook(n,a)}close(){return _e(this,null,function*(){return this.api.close()})}version(){return cw}setHook(e,t){if(typeof t!="function")throw new TypeError("Hooks can only be functions");return this.api.hooks[e]=t,this}configure(e){return this.config=P(P({},this.config),e),this}getConfig(e){return this.config[e]}aggregateTransfers(e,t){return e===void 0?M.aggregateTransfers({client:this}):M.aggregateTransfers({client:this},e,t)}createAccessToken(e,t){return M.createAccessToken({client:this},e,t)}createContract(e,t){return M.createContract({client:this},e,t)}createDeposit(e,t){return M.createDeposit({client:this},e,t)}createExchange(e,t){return M.createExchange({client:this},e,t)}createToken(e,t){return M.createToken({client:this},e,t)}createTransfer(e,t){return M.createTransfer({client:this},e,t)}createTransferGroup(e,t){return M.createTransferGroup({client:this},e,t)}createTransfers(e,t){return M.createTransfers({client:this},e,t)}createWallet(e,t){return M.createWallet({client:this},e,t)}createWithdrawal(e,t){return M.createWithdrawal({client:this},e,t)}findBalances(e,t){return e===void 0?M.findBalances({client:this}):M.findBalances({client:this},e,t)}findTokens(e,t){return e===void 0?M.findTokens({client:this}):M.findTokens({client:this},e,t)}findTransferGroups(e,t){return e===void 0?M.findTransferGroups({client:this}):M.findTransferGroups({client:this},e,t)}findTransfers(e,t){return e===void 0?M.findTransfers({client:this}):M.findTransfers({client:this},e,t)}findWallets(e,t){return e===void 0?M.findWallets({client:this}):M.findWallets({client:this},e,t)}getBalance(e,t){return M.getBalance({client:this},e,t)}getBalanceHistory(e,t){return M.getBalanceHistory({client:this},e,t)}getFlags(e,t){return M.getFlags({client:this},e,t)}getStatistics(e,t){return M.getStatistics({client:this},e,t)}getToken(e,t){return M.getToken({client:this},e,t)}getTransfer(e,t){return M.getTransfer({client:this},e,t)}getTransferGroup(e,t){return M.getTransferGroup({client:this},e,t)}getWallet(e,t){return M.getWallet({client:this},e,t)}importData(e,t){if(e===void 0&&t===void 0)return M.importData({client:this});if(t===void 0&&Zc(e))return M.importData({client:this},e);if(Yc(e))return M.importData({client:this},e,t);throw new Re({message:"INPUT_INVALID",data:{input:e,options:t}})}reverseTransfer(e,t){return M.reverseTransfer({client:this},e,t)}reverseTransferGroup(e,t){return M.reverseTransferGroup({client:this},e,t)}reverseTransfers(e,t){return e===void 0?M.reverseTransfers({client:this}):M.reverseTransfers({client:this},e,t)}setFlags(e,t){return M.setFlags({client:this},e,t)}updateToken(e,t){return M.updateToken({client:this},e,t)}updateTransfer(e,t){return M.updateTransfer({client:this},e,t)}updateTransferGroup(e,t){return M.updateTransferGroup({client:this},e,t)}updateTransferGroups(e,t){return e===void 0?M.updateTransferGroups({client:this}):M.updateTransferGroups({client:this},e,t)}updateTransfers(e,t){return e===void 0?M.updateTransfers({client:this}):M.updateTransfers({client:this},e,t)}updateWallet(e,t){return M.updateWallet({client:this},e,t)}};function nm(r,e){let t=Gd(r);return new br(t,e)}function am(r,e){let t=Rd(r);return new br(t,e)}var mw=Si.getValidator("ClientOptions"),sm=(t=>(t.ws="ws",t.https="https",t))(sm||{});function hw(r){let e=r.config,{inputCopy:t,error:n}=mw(r);if(n)throw n;if(t.client==="ws")return nm(t.connection,e);if(t.client==="https")return am(t.connection,e);throw new TypeError("Invalid client type")}var _w={getIdentifier:gu};return Vm(gw);})();
8
+ deps: ${t}}`};var QT={keyword:"dependencies",type:"object",schemaType:"object",error:dt.error,code(r){let[e,t]=KT(r);uc(r,e),lc(r,t)}};function KT({schema:r}){let e={},t={};for(let n in r){if(n==="__proto__")continue;let a=Array.isArray(r[n])?e:t;a[n]=r[n]}return[e,t]}function uc(r,e=r.schema){let{gen:t,data:n,it:a}=r;if(Object.keys(e).length===0)return;let s=t.let("missing");for(let i in e){let o=e[i];if(o.length===0)continue;let d=(0,ln.propertyInData)(t,n,i,a.opts.ownProperties);r.setParams({property:i,depsCount:o.length,deps:o.join(", ")}),a.allErrors?t.if(d,()=>{for(let g of o)(0,ln.checkReportMissingProp)(r,g)}):(t.if((0,Yp._)`${d} && (${(0,ln.checkMissingProp)(r,o,s)})`),(0,ln.reportMissingProp)(r,s),t.else())}}dt.validatePropertyDeps=uc;function lc(r,e=r.schema){let{gen:t,data:n,keyword:a,it:s}=r,i=t.name("valid");for(let o in e)(0,JT.alwaysValidSchema)(s,e[o])||(t.if((0,ln.propertyInData)(t,n,o,s.opts.ownProperties),()=>{let d=r.subschema({keyword:a,schemaProp:o},i);r.mergeValidEvaluated(d,i)},()=>t.var(i,!0)),r.ok(i))}dt.validateSchemaDeps=lc;dt.default=QT});var hc=R(Xp=>{"use strict";Object.defineProperty(Xp,"__esModule",{value:!0});var mc=L(),YT=te(),XT={message:"property name must be valid",params:({params:r})=>(0,mc._)`{propertyName: ${r.propertyName}}`},ZT={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:XT,code(r){let{gen:e,schema:t,data:n,it:a}=r;if((0,YT.alwaysValidSchema)(a,t))return;let s=e.name("valid");e.forIn("key",n,i=>{r.setParams({propertyName:i}),r.subschema({keyword:"propertyNames",data:i,dataTypes:["string"],propertyName:i,compositeRule:!0},s),e.if((0,mc.not)(s),()=>{r.error(!0),a.allErrors||e.break()})}),r.ok(s)}};Xp.default=ZT});var ed=R(Zp=>{"use strict";Object.defineProperty(Zp,"__esModule",{value:!0});var yo=Ve(),Ze=L(),ey=yt(),bo=te(),ty={message:"must NOT have additional properties",params:({params:r})=>(0,Ze._)`{additionalProperty: ${r.additionalProperty}}`},ry={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:ty,code(r){let{gen:e,schema:t,parentSchema:n,data:a,errsCount:s,it:i}=r;if(!s)throw new Error("ajv implementation error");let{allErrors:o,opts:d}=i;if(i.props=!0,d.removeAdditional!=="all"&&(0,bo.alwaysValidSchema)(i,t))return;let g=(0,yo.allSchemaProperties)(n.properties),h=(0,yo.allSchemaProperties)(n.patternProperties);T(),r.ok((0,Ze._)`${s} === ${ey.default.errors}`);function T(){e.forIn("key",a,I=>{!g.length&&!h.length?b(I):e.if($(I),()=>b(I))})}function $(I){let j;if(g.length>8){let H=(0,bo.schemaRefOrVal)(i,n.properties,"properties");j=(0,yo.isOwnProperty)(e,H,I)}else g.length?j=(0,Ze.or)(...g.map(H=>(0,Ze._)`${I} === ${H}`)):j=Ze.nil;return h.length&&(j=(0,Ze.or)(j,...h.map(H=>(0,Ze._)`${(0,yo.usePattern)(r,H)}.test(${I})`))),(0,Ze.not)(j)}function w(I){e.code((0,Ze._)`delete ${a}[${I}]`)}function b(I){if(d.removeAdditional==="all"||d.removeAdditional&&t===!1){w(I);return}if(t===!1){r.setParams({additionalProperty:I}),r.error(),o||e.break();return}if(typeof t=="object"&&!(0,bo.alwaysValidSchema)(i,t)){let j=e.name("valid");d.removeAdditional==="failing"?(O(I,j,!1),e.if((0,Ze.not)(j),()=>{r.reset(),w(I)})):(O(I,j),o||e.if((0,Ze.not)(j),()=>e.break()))}}function O(I,j,H){let U={keyword:"additionalProperties",dataProp:I,dataPropType:bo.Type.Str};H===!1&&Object.assign(U,{compositeRule:!0,createErrors:!1,allErrors:!1}),r.subschema(U,j)}}};Zp.default=ry});var Tc=R(rd=>{"use strict";Object.defineProperty(rd,"__esModule",{value:!0});var ny=Xr(),_c=Ve(),td=te(),gc=ed(),ay={keyword:"properties",type:"object",schemaType:"object",code(r){let{gen:e,schema:t,parentSchema:n,data:a,it:s}=r;s.opts.removeAdditional==="all"&&n.additionalProperties===void 0&&gc.default.code(new ny.KeywordCxt(s,gc.default,"additionalProperties"));let i=(0,_c.allSchemaProperties)(t);for(let T of i)s.definedProperties.add(T);s.opts.unevaluated&&i.length&&s.props!==!0&&(s.props=td.mergeEvaluated.props(e,(0,td.toHash)(i),s.props));let o=i.filter(T=>!(0,td.alwaysValidSchema)(s,t[T]));if(o.length===0)return;let d=e.name("valid");for(let T of o)g(T)?h(T):(e.if((0,_c.propertyInData)(e,a,T,s.opts.ownProperties)),h(T),s.allErrors||e.else().var(d,!0),e.endIf()),r.it.definedProperties.add(T),r.ok(d);function g(T){return s.opts.useDefaults&&!s.compositeRule&&t[T].default!==void 0}function h(T){r.subschema({keyword:"properties",schemaProp:T,dataProp:T},d)}}};rd.default=ay});var xc=R(nd=>{"use strict";Object.defineProperty(nd,"__esModule",{value:!0});var yc=Ve(),Fo=L(),bc=te(),Fc=te(),sy={keyword:"patternProperties",type:"object",schemaType:"object",code(r){let{gen:e,schema:t,data:n,parentSchema:a,it:s}=r,{opts:i}=s,o=(0,yc.allSchemaProperties)(t),d=o.filter(O=>(0,bc.alwaysValidSchema)(s,t[O]));if(o.length===0||d.length===o.length&&(!s.opts.unevaluated||s.props===!0))return;let g=i.strictSchema&&!i.allowMatchingProperties&&a.properties,h=e.name("valid");s.props!==!0&&!(s.props instanceof Fo.Name)&&(s.props=(0,Fc.evaluatedPropsToName)(e,s.props));let{props:T}=s;$();function $(){for(let O of o)g&&w(O),s.allErrors?b(O):(e.var(h,!0),b(O),e.if(h))}function w(O){for(let I in g)new RegExp(O).test(I)&&(0,bc.checkStrictMode)(s,`property ${I} matches pattern ${O} (use allowMatchingProperties)`)}function b(O){e.forIn("key",n,I=>{e.if((0,Fo._)`${(0,yc.usePattern)(r,O)}.test(${I})`,()=>{let j=d.includes(O);j||r.subschema({keyword:"patternProperties",schemaProp:O,dataProp:I,dataPropType:Fc.Type.Str},h),s.opts.unevaluated&&T!==!0?e.assign((0,Fo._)`${T}[${I}]`,!0):!j&&!s.allErrors&&e.if((0,Fo.not)(h),()=>e.break())})})}}};nd.default=sy});var Oc=R(ad=>{"use strict";Object.defineProperty(ad,"__esModule",{value:!0});var iy=te(),oy={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(r){let{gen:e,schema:t,it:n}=r;if((0,iy.alwaysValidSchema)(n,t)){r.fail();return}let a=e.name("valid");r.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},a),r.failResult(a,()=>r.reset(),()=>r.error())},error:{message:"must NOT be valid"}};ad.default=oy});var $c=R(sd=>{"use strict";Object.defineProperty(sd,"__esModule",{value:!0});var py=Ve(),dy={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:py.validateUnion,error:{message:"must match a schema in anyOf"}};sd.default=dy});var wc=R(id=>{"use strict";Object.defineProperty(id,"__esModule",{value:!0});var xo=L(),fy=te(),uy={message:"must match exactly one schema in oneOf",params:({params:r})=>(0,xo._)`{passingSchemas: ${r.passing}}`},ly={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:uy,code(r){let{gen:e,schema:t,parentSchema:n,it:a}=r;if(!Array.isArray(t))throw new Error("ajv implementation error");if(a.opts.discriminator&&n.discriminator)return;let s=t,i=e.let("valid",!1),o=e.let("passing",null),d=e.name("_valid");r.setParams({passing:o}),e.block(g),r.result(i,()=>r.reset(),()=>r.error(!0));function g(){s.forEach((h,T)=>{let $;(0,fy.alwaysValidSchema)(a,h)?e.var(d,!0):$=r.subschema({keyword:"oneOf",schemaProp:T,compositeRule:!0},d),T>0&&e.if((0,xo._)`${d} && ${i}`).assign(i,!1).assign(o,(0,xo._)`[${o}, ${T}]`).else(),e.if(d,()=>{e.assign(i,!0),e.assign(o,T),$&&r.mergeEvaluated($,xo.Name)})})}}};id.default=ly});var Ic=R(od=>{"use strict";Object.defineProperty(od,"__esModule",{value:!0});var cy=te(),my={keyword:"allOf",schemaType:"array",code(r){let{gen:e,schema:t,it:n}=r;if(!Array.isArray(t))throw new Error("ajv implementation error");let a=e.name("valid");t.forEach((s,i)=>{if((0,cy.alwaysValidSchema)(n,s))return;let o=r.subschema({keyword:"allOf",schemaProp:i},a);r.ok(a),r.mergeEvaluated(o)})}};od.default=my});var Sc=R(pd=>{"use strict";Object.defineProperty(pd,"__esModule",{value:!0});var Oo=L(),vc=te(),hy={message:({params:r})=>(0,Oo.str)`must match "${r.ifClause}" schema`,params:({params:r})=>(0,Oo._)`{failingKeyword: ${r.ifClause}}`},_y={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:hy,code(r){let{gen:e,parentSchema:t,it:n}=r;t.then===void 0&&t.else===void 0&&(0,vc.checkStrictMode)(n,'"if" without "then" and "else" is ignored');let a=jc(n,"then"),s=jc(n,"else");if(!a&&!s)return;let i=e.let("valid",!0),o=e.name("_valid");if(d(),r.reset(),a&&s){let h=e.let("ifClause");r.setParams({ifClause:h}),e.if(o,g("then",h),g("else",h))}else a?e.if(o,g("then")):e.if((0,Oo.not)(o),g("else"));r.pass(i,()=>r.error(!0));function d(){let h=r.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},o);r.mergeEvaluated(h)}function g(h,T){return()=>{let $=r.subschema({keyword:h},o);e.assign(i,o),r.mergeValidEvaluated($,i),T?e.assign(T,(0,Oo._)`${h}`):r.setParams({ifClause:h})}}}};function jc(r,e){let t=r.schema[e];return t!==void 0&&!(0,vc.alwaysValidSchema)(r,t)}pd.default=_y});var kc=R(dd=>{"use strict";Object.defineProperty(dd,"__esModule",{value:!0});var gy=te(),Ty={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:r,parentSchema:e,it:t}){e.if===void 0&&(0,gy.checkStrictMode)(t,`"${r}" without "if" is ignored`)}};dd.default=Ty});var Cc=R(fd=>{"use strict";Object.defineProperty(fd,"__esModule",{value:!0});var yy=Hp(),by=oc(),Fy=zp(),xy=dc(),Oy=fc(),$y=cc(),wy=hc(),Iy=ed(),jy=Tc(),vy=xc(),Sy=Oc(),ky=$c(),Cy=wc(),Ry=Ic(),Gy=Sc(),Py=kc();function Ey(r=!1){let e=[Sy.default,ky.default,Cy.default,Ry.default,Gy.default,Py.default,wy.default,Iy.default,$y.default,jy.default,vy.default];return r?e.push(by.default,xy.default):e.push(yy.default,Fy.default),e.push(Oy.default),e}fd.default=Ey});var Rc=R(ud=>{"use strict";Object.defineProperty(ud,"__esModule",{value:!0});var ge=L(),My={message:({schemaCode:r})=>(0,ge.str)`must match format "${r}"`,params:({schemaCode:r})=>(0,ge._)`{format: ${r}}`},Dy={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:My,code(r,e){let{gen:t,data:n,$data:a,schema:s,schemaCode:i,it:o}=r,{opts:d,errSchemaPath:g,schemaEnv:h,self:T}=o;if(!d.validateFormats)return;a?$():w();function $(){let b=t.scopeValue("formats",{ref:T.formats,code:d.code.formats}),O=t.const("fDef",(0,ge._)`${b}[${i}]`),I=t.let("fType"),j=t.let("format");t.if((0,ge._)`typeof ${O} == "object" && !(${O} instanceof RegExp)`,()=>t.assign(I,(0,ge._)`${O}.type || "string"`).assign(j,(0,ge._)`${O}.validate`),()=>t.assign(I,(0,ge._)`"string"`).assign(j,O)),r.fail$data((0,ge.or)(H(),U()));function H(){return d.strictSchema===!1?ge.nil:(0,ge._)`${i} && !${j}`}function U(){let ae=h.$async?(0,ge._)`(${O}.async ? await ${j}(${n}) : ${j}(${n}))`:(0,ge._)`${j}(${n})`,D=(0,ge._)`(typeof ${j} == "function" ? ${ae} : ${j}.test(${n}))`;return(0,ge._)`${j} && ${j} !== true && ${I} === ${e} && !${D}`}}function w(){let b=T.formats[s];if(!b){H();return}if(b===!0)return;let[O,I,j]=U(b);O===e&&r.pass(ae());function H(){if(d.strictSchema===!1){T.logger.warn(D());return}throw new Error(D());function D(){return`unknown format "${s}" ignored in schema at path "${g}"`}}function U(D){let Ae=D instanceof RegExp?(0,ge.regexpCode)(D):d.code.formats?(0,ge._)`${d.code.formats}${(0,ge.getProperty)(s)}`:void 0,Je=t.scopeValue("formats",{key:s,ref:D,code:Ae});return typeof D=="object"&&!(D instanceof RegExp)?[D.type||"string",D.validate,(0,ge._)`${Je}.validate`]:["string",D,Je]}function ae(){if(typeof b=="object"&&!(b instanceof RegExp)&&b.async){if(!h.$async)throw new Error("async format in sync schema");return(0,ge._)`await ${j}(${n})`}return typeof I=="function"?(0,ge._)`${j}(${n})`:(0,ge._)`${j}.test(${n})`}}}};ud.default=Dy});var Gc=R(ld=>{"use strict";Object.defineProperty(ld,"__esModule",{value:!0});var Wy=Rc(),Ay=[Wy.default];ld.default=Ay});var Pc=R(gr=>{"use strict";Object.defineProperty(gr,"__esModule",{value:!0});gr.contentVocabulary=gr.metadataVocabulary=void 0;gr.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];gr.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]});var Mc=R(cd=>{"use strict";Object.defineProperty(cd,"__esModule",{value:!0});var Ny=Bl(),Uy=nc(),qy=Cc(),By=Gc(),Ec=Pc(),Ly=[Ny.default,Uy.default,(0,qy.default)(),By.default,Ec.metadataVocabulary,Ec.contentVocabulary];cd.default=Ly});var Wc=R($o=>{"use strict";Object.defineProperty($o,"__esModule",{value:!0});$o.DiscrError=void 0;var Dc;(function(r){r.Tag="tag",r.Mapping="mapping"})(Dc||($o.DiscrError=Dc={}))});var Nc=R(hd=>{"use strict";Object.defineProperty(hd,"__esModule",{value:!0});var Tr=L(),md=Wc(),Ac=oo(),Vy=Zr(),Hy=te(),zy={message:({params:{discrError:r,tagName:e}})=>r===md.DiscrError.Tag?`tag "${e}" must be string`:`value of tag "${e}" must be in oneOf`,params:({params:{discrError:r,tag:e,tagName:t}})=>(0,Tr._)`{error: ${r}, tag: ${t}, tagValue: ${e}}`},Jy={keyword:"discriminator",type:"object",schemaType:"object",error:zy,code(r){let{gen:e,data:t,schema:n,parentSchema:a,it:s}=r,{oneOf:i}=a;if(!s.opts.discriminator)throw new Error("discriminator: requires discriminator option");let o=n.propertyName;if(typeof o!="string")throw new Error("discriminator: requires propertyName");if(n.mapping)throw new Error("discriminator: mapping is not supported");if(!i)throw new Error("discriminator: requires oneOf keyword");let d=e.let("valid",!1),g=e.const("tag",(0,Tr._)`${t}${(0,Tr.getProperty)(o)}`);e.if((0,Tr._)`typeof ${g} == "string"`,()=>h(),()=>r.error(!1,{discrError:md.DiscrError.Tag,tag:g,tagName:o})),r.ok(d);function h(){let w=$();e.if(!1);for(let b in w)e.elseIf((0,Tr._)`${g} === ${b}`),e.assign(d,T(w[b]));e.else(),r.error(!1,{discrError:md.DiscrError.Mapping,tag:g,tagName:o}),e.endIf()}function T(w){let b=e.name("valid"),O=r.subschema({keyword:"oneOf",schemaProp:w},b);return r.mergeEvaluated(O,Tr.Name),b}function $(){var w;let b={},O=j(a),I=!0;for(let ae=0;ae<i.length;ae++){let D=i[ae];if(D!=null&&D.$ref&&!(0,Hy.schemaHasRulesButRef)(D,s.self.RULES)){let Je=D.$ref;if(D=Ac.resolveRef.call(s.self,s.schemaEnv.root,s.baseId,Je),D instanceof Ac.SchemaEnv&&(D=D.schema),D===void 0)throw new Vy.default(s.opts.uriResolver,s.baseId,Je)}let Ae=(w=D==null?void 0:D.properties)===null||w===void 0?void 0:w[o];if(typeof Ae!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${o}"`);I=I&&(O||j(D)),H(Ae,ae)}if(!I)throw new Error(`discriminator: "${o}" must be required`);return b;function j({required:ae}){return Array.isArray(ae)&&ae.includes(o)}function H(ae,D){if(ae.const)U(ae.const,D);else if(ae.enum)for(let Ae of ae.enum)U(Ae,D);else throw new Error(`discriminator: "properties/${o}" must have "const" or "enum"`)}function U(ae,D){if(typeof ae!="string"||ae in b)throw new Error(`discriminator: "${o}" values must be unique strings`);b[ae]=D}}}};hd.default=Jy});var Uc=R((xj,Qy)=>{Qy.exports={$schema:"http://json-schema.org/draft-07/schema#",$id:"http://json-schema.org/draft-07/schema#",title:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:!0}});var Bc=R((ue,_d)=>{"use strict";Object.defineProperty(ue,"__esModule",{value:!0});ue.MissingRefError=ue.ValidationError=ue.CodeGen=ue.Name=ue.nil=ue.stringify=ue.str=ue._=ue.KeywordCxt=ue.Ajv=void 0;var Ky=Dl(),Yy=Mc(),Xy=Nc(),qc=Uc(),Zy=["/properties"],wo="http://json-schema.org/draft-07/schema",yr=class extends Ky.default{_addVocabularies(){super._addVocabularies(),Yy.default.forEach(e=>this.addVocabulary(e)),this.opts.discriminator&&this.addKeyword(Xy.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;let e=this.opts.$data?this.$dataMetaSchema(qc,Zy):qc;this.addMetaSchema(e,wo,!1),this.refs["http://json-schema.org/schema"]=wo}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(wo)?wo:void 0)}};ue.Ajv=yr;_d.exports=ue=yr;_d.exports.Ajv=yr;Object.defineProperty(ue,"__esModule",{value:!0});ue.default=yr;var eb=Xr();Object.defineProperty(ue,"KeywordCxt",{enumerable:!0,get:function(){return eb.KeywordCxt}});var br=L();Object.defineProperty(ue,"_",{enumerable:!0,get:function(){return br._}});Object.defineProperty(ue,"str",{enumerable:!0,get:function(){return br.str}});Object.defineProperty(ue,"stringify",{enumerable:!0,get:function(){return br.stringify}});Object.defineProperty(ue,"nil",{enumerable:!0,get:function(){return br.nil}});Object.defineProperty(ue,"Name",{enumerable:!0,get:function(){return br.Name}});Object.defineProperty(ue,"CodeGen",{enumerable:!0,get:function(){return br.CodeGen}});var tb=so();Object.defineProperty(ue,"ValidationError",{enumerable:!0,get:function(){return tb.default}});var rb=Zr();Object.defineProperty(ue,"MissingRefError",{enumerable:!0,get:function(){return rb.default}})});var Ow={};Jm(Ow,{APIFunctions:()=>Gd,APIValidators:()=>Rd,AggregateTransferManyTxInputSchema:()=>Ba,AggregateTransferManyTxOutputSchema:()=>La,AggregateTransfersFnInputSchema:()=>jn,AggregateTransfersFnOutputSchema:()=>vn,AuthError:()=>ht,AuthenticationCheckTxInputSchema:()=>Va,AuthenticationCheckTxOutputSchema:()=>Ha,AuthenticationError:()=>Pt,AuthorizationError:()=>Ui,Client:()=>wr,ClientFunctions:()=>E,ClientFunctionsEnum:()=>sm,ClientQueryBuilderFunctionsEnum:()=>im,ClientValidators:()=>Tw,ConfigError:()=>Er,ConstraintError:()=>Mr,ConstsSchema:()=>zt,CreateAccessTokenFnInputSchema:()=>Sn,CreateAccessTokenFnOutputSchema:()=>kn,CreateAccessTokenTxInputSchema:()=>za,CreateAccessTokenTxOutputSchema:()=>Ja,CreateContractFnInputSchema:()=>Cn,CreateContractFnOutputSchema:()=>Rn,CreateContractTxInputSchema:()=>Qa,CreateContractTxOutputSchema:()=>Ka,CreateDepositFnInputSchema:()=>Gn,CreateDepositFnOutputSchema:()=>Pn,CreateDepositTxInputSchema:()=>Ya,CreateDepositTxOutputSchema:()=>Xa,CreateDistributionTxInputSchema:()=>Za,CreateDistributionTxOutputSchema:()=>es,CreateExchangeFnInputSchema:()=>En,CreateExchangeFnOutputSchema:()=>Mn,CreateTokenFnInputSchema:()=>Dn,CreateTokenFnOutputSchema:()=>Wn,CreateTokenTxInputSchema:()=>ts,CreateTokenTxOutputSchema:()=>rs,CreateTransferFnInputSchema:()=>An,CreateTransferFnOutputSchema:()=>Nn,CreateTransferGroupFnInputSchema:()=>Un,CreateTransferGroupFnOutputSchema:()=>qn,CreateTransferGroupTxInputSchema:()=>ss,CreateTransferGroupTxOutputSchema:()=>is,CreateTransferManyTxInputSchema:()=>os,CreateTransferManyTxOutputSchema:()=>ps,CreateTransferTxInputSchema:()=>ns,CreateTransferTxOutputSchema:()=>as,CreateTransfersFnInputSchema:()=>Bn,CreateTransfersFnOutputSchema:()=>Ln,CreateWalletFnInputSchema:()=>Vn,CreateWalletFnOutputSchema:()=>Hn,CreateWalletTxInputSchema:()=>ds,CreateWalletTxOutputSchema:()=>fs,CreateWithdrawalFnInputSchema:()=>zn,CreateWithdrawalFnOutputSchema:()=>Jn,CreateWithdrawalTxInputSchema:()=>us,CreateWithdrawalTxOutputSchema:()=>ls,DbFilterFunctionBasicEnum:()=>zd,DbFilterFunctionInEnum:()=>Jd,DbFilterFunctionMetadataBasicEnum:()=>Hd,DbFilterFunctionMetadataInEnum:()=>Qd,DbFilterFunctionMetadataNullEnum:()=>Kd,DbFilterFunctionNullEnum:()=>Yd,DbFilterOperatorEnum:()=>Xd,DbFilterOperatorExtendedEnum:()=>ef,DbFilterOperatorStringEnum:()=>Zd,DbModelNameEnum:()=>lf,ErrorDescription:()=>gu,ErrorMessage:()=>_u,ErrorType:()=>qi,Errors:()=>De,ExportDatabaseTxInputSchema:()=>cs,ExportDatabaseTxOutputSchema:()=>ms,FindBalanceManyTxInputSchema:()=>hs,FindBalanceManyTxOutputSchema:()=>_s,FindBalancesFnInputSchema:()=>Qn,FindBalancesFnOutputSchema:()=>Kn,FindTokenManyTxInputSchema:()=>gs,FindTokenManyTxOutputSchema:()=>Ts,FindTokensFnInputSchema:()=>Yn,FindTokensFnOutputSchema:()=>Xn,FindTransferGroupManyTxInputSchema:()=>ys,FindTransferGroupManyTxOutputSchema:()=>bs,FindTransferGroupsFnInputSchema:()=>Zn,FindTransferGroupsFnOutputSchema:()=>ea,FindTransferManyTxInputSchema:()=>Fs,FindTransferManyTxOutputSchema:()=>xs,FindTransfersFnInputSchema:()=>ta,FindTransfersFnOutputSchema:()=>ra,FindWalletManyTxInputSchema:()=>Os,FindWalletManyTxOutputSchema:()=>$s,FindWalletsFnInputSchema:()=>na,FindWalletsFnOutputSchema:()=>aa,FinishTransactionTxInputSchema:()=>ws,FinishTransactionTxOutputSchema:()=>Is,FnConstsSchema:()=>sa,GetBalanceFnInputSchema:()=>ia,GetBalanceFnOutputSchema:()=>oa,GetBalanceHistoryFnInputSchema:()=>pa,GetBalanceHistoryFnOutputSchema:()=>da,GetBalanceHistoryTxInputSchema:()=>Ss,GetBalanceHistoryTxOutputSchema:()=>ks,GetBalanceTxInputSchema:()=>js,GetBalanceTxOutputSchema:()=>vs,GetDatabaseExportProgressTxInputSchema:()=>Cs,GetDatabaseExportProgressTxOutputSchema:()=>Rs,GetDatabaseImportProgressTxInputSchema:()=>Gs,GetDatabaseImportProgressTxOutputSchema:()=>Ps,GetFlagsFnInputSchema:()=>fa,GetFlagsFnOutputSchema:()=>ua,GetFlagsTxInputSchema:()=>Es,GetFlagsTxOutputSchema:()=>Ms,GetStatisticsFnInputSchema:()=>la,GetStatisticsFnOutputSchema:()=>ca,GetStatisticsTxInputSchema:()=>Ds,GetStatisticsTxOutputSchema:()=>Ws,GetTokenFnInputSchema:()=>ma,GetTokenFnOutputSchema:()=>ha,GetTokenManyTxInputSchema:()=>Us,GetTokenManyTxOutputSchema:()=>qs,GetTokenTxInputSchema:()=>As,GetTokenTxOutputSchema:()=>Ns,GetTransferFnInputSchema:()=>_a,GetTransferFnOutputSchema:()=>ga,GetTransferGroupFnInputSchema:()=>Ta,GetTransferGroupFnOutputSchema:()=>ya,GetTransferGroupTxInputSchema:()=>Vs,GetTransferGroupTxOutputSchema:()=>Hs,GetTransferTxInputSchema:()=>Bs,GetTransferTxOutputSchema:()=>Ls,GetWalletFnInputSchema:()=>ba,GetWalletFnOutputSchema:()=>Fa,GetWalletManyTxInputSchema:()=>Qs,GetWalletManyTxOutputSchema:()=>Ks,GetWalletTxInputSchema:()=>zs,GetWalletTxOutputSchema:()=>Js,ITxAggregatorSimpleEnum:()=>vd,ITxDistributorLeftoverRuleEnum:()=>Sd,ITxMetadataActionEnum:()=>kd,ITxMetadataActionForReverseEnum:()=>Cd,ITxPeriodSimpleEnum:()=>Pi,ImportActionsTxInputSchema:()=>Qt,ImportActionsTxOutputSchema:()=>Ys,ImportDataFnInputSchema:()=>Jt,ImportDataFnOutputSchema:()=>xa,ImportDatabaseTxInputSchema:()=>Xs,ImportDatabaseTxOutputSchema:()=>Zs,InputError:()=>pe,JSONRPCError:()=>Gt,ListDatabaseExportsTxInputSchema:()=>ei,ListDatabaseExportsTxOutputSchema:()=>ti,QueryBuilder:()=>Pe,QueryLogsTxInputSchema:()=>ai,QueryLogsTxOutputSchema:()=>si,QueryTxInputSchema:()=>ri,QueryTxOutputSchema:()=>ni,ResetDatabaseTxInputSchema:()=>ii,ResetDatabaseTxOutputSchema:()=>oi,ReverseTransferFnInputSchema:()=>Oa,ReverseTransferFnOutputSchema:()=>$a,ReverseTransferGroupFnInputSchema:()=>wa,ReverseTransferGroupFnOutputSchema:()=>Ia,ReverseTransferGroupManyTxInputSchema:()=>li,ReverseTransferGroupManyTxOutputSchema:()=>ci,ReverseTransferGroupTxInputSchema:()=>fi,ReverseTransferGroupTxOutputSchema:()=>ui,ReverseTransferManyTxInputSchema:()=>mi,ReverseTransferManyTxOutputSchema:()=>hi,ReverseTransferTxInputSchema:()=>pi,ReverseTransferTxOutputSchema:()=>di,ReverseTransfersFnInputSchema:()=>ja,ReverseTransfersFnOutputSchema:()=>va,SetFlagsFnInputSchema:()=>Sa,SetFlagsFnOutputSchema:()=>ka,SetFlagsTxInputSchema:()=>_i,SetFlagsTxOutputSchema:()=>gi,StartTransactionTxInputSchema:()=>Ti,StartTransactionTxOutputSchema:()=>yi,StreamError:()=>Be,StreamPromise:()=>_t,TokenStatusEnum:()=>rf,TokenTableInputSchema:()=>cn,TokenTableSchema:()=>mn,TokenTypeEnum:()=>tf,TransferGroupStatusEnum:()=>nf,TransferGroupTableInputSchema:()=>gn,TransferGroupTableSchema:()=>Tn,TransferGroupTypeEnum:()=>of,TransferLogTableInputSchema:()=>yn,TransferLogTableSchema:()=>bn,TransferStatusEnum:()=>af,TransferStatusInputEnum:()=>sf,TransferTableInputSchema:()=>hn,TransferTableSchema:()=>_n,TransferTypeEnum:()=>pf,TxConstsSchema:()=>bi,UpdateTokenFnInputSchema:()=>Ca,UpdateTokenFnOutputSchema:()=>Ra,UpdateTokenTxInputSchema:()=>Fi,UpdateTokenTxOutputSchema:()=>xi,UpdateTransferFnInputSchema:()=>Ga,UpdateTransferFnOutputSchema:()=>Pa,UpdateTransferGroupFnInputSchema:()=>Ea,UpdateTransferGroupFnOutputSchema:()=>Ma,UpdateTransferGroupManyTxInputSchema:()=>ji,UpdateTransferGroupManyTxOutputSchema:()=>vi,UpdateTransferGroupTxInputSchema:()=>wi,UpdateTransferGroupTxOutputSchema:()=>Ii,UpdateTransferGroupsFnInputSchema:()=>Da,UpdateTransferGroupsFnOutputSchema:()=>Wa,UpdateTransferManyTxInputSchema:()=>Si,UpdateTransferManyTxOutputSchema:()=>ki,UpdateTransferTxInputSchema:()=>Oi,UpdateTransferTxOutputSchema:()=>$i,UpdateTransfersFnInputSchema:()=>Aa,UpdateTransfersFnOutputSchema:()=>Na,UpdateWalletFnInputSchema:()=>Ua,UpdateWalletFnOutputSchema:()=>qa,UpdateWalletTxInputSchema:()=>Ci,UpdateWalletTxOutputSchema:()=>Ri,ValidationError:()=>We,Validator:()=>Gi,WAPIError:()=>Qe,WalletStatusEnum:()=>ff,WalletTableInputSchema:()=>Fn,WalletTableSchema:()=>xn,WalletTokenSettingTableInputSchema:()=>On,WalletTokenSettingTableSchema:()=>$n,WalletTypeEnum:()=>df,WapiClientType:()=>fm,WapiSettingTableInputSchema:()=>wn,WapiSettingTableSchema:()=>In,WapiSettingTypeEnum:()=>uf,aggregateTransfers:()=>qd,create:()=>Fw,createAccessToken:()=>Bd,createContract:()=>Ld,createDeposit:()=>Vd,createExchange:()=>cf,createToken:()=>mf,createTransfer:()=>hf,createTransferGroup:()=>_f,createTransfers:()=>gf,createWallet:()=>Tf,createWithdrawal:()=>yf,findBalances:()=>bf,findTokens:()=>Ff,findTransferGroups:()=>xf,findTransfers:()=>Of,findWallets:()=>$f,getBalance:()=>wf,getBalanceHistory:()=>If,getFlags:()=>jf,getStatistics:()=>vf,getToken:()=>Sf,getTransfer:()=>kf,getTransferGroup:()=>Cf,getWallet:()=>Rf,importData:()=>Gf,reverseTransfer:()=>Pf,reverseTransferGroup:()=>Ef,reverseTransfers:()=>Mf,setFlags:()=>Df,updateToken:()=>Wf,updateTransfer:()=>Af,updateTransferGroup:()=>Nf,updateTransferGroups:()=>Uf,updateTransfers:()=>qf,updateWallet:()=>Bf,utils:()=>xw});var hu=WebSocket;function z(...r){window.WAPI_DEBUG&&console.log(...r.map(e=>e&&typeof e=="object"?JSON.stringify(e):e))}var he={JSONRPC:{min:-32700,max:-32600,ERRORS:{PARSE_ERROR:{code:-32700,message:"Parse error",description:"Unable to parse JSON input"},INVALID_REQUEST:{code:-32600,message:"Invalid request",description:"JSON input does not match JSONRPC spec"},METHOD_NOT_FOUND:{code:-32601,message:"Method not found",description:"Requested method not found"},INVALID_PARAMS:{code:-32602,message:"Invalid params",description:"Invalid params provided for method"},INTERNAL_SERVER_ERROR:{code:-32603,message:"Internal server error",description:"Unknown error occurred"}}},AUTH:{min:-20999,max:-2e4,ERRORS:{AUTHENTICATION_ERROR:{code:-2e4,message:"Authentication error",description:"Invalid authentication credentials"},AUTHORIZATION_ERROR:{code:-20001,message:"AUTHORIZATION_ERROR",description:"Provided credentials lack access rights"}}},STREAM:{min:-10999,max:-1e4,ERRORS:{CONNECTION_LOST:{code:-1e4,message:"CONNECTION_LOST",description:"Lost connection to server"},INPUT_STREAM_INVALID:{code:-10001,message:"INPUT_STREAM_INVALID",description:"Invalid input stream identifier provided"},INVALID_RESPONSE_STREAM_CHUNK:{code:-10002,message:"INVALID_RESPONSE_STREAM_CHUNK",description:"Received multiple chunks for non-array property"},INVALID_INPUT_STREAM_CHUNK:{code:-10003,message:"INVALID_INPUT_STREAM_CHUNK",description:"Invalid chunk sent to input stream"},INPUT_STREAM_TIMEOUT:{code:-10004,message:"INPUT_STREAM_TIMEOUT",description:"Input stream failed to finish in allotted time"},INPUT_STREAM_ERROR:{code:-10005,message:"INPUT_STREAM_ERROR",description:"Unknown error in input stream"},INPUT_STREAM_NOT_ALLOWED:{code:-10006,message:"INPUT_STREAM_NOT_ALLOWED",description:"Stream input not allowed for method"}}},INPUT:{min:-14999,max:-11e3,ERRORS:{HTTP_BODY_SIZE:{code:-11e3,message:"HTTP_BODY_SIZE",description:"Http body size can't be more than 100MB"},DATABASE_EXPORT_CONFLICT:{code:-12e3,message:"DATABASE_EXPORT_CONFLICT",description:"Database export already in progress"},DATABASE_IMPORT_CONFLICT:{code:-12001,message:"DATABASE_IMPORT_CONFLICT",description:"Database import already in progress"},DATABASE_EXPORT_PROGRESS_NOT_FOUND:{code:-12002,message:"DATABASE_EXPORT_PROGRESS_NOT_FOUND",description:"Database backup process not found"},DATABASE_IMPORT_PROGRESS_NOT_FOUND:{code:-12003,message:"DATABASE_IMPORT_PROGRESS_NOT_FOUND",description:"Database backup process not found"},DATABASE_IMPORT_NOT_FOUND:{code:-12004,message:"DATABASE_IMPORT_NOT_FOUND",description:"Database import file not found"},TR_CANT_UPDATE_TO_PENDING:{code:-12100,message:"TR_CANT_UPDATE_TO_PENDING",description:"Transfer status can only move from 'pending'->'finished'/'cancelled"},TR_CANT_UPDATE_TIMESTAMP:{code:-12101,message:"TR_CANT_UPDATE_TIMESTAMP",description:"Cant update transfer.updated_at - allow_timestamps flag is set to off"},TR_CANT_INSERT_TIMESTAMP:{code:-12102,message:"TR_CANT_INSERT_TIMESTAMP",description:"Cant insert transfer.created_at - allow_timestamps flag is set to off"},TR_EMPTY_UPDATE_REQUEST:{code:-12103,message:"TR_EMPTY_UPDATE_REQUEST",description:"Update request for transfer is empty"},TR_MISSING_FILTER:{code:-12104,message:"TR_MISSING_FILTER",description:"Transactions can't reversed or updated without valid filter"},TR_TO_WALLET_WITHDRAWAL:{code:-12105,message:"TR_TO_WALLET_WITHDRAWAL",description:"To wallet can't be specified when doing a withdrawal"},TR_FROM_WALLET_DEPOSIT:{code:-12106,message:"TR_FROM_WALLET_DEPOSIT",description:"From wallet can't be specified when doing a deposit"},TR_FROM_TO_CONFLICT:{code:-12107,message:"TR_FROM_TO_CONFLICT",description:"from_wallet and to_wallet can not be the same"},TR_UNABLE_TO_RESOLVE_INPUT:{code:-12108,message:"TR_UNABLE_TO_RESOLVE_INPUT",description:"Unable to resolve references to foreign keys"},TRG_MISSING_FILTER:{code:-12200,message:"TRG_MISSING_FILTER",description:"Transaction groups can't reversed or updated without valid filter"},INVALID_FIELD_AGR_COMB:{code:-12300,message:"INVALID_FIELD_AGR_COMB",description:"Provided aggregation field was not found on Model"},INVALID_FIELD_FOR_MODEL:{code:-12301,message:"INVALID_FIELD_FOR_MODEL",description:"Provided groupBy field was not found on Model"},NO_METADATA_ON_MODEL:{code:-12302,message:"NO_METADATA_ON_MODEL",description:"Can't use metadata field for grouping as current Model does not have metadata"},INVALID_MODEL:{code:-12303,message:"INVALID_MODEL",description:"Provided Model name is invalid"},INVALID_COMPLEX_FILTER:{code:-12304,message:"INVALID_COMPLEX_FILTER",description:"The provided complex filter does not pass validation"},UNCLEAR_AGGREGATOR:{code:-12305,message:"UNCLEAR_AGGREGATOR",description:"Invalid aggregator function provided"},CONTRACT_OWNER_NOT_FOUND:{code:-12306,message:"CONTRACT_OWNER_NOT_FOUND",description:"Unable to find Wallet specified as Contract token owner"},DISTRIBUTION_MISSING_TARGETS:{code:-12307,message:"DISTRIBUTION_MISSING_TARGETS",description:"Unable to resolve all targets (Wallets, Tokens) for distribution request"},TOKEN_INVALID_WALLET:{code:-12308,message:"TOKEN_INVALID_WALLET",description:"Invalid belongs_to wallet provided"},BAL_FUTURE_DATETIME:{code:-12309,message:"BAL_FUTURE_DATETIME",description:"Balance datetime can't be in the future"},INPUT_NEEDS_IDENTIFIER:{code:-12310,message:"INPUT_NEEDS_IDENTIFIER",description:"Missing identifier - automatically calculated identifiers conflict on identical input for 30s To make an identical transfer during that window you need to provide a unique identifier"},RESET_INVALID_CONFIRMATION:{code:-12311,message:"RESET_INVALID_CONFIRMATION",description:"Provided reset confirmation code is invalid"},INPUT_NEEDS_TOKEN:{code:-12312,message:"INPUT_NEEDS_TOKEN",description:"token must be specified on input or in client config"},CONFLICTING_OPTIONS_FOR_BALANCE:{code:-12313,message:"CONFLICTING_OPTIONS_FOR_BALANCE",description:"return_running_balance and return_running_balance_for can't be specified together"},CONFLICTING_OPTIONS_FOR_SIGNED_AMOUNT:{code:-12314,message:"CONFLICTING_OPTIONS_FOR_SIGNED_AMOUNT",description:"return_signed_amount and return_signed_amount_for_wallet can't be specified together"},RUNNING_BALANCE_WITHOUT_WALLET:{code:-12315,message:"RUNNING_BALANCE_WITHOUT_WALLET",description:"return_running_balance option requires Wallet filter to be specified"},SIGNED_AMOUNT_WITHOUT_WALLET:{code:-12316,message:"SIGNED_AMOUNT_WITHOUT_WALLET",description:"return_signed_amount option requires Wallet filter to be specified"},REQUIRED_INPUT_MISSING:{code:-12317,message:"REQUIRED_INPUT_MISSING",description:"input does not specify required keys"},TRX_NOT_ALLOWED:{code:-12400,message:"TRX_NOT_ALLOWED",description:"This method can not run in a transaction"},TRANSACTION_NOT_FOUND:{code:-12401,message:"TRANSACTION_NOT_FOUND",description:"Transaction not found"},ONLY_SELECT_ALLOWED:{code:-12402,message:"ONLY_SELECT_ALLOWED",description:"Only select queries are allowed"}}},CONSTRAINT:{min:-19999,max:-19e3,ERRORS:{INVALID_LATEST_HASH:{code:-19e3,message:"INVALID_LATEST_HASH",description:"Http body size can't be more than 100MB"},TOKEN_LIMIT_REACHED:{code:-19001,message:"TOKEN_LIMIT_REACHED",description:"Unable to issue more tokens as Token.limit has been reached"},TR_INVALID_BALANCE:{code:-19101,message:"TR_INVALID_BALANCE",description:"Transfer would result in invalid balance for a Wallet"},TR_AMOUNT_NOT_DIVISIBLE:{code:-19102,message:"TR_AMOUNT_NOT_DIVISIBLE",description:"Transfer amount is not divisible by specified Token.divisor"},TR_TOKEN_DISABLED:{code:-19103,message:"TR_TOKEN_DISABLED",description:"Token status is set to 'disabled' - no new transfers allowed"},TR_TOKEN_DWONLY:{code:-19104,message:"TR_TOKEN_DWONLY",description:"Token status is set to 'dw-only' - only deposits or withdrawals allowed"},TR_TRG_STATUS_MISMATCH:{code:-19105,message:"TR_TRG_STATUS_MISMATCH",description:"Transfers in transfer_group must match transfer_group.transfer_status"},TR_TRG_CLOSED:{code:-19106,message:"TR_TRG_CLOSED",description:"Cant add Transfer to group. TransferGroup is closed"},TR_TIMESTAMP_IN_PAST:{code:-19107,message:"TR_TIMESTAMP_IN_PAST",description:"Transfer.created_at must be the latest"},TR_TIMESTAMP_MUST_BE_LATEST:{code:-19108,message:"TR_TIMESTAMP_MUST_BE_LATEST",description:"Transfer.created_at must be the latest"},TR_INVALID_CANCELLED:{code:-19109,message:"TR_INVALID_CANCELLED",description:"Cant create cancelled transfer"},TR_FROM_WALLET_STATUS_CONSTRAINT:{code:-19110,message:"TR_FROM_WALLET_STATUS_CONSTRAINT",description:"From wallet.status doesn't allow this type of transfers"},TR_TO_WALLET_STATUS_CONSTRAINT:{code:-19111,message:"TR_TO_WALLET_STATUS_CONSTRAINT",description:"To wallet.status doesn't allow this type of transfers"},TR_CANCELLED_CANT_RV:{code:-19112,message:"TR_CANCELLED_CANT_RV",description:"Cancelled Transfer can not be reversed"},TR_DEPOSIT_CANT_RV_WITHOUT_FLAG:{code:-19113,message:"TR_DEPOSIT_CANT_RV_WITHOUT_FLAG",description:"Deposits are expected connection points with outside systems, thus extra validation is required. Reversing a Transfer.type = 'deposit' requires reverse_deposit option to be true."},TR_WITHDRAWAL_CANT_RV_WITHOUT_FLAG:{code:-19114,message:"TR_WITHDRAWAL_CANT_RV_WITHOUT_FLAG",description:"Withdrawals are expected connection points with outside systems, thus extra validation is required. Reversing a Transfer.type = 'withdrawal' requires reverse_withdrawal option to be true."},TRG_SINGLE_PENDING_TR_CANT_RV:{code:-19200,message:"TRG_SINGLE_PENDING_TR_CANT_RV",description:"Transfer is part of TransferGroup and can not be reversed separately"},TRG_CANCELLED_CANT_RV:{code:-19201,message:"TRG_CANCELLED_CANT_RV",description:"Cancelled TransferGroup can not be reversed"},TRG_DEPOSIT_CANT_RV_WITHOUT_FLAG:{code:-19202,message:"TRG_DEPOSIT_CANT_RV_WITHOUT_FLAG",description:"TransferGroup includes Transfer.type = 'deposit', thus for extra validation the reverse_deposit option must be set true"},TRG_WITHDRAWAL_CANT_RV_WITHOUT_FLAG:{code:-19203,message:"TRG_WITHDRAWAL_CANT_RV_WITHOUT_FLAG",description:"TransferGroup includes Transfer.type = 'withdrawal', thus for extra validation the reverse_withdrawal option must be set true"}}},CONFIG:{min:-16e3,max:-15e3,ERRORS:{METHOD_DISABLED:{code:-15e3,message:"METHOD_DISABLED",description:"Method is disabled"},FLAG_PRODUCTION_ON:{code:-15001,message:"FLAG_PRODUCTION_ON",description:'Production flag is "on" - this method is disabled'},FLAG_PRODUCTION_LOCKED:{code:-15002,message:"FLAG_PRODUCTION_LOCKED",description:"Cant update production flag to false in this server"},TRANSACTION_TIMEOUT:{code:-15003,message:"TRANSACTION_TIMEOUT",description:"Database transaction timed out"}}}},De=v(v(v(v(v(v({},he.JSONRPC.ERRORS),he.AUTH.ERRORS),he.CONFIG.ERRORS),he.STREAM.ERRORS),he.INPUT.ERRORS),he.CONSTRAINT.ERRORS);function Et(r){return Object.fromEntries(Object.keys(r).map(e=>[e,e]))}var qi=Et(De),Qe=class extends Error{constructor({type:e,code:t,message:n,data:a}){var i;super(n);let s=(i=De[e])!=null?i:De.INTERNAL_SERVER_ERROR;this.type=De[e]?e:qi.INTERNAL_SERVER_ERROR,this.code=t||s.code,this.message=n||s.message,this.data=v({description:s.description},a&&typeof a=="object"?a:{error:a})}toJSON(){return{code:this.code,message:this.message,data:this.data}}},Gt=class extends Qe{constructor(e,t,n){super({type:e,message:n,data:t})}static get group(){return he.JSONRPC.ERRORS}static get types(){return Et(he.JSONRPC.ERRORS)}},Be=class extends Qe{constructor(e,t,n){super({type:e,message:n,data:t})}static get group(){return he.STREAM.ERRORS}static get types(){return Et(he.STREAM.ERRORS)}},pe=class extends Qe{constructor(e,t,n){super({type:e,message:n,data:t})}static get group(){return he.INPUT.ERRORS}static get types(){return Et(he.INPUT.ERRORS)}},Er=class extends Qe{constructor(e,t,n){super({type:e,message:n,data:t})}static get group(){return he.CONFIG.ERRORS}static get types(){return Et(he.CONFIG.ERRORS)}},ht=class extends Qe{constructor(e,t,n){super({type:e,message:n,data:t})}static get group(){return he.AUTH.ERRORS}static get types(){return Et(he.AUTH.ERRORS)}},Mr=class extends Qe{constructor(e,t,n){super({type:e,message:n,data:t})}static get group(){return he.CONSTRAINT.ERRORS}static get types(){return Et(he.CONSTRAINT.ERRORS)}},We=class extends Gt{constructor(e,t){super(Gt.types.INVALID_PARAMS,e,t)}},Pt=class extends ht{constructor(e){super(ht.types.AUTHENTICATION_ERROR,e)}},Ui=class extends ht{constructor(e){super(ht.types.AUTHORIZATION_ERROR,e)}};var Ym=Object.fromEntries(Object.keys(De).map(r=>[De[r].code,r]));function Xm(r){let e=Ym[r];if(!e)return{group:void 0,type:void 0};let t=Object.keys(he).find(n=>e in he[n].ERRORS);return t?{group:t,type:e}:(console.error("ERRORS and ERROR_GROUPS are out of sync",e),{group:void 0,type:e})}function Po({code:r,message:e,data:t}){let{group:n,type:a}=Xm(r);switch(e=e&&e!==a?e:De[a].description,n){case"JSONRPC":return new Gt(a,t,e);case"AUTH":return new ht(a,t,e);case"CONFIG":return new Er(a,t,e);case"CONSTRAINT":return new Mr(a,t,e);case"INPUT":return new pe(a,t,e);case"STREAM":return new Be(a,t,e);default:return new Qe({code:r,message:e,data:t,type:a!=null?a:qi.INTERNAL_SERVER_ERROR})}}var _u=Object.fromEntries(Object.keys(De).map(r=>[r,De[r].message])),gu=Object.fromEntries(Object.keys(De).map(r=>[r,De[r].description]));var Bi,Zm=new Uint8Array(16);function Eo(){if(!Bi&&(Bi=typeof crypto!="undefined"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Bi))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Bi(Zm)}var be=[];for(let r=0;r<256;++r)be.push((r+256).toString(16).slice(1));function Tu(r,e=0){return be[r[e+0]]+be[r[e+1]]+be[r[e+2]]+be[r[e+3]]+"-"+be[r[e+4]]+be[r[e+5]]+"-"+be[r[e+6]]+be[r[e+7]]+"-"+be[r[e+8]]+be[r[e+9]]+"-"+be[r[e+10]]+be[r[e+11]]+be[r[e+12]]+be[r[e+13]]+be[r[e+14]]+be[r[e+15]]}var eh=typeof crypto!="undefined"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Mo={randomUUID:eh};function th(r,e,t){if(Mo.randomUUID&&!e&&!r)return Mo.randomUUID();r=r||{};let n=r.random||(r.rng||Eo)();if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,e){t=t||0;for(let a=0;a<16;++a)e[t+a]=n[a];return e}return Tu(n)}var ir=th;function Mt(r=8){return ir().split("-").pop().substr(0,r)}var Do={timeouts:{},values:{},set(r,e){this.timeouts[r]=setTimeout(()=>this.clear(r),3e4),this.values[r]=e},get(r){return this.values[r]},getKey(r){let e=JSON.parse(JSON.stringify(r)),t="";return Object.keys(e).sort().forEach(n=>{let a="";e[n]&&typeof e[n]=="object"&&!Array.isArray(e[n])?a=this.getKey(e[n]):a=JSON.stringify(e[n]),t+=n+":"+a}),t},clear(r){this.timeouts[r]&&clearTimeout(this.timeouts[r]),delete this.timeouts[r],delete this.values[r]},clearAll(){Object.keys(this.timeouts).forEach(r=>{clearTimeout(this.timeouts[r])}),this.timeouts={},this.values={}}};function je(r){if(!r)return ir();let e=Do.getKey(r);if(Do.get(e))throw new pe("INPUT_NEEDS_IDENTIFIER",{object:r});let t=ir();return Do.set(e,t),t}function Fu(r){return new Promise(e=>setTimeout(e,r))}function xu(){return je()}function Li(r){return JSON.parse(JSON.stringify(r))}function st(r,e,t){if(e in r){if(r[e]===void 0)throw new We({input:r},`undefined provided for ${e}`);return r}if(!t)throw new We({input:r},`${e} is required if no default set`);let n=Li(r);return n[e]=t,n}function S(r){let e=Ou(r);if(e!=null)return{foreign:e}}function J(r){let e=Ou(r);if(e!=null)return{identifier:e}}function C({input:r,options:e,validate:t}){var a;let n=Li(r);return(a=n.options)!=null||(n.options=e!=null?e:{}),t(n)}function Ou(r){return r==null?r:r+""}function rh(r){return Object.keys(r).filter(e=>r[e]!==void 0).map(e=>`${encodeURIComponent(e)}=${encodeURIComponent(r[e])}`).join("&")}function yu(r){return r.host.replace(/^https:/,"wss:")+"?"+rh({apikey:r.apikey,apisecret:r.apisecret,db:r.database,clientVersion:r.clientVersion})}function $u(r){return typeof window=="undefined"?[yu(r),{rejectUnauthorized:r.rejectUnauthorized}]:[yu(r)]}function Vi(r,e){let t={};return Object.keys(r).forEach(n=>{e[n]?typeof e[n]=="string"?t[e[n]]=r[n]:t[n]=e[n](r[n]):t[n]=r[n]}),t}function it(r){return r.split(",").map(e=>e.split(" ")).map(e=>{let[t,n]=e;return{field:t,direction:n==="desc"?"desc":"asc"}})}function wu(r){return new Date(r).setHours(0,0,0,0)>new Date().setHours(0,0,0,0)}function nh(r){return r%4===0&&(r%100!==0||r%400===0)}var ah=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,sh=[0,31,28,31,30,31,30,31,31,30,31,30,31];function bu(r){let e=ah.exec(r);if(!e)return!1;let t=+e[1],n=+e[2],a=+e[3];return n>=1&&n<=12&&a>=1&&a<=(n===2&&nh(t)?29:sh[n])}var ih=/^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i;function oh(r,e){let t=ih.exec(r);if(!t)return!1;let n=+t[1],a=+t[2],s=+t[3],i=t[5];return(n<=23&&a<=59&&s<=59||n===23&&a===59&&s===60)&&(!e||i!=="")}var ph=/t|\s/i;function Iu(r){let e=r.split(ph);return e.length===1?bu(e[0]):e.length===2&&bu(e[0])&&oh(e[1])}var Dr=class{constructor(e){this._data=[];this._error=[];this._end=[];this._finished=!1;this._options=e}on(e,t){switch(e){case"data":return this._data.push(t),this;case"end":return this._end.push(t),this;case"error":return this._error.push(t),this}}push(e){if(this._finished)throw new Error("Stream is closed");return e===null?this.end():(this._data.forEach(t=>t(e)),this)}error(e){if(this._finished)throw new Error("Stream is closed");return this._error.forEach(t=>t(e)),this}end(){if(this._finished)throw new Error("Stream is closed");return this._end.forEach(e=>e()),this._finished=!0,this}destroy(e){return this.error(e),this.end(),this}get destroyed(){return this._finished}},Hi=class{constructor(){throw new TypeError("used in node version")}pipe(...e){throw new TypeError("used in node version")}pause(){throw new TypeError("used in node version")}resume(){throw new TypeError("used in node version")}on(...e){throw new TypeError("used in node version")}};var _t=class{constructor(e){this.streamObject=new Dr({objectMode:!0});this.outStreamObject=new Dr({objectMode:!0});this.started=!1;this.makeRequest=e}start(e){if(z("start request as",e),this.mode&&this.mode!==e)throw new Error("Already in use as "+this.mode);if(this.started)return;if(this.promise=new Promise((n,a)=>{this.resolve=n,this.reject=a}),this.started=!0,this.mode=e,this.makeRequest===void 0){this.streamObject.push(null),this.resolve(void 0);return}this.makeRequest(this.streamObject).catch(this.reject);let t=[];if(this.mode==="stream"){this.streamObject.on("data",n=>{if(z("stream data",n),n||this.outStreamObject.push(n),n.error){let a=Po(n.error);return this.outStreamObject.destroy(a),this.streamObject.destroy(a)}if(!n.prop){t.push(n);return}if(n.dataArr){let a=v({},n);delete a.dataArr,n.dataArr.forEach(s=>{this.outStreamObject.push(Z(v({},a),{data:s}))});return}this.outStreamObject.push(n)}).on("end",()=>{z("stream ended");let n=t.pop();if(!n)return;let a=n.result;Object.keys(a).forEach(s=>{Array.isArray(a[s])&&(a[s].forEach(i=>{this.outStreamObject.push({type:"streamChunk",prop:s,data:i})}),a[s]=[])}),this.outStreamObject.push(n),this.outStreamObject.push(null)}).on("error",n=>{z("stream error",n),this.outStreamObject.destroy(n)});return}if(this.mode==="promise"){let n=new Map;this.streamObject.on("data",a=>{var i;if(z("streamPromise data",a),a===void 0)return;if(a.error){let o=Po(a.error);return this.streamObject.destroy(o)}if(!a.prop){t.push(a);return}let s=(i=n.get(a.prop))!=null?i:[];a.dataArr?s.push(...a.dataArr):s.push(a.data),n.set(a.prop,s)}).on("end",()=>{z("streamPromise end");let a=t.pop();if(!a)return;let s=a.result;if(!n.size)return this.resolve(s);let i=!1;n.forEach((o,d)=>{Array.isArray(s[d])?(o.push(...s[d]),s[d]=o):o.length===1?s[d]=o:(this.streamObject.destroy(new Be("INVALID_RESPONSE_STREAM_CHUNK",{property:d,value:o})),i=!0)}),i||this.resolve(s)}).on("error",a=>(z("streamPromise error",a),this.reject(a)))}}then(e,t){return this.start("promise"),this.promise.then(e,t)}catch(e){return this.start("promise"),this.promise.catch(e)}stream(){return this.start("stream"),this.outStreamObject}};var Wr=class extends _t{constructor(e,t){super(e),this.inputStream=t}input(e){return e?typeof e=="function"?(e(this.inputStream),this):(console.warn("currently disabled"),this):this.inputStream}};var Vc=Qm(Bc(),1);var gd={$schema:"http://json-schema.org/draft-07/schema",$id:"JSONRPCRequest",description:"A JSON RPC 2.0 request",oneOf:[{description:"An individual request",$ref:"#/definitions/request"}],definitions:{request:{type:"object",required:["jsonrpc","method"],properties:{jsonrpc:{enum:["2.0"]},method:{type:"string"},id:{type:["string","number","null"],note:["While allowed, null should be avoided: http://www.jsonrpc.org/specification#id1","While allowed, a number with a fractional part should be avoided: http://www.jsonrpc.org/specification#id2"]},params:{type:["array","object"]}}}}};var Td={$schema:"http://json-schema.org/draft-07/schema",$id:"JSONRPCResponse",description:"A JSON RPC 2.0 response",oneOf:[{$ref:"#/definitions/success"},{$ref:"#/definitions/error"}],definitions:{common:{required:["id","jsonrpc"],not:{description:"cannot have result and error at the same time",required:["result","error"]},type:"object",properties:{id:{type:["string","integer","null"],note:["spec says a number which should not contain a fractional part","We choose integer here, but this is unenforceable with some languages"]},jsonrpc:{enum:["2.0"]}}},success:{description:"A success. The result member is then required and can be anything.",allOf:[{$ref:"#/definitions/common"},{required:["result"]}]},error:{allOf:[{$ref:"#/definitions/common"},{required:["error"],properties:{error:{type:"object",required:["code","message"],properties:{code:{type:"integer",note:["unenforceable in some languages"]},message:{type:"string"},data:{description:"optional, can be anything"}}}}}]}}};var yd={$schema:"http://json-schema.org/draft-07/schema",$id:"ClientOptions",description:"Client input options",type:"object",properties:{client:{$ref:"#/definitions/ClientType"},connection:{anyOf:[{$ref:"#/definitions/ws_connection"},{$ref:"#/definitions/https_connection"}]}},required:["client","connection"],additionalProperties:!1,definitions:{ClientType:{$id:"ClientType",type:"string",enum:["ws","https"]},ws_connection:{description:"Connection options for ws api",type:"object",properties:{host:{description:"URL of the API",type:"string"},apikey:{description:"API key for the client",type:"string"},apisecret:{description:"API secret for the client",type:"string"}},required:["host","apikey","apisecret"]},https_connection:{description:"Connection options for https api",type:"object",properties:{host:{description:"URL of the API",type:"string"},jwt:{description:"Auth token for calling api",type:"string"}},required:["host"]}}};var zt={$schema:"http://json-schema.org/draft-07/schema",$id:"Consts",description:"Enums and consts used by the system",definitions:{Flags:{$id:"Flags",$comment:"knex|manual",description:"Allowed filtering functions",type:"object",properties:{allow_timestamps:{description:"Allow setting timestamps in transfer insert/update statements",type:"boolean"},production:{description:"Is running in production mode?",type:"boolean"}},$typescript:'{"additionalProperties":false}'},DbFilterMetadata:{$id:"FilterMetadata",$comment:"knex|manual",description:"Metadata filtering object",type:"object",propertyNames:{type:"string",format:"validkey"},patternProperties:{".*":{type:["string","boolean","number"]}}},DbFilterFunctionWherePrimitive:{$id:"DbFilterFunctionWherePrimitive",$comment:"knex|manual",description:"Filtering for where and orWhere",type:"object",properties:{function:{$ref:"#/definitions/DbFilterFunctionBasic"},field:{type:"string"},operator:{$ref:"#/definitions/DbFilterOperatorExtended"},value:{type:["string","number","boolean"]}},required:["function","field","value"],$typescript:'{"additionalProperties": false}'},DbFilterFunctionWherePrimitiveForeign:{$id:"DbFilterFunctionWherePrimitiveForeign",$comment:"knex|manual",description:"Filtering for where and orWhere",type:"object",properties:{function:{$ref:"#/definitions/DbFilterFunctionBasic"},field:{type:"string"},operator:{$ref:"#/definitions/DbFilterOperatorExtended"},value:{anyOf:[{type:["string","number","boolean"]},{type:"object",properties:{foreign:{type:["string","number"]}},required:["foreign"],$typescript:'{"additionalProperties": false}'}]}},required:["function","field","value"],$typescript:'{"additionalProperties": false}'},DbFilterFunctionWherePrimitiveIdentifier:{$id:"DbFilterFunctionWherePrimitiveIdentifier",$comment:"knex|manual",description:"Filtering for where and orWhere",type:"object",properties:{function:{$ref:"#/definitions/DbFilterFunctionBasic"},field:{type:"string"},operator:{$ref:"#/definitions/DbFilterOperatorExtended"},value:{anyOf:[{type:["string","number","boolean"]},{type:"object",properties:{identifier:{type:["string","number"]}},required:["identifier"],$typescript:'{"additionalProperties": false}'}]}},required:["function","field","value"],$typescript:'{"additionalProperties": false}'},DbFilterFunctionWhereMetadataPrimitive:{$id:"DbFilterFunctionWhereMetadataPrimitive",$comment:"knex|manual",description:"Filtering for where and orWhere",type:"object",properties:{function:{$ref:"#/definitions/DbFilterFunctionMetadataBasic"},field:{type:"string"},operator:{$ref:"#/definitions/DbFilterOperatorExtended"},value:{type:["string","number","boolean"]}},required:["function","field","value"],$typescript:'{"additionalProperties": false}'},DbFilterFunctionMetadataBasic:{$id:"DbFilterFunctionMetadataBasic",$comment:"knex|manual",type:"string",enum:["whereMetadata","orWhereMetadata"]},DbFilterFunctionWhereObject:{$id:"DbFilterFunctionWhereObject",$comment:"knex|manual",description:"Filtering for where and orWhere",type:"object",properties:{function:{$ref:"#/definitions/DbFilterFunctionBasic"},value:{type:"object",properties:{metadata:{$ref:"#/definitions/DbFilterMetadata"}}}},required:["function","value"],$typescript:'{"additionalProperties": false}'},DbFilterFunctionBasic:{$id:"DbFilterFunctionBasic",$comment:"knex|manual",type:"string",enum:["where","orWhere"]},DbFilterFunctionWhereIns:{$id:"DbFilterFunctionWhereIns",$comment:"knex|manual",description:"Filtering for whereIn and orWhereIn",type:"object",properties:{function:{$ref:"#/definitions/DbFilterFunctionIn"},field:{type:"string"},value:{anyOf:[{type:"array",items:{type:"string"},minItems:1},{type:"array",items:{type:"number"},minItems:1}]}},required:["function","field","value"],$typescript:'{"additionalProperties": false}'},DbFilterFunctionIn:{$id:"DbFilterFunctionIn",$comment:"knex|manual",type:"string",enum:["whereIn","orWhereIn"]},DbFilterFunctionWhereMetadataIns:{$id:"DbFilterFunctionWhereMetadataIns",$comment:"knex|manual",description:"Filtering for whereIn and orWhereIn for metadata",type:"object",properties:{function:{$ref:"#/definitions/DbFilterFunctionMetadataIn"},field:{type:"string"},value:{anyOf:[{type:"array",items:{type:"string"},minItems:1},{type:"array",items:{type:"number"},minItems:1}]}},required:["function","field","value"],$typescript:'{"additionalProperties": false}'},DbFilterFunctionMetadataIn:{$id:"DbFilterFunctionMetadataIn",$comment:"knex|manual",type:"string",enum:["whereMetadataIn","orWhereMetadataIn"]},DbFilterFunctionWhereMetadataNulls:{$id:"DbFilterFunctionWhereMetadataNulls",$comment:"knex|manual",description:"Filtering for whereNull and orWhereNull, whereNotNull and orWhereNotNull for metadata",type:"object",properties:{function:{$ref:"#/definitions/DbFilterFunctionMetadataNull"},field:{type:"string"}},required:["function","field"],$typescript:'{"additionalProperties": false}'},DbFilterFunctionMetadataNull:{$id:"DbFilterFunctionMetadataNull",$comment:"knex|manual",type:"string",enum:["whereMetadataNull","orWhereMetadataNull","whereMetadataNotNull","orWhereMetadataNotNull"]},DbFilterFunctionWhereNulls:{$id:"DbFilterFunctionWhereNulls",$comment:"knex|manual",description:"Filtering for whereNull and orWhereNull, whereNotNull and orWhereNotNull",type:"object",properties:{function:{$ref:"#/definitions/DbFilterFunctionNull"},field:{type:"string"}},required:["function","field"],$typescript:'{"additionalProperties": false}'},DbFilterFunctionNull:{$id:"DbFilterFunctionNull",$comment:"knex|manual",type:"string",enum:["whereNull","orWhereNull","whereNotNull","orWhereNotNull"]},DbFilterOperator:{$id:"DbFilterOperator",$comment:"knex|manual",description:"Allowed filtering operators, ignored when value is not primitive",type:"string",enum:["=",">=","<=","<",">"],default:"="},DbFilterOperatorString:{$id:"DbFilterOperatorString",$comment:"knex|manual",description:"Allowed filtering operators for strings",type:"string",enum:["like","ilike"]},DbFilterOperatorExtended:{$id:"DbFilterOperatorExtended",$comment:"knex|manual",description:"Allowed filtering operators, ignored when value is not primitive",type:"string",enum:["=",">=","<=","<",">","like","ilike"],default:"="},DbFilter:{$id:"DbFilter",$comment:"knex|manual",anyOf:[{$ref:"#/definitions/DbFilterMetadata"},{$ref:"#/definitions/DbFilterFunctionWhereInner"},{$ref:"#/definitions/DbFilterFunctionWherePrimitive"},{$ref:"#/definitions/DbFilterFunctionWherePrimitiveForeign"},{$ref:"#/definitions/DbFilterFunctionWherePrimitiveIdentifier"},{$ref:"#/definitions/DbFilterFunctionWhereMetadataPrimitive"},{$ref:"#/definitions/DbFilterFunctionWhereObject"},{$ref:"#/definitions/DbFilterFunctionWhereIns"},{$ref:"#/definitions/DbFilterFunctionWhereMetadataIns"},{$ref:"#/definitions/DbFilterFunctionWhereMetadataNulls"},{$ref:"#/definitions/DbFilterFunctionWhereNulls"}]},DbFilterFunctionWhereInner:{$id:"DbFilterFunctionWhereInner",$comment:"knex|manual",description:"Filtering for where and orWhere",type:"object",properties:{function:{$ref:"#/definitions/DbFilterFunctionBasic"},inner:{type:"array",items:{$ref:"#/definitions/DbFilter"}}},required:["function","inner"],$typescript:'{"additionalProperties": false}'},TokenType:{$id:"TokenType",$comment:"model",description:"DB type values for TokenType",type:"string",enum:["value","share","group","contract"]},TokenStatus:{$id:"TokenStatus",$comment:"model",description:"DB type values for TokenStatus",type:"string",enum:["active","dw-only","disabled"]},TransferGroupStatus:{$id:"TransferGroupStatus",$comment:"model",description:"DB type values for TransferGroupStatus",type:"string",enum:["open","closed"]},TransferStatus:{$id:"TransferStatus",$comment:"model",description:"DB type values for TransferStatus",type:"string",enum:["pending","finished","cancelled"]},TransferStatusInput:{$id:"TransferStatusInput",$comment:"model",description:"DB type input values for TransferStatus",type:"string",enum:["pending","finished"]},TransferGroupType:{$id:"TransferGroupType",$comment:"model",description:"DB type values for TransferGroupType",type:"string",enum:["regular","exchange","distribution"]},TransferType:{$id:"TransferType",$comment:"model",description:"DB type values for TransferType",type:"string",enum:["transfer","deposit","withdrawal"]},WalletType:{$id:"WalletType",$comment:"model",description:"DB type values for WalletType",type:"string",enum:["token","house","regular"]},WalletStatus:{$id:"WalletStatus",$comment:"model",description:"DB type values for WalletStatus",type:"string",enum:["active","disabled"]},WapiSettingType:{$id:"WapiSettingType",$comment:"model",description:"DB type values for WapiSettingType",type:"string",enum:["flag","setting"]},DbModelName:{$id:"DbModelName",$comment:"model",description:"DB Model Names",type:"string",enum:["Token","TransferGroup","TransferLog","Transfer","WalletTokenSetting","Wallet","WapiSetting"]}}};var cn={$schema:"http://json-schema.org/draft-07/schema",$id:"TokenTableInput",title:"TokenTableInput",description:"Units of value which can be transferred in this system",type:"object",properties:{foreign:{description:"Name of the token, used for name based token transfers. Must be unique",type:"string",maxLength:255,minLength:1},public:{description:"Boolean indicating if token can be traded with outside seed wallet",default:!0,type:"boolean"},metadata:{description:"Key/value object describing the token",type:["object","null"]},divisor:{description:"Minimum amount of token that can be transferred",type:["number","null"]},limit:{description:"Maximum amount of token that can be issued",type:["number","null"]},type:{description:"Type of the token",default:"value",$ref:"/db/consts.schema.json#/definitions/TokenType"},status:{description:"Current status for the token",default:"active",$ref:"/db/consts.schema.json#/definitions/TokenStatus"}},additionalProperties:!1,required:["foreign"]};var mn={$schema:"http://json-schema.org/draft-07/schema",$id:"TokenTable",title:"TokenTable",description:"Units of value which can be transferred in this system",type:"object",properties:{id:{description:"System defined primary key",type:"integer"},foreign:{description:"Name of the token, used for name based token transfers. Must be unique",type:"string",maxLength:255,minLength:1},public:{description:"Boolean indicating if token can be traded with outside seed wallet",default:!0,type:"boolean"},belongs_to:{description:"Foreign key to seed wallet",type:"integer"},created_at:{description:"Datetime when the token was created",type:"string",format:"date-time"},updated_at:{description:"Datetime when the token was last updated",type:"string",format:"date-time"},metadata:{description:"Key/value object describing the token",type:["object","null"]},divisor:{description:"Minimum amount of token that can be transferred",type:["number","null"]},limit:{description:"Maximum amount of token that can be issued",type:["number","null"]},type:{description:"Type of the token",default:"value",$ref:"/db/consts.schema.json#/definitions/TokenType"},status:{description:"Current status for the token",default:"active",$ref:"/db/consts.schema.json#/definitions/TokenStatus"}},additionalProperties:!1,definitions:{TokenTableAccessibleFields:{$id:"TokenTableAccessibleFields",type:"string",enum:["id","foreign","public","metadata","divisor","limit","type","status"]},TokenTableFields:{$id:"TokenTableFields",type:"string",enum:["id","foreign","public","belongs_to","created_at","updated_at","metadata","divisor","limit","type","status"]},TokenTableStringFields:{$id:"TokenTableStringFields",type:"string",enum:["foreign","created_at","updated_at","type","status"]},TokenTableObjectFields:{$id:"TokenTableObjectFields",type:"string",enum:["metadata"]},TokenTableNumberFields:{$id:"TokenTableNumberFields",type:"string",enum:["id","belongs_to","divisor","limit"]},TokenTableBooleanFields:{$id:"TokenTableBooleanFields",type:"string",enum:["public"]}},required:["id","foreign","public","belongs_to","created_at","updated_at","type","status"]};var bd={$schema:"http://json-schema.org/draft-07/schema",$id:"TokenTableOptional",title:"TokenTableOptional",description:"Units of value which can be transferred in this system Only require id, other fields are optional",type:"object",properties:{id:{description:"System defined primary key",type:"integer"},foreign:{description:"Name of the token, used for name based token transfers. Must be unique",type:"string",maxLength:255,minLength:1},public:{description:"Boolean indicating if token can be traded with outside seed wallet",default:!0,type:"boolean"},belongs_to:{description:"Foreign key to seed wallet",type:"integer"},created_at:{description:"Datetime when the token was created",type:"string",format:"date-time"},updated_at:{description:"Datetime when the token was last updated",type:"string",format:"date-time"},metadata:{description:"Key/value object describing the token",type:["object","null"]},divisor:{description:"Minimum amount of token that can be transferred",type:["number","null"]},limit:{description:"Maximum amount of token that can be issued",type:["number","null"]},type:{description:"Type of the token",default:"value",$ref:"/db/consts.schema.json#/definitions/TokenType"},status:{description:"Current status for the token",default:"active",$ref:"/db/consts.schema.json#/definitions/TokenStatus"}},additionalProperties:!1,required:["id"]};var hn={$schema:"http://json-schema.org/draft-07/schema",$id:"TransferTableInput",title:"TransferTableInput",description:"A transfer of value from one wallet to another",type:"object",properties:{identifier:{description:"Identifier for this transfer. Must be unique",type:"string",maxLength:255,minLength:1},control_hash:{description:'Hash binding this transfer to the from_wallets transfer chain. It is calculated as sha256(latest_outgoing_hash + "-" + NEW.identifier)',type:["string","null"],maxLength:255},from_wallet_id:{description:"Foreign key to wallet funds originate from",type:"integer"},to_wallet_id:{description:"Foreign key to wallet where funds are going",type:"integer"},token_id:{description:"Foreign key to token this transfer refers to",type:"integer"},amount:{description:"The transfer amount",type:"number"},type:{description:"Type of the transfer",default:"transfer",$ref:"/db/consts.schema.json#/definitions/TransferType"},status:{description:"Status of the transfer",default:"finished",$ref:"/db/consts.schema.json#/definitions/TransferStatusInput"},force:{description:"Set to true to force transfer without checking for negative balance constraints",default:!1,type:"boolean"},created_at:{description:"Datetime when this transfer was created - can only be latest",type:"string",format:"date-time"},updated_at:{description:"Datetime when this transfer was updated - can only be latest",type:"string",format:"date-time"},metadata:{description:"Key/value object describing this transfer",type:["object","null"]},transfer_group_id:{description:"Foreign key pointing to the transfer_group this transfer belongs to",type:["integer","null"]},reverses_id:{description:"Foreign key pointing to the transfer this transfer reverses. Must be unique",type:["integer","null"]},status_finalized_at:{description:"DateTime transfer reached final status",type:["string","null"],format:"date-time"}},additionalProperties:!1,required:["identifier","from_wallet_id","to_wallet_id","token_id","amount"]};var _n={$schema:"http://json-schema.org/draft-07/schema",$id:"TransferTable",title:"TransferTable",description:"A transfer of value from one wallet to another",type:"object",properties:{id:{description:"System defined primary key",type:"integer"},identifier:{description:"Identifier for this transfer. Must be unique",type:"string",maxLength:255,minLength:1},control_hash:{description:'Hash binding this transfer to the from_wallets transfer chain. It is calculated as sha256(latest_outgoing_hash + "-" + NEW.identifier)',type:["string","null"],maxLength:255},from_wallet_id:{description:"Foreign key to wallet funds originate from",type:"integer"},to_wallet_id:{description:"Foreign key to wallet where funds are going",type:"integer"},token_id:{description:"Foreign key to token this transfer refers to",type:"integer"},amount:{description:"The transfer amount",type:"number"},type:{description:"Type of the transfer",default:"transfer",$ref:"/db/consts.schema.json#/definitions/TransferType"},status:{description:"Status of the transfer",default:"finished",$ref:"/db/consts.schema.json#/definitions/TransferStatus"},force:{description:"Set to true to force transfer without checking for negative balance constraints",default:!1,type:"boolean"},auto_hash:{description:"When set to true it will automatically calculate the control_hash",default:!1,type:"boolean"},created_at:{description:"Datetime when this transfer was created - can only be latest",type:"string",format:"date-time"},updated_at:{description:"Datetime when this transfer was updated - can only be latest",type:"string",format:"date-time"},metadata:{description:"Key/value object describing this transfer",type:["object","null"]},transfer_group_id:{description:"Foreign key pointing to the transfer_group this transfer belongs to",type:["integer","null"]},reverses_id:{description:"Foreign key pointing to the transfer this transfer reverses. Must be unique",type:["integer","null"]},status_finalized_at:{description:"DateTime transfer reached final status",type:["string","null"],format:"date-time"},group_validate:{description:"Boolean showing if the transfer_group has validate_final_balance_only",default:!1,type:"boolean"}},additionalProperties:!1,definitions:{TransferTableAccessibleFields:{$id:"TransferTableAccessibleFields",type:"string",enum:["id","identifier","control_hash","from_wallet_id","to_wallet_id","token_id","amount","type","status","force","created_at","updated_at","metadata","transfer_group_id","reverses_id","status_finalized_at"]},TransferTableFields:{$id:"TransferTableFields",type:"string",enum:["id","identifier","control_hash","from_wallet_id","to_wallet_id","token_id","amount","type","status","force","auto_hash","created_at","updated_at","metadata","transfer_group_id","reverses_id","status_finalized_at"]},TransferTableStringFields:{$id:"TransferTableStringFields",type:"string",enum:["identifier","control_hash","type","status","created_at","updated_at","status_finalized_at"]},TransferTableObjectFields:{$id:"TransferTableObjectFields",type:"string",enum:["metadata"]},TransferTableNumberFields:{$id:"TransferTableNumberFields",type:"string",enum:["id","from_wallet_id","to_wallet_id","token_id","amount","transfer_group_id","reverses_id"]},TransferTableBooleanFields:{$id:"TransferTableBooleanFields",type:"string",enum:["force","auto_hash"]}},required:["id","identifier","from_wallet_id","to_wallet_id","token_id","amount","type","status","force","auto_hash","created_at","updated_at"]};var Fd={$schema:"http://json-schema.org/draft-07/schema",$id:"TransferTableOptional",title:"TransferTableOptional",description:"A transfer of value from one wallet to another Only require id, other fields are optional",type:"object",properties:{id:{description:"System defined primary key",type:"integer"},identifier:{description:"Identifier for this transfer. Must be unique",type:"string",maxLength:255,minLength:1},control_hash:{description:'Hash binding this transfer to the from_wallets transfer chain. It is calculated as sha256(latest_outgoing_hash + "-" + NEW.identifier)',type:["string","null"],maxLength:255},from_wallet_id:{description:"Foreign key to wallet funds originate from",type:"integer"},to_wallet_id:{description:"Foreign key to wallet where funds are going",type:"integer"},token_id:{description:"Foreign key to token this transfer refers to",type:"integer"},amount:{description:"The transfer amount",type:"number"},type:{description:"Type of the transfer",default:"transfer",$ref:"/db/consts.schema.json#/definitions/TransferType"},status:{description:"Status of the transfer",default:"finished",$ref:"/db/consts.schema.json#/definitions/TransferStatus"},force:{description:"Set to true to force transfer without checking for negative balance constraints",default:!1,type:"boolean"},auto_hash:{description:"When set to true it will automatically calculate the control_hash",default:!1,type:"boolean"},created_at:{description:"Datetime when this transfer was created - can only be latest",type:"string",format:"date-time"},updated_at:{description:"Datetime when this transfer was updated - can only be latest",type:"string",format:"date-time"},metadata:{description:"Key/value object describing this transfer",type:["object","null"]},transfer_group_id:{description:"Foreign key pointing to the transfer_group this transfer belongs to",type:["integer","null"]},reverses_id:{description:"Foreign key pointing to the transfer this transfer reverses. Must be unique",type:["integer","null"]},status_finalized_at:{description:"DateTime transfer reached final status",type:["string","null"],format:"date-time"},group_validate:{description:"Boolean showing if the transfer_group has validate_final_balance_only",default:!1,type:"boolean"}},additionalProperties:!1,required:["id"]};var gn={$schema:"http://json-schema.org/draft-07/schema",$id:"TransferGroupTableInput",title:"TransferGroupTableInput",description:"An entity collecting transfers into a group locked by status",type:"object",properties:{identifier:{description:"Identifier for this transfer. Must be unique",type:"string",maxLength:255,minLength:1},status:{description:"Lifecycle status for transfer group",default:"open",$ref:"/db/consts.schema.json#/definitions/TransferGroupStatus"},transfer_status:{description:"Status of the transfer",default:"pending",$ref:"/db/consts.schema.json#/definitions/TransferStatusInput"},metadata:{description:"Key/value object describing this transfer_group",type:["object","null"]},reverses_id:{description:"Foreign key pointing to the transfer_group this transfer_group reverses",type:["integer","null"]},status_finalized_at:{description:"Time transfer_group was closed",type:["string","null"],format:"date-time"},transfer_status_finalized_at:{description:"Time transfer_status reached final state. Must be unique",type:["string","null"],format:"date-time"},type:{description:"Type of the transfer group",default:"regular",$ref:"/db/consts.schema.json#/definitions/TransferGroupType"}},additionalProperties:!1,required:["identifier"]};var Tn={$schema:"http://json-schema.org/draft-07/schema",$id:"TransferGroupTable",title:"TransferGroupTable",description:"An entity collecting transfers into a group locked by status",type:"object",properties:{id:{description:"System defined primary key",type:"integer"},identifier:{description:"Identifier for this transfer. Must be unique",type:"string",maxLength:255,minLength:1},status:{description:"Lifecycle status for transfer group",default:"open",$ref:"/db/consts.schema.json#/definitions/TransferGroupStatus"},transfer_status:{description:"Status of the transfer",default:"pending",$ref:"/db/consts.schema.json#/definitions/TransferStatus"},metadata:{description:"Key/value object describing this transfer_group",type:["object","null"]},created_at:{description:"Datetime when this transfer was created",type:"string",format:"date-time"},updated_at:{description:"Datetime when this transfer was updated",type:"string",format:"date-time"},reverses_id:{description:"Foreign key pointing to the transfer_group this transfer_group reverses",type:["integer","null"]},status_finalized_at:{description:"Time transfer_group was closed",type:["string","null"],format:"date-time"},transfer_status_finalized_at:{description:"Time transfer_status reached final state. Must be unique",type:["string","null"],format:"date-time"},type:{description:"Type of the transfer group",default:"regular",$ref:"/db/consts.schema.json#/definitions/TransferGroupType"},validate_final_balance_only:{description:"Boolean if only the final balances of wallets should be validated",default:!1,type:"boolean"}},additionalProperties:!1,definitions:{TransferGroupTableAccessibleFields:{$id:"TransferGroupTableAccessibleFields",type:"string",enum:["id","identifier","status","transfer_status","metadata","reverses_id","status_finalized_at","transfer_status_finalized_at","type"]},TransferGroupTableFields:{$id:"TransferGroupTableFields",type:"string",enum:["id","identifier","status","transfer_status","metadata","created_at","updated_at","reverses_id","status_finalized_at","transfer_status_finalized_at","type","validate_final_balance_only"]},TransferGroupTableStringFields:{$id:"TransferGroupTableStringFields",type:"string",enum:["identifier","status","transfer_status","created_at","updated_at","status_finalized_at","transfer_status_finalized_at","type"]},TransferGroupTableObjectFields:{$id:"TransferGroupTableObjectFields",type:"string",enum:["metadata"]},TransferGroupTableNumberFields:{$id:"TransferGroupTableNumberFields",type:"string",enum:["id","reverses_id"]},TransferGroupTableBooleanFields:{$id:"TransferGroupTableBooleanFields",type:"string",enum:["validate_final_balance_only"]}},required:["id","identifier","status","transfer_status","created_at","updated_at","type","validate_final_balance_only"]};var xd={$schema:"http://json-schema.org/draft-07/schema",$id:"TransferGroupTableOptional",title:"TransferGroupTableOptional",description:"An entity collecting transfers into a group locked by status Only require id, other fields are optional",type:"object",properties:{id:{description:"System defined primary key",type:"integer"},identifier:{description:"Identifier for this transfer. Must be unique",type:"string",maxLength:255,minLength:1},status:{description:"Lifecycle status for transfer group",default:"open",$ref:"/db/consts.schema.json#/definitions/TransferGroupStatus"},transfer_status:{description:"Status of the transfer",default:"pending",$ref:"/db/consts.schema.json#/definitions/TransferStatus"},metadata:{description:"Key/value object describing this transfer_group",type:["object","null"]},created_at:{description:"Datetime when this transfer was created",type:"string",format:"date-time"},updated_at:{description:"Datetime when this transfer was updated",type:"string",format:"date-time"},reverses_id:{description:"Foreign key pointing to the transfer_group this transfer_group reverses",type:["integer","null"]},status_finalized_at:{description:"Time transfer_group was closed",type:["string","null"],format:"date-time"},transfer_status_finalized_at:{description:"Time transfer_status reached final state. Must be unique",type:["string","null"],format:"date-time"},type:{description:"Type of the transfer group",default:"regular",$ref:"/db/consts.schema.json#/definitions/TransferGroupType"},validate_final_balance_only:{description:"Boolean if only the final balances of wallets should be validated",default:!1,type:"boolean"}},additionalProperties:!1,required:["id"]};var yn={$schema:"http://json-schema.org/draft-07/schema",$id:"TransferLogTableInput",title:"TransferLogTableInput",description:"This table is readonly, so no input is valid",$comment:"READONLY",type:"object",properties:{},additionalProperties:!1};var bn={$schema:"http://json-schema.org/draft-07/schema",$id:"TransferLogTable",title:"TransferLogTable",description:"Individual parts of a transfer, will be updated internally by db. Immutable",$comment:"READONLY",type:"object",properties:{id:{description:"System defined primary key",type:"integer"},transfer_id:{description:"Foreign key pointing to the transfer this log belongs to",type:"integer"},wallet_id:{description:"Foreign key pointing to the wallet this log refers to",type:"integer"},token_id:{description:"Foreign key pointing to the token this log refers to",type:"integer"},type:{description:"Type of this log",$ref:"/db/consts.schema.json#/definitions/TransferType"},amount:{description:"The amount the wallet balance is changed by",type:"number"},pending_amount:{description:"The pending balance of wallet after this transfer_log",type:"number"},finished_amount:{description:"The finished balance of wallet after this transfer_log",type:"number"},status:{description:"Status of this log - same as Transfer.status",$ref:"/db/consts.schema.json#/definitions/TransferStatus"},allow_negative:{description:"Boolean indicating if wallet (pending_amount + finished_amount) can be negative",default:!1,type:"boolean"},allow_positive:{description:"Boolean indicating if wallet (pending_amount + finished_amount) can be positive. Used for token balance to deny positive balance.",default:!0,type:"boolean"},force:{description:"Boolean indicating if the latest transfer from this wallet was forced to ignore negative balance checks",default:!1,type:"boolean"},created_at:{description:"Datetime this log was created",type:"string",format:"date-time"},latest_control_hash:{description:"Latest hash related to this wallet",type:["string","null"],maxLength:255},pending_amount_to:{description:"The incoming pending balance",type:"number"},pending_amount_from:{description:"The outgoing pending balance",type:"number"},group_balance:{description:"Running balance for the wallet in this group",type:["number","null"]},transfer_group_id:{description:"Foreign key pointing to the transfer_group this transfer_log belongs to",type:["integer","null"]},current:{description:"Boolean showing if this transfer_log is the latest for this wallet/token combination",default:!1,type:"boolean"},available_balance:{description:"Available balance that is sum of pending_amount_from and finished_amount",type:"number"},token_limit:{description:"If wallet = token.belongs_to and token has limit",type:["number","null"]}},additionalProperties:!1,definitions:{TransferLogTableAccessibleFields:{$id:"TransferLogTableAccessibleFields",type:"string",enum:["id","transfer_id","wallet_id","token_id","type","amount","pending_amount","finished_amount","status","created_at","pending_amount_to","pending_amount_from","available_balance","token_limit"]},TransferLogTableFields:{$id:"TransferLogTableFields",type:"string",enum:["id","transfer_id","wallet_id","token_id","type","amount","pending_amount","finished_amount","status","allow_negative","allow_positive","force","created_at","latest_control_hash","pending_amount_to","pending_amount_from","group_balance","current","available_balance","token_limit"]},TransferLogTableStringFields:{$id:"TransferLogTableStringFields",type:"string",enum:["type","status","created_at","latest_control_hash"]},TransferLogTableNumberFields:{$id:"TransferLogTableNumberFields",type:"string",enum:["id","transfer_id","wallet_id","token_id","amount","pending_amount","finished_amount","pending_amount_to","pending_amount_from","group_balance","available_balance","token_limit"]},TransferLogTableBooleanFields:{$id:"TransferLogTableBooleanFields",type:"string",enum:["allow_negative","allow_positive","force","current"]}},required:["id","transfer_id","wallet_id","token_id","type","amount","pending_amount","finished_amount","status","allow_negative","allow_positive","force","created_at","pending_amount_to","pending_amount_from","current","available_balance"]};var Od={$schema:"http://json-schema.org/draft-07/schema",$id:"TransferLogTableOptional",title:"TransferLogTableOptional",description:"Individual parts of a transfer, will be updated internally by db. Immutable Only require id, other fields are optional",$comment:"READONLY",type:"object",properties:{id:{description:"System defined primary key",type:"integer"},transfer_id:{description:"Foreign key pointing to the transfer this log belongs to",type:"integer"},wallet_id:{description:"Foreign key pointing to the wallet this log refers to",type:"integer"},token_id:{description:"Foreign key pointing to the token this log refers to",type:"integer"},type:{description:"Type of this log",$ref:"/db/consts.schema.json#/definitions/TransferType"},amount:{description:"The amount the wallet balance is changed by",type:"number"},pending_amount:{description:"The pending balance of wallet after this transfer_log",type:"number"},finished_amount:{description:"The finished balance of wallet after this transfer_log",type:"number"},status:{description:"Status of this log - same as Transfer.status",$ref:"/db/consts.schema.json#/definitions/TransferStatus"},allow_negative:{description:"Boolean indicating if wallet (pending_amount + finished_amount) can be negative",default:!1,type:"boolean"},allow_positive:{description:"Boolean indicating if wallet (pending_amount + finished_amount) can be positive. Used for token balance to deny positive balance.",default:!0,type:"boolean"},force:{description:"Boolean indicating if the latest transfer from this wallet was forced to ignore negative balance checks",default:!1,type:"boolean"},created_at:{description:"Datetime this log was created",type:"string",format:"date-time"},latest_control_hash:{description:"Latest hash related to this wallet",type:["string","null"],maxLength:255},pending_amount_to:{description:"The incoming pending balance",type:"number"},pending_amount_from:{description:"The outgoing pending balance",type:"number"},group_balance:{description:"Running balance for the wallet in this group",type:["number","null"]},transfer_group_id:{description:"Foreign key pointing to the transfer_group this transfer_log belongs to",type:["integer","null"]},current:{description:"Boolean showing if this transfer_log is the latest for this wallet/token combination",default:!1,type:"boolean"},available_balance:{description:"Available balance that is sum of pending_amount_from and finished_amount",type:"number"},token_limit:{description:"If wallet = token.belongs_to and token has limit",type:["number","null"]}},additionalProperties:!1,required:["id"]};var Fn={$schema:"http://json-schema.org/draft-07/schema",$id:"WalletTableInput",title:"WalletTableInput",description:"Entities who can make transfers in this system",type:"object",properties:{foreign:{description:"User provided key for wallet. Must be unique",type:"string",maxLength:64,minLength:1},name:{description:"Name of the wallet",type:["string","null"],maxLength:255},metadata:{description:"Key/value metadata object",type:["object","null"]},type:{description:"Type of the wallet",default:"regular",$ref:"/db/consts.schema.json#/definitions/WalletType"},status:{description:"Current status for the wallet",default:"active",$ref:"/db/consts.schema.json#/definitions/WalletStatus"}},additionalProperties:!1,required:["foreign"]};var xn={$schema:"http://json-schema.org/draft-07/schema",$id:"WalletTable",title:"WalletTable",description:"Entities who can make transfers in this system",type:"object",properties:{id:{description:"System defined primary key",type:"integer"},foreign:{description:"User provided key for wallet. Must be unique",type:"string",maxLength:64,minLength:1},name:{description:"Name of the wallet",type:["string","null"],maxLength:255},metadata:{description:"Key/value metadata object",type:["object","null"]},type:{description:"Type of the wallet",default:"regular",$ref:"/db/consts.schema.json#/definitions/WalletType"},default_allow_negative:{description:"Boolean indicating if wallet (pending_amount + finished_amount) can be negative",default:!1,type:"boolean"},default_allow_positive:{description:"Boolean indicating if wallet (pending_amount + finished_amount) can be positive. Used for token balance to deny positive balance.",default:!0,type:"boolean"},created_at:{description:"Datetime when the wallet was created",type:"string",format:"date-time"},updated_at:{description:"Datetime when the wallet was last updated",type:"string",format:"date-time"},status:{description:"Current status for the wallet",default:"active",$ref:"/db/consts.schema.json#/definitions/WalletStatus"},default_dtw_to:{description:"Bitmap indicating default what types of transfers can originate from wallet",default:"110",type:"string",maxLength:255,minLength:1},default_dtw_from:{description:"Bitmap indicating default what types of transfers can end to wallet",default:"011",type:"string",maxLength:255,minLength:1}},additionalProperties:!1,definitions:{WalletTableAccessibleFields:{$id:"WalletTableAccessibleFields",type:"string",enum:["id","foreign","name","metadata","type","status"]},WalletTableFields:{$id:"WalletTableFields",type:"string",enum:["id","foreign","name","metadata","type","default_allow_negative","default_allow_positive","created_at","updated_at","status"]},WalletTableStringFields:{$id:"WalletTableStringFields",type:"string",enum:["foreign","name","type","created_at","updated_at","status"]},WalletTableObjectFields:{$id:"WalletTableObjectFields",type:"string",enum:["metadata"]},WalletTableNumberFields:{$id:"WalletTableNumberFields",type:"string",enum:["id"]},WalletTableBooleanFields:{$id:"WalletTableBooleanFields",type:"string",enum:["default_allow_negative","default_allow_positive"]}},required:["id","foreign","type","default_allow_negative","default_allow_positive","created_at","updated_at","status"]};var $d={$schema:"http://json-schema.org/draft-07/schema",$id:"WalletTableOptional",title:"WalletTableOptional",description:"Entities who can make transfers in this system Only require id, other fields are optional",type:"object",properties:{id:{description:"System defined primary key",type:"integer"},foreign:{description:"User provided key for wallet. Must be unique",type:"string",maxLength:64,minLength:1},name:{description:"Name of the wallet",type:["string","null"],maxLength:255},metadata:{description:"Key/value metadata object",type:["object","null"]},type:{description:"Type of the wallet",default:"regular",$ref:"/db/consts.schema.json#/definitions/WalletType"},default_allow_negative:{description:"Boolean indicating if wallet (pending_amount + finished_amount) can be negative",default:!1,type:"boolean"},default_allow_positive:{description:"Boolean indicating if wallet (pending_amount + finished_amount) can be positive. Used for token balance to deny positive balance.",default:!0,type:"boolean"},created_at:{description:"Datetime when the wallet was created",type:"string",format:"date-time"},updated_at:{description:"Datetime when the wallet was last updated",type:"string",format:"date-time"},status:{description:"Current status for the wallet",default:"active",$ref:"/db/consts.schema.json#/definitions/WalletStatus"},default_dtw_to:{description:"Bitmap indicating default what types of transfers can originate from wallet",default:"110",type:"string",maxLength:255,minLength:1},default_dtw_from:{description:"Bitmap indicating default what types of transfers can end to wallet",default:"011",type:"string",maxLength:255,minLength:1}},additionalProperties:!1,required:["id"]};var On={$schema:"http://json-schema.org/draft-07/schema",$id:"WalletTokenSettingTableInput",title:"WalletTokenSettingTableInput",description:"Settings between a wallet and token",type:"object",properties:{},additionalProperties:!1};var $n={$schema:"http://json-schema.org/draft-07/schema",$id:"WalletTokenSettingTable",title:"WalletTokenSettingTable",description:"Settings between a wallet and token",type:"object",properties:{id:{description:"System defined primary key",type:"integer"},wallet_id:{description:"Foreign key to wallet these settings refer to",type:"integer"},token_id:{description:"Foreign key to token these settings refer to",type:"integer"},allow_negative:{description:"Boolean indicating if wallet (pending_amount + finished_amount) can be negative",default:!1,type:"boolean"},allow_positive:{description:"Boolean indicating if wallet (pending_amount + finished_amount) can be positive. Used for token balance to deny positive balance.",default:!0,type:"boolean"},created_at:{description:"Datetime when the token was created",type:"string",format:"date-time"},updated_at:{description:"Datetime when the token was last updated",type:"string",format:"date-time"},dtw_to:{description:"Bitmap indicating default what types of transfers can originate from wallet",default:"110",type:"string",maxLength:255,minLength:1},dtw_from:{description:"Bitmap indicating default what types of transfers can end to wallet",default:"011",type:"string",maxLength:255,minLength:1}},additionalProperties:!1,definitions:{WalletTokenSettingTableAccessibleFields:{$id:"WalletTokenSettingTableAccessibleFields",type:"string",enum:["id"]},WalletTokenSettingTableFields:{$id:"WalletTokenSettingTableFields",type:"string",enum:["id","wallet_id","token_id","allow_negative","allow_positive","created_at","updated_at"]},WalletTokenSettingTableStringFields:{$id:"WalletTokenSettingTableStringFields",type:"string",enum:["created_at","updated_at"]},WalletTokenSettingTableNumberFields:{$id:"WalletTokenSettingTableNumberFields",type:"string",enum:["id","wallet_id","token_id"]},WalletTokenSettingTableBooleanFields:{$id:"WalletTokenSettingTableBooleanFields",type:"string",enum:["allow_negative","allow_positive"]}},required:["id","wallet_id","token_id","allow_negative","allow_positive","created_at","updated_at"]};var wd={$schema:"http://json-schema.org/draft-07/schema",$id:"WalletTokenSettingTableOptional",title:"WalletTokenSettingTableOptional",description:"Settings between a wallet and token Only require id, other fields are optional",type:"object",properties:{id:{description:"System defined primary key",type:"integer"},wallet_id:{description:"Foreign key to wallet these settings refer to",type:"integer"},token_id:{description:"Foreign key to token these settings refer to",type:"integer"},allow_negative:{description:"Boolean indicating if wallet (pending_amount + finished_amount) can be negative",default:!1,type:"boolean"},allow_positive:{description:"Boolean indicating if wallet (pending_amount + finished_amount) can be positive. Used for token balance to deny positive balance.",default:!0,type:"boolean"},created_at:{description:"Datetime when the token was created",type:"string",format:"date-time"},updated_at:{description:"Datetime when the token was last updated",type:"string",format:"date-time"},dtw_to:{description:"Bitmap indicating default what types of transfers can originate from wallet",default:"110",type:"string",maxLength:255,minLength:1},dtw_from:{description:"Bitmap indicating default what types of transfers can end to wallet",default:"011",type:"string",maxLength:255,minLength:1}},additionalProperties:!1,required:["id"]};var wn={$schema:"http://json-schema.org/draft-07/schema",$id:"WapiSettingTableInput",title:"WapiSettingTableInput",description:"Database settings",type:"object",properties:{type:{description:"",default:"flag",$ref:"/db/consts.schema.json#/definitions/WapiSettingType"},name:{description:"name of setting. Must be unique",type:"string",maxLength:32,minLength:1},value:{description:"value of setting",type:"string",minLength:1},applied:{description:"is setting applied",default:!1,type:"boolean"}},additionalProperties:!1,required:["name","value"]};var In={$schema:"http://json-schema.org/draft-07/schema",$id:"WapiSettingTable",title:"WapiSettingTable",description:"Database settings",type:"object",properties:{id:{description:"System defined primary key",type:"integer"},type:{description:"",default:"flag",$ref:"/db/consts.schema.json#/definitions/WapiSettingType"},name:{description:"name of setting. Must be unique",type:"string",maxLength:32,minLength:1},value:{description:"value of setting",type:"string",minLength:1},applied:{description:"is setting applied",default:!1,type:"boolean"},created_at:{description:"Datetime when the flag was created",type:"string",format:"date-time"},updated_at:{description:"Datetime when the flag was last updated",type:"string",format:"date-time"}},additionalProperties:!1,definitions:{WapiSettingTableAccessibleFields:{$id:"WapiSettingTableAccessibleFields",type:"string",enum:["id","type","name","value","applied"]},WapiSettingTableFields:{$id:"WapiSettingTableFields",type:"string",enum:["id","type","name","value","applied","created_at","updated_at"]},WapiSettingTableStringFields:{$id:"WapiSettingTableStringFields",type:"string",enum:["type","name","value","created_at","updated_at"]},WapiSettingTableNumberFields:{$id:"WapiSettingTableNumberFields",type:"string",enum:["id"]},WapiSettingTableBooleanFields:{$id:"WapiSettingTableBooleanFields",type:"string",enum:["applied"]}},required:["id","type","name","value","applied","created_at","updated_at"]};var Id={$schema:"http://json-schema.org/draft-07/schema",$id:"WapiSettingTableOptional",title:"WapiSettingTableOptional",description:"Database settings Only require id, other fields are optional",type:"object",properties:{id:{description:"System defined primary key",type:"integer"},type:{description:"",default:"flag",$ref:"/db/consts.schema.json#/definitions/WapiSettingType"},name:{description:"name of setting. Must be unique",type:"string",maxLength:32,minLength:1},value:{description:"value of setting",type:"string",minLength:1},applied:{description:"is setting applied",default:!1,type:"boolean"},created_at:{description:"Datetime when the flag was created",type:"string",format:"date-time"},updated_at:{description:"Datetime when the flag was last updated",type:"string",format:"date-time"}},additionalProperties:!1,required:["id"]};var jn={$schema:"http://json-schema.org/draft-07/schema",$id:"AggregateTransfersFnInput",title:"AggregateTransfersFnInput",description:"Input for aggregateTransfers",type:"object",properties:{wallet:{description:"Foreign of the wallet connected to transfers",type:["string","integer"]},token:{description:"Foreign of the token transferred",type:["string","integer"]},from_wallet:{description:"Foreign of the wallet transfers are made from",type:["string","integer"]},to_wallet:{description:"Foreign of the wallet transfers are made to",type:["string","integer"]},transfer_group:{description:"Foreign of the transfer_group the transfers are a part of",type:["string","integer"]},status:{description:"Status of the transfers",$ref:"/db/transfer/transfer.schema.input.json#/properties/status"},metadata:{description:"Metadata filter",$ref:"/db/consts.schema.json#/definitions/DbFilterMetadata"},aggregators:{description:"Array of aggregators to apply",type:"array",items:{$ref:"/txs/aggregate-transfer-many/aggregate-transfer-many.schema.input.json#/definitions/aggregate_transfer_many_aggregator"}},groups:{description:"Specifications on grouping the data",$ref:"/txs/aggregate-transfer-many/aggregate-transfer-many.schema.input.json#/definitions/aggregate_transfer_many_groups"},options:{description:"Optional flags for input",$ref:"#/definitions/aggregate_transfers_fn_options"}},definitions:{aggregate_transfers_fn_options:{description:"Optional flags for input",type:"object",allOf:[{$ref:"/txs/aggregate-transfer-many/aggregate-transfer-many.schema.input.json#/definitions/aggregate_transfer_many_tx_options"}]}},additionalProperties:!1,$aggregateQueryBuilder:!0};var vn={$schema:"http://json-schema.org/draft-07/schema",$id:"AggregateTransfersFnOutput",title:"AggregateTransfersFnOutput",description:"Output of aggregateTransfers",type:"object",$ref:"/txs/aggregate-transfer-many/aggregate-transfer-many.schema.output.json"};var Sn={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateAccessTokenFnInput",title:"CreateAccessTokenFnInput",description:"Input for createAccessToken",type:"object",properties:{token:{description:"Properties of the token to create",anyOf:[{$ref:"#/definitions/create_access_token_fn_limited"},{$ref:"/txs/create-access-token/create-access-token.schema.input.json#/definitions/create_access_token_admin"}]},options:{$ref:"#/definitions/create_access_token_fn_options"}},definitions:{create_access_token_fn_options:{description:"Optional flags for input",type:"object",allOf:[{$ref:"/txs/create-access-token/create-access-token.schema.input.json#/definitions/create_access_token_tx_options"}]},create_access_token_fn_limited:{type:"object",properties:{type:{enum:["limited"]},scopes:{type:"array",items:{type:"string",enum:["aggregateTransfers","findBalances","findTokens","findTransferGroups","findTransfers","findWallets","aggregateTransferMany","findBalanceMany","findTokenMany","findTransferGroupMany","findTransferMany","findWalletMany","getBalance","getBalanceHistory","getStatistics","getToken","getTokenMany","getTransfer","getTransferGroup","getWallet","getWalletMany"]}},filters:{description:"Forced filters for requests",type:"object",$ref:"/txs/create-access-token/create-access-token.schema.input.json#/definitions/create_access_token_forced_filters"},expiresIn:{description:"JWT expiration time in minutes",type:"number"}},required:["scopes","type","expiresIn"],additionalProperties:!1}},additionalProperties:!1};var kn={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateAccessTokenFnOutput",title:"CreateAccessTokenFnOutput",description:"Output of createAccessToken",type:"object",$ref:"/txs/create-access-token/create-access-token.schema.output.json"};var Cn={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateContractFnInput",title:"CreateContractFnInput",description:"Input for createContract",type:"object",allOf:[{$ref:"#/definitions/create_contract_input"},{type:"object",properties:{options:{$ref:"#/definitions/create_contract_fn_options"}},$typescript:'{"additionalProperties": false}'}],definitions:{create_contract_fn_options:{description:"Optional flags for input",type:"object",allOf:[{$ref:"/txs/create-contract/create-contract.schema.input.json#/definitions/create_contract_tx_options"}],$typescript:'{"additionalProperties": false}'},create_contract_input:{type:"object",properties:{foreign:{description:"Unique foreign of the created Contract",type:["string","integer"]},metadata:{allOf:[{$ref:"/db/token/token.schema.input.json#/properties/metadata"}]},value_token:{description:"Foreign of the token this contract is valued in",type:["string","integer"]},value_amount:{description:"Amount of value this Contract has",type:"number"},owner:{description:"Foreign of the wallet this contract should initially belong to",type:["string","integer"]},buyer:{allOf:[{$ref:"#/definitions/create_contract_buyer_input"}]}},required:["foreign","value_amount","value_token"],$typescript:'{"additionalProperties": false}'},create_contract_buyer_input:{type:"object",description:"The properties of the contract from buyer side",properties:{wallet:{description:"Foreign of the wallet buying this contract",type:["string","integer"]},token:{description:"Foreign of the token buyer will buy with, defaults to Contract value token",type:["string","integer"]},amount:{description:"Amount the buyer will pay, defaults to contract value amount",type:"number"},metadata:{allOf:[{$ref:"/db/token/token.schema.input.json#/properties/metadata"}]},latest_control_hash:{description:"Latest control_hash on the buyer wallet",anyOf:[{$ref:"/db/transfer/transfer.schema.json#/properties/control_hash"},{type:"null"}]}},required:["wallet"],additionalProperties:!1}},$typescript:'{"additionalProperties": false}'};var Rn={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateContractFnOutput",title:"CreateContractFnOutput",description:"Output of createContract",type:"object",$ref:"/txs/create-contract/create-contract.schema.output.json"};var Gn={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateDepositFnInput",title:"CreateDepositFnInput",description:"Input for createDeposit",type:"object",allOf:[{$ref:"#/definitions/create_deposit_input"},{type:"object",properties:{options:{$ref:"#/definitions/create_deposit_fn_options"}},$typescript:'{"additionalProperties": false}'}],definitions:{create_deposit_fn_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/create_deposit_fn_additional_options"}]},create_deposit_fn_additional_options:{type:"object",properties:{return_balance:{description:"return balance after deposit",type:"boolean",default:!1},create_wallet_if_not_exists:{type:"boolean",description:"If true then the wallet will be created if not found. Only valid with 'foreign'",default:!1}},$typescript:'{"additionalProperties": false}'},create_deposit_input:{type:"object",properties:{identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},token:{description:"Id of the token to deposit as",type:["string","integer"]},wallet:{description:"Id of the wallet to deposit to",type:["string","integer"]},amount:{description:"amount to deposit",type:"number"},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},status:{description:"status of the deposit",enum:["pending","finished"],default:"finished"},transfer_group:{description:"Id of the transfer_group this deposit is linked to",type:["string"]},created_at:{$ref:"/db/transfer/transfer.schema.input.json#/properties/created_at"}},required:["wallet","amount"],$typescript:'{"additionalProperties": false}'}},$typescript:'{"additionalProperties": false}'};var Pn={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateDepositFnOutput",title:"CreateDepositFnOutput",description:"Output of deposit",$ref:"/txs/create-deposit/create-deposit.schema.output.json"};var En={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateExchangeFnInput",title:"CreateExchangeFnInput",description:"Input for createExchange",type:"object",properties:{identifier:{$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/identifier"},from_identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},from_wallet:{description:"Foreign of Wallet where from_token is debited from/to_token is credited to",type:["string","integer"]},from_token:{description:"Foreign of Token that is transferred from->to",type:["string","integer"]},from_amount:{description:"Amount of from_token transferred",$ref:"/db/transfer/transfer.schema.input.json#/properties/amount"},to_identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},to_wallet:{description:"Foreign of Wallet where from_token is credited to/to_token is debited from. If not specified then to_token.belongs_to is used",type:["string","integer"]},to_token:{description:"Foreign of Token that is transferred to->from",type:["string","integer"]},to_amount:{description:"Amount of to_token transferred. If not specified then from_amount is used",$ref:"/db/transfer/transfer.schema.input.json#/properties/amount"},status:{description:"The state at which the exchange is created",type:"string",enum:["pending","finished"]},force:{$ref:"/db/transfer/transfer.schema.input.json#/properties/force"},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},options:{$ref:"#/definitions/create_exchange_fn_options"}},required:["from_wallet","from_token","from_amount","to_token","to_wallet"],definitions:{create_exchange_fn_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/create_exchange_additional_options"}]},exchange_data:{type:"object",properties:{identifier:{$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/identifier"},from_identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},from_latest_control_hash:{description:"Latest control_hash on the from_wallet+from_token combo. Not required if no from_wallet specified",anyOf:[{$ref:"/db/transfer/transfer.schema.json#/properties/control_hash"},{type:"null"}]},from_wallet:{description:"Wallet where from_token is debited from/to_token is credited to. If not specified then from_token.belongs_to is used",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},from_token:{description:"Token that is transferred from->to",$ref:"/txs/get-token/get-token.schema.input.json#/definitions/unique_token_filter"},from_amount:{description:"Amount of from_token transferred",$ref:"/db/transfer/transfer.schema.input.json#/properties/amount"},to_identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},to_latest_control_hash:{description:"Latest control_hash on the to_wallet+to_token combo. Not required if no to_wallet specified",anyOf:[{$ref:"/db/transfer/transfer.schema.json#/properties/control_hash"},{type:"null"}]},to_wallet:{description:"Wallet where from_token is credited to/to_token is debited from. If not specified then to_token.belongs_to is used",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},to_token:{description:"Token that is transferred to->from",$ref:"/txs/get-token/get-token.schema.input.json#/definitions/unique_token_filter"},to_amount:{description:"Amount of to_token transferred. If not specified then from_amount is used",$ref:"/db/transfer/transfer.schema.input.json#/properties/amount"},status:{description:"The state at which the exchange is created",type:"string",enum:["pending","finished"]},force:{$ref:"/db/transfer/transfer.schema.input.json#/properties/force"},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"}},additionalProperties:!1},create_exchange_additional_options:{description:"Optional flags for input",type:"object",default:{},$typescript:'{"additionalProperties":false}'}},additionalProperties:!1};var Mn={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateExchangeFnOutput",title:"CreateExchangeFnOutput",description:"Output of createExchange",$ref:"/txs/create-transfer-group/create-transfer-group.schema.output.json"};var Dn={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateTokenFnInput",title:"CreateTokenFnInput",description:"Input for createToken",allOf:[{$ref:"#/definitions/create_token_fn_input_data"},{$ref:"#/definitions/create_token_fn_options_property"}],definitions:{create_token_fn_options:{allOf:[{$ref:"/txs/create-token/create-token.schema.input.json#/definitions/create_token_tx_options"}]},create_token_fn_options_property:{type:"object",properties:{options:{$ref:"#/definitions/create_token_fn_options"}},$typescript:'{"additionalProperties": false}'},create_token_fn_input_data:{type:"object",properties:{foreign:{$ref:"/db/token/token.schema.input.json#/properties/foreign"},public:{$ref:"/db/token/token.schema.input.json#/properties/public"},metadata:{$ref:"/db/token/token.schema.input.json#/properties/metadata"},divisor:{$ref:"/db/token/token.schema.input.json#/properties/divisor"},limit:{$ref:"/db/token/token.schema.input.json#/properties/limit"},belongs_to:{description:"Id of the wallet this token belongs_to",type:["string","integer"]}},required:["foreign"],$typescript:'{"additionalProperties": false}'}},$typescript:'{"additionalProperties": false}'};var Wn={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateTokenFnOutput",title:"CreateTokenFnOutput",description:"Output of createToken",$ref:"/txs/create-token/create-token.schema.output.json"};var An={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateTransferFnInput",title:"CreateTransferFnInput",description:"Input for transfer",oneOf:[{$ref:"#/definitions/create_transfer_input"},{$ref:"#/definitions/create_transfer_withdrawal_input"},{$ref:"#/definitions/create_transfer_deposit_input"}],definitions:{create_transfer_fn_options:{$comment:"Using allOf so that references dont break",type:"object",allOf:[{$ref:"/txs/create-transfer/create-transfer.schema.input.json#/definitions/create_transfer_tx_options"}]},create_transfer_fn_options_property:{type:"object",properties:{options:{$ref:"#/definitions/create_transfer_fn_options"}},$typescript:'{"additionalProperties": false}'},create_transfer_input:{type:"object",properties:{identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},token:{description:"Foreign of the token to transfer as",type:["string","integer"]},from_wallet:{description:"Foreign of the wallet to deposit to",type:["string","integer"]},to_wallet:{description:"Foreign of the wallet to deposit to",type:["string","integer"]},latest_control_hash:{description:"Latest control_hash on the from_wallet",anyOf:[{$ref:"/db/transfer/transfer.schema.json#/properties/control_hash"},{type:"null"}]},amount:{description:"amount to deposit",type:"number"},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},type:{type:"string",enum:["transfer"]},status:{description:"status of the transfer",enum:["pending","finished"],default:"finished"},transfer_group:{description:"Id of the transfer_group this transfer is linked to",type:["string"]},created_at:{$ref:"/db/transfer/transfer.schema.input.json#/properties/created_at"},options:{$ref:"#/definitions/create_transfer_fn_options"}},required:["from_wallet","to_wallet","amount"],$typescript:'{"additionalProperties": false}'},create_transfer_withdrawal_input:{type:"object",properties:{identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},token:{description:"Foreign of the token to transfer as",type:["string","integer"]},wallet:{description:"Foreign of the wallet to withdraw from",type:["string","integer"]},latest_control_hash:{description:"Latest control_hash on the from_wallet",anyOf:[{$ref:"/db/transfer/transfer.schema.json#/properties/control_hash"},{type:"null"}]},amount:{description:"amount to deposit",type:"number"},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},type:{type:"string",enum:["withdrawal"]},status:{description:"status of the transfer",enum:["pending","finished"],default:"finished"},transfer_group:{description:"Id of the transfer_group this transfer is linked to",type:["string"]},created_at:{$ref:"/db/transfer/transfer.schema.input.json#/properties/created_at"},options:{$ref:"#/definitions/create_transfer_fn_options"}},required:["wallet","amount","type"],$typescript:'{"additionalProperties": false}'},create_transfer_deposit_input:{type:"object",properties:{identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},token:{description:"Foreign of the token to transfer as",type:["string","integer"]},wallet:{description:"Foreign of the wallet to deposit to",type:["string","integer"]},amount:{description:"amount to deposit",type:"number"},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},type:{type:"string",enum:["deposit"]},status:{description:"status of the transfer",enum:["pending","finished"],default:"finished"},transfer_group:{description:"Id of the transfer_group this transfer is linked to",type:["string"]},created_at:{$ref:"/db/transfer/transfer.schema.input.json#/properties/created_at"},options:{$ref:"#/definitions/create_transfer_fn_options"}},required:["wallet","amount","type"],$typescript:'{"additionalProperties": false}'},create_transfer_wild_input:{anyOf:[{$ref:"#/definitions/create_transfer_input"},{$ref:"#/definitions/create_transfer_withdrawal_input"},{$ref:"#/definitions/create_transfer_deposit_input"}]}},$typescript:'{"additionalProperties": false}'};var Nn={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateTransferFnOutput",title:"CreateTransferFnOutput",description:"Output of transfer",$ref:"/txs/create-transfer/create-transfer.schema.output.json"};var Un={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateTransferGroupFnInput",title:"CreateTransferGroupFnInput",description:"Input for createTransferGroup",type:"object",allOf:[{$ref:"#/definitions/create_transfer_group_fn_input_data"},{$ref:"#/definitions/create_transfer_group_fn_options_property"}],definitions:{create_transfer_group_fn_options:{$comment:"Using allOf, because otherwise references break",type:"object",allOf:[{$ref:"/txs/create-transfer-group/create-transfer-group.schema.input.json#/definitions/create_transfer_group_tx_options"}]},create_transfer_group_fn_options_property:{type:"object",properties:{options:{$ref:"#/definitions/create_transfer_group_fn_options"}},$typescript:'{"additionalProperties": false}'},create_transfer_group_fn_input_data:{type:"object",properties:{identifier:{$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/identifier"},status:{$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/status"},transfer_status:{$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/transfer_status"},metadata:{$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/metadata"},children:{description:"Array of children",type:"array",items:{$ref:"#/definitions/child_transfer_data_fn"}}},$typescript:'{"additionalProperties": false}'},child_transfer_data_fn:{anyOf:[{$ref:"#/definitions/child_transfer_data_regular_fn"},{$ref:"#/definitions/child_transfer_data_withdrawal_fn"},{$ref:"#/definitions/child_transfer_data_deposit_fn"}]},child_transfer_data_regular_fn:{type:"object",properties:{identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},token:{description:"Foreign of the token to transfer as",type:["string","integer"]},from_wallet:{description:"Foreign of the wallet to deposit to",type:["string","integer"]},to_wallet:{description:"Foreign of the wallet to deposit to",type:["string","integer"]},latest_control_hash:{description:"Latest control_hash on the from_wallet",anyOf:[{$ref:"/db/transfer/transfer.schema.json#/properties/control_hash"},{type:"null"}]},amount:{description:"amount to deposit",type:"number"},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},type:{type:"string",enum:["transfer"]},created_at:{$ref:"/db/transfer/transfer.schema.input.json#/properties/created_at"}},required:["from_wallet","to_wallet","amount"],$typescript:'{"additionalProperties": false}'},child_transfer_data_withdrawal_fn:{type:"object",properties:{identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},token:{description:"Foreign of the token to transfer as",type:["string","integer"]},wallet:{description:"Foreign of the wallet to withdraw from",type:["string","integer"]},latest_control_hash:{description:"Latest control_hash on the from_wallet",anyOf:[{$ref:"/db/transfer/transfer.schema.json#/properties/control_hash"},{type:"null"}]},amount:{description:"amount to deposit",type:"number"},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},type:{type:"string",enum:["withdrawal"]},created_at:{$ref:"/db/transfer/transfer.schema.input.json#/properties/created_at"}},required:["wallet","amount","type"],$typescript:'{"additionalProperties": false}'},child_transfer_data_deposit_fn:{type:"object",properties:{identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},token:{description:"Foreign of the token to transfer as",type:["string","integer"]},wallet:{description:"Foreign of the wallet to deposit to",type:["string","integer"]},amount:{description:"amount to deposit",type:"number"},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},type:{type:"string",enum:["deposit"]},created_at:{$ref:"/db/transfer/transfer.schema.input.json#/properties/created_at"}},required:["wallet","amount","type"],$typescript:'{"additionalProperties": false}'}},$typescript:'{"additionalProperties": false}'};var qn={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateTransferGroupFnOutput",title:"CreateTransferGroupFnOutput",description:"Output of createTransferGroup",type:"object",$ref:"/txs/create-transfer-group/create-transfer-group.schema.output.json"};var Bn={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateTransfersFnInput",title:"CreateTransfersFnInput",description:"Input for createTransfers",type:"object",properties:{transfers:{type:"array",description:"Array of transfer objects to create",minItems:1,items:{$ref:"/fns/create-transfer/create-transfer.schema.input.json#/definitions/create_transfer_wild_input"}},options:{$ref:"#/definitions/create_transfers_fn_options"}},definitions:{create_transfers_fn_options:{allOf:[{$ref:"/txs/create-transfer-many/create-transfer-many.schema.input.json#/definitions/create_transfer_many_tx_options"}]}},required:["transfers"],additionalProperties:!1};var Ln={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateTransfersFnOutput",title:"CreateTransfersFnOutput",description:"Output of createTransfers",$ref:"/txs/create-transfer-many/create-transfer-many.schema.output.json"};var Vn={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateWalletFnInput",title:"CreateWalletFnInput",description:"Input for createWallet",type:"object",allOf:[{$ref:"#/definitions/create_wallet_fn_input_data"},{$ref:"#/definitions/create_wallet_fn_options_property"}],definitions:{create_wallet_fn_options:{description:"Optional flags for input",type:"object",allOf:[{$ref:"/txs/create-wallet/create-wallet.schema.input.json#/definitions/create_wallet_tx_options"}]},create_wallet_fn_options_property:{type:"object",properties:{options:{$ref:"#/definitions/create_wallet_fn_options"}},$typescript:'{"additionalProperties": false}'},create_wallet_fn_input_data:{type:"object",properties:{foreign:{$ref:"/db/wallet/wallet.schema.input.json#/properties/foreign"},name:{$ref:"/db/wallet/wallet.schema.input.json#/properties/name"},metadata:{$ref:"/db/wallet/wallet.schema.input.json#/properties/metadata"},status:{$ref:"/db/wallet/wallet.schema.input.json#/properties/status"}},required:["foreign"],$typescript:'{"additionalProperties": false}'}},$typescript:'{"additionalProperties": false}'};var Hn={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateWalletFnOutput",title:"CreateWalletFnOutput",description:"Output of createWallet",type:"object",$ref:"/txs/create-wallet/create-wallet.schema.output.json"};var zn={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateWithdrawalFnInput",title:"CreateWithdrawalFnInput",description:"Input for withdraw",type:"object",allOf:[{$ref:"#/definitions/create_withdrawal_input"},{type:"object",properties:{options:{$ref:"#/definitions/create_withdrawal_fn_options"}},$typescript:'{"additionalProperties": false}'}],definitions:{create_withdrawal_fn_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/create_withdrawal_fn_additional_options"}]},create_withdrawal_fn_additional_options:{type:"object",properties:{return_balance:{description:"Return balance after withdrawal",type:"boolean"}},default:{},$typescript:'{"additionalProperties": false}'},create_withdrawal_input:{type:"object",properties:{identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},token:{description:"Foreign of the token to deposit as",type:["string","integer"]},wallet:{description:"Foreign of the wallet to deposit to",type:["string","integer"]},latest_control_hash:{description:"Latest control_hash on the from_wallet",anyOf:[{$ref:"/db/transfer/transfer.schema.json#/properties/control_hash"},{type:"null"}]},amount:{description:"amount to deposit",type:"number"},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},status:{description:"status of the withdrawal",enum:["pending","finished"],default:"finished"},transfer_group:{description:"Id of the transfer_group this withdrawal is linked to",type:["string"]},created_at:{$ref:"/db/transfer/transfer.schema.input.json#/properties/created_at"}},required:["wallet","amount"],$typescript:'{"additionalProperties": false}'}},$typescript:'{"additionalProperties": false}'};var Jn={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateWithdrawalFnOutput",title:"CreateWithdrawalFnOutput",description:"Output of withdraw",$ref:"/txs/create-withdrawal/create-withdrawal.schema.output.json"};var Qn={$schema:"http://json-schema.org/draft-07/schema",$id:"FindBalancesFnInput",title:"FindBalancesFnInput",description:"Input for findBalances",type:"object",properties:{token:{description:"Id of the token to get balance",type:["string","integer"]},wallet:{description:"Id of the wallet to get balance from",type:["string","integer"]},options:{$ref:"#/definitions/find_balances_fn_options"}},definitions:{find_balances_fn_options:{description:"findBalances function options",allOf:[{$ref:"/fns/fn-consts.schema.json#/definitions/i_fn_find_options_extra"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_limiting_options"},{$ref:"/txs/find-balance-many/find-balance-many.schema.input.json#/definitions/find_balance_many_ordering_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_select_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_deselect_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_options"}]}},$queryBuilder:!0,additionalProperties:!1};var Kn={$schema:"http://json-schema.org/draft-07/schema",$id:"FindBalancesFnOutput",title:"FindBalancesFnOutput",description:"Output of findBalances",type:"object",$ref:"/txs/find-balance-many/find-balance-many.schema.output.json"};var Yn={$schema:"http://json-schema.org/draft-07/schema",$id:"FindTokensFnInput",title:"FindTokensFnInput",description:"Input for findTokens",type:"object",properties:{foreign:{description:"Foreign of the token",type:["string","integer"]},type:{$ref:"/db/token/token.schema.json#/properties/type"},belongs_to:{description:"Foreign of the wallet connected to token",type:["string","integer"]},metadata:{description:"Metadata filter",$ref:"/db/consts.schema.json#/definitions/DbFilterMetadata"},options:{$ref:"#/definitions/find_tokens_fn_options"}},definitions:{find_tokens_fn_options:{description:"findtokens function options",allOf:[{$ref:"/fns/fn-consts.schema.json#/definitions/i_fn_find_options_extra"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_limiting_options"},{$ref:"/txs/find-token-many/find-token-many.schema.input.json#/definitions/find_token_many_ordering_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_select_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_deselect_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_options"}]}},$queryBuilder:!0,additionalProperties:!1};var Xn={$schema:"http://json-schema.org/draft-07/schema",$id:"FindTokensFnOutput",title:"FindTokensFnOutput",description:"Output of findTokens",type:"object",$ref:"/txs/find-token-many/find-token-many.schema.output.json"};var Zn={$schema:"http://json-schema.org/draft-07/schema",$id:"FindTransferGroupsFnInput",title:"FindTransferGroupsFnInput",description:"Input for findTransferGroups",type:"object",properties:{identifier:{description:"Identifier of the transfer_group",type:["string","integer"]},transfer_status:{description:"Status of the transfers",$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/transfer_status"},status:{description:"Status of the transfer_group",$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/status"},metadata:{description:"Metadata filter",$ref:"/db/consts.schema.json#/definitions/DbFilterMetadata"},reverses:{description:"Identifier of the transfer_group the transfer_group reverses",type:["string","integer"]},type:{description:"Type of the transfer group",$ref:"/db/consts.schema.json#/definitions/TransferGroupType"},options:{$ref:"#/definitions/find_transfer_groups_fn_options"}},definitions:{find_transfer_groups_fn_options:{description:"findTransferGroups function options",allOf:[{$ref:"/fns/fn-consts.schema.json#/definitions/i_fn_find_options_extra"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_limiting_options"},{$ref:"/txs/find-transfer-group-many/find-transfer-group-many.schema.input.json#/definitions/find_transfer_group_many_ordering_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/find_transfer_groups_fn_extra_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_select_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_deselect_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_options"}]},find_transfer_groups_fn_extra_options:{description:"simplified options for findTransferGroups",type:"object",properties:{},$typescript:'{"additionalProperties":false}'}},$queryBuilder:!0,additionalProperties:!1};var ea={$schema:"http://json-schema.org/draft-07/schema",$id:"FindTransferGroupsFnOutput",title:"FindTransferGroupsFnOutput",description:"Output of findTransferGroups",type:"object",$ref:"/txs/find-transfer-group-many/find-transfer-group-many.schema.output.json"};var ta={$schema:"http://json-schema.org/draft-07/schema",$id:"FindTransfersFnInput",title:"FindTransfersFnInput",description:"Input for findTransfers",type:"object",properties:{wallet:{description:"Foreign of the wallet connected to transfers",type:["string","integer"]},token:{description:"Foreign of the token transferred",type:["string","integer"]},from_wallet:{description:"Foreign of the wallet transfers are made from",type:["string","integer"]},to_wallet:{description:"Foreign of the wallet transfers are made to",type:["string","integer"]},transfer_group:{description:"Foreign of the transfer_group the transfers are a part of",type:["string","integer"]},status:{description:"Status of the transfers",$ref:"/db/transfer/transfer.schema.input.json#/properties/status"},metadata:{description:"Metadata filter",$ref:"/db/consts.schema.json#/definitions/DbFilterMetadata"},options:{$ref:"#/definitions/find_transfers_fn_options"}},definitions:{find_transfers_fn_options:{description:"findTransfers function options",allOf:[{$ref:"/fns/fn-consts.schema.json#/definitions/i_fn_find_options_extra"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_limiting_options"},{$ref:"/txs/find-transfer-many/find-transfer-many.schema.input.json#/definitions/find_transfer_many_ordering_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/find_transfers_fn_extra_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_select_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_deselect_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_options"}]},find_transfers_fn_extra_options:{description:"simplified options for findTransfers",type:"object",properties:{return_running_balance:{description:"return running balance for specified wallet under filter",type:"boolean"},return_signed_amount:{description:"return running balance for specified wallet under filter",type:"boolean"},return_running_balance_for_wallet:{description:"foreign key for which wallet should running balance be returned for",type:["string","integer"]},return_signed_amount_for_wallet:{description:"foreign key for which wallet should signed amounts be returned for",type:["string","integer"]}},$typescript:'{"additionalProperties":false}'}},$queryBuilder:!0,additionalProperties:!1};var ra={$schema:"http://json-schema.org/draft-07/schema",$id:"FindTransfersFnOutput",title:"FindTransfersFnOutput",description:"Output of findTransfers",type:"object",$ref:"/txs/find-transfer-many/find-transfer-many.schema.output.json"};var na={$schema:"http://json-schema.org/draft-07/schema",$id:"FindWalletsFnInput",title:"FindWalletsFnInput",description:"Input for findWallets",type:"object",properties:{foreign:{$ref:"/db/wallet/wallet.schema.json#/properties/foreign"},name:{$ref:"/db/wallet/wallet.schema.json#/properties/name"},type:{$ref:"/db/wallet/wallet.schema.json#/properties/type"},status:{$ref:"/db/wallet/wallet.schema.json#/properties/status"},metadata:{description:"Metadata filter",$ref:"/db/consts.schema.json#/definitions/DbFilterMetadata"},options:{$ref:"#/definitions/find_wallets_fn_options"}},definitions:{find_wallets_fn_options:{description:"Optional flags for input",type:"object",allOf:[{$ref:"/fns/fn-consts.schema.json#/definitions/i_fn_find_options_extra"},{$ref:"/txs/find-wallet-many/find-wallet-many.schema.input.json#/definitions/find_wallet_many_tx_options"},{$ref:"#/definitions/find_wallets_fn_extra_options"}]},find_wallets_fn_extra_options:{type:"object",properties:{include_balance_for_token:{description:"Foreign of token to include balance for",type:["string","number"]}},$typescript:'{"additionalProperties":false}'}},$queryBuilder:!0,additionalProperties:!1};var aa={$schema:"http://json-schema.org/draft-07/schema",$id:"FindWalletsFnOutput",title:"FindWalletsFnOutput",description:"Output of findWallets",type:"object",$ref:"/txs/find-wallet-many/find-wallet-many.schema.output.json"};var sa={$schema:"http://json-schema.org/draft-07/schema",$id:"FnConsts",description:"Generics used by functions",definitions:{i_fn_find_options:{description:"extended find options for client functions",allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_limiting_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_ordering_options"},{$ref:"#/definitions/i_fn_find_options_extra"}]},i_fn_find_options_extra:{description:"extra find options for client functions",$typescript:'{"additionalProperties":false}',type:"object",properties:{order_by:{description:"Ordering options in string format",type:"string"}}}}};var ia={$schema:"http://json-schema.org/draft-07/schema",$id:"GetBalanceFnInput",title:"GetBalanceFnInput",description:"Input for Getbalance",type:"object",properties:{token:{description:"Id of the token to get balance",type:["string","integer"]},wallet:{description:"Id of the wallet to get balance from",type:["string","integer"]},datetime:{description:"Date and time this balance should be got",type:"string"},options:{$ref:"#/definitions/get_balance_fn_options"}},definitions:{get_balance_fn_options:{allOf:[{$ref:"/txs/get-balance/get-balance.schema.input.json#/definitions/get_balance_tx_options"}]}},required:["wallet"],additionalProperties:!1};var oa={$schema:"http://json-schema.org/draft-07/schema",$id:"GetBalanceFnOutput",title:"GetBalanceFnOutput",description:"Output of balance",type:"object",$ref:"/txs/get-balance/get-balance.schema.output.json"};var pa={$schema:"http://json-schema.org/draft-07/schema",$id:"GetBalanceHistoryFnInput",title:"GetBalanceHistoryFnInput",description:"Input for getBalanceHistory",type:"object",properties:{token:{description:"Id of the token to get balance",type:["string","integer"]},wallet:{description:"Id of the wallet to get balance from",type:["string","integer"]},options:{$ref:"#/definitions/get_balance_history_fn_options"}},definitions:{get_balance_history_fn_options:{description:"Optional flags for input",type:"object",allOf:[{$ref:"/txs/get-balance-history/get-balance-history.schema.input.json#/definitions/get_balance_history_tx_options"}]}},required:["wallet"],additionalProperties:!1};var da={$schema:"http://json-schema.org/draft-07/schema",$id:"GetBalanceHistoryFnOutput",title:"GetBalanceHistoryFnOutput",description:"Output of getBalanceHistory",type:"object",$ref:"/txs/get-balance-history/get-balance-history.schema.output.json"};var fa={$schema:"http://json-schema.org/draft-07/schema",$id:"GetFlagsFnInput",title:"GetFlagsFnInput",description:"Input for getFlags",type:"object",properties:{options:{$ref:"#/definitions/get_flags_fn_options"}},default:{},definitions:{get_flags_fn_options:{allOf:[{$ref:"/txs/get-flags/get-flags.schema.input.json#/definitions/get_flags_tx_options"}]}},additionalProperties:!1};var ua={$schema:"http://json-schema.org/draft-07/schema",$id:"GetFlagsFnOutput",title:"GetFlagsFnOutput",description:"Output of getFlags",$ref:"/txs/get-flags/get-flags.schema.output.json"};var la={$schema:"http://json-schema.org/draft-07/schema",$id:"GetStatisticsFnInput",title:"GetStatisticsFnInput",description:"Input for getStatistics",type:"object",properties:{model:{$ref:"/txs/get-statistics/get-statistics.schema.input.json#/definitions/statistics_model"},groups:{$ref:"/txs/get-statistics/get-statistics.schema.input.json#/definitions/statistics_groups"},aggregator:{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_aggregator"},filter:{$ref:"/txs/get-statistics/get-statistics.schema.input.json#/definitions/statistics_filter"},options:{$ref:"#/definitions/get_statistics_fn_options"}},definitions:{get_statistics_fn_options:{description:"Optional flags for input",type:"object",allOf:[{$ref:"/txs/get-statistics/get-statistics.schema.input.json#/definitions/get_statistics_tx_options"}]}},additionalProperties:!1};var ca={$schema:"http://json-schema.org/draft-07/schema",$id:"GetStatisticsFnOutput",title:"GetStatisticsFnOutput",description:"Output of getStatistics",type:"object",$ref:"/txs/get-statistics/get-statistics.schema.output.json"};var ma={$schema:"http://json-schema.org/draft-07/schema",$id:"GetTokenFnInput",title:"GetTokenFnInput",description:"Input for getToken",type:"object",properties:{foreign:{$ref:"/db/token/token.schema.json#/properties/foreign"},options:{$ref:"#/definitions/get_token_fn_options"}},definitions:{get_token_fn_options:{allOf:[{$ref:"/txs/get-token/get-token.schema.input.json#/definitions/get_token_tx_options"}]}},additionalProperties:!1};var ha={$schema:"http://json-schema.org/draft-07/schema",$id:"GetTokenFnOutput",title:"GetTokenFnOutput",description:"Output of getToken",$ref:"/txs/get-token/get-token.schema.output.json"};var _a={$schema:"http://json-schema.org/draft-07/schema",$id:"GetTransferFnInput",title:"GetTransferFnInput",description:"Input for getTransfer",type:"object",properties:{transfer:{description:"Transfer identifier",type:["string","integer"]},options:{$ref:"#/definitions/get_transfer_fn_options"}},definitions:{get_transfer_fn_options:{description:"Optional flags for input",allOf:[{$ref:"/txs/get-transfer/get-transfer.schema.input.json#/definitions/get_transfer_tx_options"}]}},required:["transfer"],additionalProperties:!1};var ga={$schema:"http://json-schema.org/draft-07/schema",$id:"GetTransferFnOutput",title:"GetTransferFnOutput",description:"Output of getTransfer",type:"object",$ref:"/txs/get-transfer/get-transfer.schema.output.json"};var Ta={$schema:"http://json-schema.org/draft-07/schema",$id:"GetTransferGroupFnInput",title:"GetTransferGroupFnInput",description:"Input for getTransferGroup",type:"object",properties:{transfer_group:{description:"identifier of the transfer group to reverse",type:["string","number"]},options:{$ref:"#/definitions/get_transfer_group_fn_options"}},definitions:{get_transfer_group_fn_options:{description:"Optional flags for input",allOf:[{$ref:"/txs/get-transfer-group/get-transfer-group.schema.input.json#/definitions/get_transfer_group_tx_options"}]}},required:["transfer_group"],additionalProperties:!1};var ya={$schema:"http://json-schema.org/draft-07/schema",$id:"GetTransferGroupFnOutput",title:"GetTransferGroupFnOutput",description:"Output of getTransferGroup",type:"object",$ref:"/txs/get-transfer-group/get-transfer-group.schema.output.json"};var ba={$schema:"http://json-schema.org/draft-07/schema",$id:"GetWalletFnInput",title:"GetWalletFnInput",description:"Input for getWallet",type:"object",properties:{wallet:{description:"Wallet foreign",type:["string","integer"]},options:{$ref:"#/definitions/get_wallet_fn_options"}},definitions:{get_wallet_fn_options:{description:"Optional flags for input",type:"object",allOf:[{$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/get_wallet_tx_options"}]}},required:["wallet"],additionalProperties:!1};var Fa={$schema:"http://json-schema.org/draft-07/schema",$id:"GetWalletFnOutput",title:"GetWalletFnOutput",description:"Output of getWallet",type:"object",$ref:"/txs/get-wallet/get-wallet.schema.output.json"};var Jt={$schema:"http://json-schema.org/draft-07/schema",$id:"ImportDataFnInput",title:"ImportDataFnInput",description:"Input for import",type:"object",properties:{actions:{type:"array",items:{$ref:"#/definitions/import_data_fn_stream_chunk"}},options:{$ref:"#/definitions/import_data_fn_options"}},definitions:{import_data_fn_options:{description:"Optional flags for input",type:"object",allOf:[{$ref:"/txs/import-actions/import-actions.schema.input.json#/definitions/import_actions_tx_options"}]},import_data_fn_stream_chunk:{type:"object",anyOf:[{$ref:"#/definitions/import_wallet"},{$ref:"#/definitions/import_token"},{$ref:"#/definitions/import_transfer_group"},{$ref:"#/definitions/import_transfer"},{$ref:"#/definitions/import_reverse_transfer"},{$ref:"#/definitions/import_reverse_transfer_group"}]},import_wallet:{type:"object",properties:{target:{description:"Target of the action",type:"string",enum:["wallet"]},data:{allOf:[{$ref:"/fns/create-wallet/create-wallet.schema.input.json#/definitions/create_wallet_fn_input_data"}]}},required:["target","data"],$typescript:'{"additionalProperties": false}'},import_token:{type:"object",properties:{target:{description:"Target of the action",type:"string",enum:["token"]},data:{allOf:[{$ref:"/fns/create-token/create-token.schema.input.json#/definitions/create_token_fn_input_data"}]}},required:["target","data"],$typescript:'{"additionalProperties": false}'},import_transfer_group_extension:{type:"object",properties:{created_at:{type:"string",format:"date-time"},status_finalized_at:{type:"string",format:"date-time"},transfer_status_finalized_at:{type:"string",format:"date-time"}},$typescript:'{"additionalProperties": false}'},import_transfer_group_data:{allOf:[{$ref:"/fns/create-transfer-group/create-transfer-group.schema.input.json#/definitions/create_transfer_group_fn_input_data"},{$ref:"#/definitions/import_transfer_group_extension"}]},import_transfer_group:{type:"object",properties:{target:{description:"Target of the action",type:"string",enum:["transfer_group"]},data:{allOf:[{$ref:"#/definitions/import_transfer_group_data"}]}},required:["target","data"],$typescript:'{"additionalProperties": false}'},import_transfer_extension:{type:"object",properties:{created_at:{type:"string",format:"date-time"},status_finalized_at:{type:"string",format:"date-time"}},$typescript:'{"additionalProperties": false}'},import_transfer_data:{type:"object",properties:{identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},token:{description:"Foreign of the token to transfer as",type:["string","integer"]},from_wallet:{description:"Foreign of the wallet to deposit to",type:["string","integer"]},to_wallet:{description:"Foreign of the wallet to deposit to",type:["string","integer"]},latest_control_hash:{description:"Latest control_hash on the from_wallet",anyOf:[{$ref:"/db/transfer/transfer.schema.json#/properties/control_hash"},{type:"null"}]},amount:{description:"amount to deposit",type:"number"},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},type:{type:"string",enum:["transfer"]},status:{description:"status of the transfer",enum:["pending","cancelled","finished"],default:"finished"},transfer_group:{description:"Id of the transfer_group this transfer is linked to",type:["string"]},created_at:{$ref:"/db/transfer/transfer.schema.input.json#/properties/created_at"},status_finalized_at:{$ref:"/db/transfer/transfer.schema.input.json#/properties/status_finalized_at"}},required:["from_wallet","to_wallet","amount"],$typescript:'{"additionalProperties": false}'},import_withdrawal_data:{type:"object",properties:{identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},token:{description:"Foreign of the token to transfer as",type:["string","integer"]},wallet:{description:"Foreign of the wallet to withdraw from",type:["string","integer"]},latest_control_hash:{description:"Latest control_hash on the from_wallet",anyOf:[{$ref:"/db/transfer/transfer.schema.json#/properties/control_hash"},{type:"null"}]},amount:{description:"amount to deposit",type:"number"},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},type:{type:"string",enum:["withdrawal"]},status:{description:"status of the transfer",enum:["pending","cancelled","finished"],default:"finished"},transfer_group:{description:"Id of the transfer_group this transfer is linked to",type:["string"]},created_at:{$ref:"/db/transfer/transfer.schema.input.json#/properties/created_at"},status_finalized_at:{$ref:"/db/transfer/transfer.schema.input.json#/properties/status_finalized_at"}},required:["wallet","amount","type"],$typescript:'{"additionalProperties": false}'},import_deposit_data:{type:"object",properties:{identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},token:{description:"Foreign of the token to transfer as",type:["string","integer"]},wallet:{description:"Foreign of the wallet to deposit to",type:["string","integer"]},amount:{description:"amount to deposit",type:"number"},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},type:{type:"string",enum:["deposit"]},status:{description:"status of the transfer",enum:["pending","cancelled","finished"],default:"finished"},transfer_group:{description:"Id of the transfer_group this transfer is linked to",type:["string"]},created_at:{$ref:"/db/transfer/transfer.schema.input.json#/properties/created_at"},status_finalized_at:{$ref:"/db/transfer/transfer.schema.input.json#/properties/status_finalized_at"}},required:["wallet","amount","type"],$typescript:'{"additionalProperties": false}'},create_transfer_data_wild:{anyOf:[{$ref:"#/definitions/import_transfer_data"},{$ref:"#/definitions/import_withdrawal_data"},{$ref:"#/definitions/import_deposit_data"}]},import_transfer:{type:"object",properties:{target:{description:"Target of the action",type:"string",enum:["transfer"]},data:{allOf:[{$ref:"#/definitions/create_transfer_data_wild"}]}},required:["target","data"],$typescript:'{"additionalProperties": false}'},import_reverse_transfer_options:{type:"object",properties:{metadata_action:{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_action"}},$typescript:'{"additionalProperties": false}'},import_reverse_transfer_extension:{type:"object",properties:{options:{allOf:[{$ref:"#/definitions/import_reverse_transfer_options"}]}},$typescript:'{"additionalProperties": false}'},import_reverse_transfer_data:{allOf:[{$ref:"/fns/reverse-transfer/reverse-transfer.schema.input.json#/definitions/reverse_transfer_fn_input_data"},{$ref:"#/definitions/import_reverse_transfer_extension"}]},import_reverse_transfer:{type:"object",properties:{target:{description:"Target of the action",type:"string",enum:["reverse_transfer"]},data:{allOf:[{$ref:"#/definitions/import_reverse_transfer_data"}]}},required:["target","data"],$typescript:'{"additionalProperties": false}'},import_reverse_transfer_group_options:{type:"object",properties:{metadata_action:{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_action"},transfer_metadata_action:{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_action"}},$typescript:'{"additionalProperties": false}'},import_reverse_transfer_group_extension:{type:"object",properties:{options:{allOf:[{$ref:"#/definitions/import_reverse_transfer_group_options"}]}},$typescript:'{"additionalProperties": false}'},import_reverse_transfer_group_data:{allOf:[{$ref:"/fns/reverse-transfer-group/reverse-transfer-group.schema.input.json#/definitions/reverse_transfer_group_fn_input_data"},{$ref:"#/definitions/import_reverse_transfer_group_extension"}]},import_reverse_transfer_group:{type:"object",properties:{target:{description:"Target of the action",type:"string",enum:["reverse_transfer_group"]},data:{allOf:[{$ref:"#/definitions/import_reverse_transfer_group_data"}]}},required:["target","data"],$typescript:'{"additionalProperties": false}'}},$allowStreamInput:"import_data_fn_stream_chunk",additionalProperties:!1};var xa={$schema:"http://json-schema.org/draft-07/schema",$id:"ImportDataFnOutput",title:"ImportDataFnOutput",description:"Output of import",type:"object",$ref:"/txs/import-actions/import-actions.schema.output.json"};var Oa={$schema:"http://json-schema.org/draft-07/schema",$id:"ReverseTransferFnInput",title:"ReverseTransferFnInput",description:"Input for reverseTransfer",allOf:[{$ref:"#/definitions/reverse_transfer_fn_input_data"},{$ref:"#/definitions/reverse_transfer_fn_options_property"}],definitions:{reverse_transfer_fn_options:{allOf:[{$ref:"/txs/reverse-transfer/reverse-transfer.schema.input.json#/definitions/reverse_transfer_tx_options"}]},reverse_transfer_fn_options_property:{type:"object",properties:{options:{$ref:"#/definitions/reverse_transfer_fn_options"}},$typescript:'{"additionalProperties": false}'},reverse_transfer_fn_input_data:{type:"object",properties:{transfer:{description:"Transfer identifier",type:["string","integer"]},status:{description:"Status of the created transfer",$ref:"/db/transfer/transfer.schema.input.json#/properties/status"},identifier:{description:"Identifier for the created transfer",$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},force:{description:"Force create the reverse transfer ignoring balance",$ref:"/db/transfer/transfer.schema.input.json#/properties/force"},metadata:{description:"Metadata for the reversed transfers",$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},extend_metadata:{description:"Key value object to extend metadata with on created transfer",$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/metadata"}},required:["transfer"],$typescript:'{"additionalProperties": false}'}},$typescript:'{"additionalProperties": false}'};var $a={$schema:"http://json-schema.org/draft-07/schema",$id:"ReverseTransferFnOutput",title:"ReverseTransferFnOutput",description:"Output of reverseTransfer",$ref:"/txs/reverse-transfer/reverse-transfer.schema.output.json"};var wa={$schema:"http://json-schema.org/draft-07/schema",$id:"ReverseTransferGroupFnInput",title:"ReverseTransferGroupFnInput",description:"Input for reverseTransferGroup",allOf:[{$ref:"#/definitions/reverse_transfer_group_fn_input_data"},{$ref:"#/definitions/reverse_transfer_group_fn_options_property"}],definitions:{reverse_transfer_group_fn_options:{allOf:[{$ref:"/txs/reverse-transfer-group/reverse-transfer-group.schema.input.json#/definitions/reverse_transfer_group_tx_options"}]},reverse_transfer_group_fn_options_property:{type:"object",properties:{options:{$ref:"#/definitions/reverse_transfer_group_fn_options"}},$typescript:'{"additionalProperties": false}'},reverse_transfer_group_fn_input_data:{type:"object",properties:{transfer_group:{description:"identifier of the transfer group to reverse",type:["string","number"]},status:{$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/status"},transfer_status:{$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/transfer_status"},identifier:{$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/identifier"},force:{$ref:"/db/transfer/transfer.schema.input.json#/properties/force"},metadata:{$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/metadata"},transfer_metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},extend_metadata:{description:"Key value object to extend metadata with on created transfer",$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/metadata"},transfer_extend_metadata:{description:"Key value object to extend metadata with on created transfer",$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"}},required:["transfer_group"],$typescript:'{"additionalProperties": false}'}},$typescript:'{"additionalProperties": false}'};var Ia={$schema:"http://json-schema.org/draft-07/schema",$id:"ReverseTransferGroupFnOutput",title:"ReverseTransferGroupFnOutput",description:"Output of reverseTransferGroup",$ref:"/txs/reverse-transfer-group/reverse-transfer-group.schema.output.json"};var ja={$schema:"http://json-schema.org/draft-07/schema",$id:"ReverseTransfersFnInput",title:"ReverseTransfersFnInput",description:"Input for reverseTransfers",type:"object",properties:{wallet:{description:"Foreign of the wallet connected to transfers",type:["string","integer"]},token:{description:"Foreign of the token transferred",type:["string","integer"]},from_wallet:{description:"Foreign of the wallet transfers are made from",type:["string","integer"]},to_wallet:{description:"Foreign of the wallet transfers are made to",type:["string","integer"]},transfer_group:{description:"Foreign of the transfer_group the transfers are a part of",type:["string","integer"]},status:{description:"Status of the transfers",$ref:"/db/transfer/transfer.schema.input.json#/properties/status"},metadata:{description:"Metadata filter",$ref:"/db/consts.schema.json#/definitions/DbFilterMetadata"},reverse:{$ref:"/txs/reverse-transfer-many/reverse-transfer-many.schema.input.json#/definitions/reverse_transfer_many_modifications"},options:{$ref:"#/definitions/reverse_transfers_fn_options"}},definitions:{reverse_transfers_fn_options:{description:"findTransfers function options",allOf:[{$ref:"/txs/reverse-transfer-many/reverse-transfer-many.schema.input.json#/definitions/reverse_transfer_many_tx_options"}]},reverse_transfers_fn_modifications:{description:"In case the transfer will be made then apply these modifications",allOf:[{$ref:"/txs/reverse-transfer-many/reverse-transfer-many.schema.input.json#/definitions/reverse_transfer_many_modifications"}]}},$reverseQueryBuilder:!0,additionalProperties:!1};var va={$schema:"http://json-schema.org/draft-07/schema",$id:"ReverseTransfersFnOutput",title:"ReverseTransfersFnOutput",description:"Output of reverseTransfers",type:"object",$ref:"/txs/reverse-transfer-many/reverse-transfer-many.schema.output.json"};var Sa={$schema:"http://json-schema.org/draft-07/schema",$id:"SetFlagsFnInput",title:"SetFlagsFnInput",description:"Input for setFlags",allOf:[{$ref:"#/definitions/set_flags_properties"}],definitions:{set_flags_fn_options:{allOf:[{$ref:"/txs/set-flags/set-flags.schema.input.json#/definitions/set_flags_tx_options"}]},set_flags_properties:{allOf:[{$ref:"/db/consts.schema.json#/definitions/Flags"},{$ref:"#/definitions/set_flags_options_property"}]},set_flags_options_property:{type:"object",properties:{options:{$ref:"#/definitions/set_flags_fn_options"}},$typescript:'{"additionalProperties": false}'}},$typescript:'{"additionalProperties": false}'};var ka={$schema:"http://json-schema.org/draft-07/schema",$id:"SetFlagsFnOutput",title:"SetFlagsFnOutput",description:"Output of setFlags",$ref:"/txs/set-flags/set-flags.schema.output.json"};var Ca={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateTokenFnInput",title:"UpdateTokenFnInput",description:"Input for updateToken",type:"object",properties:{token:{description:"Token foreign",type:["string","number"]},metadata:{$ref:"/db/token/token.schema.json#/properties/metadata"},public:{$ref:"/db/token/token.schema.json#/properties/public"},status:{$ref:"/db/token/token.schema.json#/properties/status"},options:{$ref:"#/definitions/update_token_fn_options"}},definitions:{update_token_fn_fields:{description:"Updateable fields",type:"object",allOf:[{$ref:"/txs/update-token/update-token.schema.input.json#/definitions/update_token_fields"}]},update_token_fn_options:{description:"Optional flags for input",type:"object",allOf:[{$ref:"/txs/update-token/update-token.schema.input.json#/definitions/update_token_tx_options"}]}},additionalProperties:!1,required:["token"]};var Ra={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateTokenFnOutput",title:"UpdateTokenFnOutput",description:"Output of updateToken",type:"object",$ref:"/txs/update-token/update-token.schema.output.json"};var Ga={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateTransferFnInput",title:"UpdateTransferFnInput",description:"Input for updateTransfer",type:"object",properties:{transfer:{description:"Transfer identifier",type:["string","integer"]},status:{description:"Status the transfer should be set to",enum:["finished","cancelled"]},metadata:{$ref:"/db/transfer/transfer.schema.json#/properties/metadata"},options:{$ref:"#/definitions/update_transfer_fn_options"}},definitions:{update_transfer_fn_options:{allOf:[{$ref:"/txs/update-transfer/update-transfer.schema.input.json#/definitions/update_transfer_tx_options"}]}},additionalProperties:!1,required:["transfer"]};var Pa={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateTransferFnOutput",title:"UpdateTransferFnOutput",description:"Output of updateTransfer",type:"object",$ref:"/txs/update-transfer/update-transfer.schema.output.json"};var Ea={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateTransferGroupFnInput",title:"UpdateTransferGroupFnInput",description:"Input for updateTransferGroup",anyOf:[{$ref:"#/definitions/update_transfer_group_fn_status"},{$ref:"#/definitions/update_transfer_group_fn_transfer_status"},{$ref:"#/definitions/update_transfer_group_fn_metadata"}],definitions:{update_transfer_group_fn_options:{$comment:"Using allOf so that references dont break",type:"object",allOf:[{$ref:"/txs/update-transfer-group/update-transfer-group.schema.input.json#/definitions/update_transfer_group_tx_options"}]},update_transfer_group_fn_status:{type:"object",properties:{transfer_group:{description:"identifier of the transfer group to reverse",type:["string","number"]},status:{description:"Lifecycle status of the TransferGroup",$ref:"/db/consts.schema.json#/definitions/TransferGroupStatus"},transfer_status:{description:"Status all the transfers should be set at.",$ref:"/db/consts.schema.json#/definitions/TransferStatus"},metadata:{description:"Key value object to be replaced or extended with existing TransferGroup metadata",$ref:"/db/transfer/transfer.schema.json#/properties/metadata"},options:{$ref:"#/definitions/update_transfer_group_fn_options"}},required:["transfer_group","status"],$typescript:'{"additionalProperties": false}'},update_transfer_group_fn_transfer_status:{type:"object",properties:{transfer_group:{description:"identifier of the transfer group to update",type:["string","number"]},status:{description:"Lifecycle status of the TransferGroup",$ref:"/db/consts.schema.json#/definitions/TransferGroupStatus"},transfer_status:{description:"Status all the transfers should be set at.",$ref:"/db/consts.schema.json#/definitions/TransferStatus"},metadata:{description:"Key value object to be replaced or extended with existing TransferGroup metadata",$ref:"/db/transfer/transfer.schema.json#/properties/metadata"},options:{$ref:"#/definitions/update_transfer_group_fn_options"}},required:["transfer_group","transfer_status"],$typescript:'{"additionalProperties": false}'},update_transfer_group_fn_metadata:{type:"object",properties:{transfer_group:{description:"identifier of the transfer group to update",type:["string","number"]},status:{description:"Lifecycle status of the TransferGroup",$ref:"/db/consts.schema.json#/definitions/TransferGroupStatus"},transfer_status:{description:"Status all the transfers should be set at.",$ref:"/db/consts.schema.json#/definitions/TransferStatus"},metadata:{description:"Key value object to be replaced or extended with existing TransferGroup metadata",$ref:"/db/transfer/transfer.schema.json#/properties/metadata"},options:{$ref:"#/definitions/update_transfer_group_fn_options"}},required:["transfer_group","metadata"],$typescript:'{"additionalProperties": false}'}}};var Ma={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateTransferGroupFnOutput",title:"UpdateTransferGroupFnOutput",description:"Output of updateTransferGroup",type:"object",$ref:"/txs/update-transfer-group/update-transfer-group.schema.output.json"};var Da={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateTransferGroupsFnInput",title:"UpdateTransferGroupsFnInput",description:"Input for updateTransferGroups",type:"object",properties:{transfer_status:{description:"Status of the transfers",$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/transfer_status"},status:{description:"Status of the transfer_group",$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/status"},metadata:{description:"Metadata filter",$ref:"/db/consts.schema.json#/definitions/DbFilterMetadata"},reverses:{description:"Identifier of the transfer_group the transfer_group reverses",type:["string","integer"]},type:{description:"Type of the transfer group",$ref:"/db/consts.schema.json#/definitions/TransferGroupType"},update:{$ref:"#/definitions/update_transfer_groups_fn_update_fields"},options:{$ref:"#/definitions/update_transfer_groups_fn_options"}},definitions:{update_transfer_groups_fn_update_fields:{type:"object",allOf:[{$ref:"/txs/update-transfer-group/update-transfer-group.schema.input.json#/definitions/update_transfer_group_data"}]},update_transfer_groups_fn_options:{description:"Optional flags for input",type:"object",allOf:[{$ref:"/txs/update-transfer-group/update-transfer-group.schema.input.json#/definitions/update_transfer_group_tx_options"}]}},$updateQueryBuilder:!0,additionalProperties:!1};var Wa={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateTransferGroupsFnOutput",title:"UpdateTransferGroupsFnOutput",description:"Output of updateTransferGroups",type:"object",$ref:"/txs/update-transfer-group-many/update-transfer-group-many.schema.output.json"};var Aa={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateTransfersFnInput",title:"UpdateTransfersFnInput",description:"Input for updateTransfers",type:"object",properties:{wallet:{description:"Foreign of the wallet connected to transfers",type:["string","integer"]},token:{description:"Foreign of the token transferred",type:["string","integer"]},from_wallet:{description:"Foreign of the wallet transfers are made from",type:["string","integer"]},to_wallet:{description:"Foreign of the wallet transfers are made to",type:["string","integer"]},transfer_group:{description:"Foreign of the transfer_group the transfers are a part of",type:["string","integer"]},status:{description:"Status of the transfers",$ref:"/db/transfer/transfer.schema.input.json#/properties/status"},metadata:{description:"Metadata filter",$ref:"/db/consts.schema.json#/definitions/DbFilterMetadata"},update:{$ref:"/txs/update-transfer/update-transfer.schema.input.json#/definitions/update_transfer_fields"},options:{$ref:"#/definitions/update_transfers_fn_options"}},definitions:{update_transfers_fn_options:{description:"Optional flags for input",type:"object",allOf:[{$ref:"/txs/update-transfer-many/update-transfer-many.schema.input.json#/definitions/update_transfer_many_tx_options"}]},update_transfers_fn_update_fields:{type:"object",allOf:[{$ref:"/txs/update-transfer/update-transfer.schema.input.json#/definitions/update_transfer_fields"}]}},$updateQueryBuilder:!0,additionalProperties:!1};var Na={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateTransfersFnOutput",title:"UpdateTransfersFnOutput",description:"Output of updateTransfers",type:"object",$ref:"/txs/update-transfer-many/update-transfer-many.schema.output.json"};var Ua={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateWalletFnInput",title:"UpdateWalletFnInput",description:"Input for updateWallet",type:"object",properties:{wallet:{description:"Wallet foreign",type:["string","integer"]},metadata:{$ref:"/db/wallet/wallet.schema.json#/properties/metadata"},name:{$ref:"/db/wallet/wallet.schema.input.json#/properties/name"},status:{$ref:"/db/wallet/wallet.schema.input.json#/properties/status"},options:{$ref:"#/definitions/update_wallet_fn_options"}},definitions:{update_wallet_fn_fields:{description:"Updatable fields",type:"object",allOf:[{$ref:"/txs/update-wallet/update-wallet.schema.input.json#/definitions/update_wallet_fields"}]},update_wallet_fn_options:{description:"Optional flags for input",type:"object",allOf:[{$ref:"/txs/update-wallet/update-wallet.schema.input.json#/definitions/update_wallet_tx_options"}]}},additionalProperties:!1,required:["wallet"]};var qa={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateWalletFnOutput",title:"UpdateWalletFnOutput",description:"Output of updateWallet",type:"object",$ref:"/txs/update-wallet/update-wallet.schema.output.json"};var Ba={$schema:"http://json-schema.org/draft-07/schema",$id:"AggregateTransferManyTxInput",title:"AggregateTransferManyTxInput",description:"Input for aggregateTransferMany",type:"object",properties:{transfer:{$ref:"/txs/find-transfer-many/find-transfer-many.schema.input.json#/definitions/find_transfer_many_filter"},aggregators:{description:"Array of aggregators to apply",type:"array",items:{$ref:"#/definitions/aggregate_transfer_many_aggregator"}},groups:{$ref:"#/definitions/aggregate_transfer_many_groups"},options:{$ref:"#/definitions/aggregate_transfer_many_tx_options"}},definitions:{aggregate_transfer_many_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/aggregate_transfer_many_additional_options"}]},aggregate_transfer_many_additional_options:{$typescript:'{"additionalProperties":false}',description:"Optional flags to aggregate data",type:"object",properties:{return_all_intervals:{description:"Add empty values for each interval if no matching data",type:"object",properties:{start_time:{type:"string"},end_time:{type:"string"}},additionalProperties:!1,required:["start_time","end_time"]}}},aggregate_transfer_many_groups:{type:"array",maxItems:5,items:{$ref:"#/definitions/aggregate_transfer_many_group"}},aggregate_transfer_many_group:{anyOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_group_period"},{$ref:"#/definitions/aggregate_transfer_many_group_field"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_group_metadata_field"}]},aggregate_transfer_many_group_field:{type:"object",properties:{type:{type:"string",enum:["field"]},field:{$ref:"#/definitions/aggregate_transfer_many_group_by_fields"},alias:{type:"string"}},required:["type","field"],additionalProperties:!1},aggregate_transfer_many_group_by_fields:{type:"string",enum:["type","status","from_wallet","to_wallet","wallet","token","transfer_group"]},aggregate_transfer_many_aggregator:{description:"Aggregator description",anyOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_aggregator_simple"},{$ref:"#/definitions/aggregate_transfer_many_aggregator_complex"}]},aggregate_transfer_many_aggregator_complex:{description:"Function and field to group",type:"object",properties:{function:{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_aggregator_simple"},field:{description:"Field to group by",type:"string",enum:["from.amount","to.amount","amount","abs.amount","transfer_group","from_wallet","to_wallet","wallet","token","id"]},alias:{description:"Alias to group under",type:"string"}},$typescript:'{"additionalProperties":false}'}},additionalProperties:!1};var La={$schema:"http://json-schema.org/draft-07/schema",$id:"AggregateTransferManyTxOutput",title:"AggregateTransferManyTxOutput",description:"Output of aggregateTransferMany",type:"object",properties:{rows:{description:"The results of the aggregation",$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_aggregate_results"},metadata:{description:"Information about the aggregation",$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_aggregating_metadata"}},additionalProperties:!1};var Va={$schema:"http://json-schema.org/draft-07/schema",$id:"AuthenticationCheckTxInput",title:"AuthenticationCheckTxInput",description:"Input for authenticationCheck",type:"object",properties:{options:{$ref:"#/definitions/authentication_check_tx_options"}},definitions:{authentication_check_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/authentication_check_additional_options"}]},authentication_check_additional_options:{description:"Optional flags for input",type:"object",default:{},$typescript:'{"additionalProperties":false}'}},additionalProperties:!1};var Ha={$schema:"http://json-schema.org/draft-07/schema",$id:"AuthenticationCheckTxOutput",title:"AuthenticationCheckTxOutput",description:"Output of authenticationCheck",type:"object",properties:{},additionalProperties:!1};var za={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateAccessTokenTxInput",title:"CreateAccessTokenTxInput",description:"Input for createAccessToken",type:"object",properties:{token:{anyOf:[{$ref:"#/definitions/create_access_token_limited"},{$ref:"#/definitions/create_access_token_admin"}]},options:{$ref:"#/definitions/create_access_token_tx_options"}},definitions:{create_access_token_limited:{type:"object",properties:{type:{enum:["limited"]},scopes:{type:"array",items:{type:"string",enum:["aggregateTransferMany","findBalanceMany","findTokenMany","findTransferGroupMany","findTransferMany","findWalletMany","getBalance","getBalanceHistory","getStatistics","getToken","getTokenMany","getTransfer","getTransferGroup","getWallet","getWalletMany"]}},filters:{description:"Forced filters for requests",type:"object",$ref:"#/definitions/create_access_token_forced_filters"},expiresIn:{description:"JWT expiration time in minutes",type:"number"}},required:["scopes","type","expiresIn"],additionalProperties:!1},create_access_token_admin:{type:"object",properties:{type:{enum:["admin"]},expiresIn:{description:"JWT expiration time in minutes",type:"number"}},required:["type","expiresIn"],additionalProperties:!1},create_access_token_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/create_access_token_additional_options"}]},create_access_token_additional_options:{description:"Optional flags for input",type:"object",default:{},$typescript:'{"additionalProperties":false}'},create_access_token_forced_filters:{type:"object",properties:{wallet_foreign:{type:"string"},from_wallet_foreign:{type:"string"},to_wallet_foreign:{type:"string"},token_foreign:{type:"string"}},additionalProperties:!1}},additionalProperties:!1};var Ja={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateAccessTokenTxOutput",title:"CreateAccessTokenTxOutput",description:"Output of createAccessToken",type:"object",properties:{authToken:{description:"The JWT token",type:"string"}},required:["token"],additionalProperties:!1};var Qa={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateContractTxInput",title:"CreateContractTxInput",description:"Input for createContract",type:"object",properties:{token:{allOf:[{$ref:"#/definitions/create_contract_token"}]},exchange:{allOf:[{$ref:"#/definitions/create_contract_exchange"}]},options:{$ref:"#/definitions/create_contract_tx_options"}},definitions:{create_contract_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/create_contract_additional_options"}]},create_contract_additional_options:{description:"Optional flags for input",type:"object",default:{},$typescript:'{"additionalProperties":false}'},create_contract_token:{type:"object",properties:{foreign:{allOf:[{$ref:"/db/token/token.schema.input.json#/properties/foreign"}]},metadata:{allOf:[{$ref:"/db/token/token.schema.input.json#/properties/metadata"}]},deposits:{allOf:[{$ref:"#/definitions/create_contract_deposits"}]},owner:{description:"The inital owner of the contract, defaults to foreign = 'house'",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"}},additionalProperties:!1,required:["foreign","deposits"]},create_contract_deposit:{type:"object",properties:{token:{description:"Token that is moved",allOf:[{$ref:"/txs/get-token/get-token.schema.input.json#/definitions/unique_token_filter"}]},amount:{allOf:[{$ref:"/db/transfer/transfer.schema.input.json#/properties/amount"}]}},additionalProperties:!1,required:["token","amount"]},create_contract_deposits:{type:"array",items:{allOf:[{$ref:"#/definitions/create_contract_deposit"}]},minItems:1},create_contract_exchange:{type:"object",properties:{from_wallet:{description:"Wallet the contract will belong to at the end (buyer)",allOf:[{$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"}]},from_latest_control_hash:{description:"Latest control_hash on the from_wallet+from_token combo",anyOf:[{$ref:"/db/transfer/transfer.schema.json#/properties/control_hash"},{type:"null"}]},from_token:{description:"Token that is transferred from from_wallet in exchange of the contract",$ref:"/txs/get-token/get-token.schema.input.json#/definitions/unique_token_filter"},to_wallet:{description:"Wallet the payment for the contract is sent to (seller)",allOf:[{$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"}]},amount:{allOf:[{$ref:"/db/transfer/transfer.schema.input.json#/properties/amount"}]},status:{description:"The state at which the exchange is created",type:"string",enum:["pending","finished"]},force:{allOf:[{$ref:"/db/transfer/transfer.schema.input.json#/properties/force"}]},metadata:{allOf:[{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"}]}},additionalProperties:!1,required:["from_wallet","amount"]}},required:["token"],additionalProperties:!1};var Ka={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateContractTxOutput",title:"CreateContractTxOutput",description:"Output of createContract",type:"object",properties:{token:{$ref:"/db/token/token.schema.json"},exchange:{description:"Created exchange for the Contract",allOf:[{$ref:"/txs/create-transfer-group/create-transfer-group.schema.output.json"}]}},required:["token"],additionalProperties:!1};var Ya={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateDepositTxInput",title:"CreateDepositTxInput",description:"Input for createDeposit",type:"object",properties:{deposit:{$ref:"/txs/create-transfer/create-transfer.schema.input.json#/definitions/transfer_data_deposit"},options:{$ref:"#/definitions/create_deposit_tx_options"}},definitions:{create_deposit_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"/txs/create-transfer/create-transfer.schema.input.json#/definitions/create_transfer_additional_options"}]}},additionalProperties:!1,required:["deposit"]};var Xa={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateDepositTxOutput",title:"CreateDepositTxOutput",description:"The transfer of funds and optionally the destination wallet balance",allOf:[{$ref:"/txs/create-transfer/create-transfer.schema.output.json"}]};var Za={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateDistributionTxInput",title:"CreateDistributionTxInput",description:"Input for createDistribution",type:"object",properties:{distribution:{$ref:"#/definitions/distribution"},options:{$ref:"#/definitions/create_distribution_tx_options"}},definitions:{create_distribution_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/create_distribution_additional_options"}]},create_distribution_additional_options:{description:"Optional flags for input",type:"object",default:{dryrun:!1},properties:{dryrun:{type:"boolean",default:!1}},$typescript:'{"additionalProperties":false}'},leftover_target:{type:"object",properties:{rule:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_distributor_leftover_rule"}]},target:{type:"object",properties:{wallet:{allOf:[{$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"}]},metadata:{allOf:[{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"}]}},required:["wallet"],additionalProperties:!1}},required:["rule"],additionalProperties:!1},distribution:{description:"Distribute funds from one wallet between multiple wallets",type:"object",properties:{identifier:{description:"Unique identifier for this distribution",type:"string"},latest_control_hash:{description:"Latest control_hash on the from_wallet",anyOf:[{$ref:"/db/transfer/transfer.schema.json#/properties/control_hash"},{type:"null"}]},from_wallet:{description:"Wallet where funds are debited",allOf:[{$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"}]},token:{description:"Token that is moved",allOf:[{$ref:"/txs/get-token/get-token.schema.input.json#/definitions/unique_token_filter"}]},amount:{allOf:[{$ref:"/db/transfer/transfer.schema.input.json#/properties/amount"}]},status:{allOf:[{$ref:"/db/transfer/transfer.schema.input.json#/properties/status"}]},force:{allOf:[{$ref:"/db/transfer/transfer.schema.input.json#/properties/force"}]},metadata:{allOf:[{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"}]},copy_wallet_metadata_fields:{description:"Copy metadata information from Wallet metadata to transfer metadata",type:"array",items:{$ref:"#/definitions/copy_metadata_field"}},transfer_group:{description:"TransferGroup the transfer belongs to",allOf:[{$ref:"/txs/get-transfer-group/get-transfer-group.schema.input.json#/definitions/unique_transfer_group_filter"}]},targets:{anyOf:[{$ref:"#/definitions/target_wallets"},{$ref:"#/definitions/target_token"}]},leftover:{allOf:[{$ref:"#/definitions/leftover_target"}]}},required:["identifier","from_wallet","token","amount","targets","leftover"],additionalProperties:!1},copy_metadata_field:{description:"Copy metadata info from property to property",type:"object",properties:{from_property:{type:"string"},to_property:{type:"string"}},required:["from_property"],additionalProperties:!1},target_token:{description:"Wallets will receive funds based on their balance of this token",allOf:[{$ref:"/txs/get-token/get-token.schema.input.json#/definitions/unique_token_filter"}]},target_wallet:{type:"object",properties:{wallet:{description:"Wallet where funds are credited",allOf:[{$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"}]},portion:{description:"Number specifying the portion of funds to be credited",type:["string","number"]},metadata:{allOf:[{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"}]}},required:["wallet"],additionalProperties:!1},target_wallets:{type:"array",items:{$ref:"#/definitions/target_wallet"},minItems:1}},required:["distribution"],additionalProperties:!1};var es={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateDistributionTxOutput",title:"CreateDistributionTxOutput",description:"Output of createDistribution",type:"object",properties:{transfer_group:{description:"Created distribution transfer group",allOf:[{$ref:"/db/transfer-group/transfer-group.schema.json"}]},transfers:{description:"Created transfers",type:"array",items:{$ref:"/db/transfer/transfer.schema.json"}}},required:["transfer_group","transfers"],additionalProperties:!1};var ts={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateTokenTxInput",title:"CreateTokenTxInput",description:"Input for createToken function",type:"object",properties:{token:{$ref:"#/definitions/create_token_input"},options:{$ref:"#/definitions/create_token_tx_options"}},definitions:{create_token_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"}]},create_token_input:{type:"object",properties:{foreign:{$ref:"/db/token/token.schema.json#/properties/foreign"},public:{$ref:"/db/token/token.schema.json#/properties/public"},metadata:{$ref:"/db/token/token.schema.json#/properties/metadata"},divisor:{$ref:"/db/token/token.schema.json#/properties/divisor"},limit:{$ref:"/db/token/token.schema.json#/properties/limit"},type:{$ref:"/db/token/token.schema.json#/properties/type"},belongs_to:{description:"Wallet this token belongs_to",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"}},additionalProperties:!1,required:["foreign"]}},required:["token"],additionalProperties:!1};var rs={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateTokenTxOutput",title:"CreateTokenTxOutput",description:"The created token and respective wallet",type:"object",properties:{token:{$ref:"/db/token/token.schema.json"},wallet:{$ref:"/db/wallet/wallet.schema.json"}},additionalProperties:!1,required:["token","wallet"]};var ns={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateTransferTxInput",title:"CreateTransferTxInput",description:"Input for createTransfer",type:"object",properties:{transfer:{$ref:"#/definitions/transfer_data"},options:{$ref:"#/definitions/create_transfer_tx_options"}},definitions:{create_transfer_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/create_transfer_additional_options"}]},create_transfer_additional_options:{description:"Additional flags to determine the return",type:"object",default:{},properties:{return_from_balance:{$id:"return_from_balance",description:"Whether the request should also return from wallet balance",type:"boolean",default:!1},return_to_balance:{$id:"return_to_balance",description:"Whether the request should also return to wallet balance",type:"boolean",default:!1},create_to_wallet_if_not_exists:{type:"boolean",description:"If true then the wallet will be created if not found. Only valid with 'foreign'",default:!1}},$typescript:'{"additionalProperties": false}'},transfer_data:{anyOf:[{$ref:"#/definitions/transfer_data_regular"},{$ref:"#/definitions/transfer_data_deposit"},{$ref:"#/definitions/transfer_data_withdrawal"}]},transfer_data_regular:{type:"object",properties:{identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},latest_control_hash:{description:"Latest control_hash on the from_wallet",anyOf:[{$ref:"/db/transfer/transfer.schema.json#/properties/control_hash"},{type:"null"}]},from_wallet:{description:"Wallet where funds are debited",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},to_wallet:{description:"Wallet where funds are credited",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},token:{description:"Token that is moved",$ref:"/txs/get-token/get-token.schema.input.json#/definitions/unique_token_filter"},amount:{$ref:"/db/transfer/transfer.schema.input.json#/properties/amount"},type:{description:"Type of transfer",enum:["transfer"]},status:{$ref:"/db/transfer/transfer.schema.input.json#/properties/status"},force:{$ref:"/db/transfer/transfer.schema.input.json#/properties/force"},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},transfer_group:{description:"TransferGroup the transfer belongs to",$ref:"/txs/get-transfer-group/get-transfer-group.schema.input.json#/definitions/unique_transfer_group_filter"},created_at:{$ref:"/db/transfer/transfer.schema.input.json#/properties/created_at"}},required:["from_wallet","to_wallet","token","amount","type"],$typescript:'{"additionalProperties": false}'},transfer_data_deposit:{type:"object",properties:{identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},latest_control_hash:{description:"Latest control_hash on the from_wallet",anyOf:[{$ref:"/db/transfer/transfer.schema.json#/properties/control_hash"},{type:"null"}]},from_wallet:{description:"Wallet where funds are debited",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},to_wallet:{description:"Wallet where funds are credited",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},token:{description:"Token that is moved",$ref:"/txs/get-token/get-token.schema.input.json#/definitions/unique_token_filter"},amount:{$ref:"/db/transfer/transfer.schema.input.json#/properties/amount"},type:{description:"Type of transfer",enum:["deposit"]},status:{$ref:"/db/transfer/transfer.schema.input.json#/properties/status"},force:{$ref:"/db/transfer/transfer.schema.input.json#/properties/force"},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},transfer_group:{description:"TransferGroup the transfer belongs to",$ref:"/txs/get-transfer-group/get-transfer-group.schema.input.json#/definitions/unique_transfer_group_filter"},created_at:{$ref:"/db/transfer/transfer.schema.input.json#/properties/created_at"}},required:["to_wallet","token","amount"],$typescript:'{"additionalProperties": false}'},transfer_data_withdrawal:{type:"object",properties:{identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},latest_control_hash:{description:"Latest control_hash on the from_wallet",anyOf:[{$ref:"/db/transfer/transfer.schema.json#/properties/control_hash"},{type:"null"}]},from_wallet:{description:"Wallet where funds are debited",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},to_wallet:{description:"Wallet where funds are credited",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},token:{description:"Token that is moved",$ref:"/txs/get-token/get-token.schema.input.json#/definitions/unique_token_filter"},amount:{$ref:"/db/transfer/transfer.schema.input.json#/properties/amount"},type:{description:"Type of transfer",enum:["withdrawal"]},status:{$ref:"/db/transfer/transfer.schema.input.json#/properties/status"},force:{$ref:"/db/transfer/transfer.schema.input.json#/properties/force"},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},transfer_group:{description:"TransferGroup the transfer belongs to",$ref:"/txs/get-transfer-group/get-transfer-group.schema.input.json#/definitions/unique_transfer_group_filter"},created_at:{$ref:"/db/transfer/transfer.schema.input.json#/properties/created_at"}},required:["from_wallet","token","amount"],$typescript:'{"additionalProperties": false}'}},required:["transfer"],additionalProperties:!1};var as={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateTransferTxOutput",title:"CreateTransferTxOutput",description:"Output of createTransfer",type:"object",properties:{transfer:{description:"Created transfer object",$ref:"/txs/get-transfer/get-transfer.schema.output.json#/definitions/transfer"},from_balance:{description:"Debited wallet balance",$ref:"/txs/get-balance/get-balance.schema.output.json#/definitions/balance"},to_balance:{description:"Credited wallet balance",$ref:"/txs/get-balance/get-balance.schema.output.json#/definitions/balance"}},additionalProperties:!1,required:["transfer"]};var ss={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateTransferGroupTxInput",title:"CreateTransferGroupTxInput",description:"Input for createTransferGroup",type:"object",properties:{transfer_group:{$ref:"#/definitions/transfer_group_data"},options:{$ref:"#/definitions/create_transfer_group_tx_options"}},definitions:{create_transfer_group_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/create_transfer_group_additional_options"}]},create_transfer_group_additional_options:{description:"Optional flags for input",type:"object",default:{},properties:{create_to_wallet_if_not_exists:{type:"boolean",description:"If true then the wallet will be created if not found. Only valid with 'foreign'",default:!1},validate_final_balance_only:{type:"boolean",description:"If true then transfers within a group will ignore balance restrictions. Only final transfers for wallets are checked. Only valid with transfer_status_lock",default:!1}},$typescript:'{"additionalProperties": false}'},transfer_group_data:{type:"object",description:"Input for the transferGroup to create",properties:{identifier:{$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/identifier"},status:{$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/status"},transfer_status:{$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/transfer_status"},metadata:{$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/metadata"},children:{description:"Array of children",type:"array",items:{$ref:"#/definitions/child_transfer_data"}}},additionalProperties:!1},child_transfer_data:{anyOf:[{$ref:"#/definitions/child_transfer_data_regular"},{$ref:"#/definitions/child_transfer_data_deposit"},{$ref:"#/definitions/child_transfer_data_withdrawal"}]},child_transfer_data_regular:{type:"object",properties:{identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},latest_control_hash:{description:"Latest control_hash on the from_wallet",anyOf:[{$ref:"/db/transfer/transfer.schema.json#/properties/control_hash"},{type:"null"}]},from_wallet:{description:"Wallet where funds are debited",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},to_wallet:{description:"Wallet where funds are credited",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},token:{description:"Token that is moved",$ref:"/txs/get-token/get-token.schema.input.json#/definitions/unique_token_filter"},amount:{$ref:"/db/transfer/transfer.schema.input.json#/properties/amount"},type:{description:"Type of transfer",enum:["transfer"]},force:{$ref:"/db/transfer/transfer.schema.input.json#/properties/force"},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},created_at:{$ref:"/db/transfer/transfer.schema.input.json#/properties/created_at"}},required:["from_wallet","to_wallet","token","amount","type"],$typescript:'{"additionalProperties": false}'},child_transfer_data_deposit:{type:"object",properties:{identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},latest_control_hash:{description:"Latest control_hash on the from_wallet",anyOf:[{$ref:"/db/transfer/transfer.schema.json#/properties/control_hash"},{type:"null"}]},from_wallet:{description:"Wallet where funds are debited",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},to_wallet:{description:"Wallet where funds are credited",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},token:{description:"Token that is moved",$ref:"/txs/get-token/get-token.schema.input.json#/definitions/unique_token_filter"},amount:{$ref:"/db/transfer/transfer.schema.input.json#/properties/amount"},type:{description:"Type of transfer",enum:["deposit"]},force:{$ref:"/db/transfer/transfer.schema.input.json#/properties/force"},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},created_at:{$ref:"/db/transfer/transfer.schema.input.json#/properties/created_at"}},required:["to_wallet","token","amount"],$typescript:'{"additionalProperties": false}'},child_transfer_data_withdrawal:{type:"object",properties:{identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},latest_control_hash:{description:"Latest control_hash on the from_wallet",anyOf:[{$ref:"/db/transfer/transfer.schema.json#/properties/control_hash"},{type:"null"}]},from_wallet:{description:"Wallet where funds are debited",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},to_wallet:{description:"Wallet where funds are credited",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},token:{description:"Token that is moved",$ref:"/txs/get-token/get-token.schema.input.json#/definitions/unique_token_filter"},amount:{$ref:"/db/transfer/transfer.schema.input.json#/properties/amount"},type:{description:"Type of transfer",enum:["withdrawal"]},force:{$ref:"/db/transfer/transfer.schema.input.json#/properties/force"},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},created_at:{$ref:"/db/transfer/transfer.schema.input.json#/properties/created_at"}},required:["from_wallet","token","amount"],$typescript:'{"additionalProperties": false}'}},required:[],additionalProperties:!1};var is={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateTransferGroupTxOutput",title:"CreateTransferGroupTxOutput",description:"Output of createTransferGroup",type:"object",properties:{transfer_group:{$ref:"/db/transfer-group/transfer-group.schema.json"},transfers:{description:"Created transfer objects",type:"array",items:{$ref:"/txs/get-transfer/get-transfer.schema.output.json#/definitions/transfer"}}},required:["transfer_group"],additionalProperties:!1};var os={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateTransferManyTxInput",title:"CreateTransferManyTxInput",description:"Input for CreateTransferMany",type:"object",properties:{transfers:{description:"An array of transfers",type:"array",items:{$ref:"/txs/create-transfer/create-transfer.schema.input.json#/definitions/transfer_data"}},options:{$ref:"#/definitions/create_transfer_many_tx_options"}},definitions:{create_transfer_many_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/create_transfer_many_additional_options"}]},create_transfer_many_additional_options:{description:"Optional flags for input",type:"object",default:{},properties:{return_from_balance:{$id:"return_from_balance",description:"Whether the request should also return from wallet balance",type:"boolean",default:!1},return_to_balance:{$id:"return_to_balance",description:"Whether the request should also return to wallet balance",type:"boolean",default:!1},create_to_wallet_if_not_exists:{type:"boolean",description:"If true then the wallet will be created if not found. Only valid with 'foreign'",default:!1}},$typescript:'{"additionalProperties": false}'}},required:["transfers"],additionalProperties:!1};var ps={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateTransferManyTxOutput",title:"CreateTransferManyTxOutput",description:"Output of CreateTransferMany",type:"object",properties:{transfers:{description:"Created transfer objects",type:"array",items:{$ref:"/txs/get-transfer/get-transfer.schema.output.json#/definitions/transfer"}},from_balances:{description:"Debited wallet balances",type:"array",items:{$ref:"/txs/get-balance/get-balance.schema.output.json#/definitions/balance"}},to_balances:{description:"Credited wallet balances",type:"array",items:{$ref:"/txs/get-balance/get-balance.schema.output.json#/definitions/balance"}}},required:["transfers"],additionalProperties:!1};var ds={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateWalletTxInput",title:"CreateWalletTxInput",description:"Input for createWallet",type:"object",properties:{wallet:{$ref:"/db/wallet/wallet.schema.input.json"},options:{$ref:"#/definitions/create_wallet_tx_options"}},definitions:{create_wallet_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"}]}},additionalProperties:!1,required:["wallet"]};var fs={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateWalletTxOutput",title:"CreateWalletTxOutput",description:"The created wallet",type:"object",properties:{wallet:{$ref:"/db/wallet/wallet.schema.json"}},additionalProperties:!1,required:["wallet"]};var us={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateWithdrawalTxInput",title:"CreateWithdrawalTxInput",description:"Input for createWithdrawal",type:"object",properties:{withdrawal:{$ref:"/txs/create-transfer/create-transfer.schema.input.json#/definitions/transfer_data_withdrawal"},options:{$ref:"#/definitions/create_withdrawal_tx_options"}},definitions:{create_withdrawal_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"/txs/create-transfer/create-transfer.schema.input.json#/definitions/create_transfer_additional_options"}]}},required:["withdrawal"],additionalProperties:!1};var ls={$schema:"http://json-schema.org/draft-07/schema",$id:"CreateWithdrawalTxOutput",title:"CreateWithdrawalTxOutput",description:"Output of createWithdrawal",allOf:[{$ref:"/txs/create-transfer/create-transfer.schema.output.json"}]};var cs={$schema:"http://json-schema.org/draft-07/schema",$id:"ExportDatabaseTxInput",title:"ExportDatabaseTxInput",description:"Input for exportDatabase",type:"object",properties:{export_name:{description:"Name of the created export file",type:"string"}},definitions:{},additionalProperties:!1};var ms={$schema:"http://json-schema.org/draft-07/schema",$id:"ExportDatabaseTxOutput",title:"ExportDatabaseTxOutput",description:"Output of exportDatabase",type:"object",properties:{message:{type:"string"}},additionalProperties:!1};var hs={$schema:"http://json-schema.org/draft-07/schema",$id:"FindBalanceManyTxInput",title:"FindBalanceManyTxInput",description:"Input for findBalanceMany",type:"object",properties:{balance:{$ref:"#/definitions/find_balance_many_filter"},options:{$ref:"#/definitions/find_balance_many_tx_options"}},definitions:{find_balance_many_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_limiting_options"},{$ref:"#/definitions/find_balance_many_ordering_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/find_balance_many_additional_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_select_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_deselect_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_options"}]},find_balance_many_additional_options:{description:"Optional flags for input",type:"object",default:{},$typescript:'{"additionalProperties":false}'},find_balance_many_ordering_options:{$typescript:'{"additionalProperties":false}',description:"Optional flags for input ordering",type:"object",properties:{order:{description:"Ordering options",type:"array",items:{$ref:"#/definitions/find_balance_many_ordering_input"}}}},find_balance_many_ordering_input:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_ordering_input"},{$ref:"#/definitions/find_balance_many_ordering_input_field"}]},find_balance_many_ordering_input_field:{type:"object",properties:{field:{$ref:"/db/transfer-log/transfer-log.schema.json#/definitions/TransferLogTableFields"}},$typescript:'{"additionalProperties": false}'},balance_filter_foreign_fields:{type:"string",enum:["wallet","token"]},advanced_balance_filter_fields_foreign:{type:"object",properties:{field:{$ref:"#/definitions/balance_filter_foreign_fields"}},required:["field"],$typescript:'{"additionalProperties": false}'},balance_filter:{type:"object",properties:{wallet:{$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},token:{$ref:"/txs/get-token/get-token.schema.input.json#/definitions/unique_token_filter"},transfer:{$ref:"/txs/get-transfer/get-transfer.schema.input.json#/definitions/unique_transfer_filter"},type:{$ref:"/db/transfer-log/transfer-log.schema.json#/properties/type"},amount:{$ref:"/db/transfer-log/transfer-log.schema.json#/properties/amount"},pending_amount:{$ref:"/db/transfer-log/transfer-log.schema.json#/properties/pending_amount"},finished_amount:{$ref:"/db/transfer-log/transfer-log.schema.json#/properties/finished_amount"},status:{$ref:"/db/transfer-log/transfer-log.schema.json#/properties/status"},metadata:{$ref:"/db/consts.schema.json#/definitions/DbFilterMetadata"}},$typescript:'{"additionalProperties": false}'},advanced_balance_filter_inner:{type:"object",properties:{inner:{type:"array",items:{$ref:"#/definitions/advanced_balance_filter"}}},$typescript:'{"additionalProperties":false}'},advanced_balance_filter_where_inner:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereInner"},{$ref:"#/definitions/advanced_balance_filter_inner"}]},advanced_balance_filter_where_primitive:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWherePrimitive"},{$ref:"#/definitions/advanced_balance_filter_fields"}]},advanced_balance_filter_where_primitive_foreign:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWherePrimitiveForeign"},{$ref:"#/definitions/advanced_balance_filter_fields_foreign"}]},advanced_balance_filter_where_object:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereObject"},{$ref:"#/definitions/advanced_balance_filter_values"}]},advanced_balance_filter_where_in:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereIns"},{$ref:"#/definitions/advanced_balance_filter_fields_w_foreign"}]},advanced_balance_filter_where_null:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereNulls"},{$ref:"#/definitions/advanced_balance_filter_fields"}]},advanced_balance_filter_fields:{type:"object",properties:{field:{type:"string",enum:["type","amount","pending_amount","finished_amount","status","metadata","updated_at"]}},required:["field"],$typescript:'{"additionalProperties": false}'},advanced_balance_filter_fields_w_foreign:{type:"object",properties:{field:{anyOf:[{$ref:"/db/transfer-log/transfer-log.schema.json#/definitions/TransferLogTableFields"},{$ref:"#/definitions/balance_filter_foreign_fields"}]}},required:["field"],$typescript:'{"additionalProperties": false}'},advanced_balance_filter_values:{type:"object",properties:{value:{$ref:"#/definitions/balance_filter"}},required:["value"],$typescript:'{"additionalProperties": false}'},advanced_balance_filter:{anyOf:[{$ref:"#/definitions/advanced_balance_filter_where_inner"},{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereMetadataIns"},{$ref:"#/definitions/advanced_balance_filter_where_object"},{$ref:"#/definitions/advanced_balance_filter_where_primitive"},{$ref:"#/definitions/advanced_balance_filter_where_primitive_foreign"},{$ref:"#/definitions/advanced_balance_filter_where_in"},{$ref:"#/definitions/advanced_balance_filter_where_null"},{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereMetadataNulls"}]},advanced_balance_filter_array:{type:"array",items:{$ref:"#/definitions/advanced_balance_filter"}},find_balance_many_filter:{oneOf:[{$ref:"#/definitions/balance_filter"},{$ref:"#/definitions/advanced_balance_filter_array"}]}},additionalProperties:!1};var _s={$schema:"http://json-schema.org/draft-07/schema",$id:"FindBalanceManyTxOutput",title:"FindBalanceManyTxOutput",description:"Output of findBalanceMany",type:"object",properties:{balances:{description:"Found balances",type:"array",items:{$ref:"/txs/get-balance/get-balance.schema.output.json#/definitions/balance"}},metadata:{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_find_metadata"}},required:["balances","metadata"],additionalProperties:!1};var gs={$schema:"http://json-schema.org/draft-07/schema",$id:"FindTokenManyTxInput",title:"FindTokenManyTxInput",description:"Input for findTokenMany",type:"object",properties:{token:{$ref:"#/definitions/find_token_many_filter"},options:{$ref:"#/definitions/find_token_many_tx_options"}},definitions:{find_token_many_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_limiting_options"},{$ref:"#/definitions/find_token_many_ordering_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/find_token_many_additional_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_select_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_deselect_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_options"}]},find_token_many_additional_options:{description:"Optional flags for input",type:"object",default:{},$typescript:'{"additionalProperties":false}'},find_token_many_ordering_options:{$typescript:'{"additionalProperties":false}',description:"Optional flags for input ordering",type:"object",properties:{order:{description:"Ordering options",type:"array",items:{$ref:"#/definitions/find_token_many_ordering_input"}}}},find_token_many_ordering_input:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_ordering_input"},{$ref:"#/definitions/find_token_many_ordering_input_field"}]},find_token_many_ordering_input_field:{type:"object",properties:{field:{$ref:"/db/token/token.schema.json#/definitions/TokenTableFields"}},$typescript:'{"additionalProperties": false}'},token_filter_foreign_fields:{type:"string",enum:["belongs_to"]},token_filter:{type:"object",properties:{foreign:{description:"Foreign of token to return",$ref:"/db/token/token.schema.json#/properties/foreign"},type:{$ref:"/db/token/token.schema.json#/properties/type"},metadata:{$ref:"/db/consts.schema.json#/definitions/DbFilterMetadata"},belongs_to:{$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"}},$typescript:'{"additionalProperties": false}'},advanced_token_filter_inner:{type:"object",properties:{inner:{type:"array",items:{$ref:"#/definitions/advanced_token_filter"}}},$typescript:'{"additionalProperties":false}'},advanced_token_filter_where_inner:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereInner"},{$ref:"#/definitions/advanced_token_filter_inner"}]},advanced_token_filter_where_primitive:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWherePrimitive"},{$ref:"#/definitions/advanced_token_filter_fields"}]},advanced_token_filter_where_primitive_foreign:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWherePrimitiveForeign"},{$ref:"#/definitions/advanced_token_filter_fields_foreign"}]},advanced_token_filter_where_object:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereObject"},{$ref:"#/definitions/advanced_token_filter_values"}]},advanced_token_filter_where_in:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereIns"},{$ref:"#/definitions/advanced_token_filter_fields_w_foreign"}]},advanced_token_filter_where_null:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereNulls"},{$ref:"#/definitions/advanced_token_filter_fields"}]},advanced_token_filter_fields:{type:"object",properties:{field:{$ref:"/db/token/token.schema.json#/definitions/TokenTableFields"}},required:["field"],$typescript:'{"additionalProperties": false}'},advanced_token_filter_fields_foreign:{type:"object",properties:{field:{$ref:"#/definitions/token_filter_foreign_fields"}},required:["field"],$typescript:'{"additionalProperties": false}'},advanced_token_filter_fields_w_foreign:{type:"object",properties:{field:{anyOf:[{$ref:"/db/token/token.schema.json#/definitions/TokenTableFields"},{$ref:"#/definitions/token_filter_foreign_fields"}]}},required:["field"],$typescript:'{"additionalProperties": false}'},advanced_token_filter_values:{type:"object",properties:{value:{$ref:"#/definitions/token_filter"}},required:["value"],$typescript:'{"additionalProperties": false}'},advanced_token_filter:{anyOf:[{$ref:"#/definitions/advanced_token_filter_where_inner"},{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereMetadataIns"},{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereMetadataPrimitive"},{$ref:"#/definitions/advanced_token_filter_where_object"},{$ref:"#/definitions/advanced_token_filter_where_primitive"},{$ref:"#/definitions/advanced_token_filter_where_primitive_foreign"},{$ref:"#/definitions/advanced_token_filter_where_in"},{$ref:"#/definitions/advanced_token_filter_where_null"},{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereMetadataNulls"}]},advanced_token_filter_array:{type:"array",items:{$ref:"#/definitions/advanced_token_filter"}},find_token_many_filter:{oneOf:[{$ref:"#/definitions/token_filter"},{$ref:"#/definitions/advanced_token_filter_array"}]}},additionalProperties:!1};var Ts={$schema:"http://json-schema.org/draft-07/schema",$id:"FindTokenManyTxOutput",title:"FindTokenManyTxOutput",description:"Output of findTokenMany",type:"object",properties:{tokens:{description:"Found tokens",type:"array",items:{$ref:"/txs/get-token/get-token.schema.output.json#/definitions/token"}},metadata:{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_find_metadata"}},required:["tokens","metadata"],additionalProperties:!1};var ys={$schema:"http://json-schema.org/draft-07/schema",$id:"FindTransferGroupManyTxInput",title:"FindTransferGroupManyTxInput",description:"Input for findTransferGroupMany",type:"object",properties:{transfer_group:{$ref:"#/definitions/find_transfer_group_many_filter"},options:{$ref:"#/definitions/find_transfer_group_many_tx_options"}},definitions:{find_transfer_group_many_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_limiting_options"},{$ref:"#/definitions/find_transfer_group_many_ordering_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/find_transfer_group_many_additional_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_select_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_deselect_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_options"}]},find_transfer_group_many_additional_options:{$typescript:'{"additionalProperties":false}',type:"object",properties:{return_transfers:{description:"Return running balance for each transfer_group for wallet in question",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"}}},find_transfer_group_many_ordering_options:{$typescript:'{"additionalProperties":false}',description:"Optional flags for input ordering",type:"object",properties:{order:{description:"Ordering options",type:"array",items:{$ref:"#/definitions/find_transfer_group_many_ordering_input"}}}},find_transfer_group_many_ordering_input:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_ordering_input"},{$ref:"#/definitions/find_transfer_group_many_ordering_input_field"}]},find_transfer_group_many_ordering_input_field:{type:"object",properties:{field:{$ref:"/db/transfer-group/transfer-group.schema.json#/definitions/TransferGroupTableFields"}},$typescript:'{"additionalProperties": false}'},transfer_group_filter_identifier_fields:{type:"string",enum:["transfer_group","reverses"]},advanced_transfer_group_filter_fields_identifier:{type:"object",properties:{field:{$ref:"#/definitions/transfer_group_filter_identifier_fields"}},required:["field"],$typescript:'{"additionalProperties": false}'},transfer_group_filter:{type:"object",properties:{identifier:{$ref:"/db/transfer-group/transfer-group.schema.json#/properties/identifier"},status:{$ref:"/db/transfer-group/transfer-group.schema.json#/properties/status"},type:{$ref:"/db/transfer-group/transfer-group.schema.json#/properties/type"},transfer_status:{$ref:"/db/transfer-group/transfer-group.schema.json#/properties/transfer_status"},reverses:{$ref:"/txs/get-transfer-group/get-transfer-group.schema.input.json#/definitions/unique_transfer_group_filter"},metadata:{$ref:"/db/consts.schema.json#/definitions/DbFilterMetadata"}},$typescript:'{"additionalProperties": false}'},advanced_transfer_group_filter_inner:{type:"object",properties:{inner:{type:"array",items:{$ref:"#/definitions/advanced_transfer_group_filter"}}},$typescript:'{"additionalProperties":false}'},advanced_transfer_group_filter_where_inner:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereInner"},{$ref:"#/definitions/advanced_transfer_group_filter_inner"}]},advanced_transfer_group_filter_where_primitive:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWherePrimitive"},{$ref:"#/definitions/advanced_transfer_group_filter_fields"}]},advanced_transfer_group_filter_where_primitive_identifier:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWherePrimitiveIdentifier"},{$ref:"#/definitions/advanced_transfer_group_filter_fields_identifier"}]},advanced_transfer_group_filter_where_object:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereObject"},{$ref:"#/definitions/advanced_transfer_group_filter_values"}]},advanced_transfer_group_filter_where_in:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereIns"},{$ref:"#/definitions/advanced_transfer_group_filter_fields_w_foreign"}]},advanced_transfer_group_filter_where_null:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereNulls"},{$ref:"#/definitions/advanced_transfer_group_filter_fields"}]},advanced_transfer_group_filter_fields:{type:"object",properties:{field:{$ref:"/db/transfer-group/transfer-group.schema.json#/definitions/TransferGroupTableFields"}},required:["field"],$typescript:'{"additionalProperties": false}'},advanced_transfer_group_filter_fields_w_foreign:{type:"object",properties:{field:{anyOf:[{$ref:"/db/transfer-group/transfer-group.schema.json#/definitions/TransferGroupTableFields"},{$ref:"#/definitions/transfer_group_filter_identifier_fields"}]}},required:["field"],$typescript:'{"additionalProperties": false}'},advanced_transfer_group_filter_values:{type:"object",properties:{value:{$ref:"#/definitions/transfer_group_filter"}},required:["value"],$typescript:'{"additionalProperties": false}'},advanced_transfer_group_filter:{anyOf:[{$ref:"#/definitions/advanced_transfer_group_filter_where_inner"},{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereMetadataIns"},{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereMetadataPrimitive"},{$ref:"#/definitions/advanced_transfer_group_filter_where_object"},{$ref:"#/definitions/advanced_transfer_group_filter_where_primitive"},{$ref:"#/definitions/advanced_transfer_group_filter_where_primitive_identifier"},{$ref:"#/definitions/advanced_transfer_group_filter_where_in"},{$ref:"#/definitions/advanced_transfer_group_filter_where_null"},{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereMetadataNulls"}]},advanced_transfer_group_filter_array:{type:"array",items:{$ref:"#/definitions/advanced_transfer_group_filter"}},find_transfer_group_many_filter:{oneOf:[{$ref:"#/definitions/transfer_group_filter"},{$ref:"#/definitions/advanced_transfer_group_filter_array"}]}},required:["transfer_group"],additionalProperties:!1};var bs={$schema:"http://json-schema.org/draft-07/schema",$id:"FindTransferGroupManyTxOutput",title:"FindTransferGroupManyTxOutput",description:"Output of find-transfer-group-many",type:"object",properties:{transfer_groups:{description:"Found transfers",type:"array",items:{$ref:"/txs/get-transfer-group/get-transfer-group.schema.output.json#/definitions/transfer_group"}},metadata:{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_find_metadata"}},required:["transfer_groups","metadata"],additionalProperties:!1};var Fs={$schema:"http://json-schema.org/draft-07/schema",$id:"FindTransferManyTxInput",title:"FindTransferManyTxInput",description:"Input for findTransferMany",type:"object",properties:{transfer:{$ref:"#/definitions/find_transfer_many_filter"},options:{$ref:"#/definitions/find_transfer_many_tx_options"}},definitions:{find_transfer_many_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_limiting_options"},{$ref:"#/definitions/find_transfer_many_ordering_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/find_transfer_many_additional_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_select_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_deselect_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_options"}]},find_transfer_many_additional_options:{$typescript:'{"additionalProperties":false}',type:"object",properties:{return_running_balance_for_wallet:{description:"Return running balance for each transfer for wallet in question",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},return_signed_amount_for_wallet:{description:"Return amount as signed value for each transfer for wallet in question",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"}}},find_transfer_many_ordering_options:{$typescript:'{"additionalProperties":false}',description:"Optional flags for input ordering",type:"object",properties:{order:{description:"Ordering options",type:"array",items:{$ref:"#/definitions/find_transfer_many_ordering_input"}}}},find_transfer_many_ordering_input:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_ordering_input"},{$ref:"#/definitions/find_transfer_many_ordering_input_field"}]},find_transfer_many_ordering_input_field:{type:"object",properties:{field:{$ref:"/db/transfer/transfer.schema.json#/definitions/TransferTableAccessibleFields"}},$typescript:'{"additionalProperties": false}'},transfer_filter_foreign_fields:{type:"string",enum:["from_wallet","to_wallet","wallet","token"]},transfer_filter_identifier_fields:{type:"string",enum:["transfer_group"]},transfer_filter:{type:"object",properties:{from_wallet:{$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},to_wallet:{$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},wallet:{$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},token:{$ref:"/txs/get-token/get-token.schema.input.json#/definitions/unique_token_filter"},status:{$ref:"/db/transfer/transfer.schema.json#/properties/status"},transfer_group:{$ref:"/txs/get-transfer-group/get-transfer-group.schema.input.json#/definitions/unique_transfer_group_filter"},metadata:{$ref:"/db/consts.schema.json#/definitions/DbFilterMetadata"}},$typescript:'{"additionalProperties": false}'},advanced_transfer_filter_inner:{type:"object",properties:{inner:{type:"array",items:{$ref:"#/definitions/advanced_transfer_filter"}}},$typescript:'{"additionalProperties":false}'},advanced_transfer_filter_where_inner:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereInner"},{$ref:"#/definitions/advanced_transfer_filter_inner"}]},advanced_transfer_filter_where_primitive:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWherePrimitive"},{$ref:"#/definitions/advanced_transfer_filter_fields"}]},advanced_transfer_filter_where_primitive_foreign:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWherePrimitiveForeign"},{$ref:"#/definitions/advanced_transfer_filter_fields_foreign"}]},advanced_transfer_filter_where_primitive_identifier:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWherePrimitiveIdentifier"},{$ref:"#/definitions/advanced_transfer_filter_fields_identifier"}]},advanced_transfer_filter_where_object:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereObject"},{$ref:"#/definitions/advanced_transfer_filter_values"}]},advanced_transfer_filter_where_in:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereIns"},{$ref:"#/definitions/advanced_transfer_filter_fields_w_foreign"}]},advanced_transfer_filter_where_null:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereNulls"},{$ref:"#/definitions/advanced_transfer_filter_fields"}]},advanced_transfer_filter_fields:{type:"object",properties:{field:{$ref:"/db/transfer/transfer.schema.json#/definitions/TransferTableAccessibleFields"}},required:["field"],$typescript:'{"additionalProperties": false}'},advanced_transfer_filter_fields_foreign:{type:"object",properties:{field:{$ref:"#/definitions/transfer_filter_foreign_fields"}},required:["field"],$typescript:'{"additionalProperties": false}'},advanced_transfer_filter_fields_identifier:{type:"object",properties:{field:{$ref:"#/definitions/transfer_filter_identifier_fields"}},required:["field"],$typescript:'{"additionalProperties": false}'},advanced_transfer_filter_fields_w_foreign:{type:"object",properties:{field:{anyOf:[{$ref:"/db/transfer/transfer.schema.json#/definitions/TransferTableAccessibleFields"},{$ref:"#/definitions/transfer_filter_foreign_fields"}]}},required:["field"],$typescript:'{"additionalProperties": false}'},advanced_transfer_filter_values:{type:"object",properties:{value:{$ref:"#/definitions/transfer_filter"}},required:["value"],$typescript:'{"additionalProperties": false}'},advanced_transfer_filter:{anyOf:[{$ref:"#/definitions/advanced_transfer_filter_where_inner"},{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereMetadataIns"},{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereMetadataPrimitive"},{$ref:"#/definitions/advanced_transfer_filter_where_object"},{$ref:"#/definitions/advanced_transfer_filter_where_primitive"},{$ref:"#/definitions/advanced_transfer_filter_where_primitive_foreign"},{$ref:"#/definitions/advanced_transfer_filter_where_primitive_identifier"},{$ref:"#/definitions/advanced_transfer_filter_where_in"},{$ref:"#/definitions/advanced_transfer_filter_where_null"},{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereMetadataNulls"}]},advanced_transfer_filter_array:{type:"array",items:{$ref:"#/definitions/advanced_transfer_filter"}},find_transfer_many_filter:{oneOf:[{$ref:"#/definitions/transfer_filter"},{$ref:"#/definitions/advanced_transfer_filter_array"}]}},required:["transfer"],additionalProperties:!1};var xs={$schema:"http://json-schema.org/draft-07/schema",$id:"FindTransferManyTxOutput",title:"FindTransferManyTxOutput",description:"Output of findTransferMany",type:"object",properties:{transfers:{description:"Found transfers",type:"array",items:{$ref:"/txs/get-transfer/get-transfer.schema.output.json#/definitions/transfer"}},metadata:{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_find_metadata"}},required:["transfers","metadata"],additionalProperties:!1};var Os={$schema:"http://json-schema.org/draft-07/schema",$id:"FindWalletManyTxInput",title:"FindWalletManyTxInput",description:"Input for findWalletMany",type:"object",properties:{wallet:{$ref:"#/definitions/find_wallet_many_filter"},options:{$ref:"#/definitions/find_wallet_many_tx_options"}},definitions:{find_wallet_many_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_limiting_options"},{$ref:"#/definitions/find_wallet_many_ordering_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/find_wallet_many_additional_options"},{$ref:"#/definitions/find_wallet_many_select_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_options"}]},find_wallet_many_additional_options:{description:"Optional flags for input",type:"object",properties:{include_balance_for_token:{description:"If specified each wallet will have its balance included",$ref:"/txs/get-token/get-token.schema.input.json#/definitions/unique_token_filter"}},default:{},$typescript:'{"additionalProperties":false}'},find_wallet_many_ordering_options:{$typescript:'{"additionalProperties":false}',description:"Optional flags for input ordering",type:"object",properties:{order:{description:"Ordering options",type:"array",items:{$ref:"#/definitions/find_wallet_many_ordering_input"}}}},find_wallet_many_ordering_input:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_ordering_input"},{$ref:"#/definitions/find_wallet_many_ordering_input_field"}]},find_wallet_many_ordering_input_field:{type:"object",properties:{field:{$ref:"#/definitions/advanced_wallet_filter_fields"}},$typescript:'{"additionalProperties": false}'},find_wallet_many_filter:{oneOf:[{$ref:"#/definitions/wallet_filter"},{$ref:"#/definitions/advanced_wallet_filter_array"}]},wallet_filter:{type:"object",properties:{foreign:{$ref:"/db/wallet/wallet.schema.json#/properties/foreign"},name:{$ref:"/db/wallet/wallet.schema.json#/properties/name"},type:{$ref:"/db/wallet/wallet.schema.json#/properties/type"},status:{$ref:"/db/wallet/wallet.schema.json#/properties/status"},metadata:{$ref:"/db/consts.schema.json#/definitions/DbFilterMetadata"}},$typescript:'{"additionalProperties":false}'},advanced_wallet_filter_where_inner:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereInner"},{$ref:"#/definitions/advanced_wallet_filter_inner"}]},advanced_wallet_filter_inner:{type:"object",properties:{inner:{type:"array",items:{$ref:"#/definitions/advanced_wallet_filter"}}},$typescript:'{"additionalProperties":false}'},advanced_wallet_filter_where_primitive:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWherePrimitive"},{$ref:"#/definitions/advanced_wallet_filter_fields_object"}]},advanced_wallet_filter_where_object:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereObject"},{$ref:"#/definitions/advanced_wallet_filter_values"}]},advanced_wallet_filter_where_in:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereIns"},{$ref:"#/definitions/advanced_wallet_filter_fields_object"}]},advanced_wallet_filter_where_null:{allOf:[{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereNulls"},{$ref:"#/definitions/advanced_wallet_filter_fields_object"}]},advanced_wallet_filter_fields_object:{type:"object",properties:{field:{$ref:"#/definitions/advanced_wallet_filter_fields"}},required:["field"],$typescript:'{"additionalProperties": false}'},advanced_wallet_filter_fields:{type:"string",enum:["id","balance_pending_amount","balance_finished_amount","balance_available_balance","foreign","name","type","status","created_at"]},advanced_wallet_filter_string_fields:{type:"string",enum:["foreign","name","type","status","created_at"]},advanced_wallet_filter_number_fields:{type:"string",enum:["id","balance_pending_amount","balance_finished_amount","balance_available_balance"]},advanced_wallet_filter_values:{type:"object",properties:{value:{$ref:"#/definitions/wallet_filter"}},required:["value"],$typescript:'{"additionalProperties": false}'},advanced_wallet_filter:{anyOf:[{$ref:"#/definitions/advanced_wallet_filter_where_inner"},{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereMetadataIns"},{$ref:"/db/consts.schema.json#/definitions/DbFilterFunctionWhereMetadataPrimitive"},{$ref:"#/definitions/advanced_wallet_filter_where_primitive"},{$ref:"#/definitions/advanced_wallet_filter_where_object"},{$ref:"#/definitions/advanced_wallet_filter_where_in"},{$ref:"#/definitions/advanced_wallet_filter_where_null"}]},advanced_wallet_filter_array:{type:"array",items:{$ref:"#/definitions/advanced_wallet_filter"}},find_wallet_many_select_options:{$typescript:'{"additionalProperties":false}',description:"Optional flags to limit search result",type:"object",properties:{select:{description:"Select options",type:"array",items:{$ref:"/txs/find-wallet-many/find-wallet-many.schema.output.json#/definitions/wallet_with_balance_fields"}}}}},additionalProperties:!1};var $s={$schema:"http://json-schema.org/draft-07/schema",$id:"FindWalletManyTxOutput",title:"FindWalletManyTxOutput",description:"Output of findWalletMany",type:"object",properties:{wallets:{description:"Wallets matching the query",type:"array",items:{anyOf:[{$ref:"/db/wallet/wallet.schema.json"},{type:"null"},{$ref:"#/definitions/wallet_with_balance"}]}},metadata:{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_find_metadata"}},definitions:{wallet_with_balance:{type:"object",properties:{id:{description:"System defined primary key",type:"integer"},foreign:{description:"User provided key for wallet. Must be unique",type:"string"},name:{description:"Name of the wallet",type:["string","null"]},metadata:{description:"Key/value metadata object",type:["object","null"]},type:{description:"Type of the wallet",default:"regular",$ref:"/db/consts.schema.json#/definitions/WalletType"},status:{description:"Current status for the wallet",default:"active",type:"string"},default_allow_negative:{description:"Boolean indicating if wallet (pending_amount + finished_amount) can be negative",default:!1,type:"boolean"},default_allow_positive:{description:"Boolean indicating if wallet (pending_amount + finished_amount) can be positive. Used for token balance to deny positive balance.",default:!0,type:"boolean"},created_at:{description:"Datetime when the wallet was created",type:"string",format:"date-time"},updated_at:{description:"Datetime when the wallet was last updated",type:"string",format:"date-time"},balance_transfer_id:{description:"Latest transfer id",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/transfer_id"},balance_token_id:{description:"Token ID of balance",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/token_id"},balance_token_foreign:{description:"Token Foreign of balance",$ref:"/db/token/token.schema.json#/properties/foreign"},balance_pending_amount:{description:"Current pending balance",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/pending_amount"},balance_pending_amount_to:{description:"Sum of incoming pending transfers",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/pending_amount_to"},balance_pending_amount_from:{description:"Sum of outgoing pending transfers",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/pending_amount_from"},balance_finished_amount:{description:"Current finished balance",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/finished_amount"},balance_amount:{description:"Current finished and pending balance sum",type:"number"},balance_available_balance:{description:"Available balance that is sum of pending_amount_from and finished_amount",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/available_balance"},balance_latest_control_hash:{description:"Latest control_hash associated with wallet token combination",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/latest_control_hash"},balance_updated_at:{description:"Last modification date of balance",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/created_at"}},additionalProperties:!1},wallet_with_balance_fields:{type:"string",enum:["id","foreign","name","metadata","type","status","default_allow_negative","default_allow_positive","created_at","updated_at","balance_transfer_id","balance_token_id","balance_token_foreign","balance_pending_amount","balance_pending_amount_to","balance_pending_amount_from","balance_finished_amount","balance_amount","balance_latest_control_hash","balance_updated_at","balance_available_balance"]}},required:["wallets","metadata"],additionalProperties:!1};var ws={$schema:"http://json-schema.org/draft-07/schema",$id:"FinishTransactionTxInput",title:"FinishTransactionTxInput",description:"Input for finishTransaction",type:"object",properties:{action:{description:"Finish transaction with commit/rollback",default:"commit",type:"string",enum:["commit","rollback"]},options:{$ref:"#/definitions/finish_transaction_tx_options"}},definitions:{finish_transaction_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/finish_transaction_additional_options"}]},finish_transaction_additional_options:{type:"object",properties:{transaction_id:{description:"Id of the transaction context to run the query in",type:"string"}},required:["transaction_id"],$typescript:'{"additionalProperties": false}'}},required:["action","options"],additionalProperties:!1};var Is={$schema:"http://json-schema.org/draft-07/schema",$id:"FinishTransactionTxOutput",title:"FinishTransactionTxOutput",description:"Output of finishTransaction",type:"object",properties:{success:{type:"boolean"},message:{description:"Error message when success is false",type:"string"}},required:["success"],additionalProperties:!1};var js={$schema:"http://json-schema.org/draft-07/schema",$id:"GetBalanceTxInput",title:"GetBalanceTxInput",description:"Input for getBalance",type:"object",properties:{balance:{$ref:"#/definitions/unique_balance_filter"},options:{$ref:"#/definitions/get_balance_tx_options"}},definitions:{get_balance_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/get_balance_additional_options"}]},get_balance_additional_options:{description:"Optional flags for input",type:"object",properties:{create_wallet_if_not_exists:{type:"boolean",description:"If true then the missing wallet will be created if not found. Only valid with 'foreign'",default:!1},create_token_if_not_exists:{type:"boolean",description:"If true then the missing token will be created if not found. Only valid with 'foreign'",default:!1},create_if_not_exists:{type:"boolean",description:"If true then the missing balance will be created if not found. ",default:!1}},default:{},$typescript:'{"additionalProperties": false}'},unique_balance_filter:{type:"object",properties:{wallet:{$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},token:{$ref:"/txs/get-token/get-token.schema.input.json#/definitions/unique_token_filter"},datetime:{description:"Time the balance should be retrieved at",type:"string"}},required:["wallet","token"],additionalProperties:!1}},required:["balance"],additionalProperties:!1};var vs={$schema:"http://json-schema.org/draft-07/schema",$id:"GetBalanceTxOutput",title:"GetBalanceTxOutput",description:"Output of getBalance",type:"object",properties:{balance:{description:"requested balance",$ref:"#/definitions/balance"}},definitions:{balance:{type:"object",properties:{transfer_id:{description:"Latest transfer id",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/transfer_id"},token_id:{description:"Token ID of balance",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/token_id"},token_foreign:{description:"Token Foreign of balance",$ref:"/db/token/token.schema.json#/properties/foreign"},wallet_id:{description:"Wallet ID of balance",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/wallet_id"},wallet_foreign:{description:"Wallet Foreign of balance",$ref:"/db/wallet/wallet.schema.json#/properties/foreign"},pending_amount:{description:"Current pending balance",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/pending_amount"},pending_amount_to:{description:"Sum of incoming pending transfers",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/pending_amount_to"},pending_amount_from:{description:"Sum of outgoing pending transfers",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/pending_amount_from"},available_balance:{description:"Available balance that is sum of pending_amount_from and finished_amount",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/available_balance"},finished_amount:{description:"Current finished balance",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/finished_amount"},amount:{description:"Current finished and pending balance sum",type:"number"},latest_control_hash:{description:"Latest control_hash associated with wallet token combination",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/latest_control_hash"},updated_at:{description:"Last modification date of balance",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/created_at"}},required:["token_id","token_foreign","wallet_id","wallet_foreign","pending_amount","finished_amount","amount","latest_control_hash","updated_at"],additionalProperties:!1},balance_fields:{description:"Fields on the balance object",type:"string",enum:["transfer_id","token_id","token_foreign","wallet_id","wallet_foreign","pending_amount","pending_amount_to","pending_amount_from","finished_amount","available_balance","amount","latest_control_hash","updated_at"]}},additionalProperties:!1};var Ss={$schema:"http://json-schema.org/draft-07/schema",$id:"GetBalanceHistoryTxInput",title:"GetBalanceHistoryTxInput",description:"Input for getBalanceHistory",type:"object",properties:{balance:{$ref:"/txs/get-balance/get-balance.schema.input.json#/definitions/unique_balance_filter"},options:{$ref:"#/definitions/get_balance_history_tx_options"}},definitions:{get_balance_history_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/get_balance_history_additional_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_limiting_options"},{$ref:"#/definitions/get_balance_history_ordering_options"},{$ref:"#/definitions/balance_history_select_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_options"}]},get_balance_history_additional_options:{description:"Optional flags for input",type:"object",properties:{create_wallet_if_not_exists:{type:"boolean",description:"If true then the missing wallet will be created if not found. Only valid with 'foreign'",default:!1},create_token_if_not_exists:{type:"boolean",description:"If true then the missing token will be created if not found. Only valid with 'foreign'",default:!1}},default:{},$typescript:'{"additionalProperties":false}'},get_balance_history_ordering_options:{$typescript:'{"additionalProperties":false}',description:"Optional flags for input ordering",type:"object",properties:{order:{description:"Ordering options",type:"string",enum:["asc","desc"]}}},balance_history_select_options:{$typescript:'{"additionalProperties":false}',description:"Optional flags to limit search result",type:"object",properties:{select:{description:"Select options",type:"array",items:{$ref:"/txs/get-balance-history/get-balance-history.schema.output.json#/definitions/balance_history_fields"}}}}},additionalProperties:!1};var ks={$schema:"http://json-schema.org/draft-07/schema",$id:"GetBalanceHistoryTxOutput",title:"GetBalanceHistoryTxOutput",description:"Output of getBalanceHistory",type:"object",properties:{balances:{description:"Resolved balance change objects",type:"array",items:{$ref:"#/definitions/balance_history"}},metadata:{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_find_metadata"}},definitions:{balance_history:{type:"object",properties:{balance_id:{description:"The internal ID of the balance",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/id"},token_id:{description:"Token ID of balance",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/token_id"},token_foreign:{description:"Token Foreign of balance",$ref:"/db/token/token.schema.json#/properties/foreign"},wallet_id:{description:"Wallet ID of balance",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/wallet_id"},wallet_foreign:{description:"Wallet Foreign of balance",$ref:"/db/wallet/wallet.schema.json#/properties/foreign"},pending_amount:{description:"Current pending balance",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/pending_amount"},pending_amount_to:{description:"Sum of incoming pending transfers",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/pending_amount_to"},pending_amount_from:{description:"Sum of outgoing pending transfers",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/pending_amount_from"},available_balance:{description:"Available balance that is sum of pending_amount_from and finished_amount",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/available_balance"},finished_amount:{description:"Current finished balance",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/finished_amount"},amount:{description:"Current finished and pending balance sum",type:"number"},latest_control_hash:{description:"Latest control_hash associated with wallet token combination",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/latest_control_hash"},updated_at:{description:"Last modification date of balance",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/created_at"},transfer_id:{$ref:"/db/transfer/transfer.schema.json#/properties/id"},transfer_identifier:{$ref:"/db/transfer/transfer.schema.json#/properties/identifier"},transfer_control_hash:{$ref:"/db/transfer/transfer.schema.json#/properties/control_hash"},transfer_from_wallet_id:{$ref:"/db/transfer/transfer.schema.json#/properties/from_wallet_id"},transfer_from_wallet_foreign:{$ref:"/db/wallet/wallet.schema.json#/properties/foreign"},transfer_to_wallet_id:{$ref:"/db/transfer/transfer.schema.json#/properties/to_wallet_id"},transfer_to_wallet_foreign:{$ref:"/db/wallet/wallet.schema.json#/properties/foreign"},transfer_amount:{$ref:"/db/transfer/transfer.schema.json#/properties/amount"},transfer_type:{$ref:"/db/transfer/transfer.schema.json#/properties/type"},transfer_status:{$ref:"/db/transfer/transfer.schema.json#/properties/status"},transfer_force:{$ref:"/db/transfer/transfer.schema.json#/properties/force"},transfer_created_at:{$ref:"/db/transfer/transfer.schema.json#/properties/created_at"},transfer_updated_at:{$ref:"/db/transfer/transfer.schema.json#/properties/updated_at"},transfer_metadata:{$ref:"/db/transfer/transfer.schema.json#/properties/metadata"},transfer_transfer_group_id:{$ref:"/db/transfer/transfer.schema.json#/properties/transfer_group_id"},transfer_transfer_group_identifier:{description:"Transfer Group identifier if transfer belongs to a group",type:"string"},transfer_reverses_id:{$ref:"/db/transfer/transfer.schema.json#/properties/reverses_id"},transfer_reverses_identifier:{description:"Reverses identifier if transfer reverses another transfer",type:"string"},transfer_status_finalized_at:{description:"DateTime transfer reached final status",type:["string","null"],format:"date-time"}},$typescript:'{"additionalProperties": false}'},balance_history_fields:{type:"string",enum:["transfer_id","transfer_identifier","transfer_control_hash","transfer_from_wallet_id","transfer_from_wallet_foreign","transfer_to_wallet_id","transfer_to_wallet_foreign","transfer_amount","transfer_type","transfer_status","transfer_force","transfer_created_at","transfer_updated_at","transfer_metadata","transfer_transfer_group_id","transfer_transfer_group_identifier","transfer_reverses_id","transfer_reverses_identifier","transfer_status_finalized_at","balance_id","token_id","token_foreign","wallet_id","wallet_foreign","pending_amount","pending_amount_to","pending_amount_from","finished_amount","amount","latest_control_hash","updated_at","status"]}},additionalProperties:!1};var Cs={$schema:"http://json-schema.org/draft-07/schema",$id:"GetDatabaseExportProgressTxInput",title:"GetDatabaseExportProgressTxInput",description:"Input for getDatabaseExportProgress",type:"object",properties:{options:{$ref:"#/definitions/get_database_backup_progress_tx_options"}},definitions:{get_database_backup_progress_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/get_database_backup_progress_additional_options"}]},get_database_backup_progress_additional_options:{description:"Optional flags for input",type:"object",default:{},$typescript:'{"additionalProperties":false}'}},additionalProperties:!1};var Rs={$schema:"http://json-schema.org/draft-07/schema",$id:"GetDatabaseExportProgressTxOutput",title:"GetDatabaseExportProgressTxOutput",description:"Output of getDatabaseExportProgress",type:"object",properties:{size:{type:"number",description:"Size of a exported backup in MB"},started:{type:"boolean",description:"Boolean indicating if export has started"},finished:{type:"boolean",description:"Boolean indicating if export has finished"},error:{type:"string",description:"Error message in case one occurs"}},required:["size","started","finished"],additionalProperties:!1};var Gs={$schema:"http://json-schema.org/draft-07/schema",$id:"GetDatabaseImportProgressTxInput",title:"GetDatabaseImportProgressTxInput",description:"Input for GetDatabaseImportProgress",type:"object",properties:{options:{$ref:"#/definitions/import_database_progress_tx_options"}},definitions:{import_database_progress_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"}]}},additionalProperties:!1};var Ps={$schema:"http://json-schema.org/draft-07/schema",$id:"GetDatabaseImportProgressTxOutput",title:"GetDatabaseImportProgressTxOutput",description:"Output of GetDatabaseImportProgress",type:"object",properties:{progress:{type:"number",description:"Percentage of imported database"},started:{type:"boolean",description:"Boolean indicating if import has started"},finished:{type:"boolean",description:"Boolean indicating if import has finished"},error:{type:"string",description:"Error message in case one occurs"}},required:["progress","started","finished"],additionalProperties:!1};var Es={$schema:"http://json-schema.org/draft-07/schema",$id:"GetFlagsTxInput",title:"GetFlagsTxInput",description:"Input for getFlags",type:"object",properties:{options:{$ref:"#/definitions/get_flags_tx_options"}},definitions:{get_flags_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options_without_tx"}]}},additionalProperties:!1};var Ms={$schema:"http://json-schema.org/draft-07/schema",$id:"GetFlagsTxOutput",title:"GetFlagsTxOutput",description:"Output of getFlags",type:"object",properties:{flags:{$ref:"/db/consts.schema.json#/definitions/Flags"}},additionalProperties:!1};var Ds={$schema:"http://json-schema.org/draft-07/schema",$id:"GetStatisticsTxInput",title:"GetStatisticsTxInput",description:"Input for getStatistics",type:"object",properties:{model:{$ref:"#/definitions/statistics_model"},groups:{$ref:"#/definitions/statistics_groups"},aggregator:{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_aggregator"},filter:{$ref:"#/definitions/statistics_filter"},options:{$ref:"#/definitions/get_statistics_tx_options"}},definitions:{get_statistics_tx_options:{description:"Optional flags for input",type:"object",default:{},properties:{tracking_id:{description:"User provided id added to logs for debugging",type:"string"}},additionalProperties:!1},statistics_groups:{type:"array",description:"Array of grouping definitions",maxItems:5,items:{$ref:"#/definitions/statistics_group"}},statistics_group:{anyOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_group"},{$ref:"#/definitions/statistics_group_field"}]},statistics_group_field:{type:"object",properties:{type:{type:"string",enum:["field"]},value:{$ref:"#/definitions/statistics_field"},alias:{type:"string"}},required:["type","value"],additionalProperties:!1},statistics_model:{description:"Model to return statistics about",type:"string",enum:["Transfer","TransferGroup","Wallet","Token"],default:"Transfer"},statistics_field:{description:"Field to group statistics about. Only used with group_by_field type",type:"string",enum:["type","status","transfer_status"],default:"type"},statistics_filter:{description:"Filter to apply to transfers before grouping",anyOf:[{$ref:"#/definitions/statistics_general_filter"},{$ref:"#/definitions/statistics_transfer_filter"}]},statistics_general_filter:{type:"object",properties:{start_time:{type:"string",format:"date-time"},end_time:{type:"string",format:"date-time"}},$typescript:'{"additionalProperties":false}'},statistics_transfer_filter:{type:"object",properties:{status:{$ref:"/db/transfer/transfer.schema.json#/properties/status"},start_time:{type:"string",format:"date-time"},end_time:{type:"string",format:"date-time"}},$typescript:'{"additionalProperties":false}'}},additionalProperties:!1};var Ws={$schema:"http://json-schema.org/draft-07/schema",$id:"GetStatisticsTxOutput",title:"GetStatisticsTxOutput",description:"Output of getStatistics",type:"object",properties:{rows:{description:"Results of the aggregation",$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_aggregate_results"}},definitions:{},required:["rows"],additionalProperties:!1};var As={$schema:"http://json-schema.org/draft-07/schema",$id:"GetTokenTxInput",title:"GetTokenTxInput",description:"Input for getToken",type:"object",properties:{token:{$ref:"#/definitions/unique_token_filter"},options:{$ref:"#/definitions/get_token_tx_options"}},definitions:{get_token_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/get_token_additional_options"}]},get_token_additional_options:{description:"Optional flags for input",type:"object",properties:{ignore_cache:{description:"If true then result is returned from cache layer if possible",type:"boolean",default:!1},create_if_not_exists:{type:"boolean",description:"If true then the token will be created if not found. Only valid with 'foreign'",default:!1},return_only_id:{type:"boolean",description:"If true then the returning object is only guaranteed to have id",default:!1}},default:{},$typescript:'{"additionalProperties": false}'},unique_token_filter:{description:"UNIQUE filtering options for token",anyOf:[{$ref:"#/definitions/unique_token_filter_id"},{$ref:"#/definitions/unique_token_filter_foreign"}]},unique_token_filter_id:{type:"object",description:"ID based filter for token",properties:{id:{description:"Id of wallet to return",$ref:"/db/wallet/wallet.schema.json#/properties/id"},foreign:{description:"Foreign of wallet to return",$ref:"/db/wallet/wallet.schema.json#/properties/name"}},required:["id"],additionalProperties:!1},unique_token_filter_foreign:{type:"object",description:"Foreign based filter for token",properties:{id:{description:"Id of wallet to return",$ref:"/db/wallet/wallet.schema.json#/properties/id"},foreign:{description:"Foreign of wallet to return",$ref:"/db/wallet/wallet.schema.json#/properties/name"}},required:["foreign"],additionalProperties:!1}},required:["token"],additionalProperties:!1};var Ns={$schema:"http://json-schema.org/draft-07/schema",$id:"GetTokenTxOutput",title:"GetTokenTxOutput",description:"Output of getToken",type:"object",properties:{token:{description:"requested token",$ref:"#/definitions/token"}},definitions:{token:{properties:{id:{$ref:"/db/token/token.schema.json#/properties/id"},foreign:{$ref:"/db/token/token.schema.json#/properties/foreign"},public:{$ref:"/db/token/token.schema.json#/properties/public"},belongs_to:{$ref:"/db/token/token.schema.json#/properties/belongs_to"},created_at:{$ref:"/db/token/token.schema.json#/properties/created_at"},updated_at:{$ref:"/db/token/token.schema.json#/properties/updated_at"},metadata:{$ref:"/db/token/token.schema.json#/properties/metadata"},divisor:{$ref:"/db/token/token.schema.json#/properties/divisor"},limit:{$ref:"/db/token/token.schema.json#/properties/limit"},type:{$ref:"/db/token/token.schema.json#/properties/type"},belongs_to_foreign:{description:"Foreign of the belongs_to wallet if exists",type:["string","null"]}},required:["id"],additionalProperties:!1}},additionalProperties:!1};var Us={$schema:"http://json-schema.org/draft-07/schema",$id:"GetTokenManyTxInput",title:"GetTokenManyTxInput",description:"Input for getTokenMany",type:"object",properties:{tokens:{type:"array",items:{$ref:"/txs/get-token/get-token.schema.input.json#/definitions/unique_token_filter"}},options:{$ref:"#/definitions/get_token_many_tx_options"}},definitions:{get_token_many_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/get_token_many_additional_options"}]},get_token_many_additional_options:{description:"Optional flags for input",type:"object",properties:{ignore_cache:{type:"boolean",default:!1},create_if_not_exists:{type:"boolean",description:"If true then the token will be created if not found. Only valid with 'foreign'",default:!1},return_only_id:{type:"boolean",description:"If true then the returning object is only guaranteed to have id",default:!1}},default:{},$typescript:'{"additionalProperties": false}'}},required:["tokens"],additionalProperties:!1};var qs={$schema:"http://json-schema.org/draft-07/schema",$id:"GetTokenManyTxOutput",title:"GetTokenManyTxOutput",description:"Output of getTokenMany",type:"object",properties:{tokens:{type:"array",items:{$ref:"#/definitions/TokenResult"}}},definitions:{TokenResult:{anyOf:[{$ref:"/db/token/token.schema.json"},{$ref:"/db/token/token.schema.optional.json"},{type:"null"}]}},required:["tokens"],additionalProperties:!1};var Bs={$schema:"http://json-schema.org/draft-07/schema",$id:"GetTransferTxInput",title:"GetTransferTxInput",description:"Input for getTransfer",type:"object",properties:{transfer:{$ref:"#/definitions/unique_transfer_filter"},options:{$ref:"#/definitions/get_transfer_tx_options"}},definitions:{get_transfer_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"}]},unique_transfer_filter:{description:"UNIQUE filtering options for transfer",anyOf:[{$ref:"#/definitions/unique_transfer_filter_id"},{$ref:"#/definitions/unique_transfer_filter_identifier"}]},unique_transfer_filter_id:{type:"object",description:"ID based filter of transfer",properties:{id:{description:"Id of transfer to return",$ref:"/db/transfer/transfer.schema.json#/properties/id"},identifier:{description:"Identifier of transfer to return",$ref:"/db/transfer/transfer.schema.json#/properties/identifier"}},required:["id"],additionalProperties:!1},unique_transfer_filter_identifier:{type:"object",description:"identifier based filter of transfer",properties:{id:{description:"Id of transfer to return",$ref:"/db/transfer/transfer.schema.json#/properties/id"},identifier:{description:"Identifier of transfer to return",$ref:"/db/transfer/transfer.schema.json#/properties/identifier"}},required:["identifier"],additionalProperties:!1}},required:["transfer"],additionalProperties:!1};var Ls={$schema:"http://json-schema.org/draft-07/schema",$id:"GetTransferTxOutput",title:"GetTransferTxOutput",description:"Output of getTransfer",type:"object",properties:{transfer:{$ref:"#/definitions/transfer"}},definitions:{transfer:{type:"object",description:"requested transfer",properties:{id:{$ref:"/db/transfer/transfer.schema.json#/properties/id"},identifier:{$ref:"/db/transfer/transfer.schema.json#/properties/identifier"},control_hash:{$ref:"/db/transfer/transfer.schema.json#/properties/control_hash"},from_wallet_id:{$ref:"/db/transfer/transfer.schema.json#/properties/from_wallet_id"},from_wallet_foreign:{$ref:"/db/wallet/wallet.schema.json#/properties/foreign"},to_wallet_id:{$ref:"/db/transfer/transfer.schema.json#/properties/to_wallet_id"},to_wallet_foreign:{$ref:"/db/wallet/wallet.schema.json#/properties/foreign"},token_id:{$ref:"/db/transfer/transfer.schema.json#/properties/token_id"},token_foreign:{$ref:"/db/token/token.schema.json#/properties/foreign"},amount:{$ref:"/db/transfer/transfer.schema.json#/properties/amount"},type:{$ref:"/db/transfer/transfer.schema.json#/properties/type"},status:{$ref:"/db/transfer/transfer.schema.json#/properties/status"},force:{$ref:"/db/transfer/transfer.schema.json#/properties/force"},auto_hash:{$ref:"/db/transfer/transfer.schema.json#/properties/auto_hash"},created_at:{$ref:"/db/transfer/transfer.schema.json#/properties/created_at"},updated_at:{$ref:"/db/transfer/transfer.schema.json#/properties/updated_at"},metadata:{$ref:"/db/transfer/transfer.schema.json#/properties/metadata"},transfer_group_id:{$ref:"/db/transfer/transfer.schema.json#/properties/transfer_group_id"},transfer_group_identifier:{description:"Transfer Group identifier if transfer belongs to a group",type:"string"},reverses_id:{$ref:"/db/transfer/transfer.schema.json#/properties/reverses_id"},reverses_identifier:{description:"Reverses identifier if transfer reverses another transfer",type:"string"},balance_id:{description:"Iterator marking the position of the balance in the continuum",type:["number","null"]},balance_pending:{description:"Wallet pending balance after transfer",type:["number","null"]},balance_pending_to:{description:"Wallet pending_to balance after transfer",type:["number","null"]},balance_pending_from:{description:"Wallet pending_from balance after transfer",type:["number","null"]},balance_finished:{description:"Wallet finished balance after transfer",type:["number","null"]},signed_amount:{description:"amount with a sign according to transfer direction",type:["number","null"]},status_finalized_at:{description:"DateTime transfer reached final status",type:["string","null"],format:"date-time"}},additionalProperties:!1,required:["id","identifier","from_wallet_id","from_wallet_foreign","to_wallet_id","to_wallet_foreign","token_id","token_foreign","amount","type","status","force","created_at"]},transfer_optional:{type:"object",description:"requested transfer",properties:{id:{$ref:"/db/transfer/transfer.schema.json#/properties/id"},identifier:{$ref:"/db/transfer/transfer.schema.json#/properties/identifier"},control_hash:{$ref:"/db/transfer/transfer.schema.json#/properties/control_hash"},from_wallet_id:{$ref:"/db/transfer/transfer.schema.json#/properties/from_wallet_id"},from_wallet_foreign:{$ref:"/db/wallet/wallet.schema.json#/properties/foreign"},to_wallet_id:{$ref:"/db/transfer/transfer.schema.json#/properties/to_wallet_id"},to_wallet_foreign:{$ref:"/db/wallet/wallet.schema.json#/properties/foreign"},token_id:{$ref:"/db/transfer/transfer.schema.json#/properties/token_id"},token_foreign:{$ref:"/db/token/token.schema.json#/properties/foreign"},amount:{$ref:"/db/transfer/transfer.schema.json#/properties/amount"},type:{$ref:"/db/transfer/transfer.schema.json#/properties/type"},status:{$ref:"/db/transfer/transfer.schema.json#/properties/status"},force:{$ref:"/db/transfer/transfer.schema.json#/properties/force"},auto_hash:{$ref:"/db/transfer/transfer.schema.json#/properties/auto_hash"},created_at:{$ref:"/db/transfer/transfer.schema.json#/properties/created_at"},updated_at:{$ref:"/db/transfer/transfer.schema.json#/properties/updated_at"},metadata:{$ref:"/db/transfer/transfer.schema.json#/properties/metadata"},transfer_group_id:{$ref:"/db/transfer/transfer.schema.json#/properties/transfer_group_id"},transfer_group_identifier:{description:"Transfer Group identifier if transfer belongs to a group",type:"string"},reverses_id:{$ref:"/db/transfer/transfer.schema.json#/properties/reverses_id"},balance_id:{description:"Iterator marking the position of the balance in the continuum",type:["number","null"]},balance_pending:{description:"Wallet pending balance after transfer",type:["number","null"]},balance_pending_to:{description:"Wallet pending_to balance after transfer",type:["number","null"]},balance_pending_from:{description:"Wallet pending_from balance after transfer",type:["number","null"]},balance_finished:{description:"Wallet finished balance after transfer",type:["number","null"]},signed_amount:{description:"amount with a sign according to transfer direction",type:["number","null"]},status_finalized_at:{description:"DateTime transfer reached final status",type:["string","null"],format:"date-time"}},additionalProperties:!1}},additionalProperties:!1};var Vs={$schema:"http://json-schema.org/draft-07/schema",$id:"GetTransferGroupTxInput",title:"GetTransferGroupTxInput",description:"Input for getTransferGroup",type:"object",properties:{transfer_group:{$ref:"#/definitions/unique_transfer_group_filter"},options:{$ref:"#/definitions/get_transfer_group_tx_options"}},definitions:{get_transfer_group_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/get_transfer_group_additional_options"}]},get_transfer_group_additional_options:{description:"Optional flags for input",type:"object",properties:{create_if_not_exists:{type:"boolean",description:"If true then the transfer_group will be created if not found. Only valid with 'identifier'",default:!1},return_only_id:{type:"boolean",description:"If true then the returning object is only guaranteed to have id",default:!1}},default:{},$typescript:'{"additionalProperties": false}'},unique_transfer_group_filter:{description:"UNIQUE filtering options for transfer",anyOf:[{$ref:"#/definitions/unique_transfer_group_filter_id"},{$ref:"#/definitions/unique_transfer_group_filter_identifier"}]},unique_transfer_group_filter_id:{type:"object",description:"ID based filter of transfer",properties:{id:{description:"Id of transfer_group to return",$ref:"/db/transfer-group/transfer-group.schema.json#/properties/id"},identifier:{description:"Identifier of transfer_group to return",$ref:"/db/transfer-group/transfer-group.schema.json#/properties/identifier"}},required:["id"],additionalProperties:!1},unique_transfer_group_filter_identifier:{type:"object",description:"identifier based filter of transfer",properties:{id:{description:"Id of transfer_group to return",$ref:"/db/transfer-group/transfer-group.schema.json#/properties/id"},identifier:{description:"Identifier of transfer_group to return",$ref:"/db/transfer-group/transfer-group.schema.json#/properties/identifier"}},required:["identifier"],additionalProperties:!1}},required:["transfer_group"],additionalProperties:!1};var Hs={$schema:"http://json-schema.org/draft-07/schema",$id:"GetTransferGroupTxOutput",title:"GetTransferGroupTxOutput",description:"Output of getTransferGroup",type:"object",properties:{transfer_group:{$ref:"#/definitions/transfer_group"}},definitions:{transfer_group:{description:"requested transfer_group",properties:{id:{$ref:"/db/transfer-group/transfer-group.schema.json#/properties/id"},identifier:{$ref:"/db/transfer-group/transfer-group.schema.json#/properties/identifier"},status:{$ref:"/db/transfer-group/transfer-group.schema.json#/properties/status"},transfer_status:{$ref:"/db/transfer-group/transfer-group.schema.json#/properties/transfer_status"},metadata:{$ref:"/db/transfer-group/transfer-group.schema.json#/properties/metadata"},created_at:{$ref:"/db/transfer-group/transfer-group.schema.json#/properties/created_at"},updated_at:{$ref:"/db/transfer-group/transfer-group.schema.json#/properties/updated_at"},reverses_id:{$ref:"/db/transfer-group/transfer-group.schema.json#/properties/reverses_id"},status_finalized_at:{$ref:"/db/transfer-group/transfer-group.schema.json#/properties/status_finalized_at"},transfer_status_finalized_at:{$ref:"/db/transfer-group/transfer-group.schema.json#/properties/transfer_status_finalized_at"},type:{$ref:"/db/transfer-group/transfer-group.schema.json#/properties/type"},validate_final_balance_only:{$ref:"/db/transfer-group/transfer-group.schema.json#/properties/validate_final_balance_only"},reverses_identifier:{description:"Identifier of the transfer group this reverses",type:["string","null"]}},additionalProperties:!1,required:["id"]}},additionalProperties:!1};var zs={$schema:"http://json-schema.org/draft-07/schema",$id:"GetWalletTxInput",title:"GetWalletTxInput",description:"Input for getWallet",type:"object",properties:{wallet:{$ref:"#/definitions/unique_wallet_filter"},options:{$ref:"#/definitions/get_wallet_tx_options"}},definitions:{get_wallet_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/get_wallet_additional_options"}]},get_wallet_additional_options:{description:"Optional flags for input",type:"object",properties:{ignore_cache:{description:"If true the wallet is returned from cache layer if possible",type:"boolean",default:!1},create_if_not_exists:{type:"boolean",description:"If true then the wallet will be created if not found. Only valid with 'foreign'",default:!1},return_only_id:{type:"boolean",description:"If true then the returning object is only guaranteed to have id",default:!1}},default:{},$typescript:'{"additionalProperties": false}'},unique_wallet_filter:{type:"object",description:"UNIQUE filtering options for wallet",anyOf:[{$ref:"#/definitions/unique_wallet_filter_id"},{$ref:"#/definitions/unique_wallet_filter_foreign"}]},unique_wallet_filter_id:{type:"object",description:"ID based filter for wallet",properties:{id:{description:"Id of wallet to return",$ref:"/db/wallet/wallet.schema.json#/properties/id"},foreign:{description:"Foreign of wallet to return",$ref:"/db/wallet/wallet.schema.json#/properties/name"}},required:["id"],additionalProperties:!1},unique_wallet_filter_foreign:{type:"object",description:"Foreign based filter for wallet",properties:{id:{description:"Id of wallet to return",$ref:"/db/wallet/wallet.schema.json#/properties/id"},foreign:{description:"Foreign of wallet to return",$ref:"/db/wallet/wallet.schema.json#/properties/name"}},required:["foreign"],additionalProperties:!1}},required:["wallet"],additionalProperties:!1};var Js={$schema:"http://json-schema.org/draft-07/schema",$id:"GetWalletTxOutput",title:"GetWalletTxOutput",description:"Output of getWallet",type:"object",properties:{wallet:{description:"requested wallet",anyOf:[{$ref:"/db/wallet/wallet.schema.json"},{$ref:"/db/wallet/wallet.schema.optional.json"}]}},additionalProperties:!1};var Qs={$schema:"http://json-schema.org/draft-07/schema",$id:"GetWalletManyTxInput",title:"GetWalletManyTxInput",description:"Input for getWalletMany",type:"object",properties:{wallets:{type:"array",items:{$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"}},options:{$ref:"#/definitions/get_wallet_many_tx_options"}},definitions:{get_wallet_many_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/get_wallet_many_additional_options"}]},get_wallet_many_additional_options:{description:"Optional flags for input",type:"object",properties:{ignore_cache:{type:"boolean",default:!1},create_if_not_exists:{type:"boolean",description:"If true then the wallet will be created if not found. Only valid with 'foreign'",default:!1},return_only_id:{type:"boolean",description:"If true then the returning object is only guaranteed to have id",default:!1}},default:{},$typescript:'{"additionalProperties": false}'}},additionalProperties:!1};var Ks={$schema:"http://json-schema.org/draft-07/schema",$id:"GetWalletManyTxOutput",title:"GetWalletManyTxOutput",description:"Output of getWalletMany",type:"object",properties:{wallets:{type:"array",items:{$ref:"#/definitions/WalletResult"}}},definitions:{WalletResult:{anyOf:[{$ref:"/db/wallet/wallet.schema.json"},{$ref:"/db/wallet/wallet.schema.optional.json"},{type:"null"}]}},required:["wallets"],additionalProperties:!1};var Qt={$schema:"http://json-schema.org/draft-07/schema",$id:"ImportActionsTxInput",title:"ImportActionsTxInput",description:"Input for importActions",type:"object",properties:{actions:{description:"Array of actions to import.",type:"array",items:{$ref:"#/definitions/import_actions_tx_stream_chunk"}},options:{$ref:"#/definitions/import_actions_tx_options"}},required:["actions"],definitions:{import_actions_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"}]},import_actions_tx_stream_chunk:{type:"object",anyOf:[{$ref:"#/definitions/import_action_wallet"},{$ref:"#/definitions/import_action_token"},{$ref:"#/definitions/import_action_transfer_group"},{$ref:"#/definitions/import_action_transfer"}]},import_action_wallet:{type:"object",properties:{target:{description:"Target of the action",type:"string",enum:["wallet"]},data:{$ref:"/db/wallet/wallet.schema.input.json"}},required:["target","data"],additionalProperties:!1},import_action_token:{type:"object",properties:{target:{description:"Target of the action",type:"string",enum:["token"]},data:{$ref:"/txs/create-token/create-token.schema.input.json#/definitions/create_token_input"}},required:["target","data"],additionalProperties:!1},import_action_transfer_group_extension:{type:"object",properties:{created_at:{type:"string",format:"date-time"},status_finalized_at:{type:"string",format:"date-time"},transfer_status_finalized_at:{type:"string",format:"date-time"}},$typescript:'{"additionalProperties": false}'},import_action_transfer_group_data:{allOf:[{$ref:"/txs/create-transfer-group/create-transfer-group.schema.input.json#/definitions/transfer_group_data"},{$ref:"#/definitions/import_action_transfer_group_extension"}]},import_action_transfer_group:{type:"object",properties:{target:{description:"Target of the action",type:"string",enum:["transfer_group"]},data:{allOf:[{$ref:"#/definitions/import_action_transfer_group_data"}]}},required:["target","data"],additionalProperties:!1},import_action_transfer_data:{anyOf:[{$ref:"#/definitions/import_action_transfer_data_regular"},{$ref:"#/definitions/import_action_transfer_data_deposit"},{$ref:"#/definitions/import_action_transfer_data_withdrawal"}]},import_action_transfer_data_regular:{type:"object",properties:{identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},from_wallet:{description:"Wallet where funds are debited",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},to_wallet:{description:"Wallet where funds are credited",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},token:{description:"Token that is moved",$ref:"/txs/get-token/get-token.schema.input.json#/definitions/unique_token_filter"},amount:{$ref:"/db/transfer/transfer.schema.input.json#/properties/amount"},type:{description:"Type of transfer",enum:["transfer"]},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},status:{$ref:"/db/consts.schema.json#/definitions/TransferStatus"},transfer_group:{description:"TransferGroup the transfer belongs to",$ref:"/txs/get-transfer-group/get-transfer-group.schema.input.json#/definitions/unique_transfer_group_filter"},created_at:{type:"string",format:"date-time"},status_finalized_at:{type:"string",format:"date-time"}},required:["from_wallet","to_wallet","token","amount","type"],$typescript:'{"additionalProperties": false}'},import_action_transfer_data_deposit:{type:"object",properties:{identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},from_wallet:{description:"Wallet where funds are debited",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},to_wallet:{description:"Wallet where funds are credited",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},token:{description:"Token that is moved",$ref:"/txs/get-token/get-token.schema.input.json#/definitions/unique_token_filter"},amount:{$ref:"/db/transfer/transfer.schema.input.json#/properties/amount"},type:{description:"Type of transfer",enum:["deposit"]},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},status:{$ref:"/db/consts.schema.json#/definitions/TransferStatus"},transfer_group:{description:"TransferGroup the transfer belongs to",$ref:"/txs/get-transfer-group/get-transfer-group.schema.input.json#/definitions/unique_transfer_group_filter"},created_at:{type:"string",format:"date-time"},status_finalized_at:{type:"string",format:"date-time"}},required:["to_wallet","token","amount"],$typescript:'{"additionalProperties": false}'},import_action_transfer_data_withdrawal:{type:"object",properties:{identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},from_wallet:{description:"Wallet where funds are debited",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},to_wallet:{description:"Wallet where funds are credited",$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},token:{description:"Token that is moved",$ref:"/txs/get-token/get-token.schema.input.json#/definitions/unique_token_filter"},amount:{$ref:"/db/transfer/transfer.schema.input.json#/properties/amount"},type:{description:"Type of transfer",enum:["withdrawal"]},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},status:{$ref:"/db/consts.schema.json#/definitions/TransferStatus"},transfer_group:{description:"TransferGroup the transfer belongs to",$ref:"/txs/get-transfer-group/get-transfer-group.schema.input.json#/definitions/unique_transfer_group_filter"},created_at:{type:"string",format:"date-time"},status_finalized_at:{type:"string",format:"date-time"}},required:["from_wallet","token","amount"],$typescript:'{"additionalProperties": false}'},import_action_transfer:{type:"object",properties:{target:{description:"Target of the action",type:"string",enum:["transfer"]},data:{allOf:[{$ref:"#/definitions/import_action_transfer_data"}]}},required:["target","data"],additionalProperties:!1}},$allowStreamInput:"import_actions_tx_stream_chunk",additionalProperties:!1};var Ys={$schema:"http://json-schema.org/draft-07/schema",$id:"ImportActionsTxOutput",title:"ImportActionsTxOutput",description:"Output of importActions",type:"object",properties:{progress:{type:"array"},erroneous:{type:"array"}},additionalProperties:!1};var Xs={$schema:"http://json-schema.org/draft-07/schema",$id:"ImportDatabaseTxInput",title:"ImportDatabaseTxInput",description:"Input for importDatabase",type:"object",properties:{name:{type:"string"}},definitions:{},additionalProperties:!1};var Zs={$schema:"http://json-schema.org/draft-07/schema",$id:"ImportDatabaseTxOutput",title:"ImportDatabaseTxOutput",description:"Output of importDatabase",type:"object",properties:{message:{type:"string"}},additionalProperties:!1};var ei={$schema:"http://json-schema.org/draft-07/schema",$id:"ListDatabaseExportsTxInput",title:"ListDatabaseExportsTxInput",description:"Input for listDatabaseExports",type:"object",properties:{},definitions:{},additionalProperties:!1};var ti={$schema:"http://json-schema.org/draft-07/schema",$id:"ListDatabaseExportsTxOutput",title:"ListDatabaseExportsTxOutput",description:"Output of listDatabaseExports",type:"object",properties:{exports:{type:"array",items:{$ref:"#/definitions/database_export"}}},required:["exports"],definitions:{database_export:{type:"object",properties:{name:{description:"Name of the export",type:"string"},size:{description:"Size of the export",type:"number"}},required:["name","size"]}},additionalProperties:!1};var ri={$schema:"http://json-schema.org/draft-07/schema",$id:"QueryTxInput",title:"QueryTxInput",description:"Input for query",type:"object",properties:{query:{description:"SELECT query",type:"string"},params:{description:"Parameters for the query",type:"array"},options:{$ref:"#/definitions/query_tx_options"}},definitions:{query_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options_without_tx"}]}},required:["query","params"],additionalProperties:!1};var ni={$schema:"http://json-schema.org/draft-07/schema",$id:"QueryTxOutput",title:"QueryTxOutput",description:"Output of query",type:"object",properties:{results:{description:"The query results",type:"array"}},required:["results"],additionalProperties:!1};var ai={$schema:"http://json-schema.org/draft-07/schema",$id:"QueryLogsTxInput",title:"QueryLogsTxInput",description:"Input for queryLogs",type:"object",properties:{startTime:{description:"Log entries start time",type:"string"},endTime:{description:"Log entries end time",type:"string"},tracking_id:{type:"string"},level:{type:"string",enum:["debug","info","warning","error"]},options:{$ref:"#/definitions/query_logs_tx_options"}},definitions:{query_logs_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/query_logs_additional_options"}]},query_logs_additional_options:{description:"Optional flags for input",type:"object",default:{exact_level:!1},properties:{exact_level:{description:"Should query be limited to exactly defined level or greater than",type:"boolean"}},$typescript:'{"additionalProperties":false}'}},additionalProperties:!1};var si={$schema:"http://json-schema.org/draft-07/schema",$id:"QueryLogsTxOutput",title:"QueryLogsTxOutput",description:"Output of queryLogs",type:"object",properties:{logs:{type:"array",items:{$ref:"#/definitions/query_log_entry"}}},definitions:{query_log_entry:{type:"object",properties:{level:{description:"Log level",type:"string",enum:["debug","info","warning","error"]},timestamp:{description:"Timestamp when log was created",type:"string"},payload:{description:"Log payload",type:"object"}},additionalProperties:!1}},required:["logs"],additionalProperties:!1};var ii={$schema:"http://json-schema.org/draft-07/schema",$id:"ResetDatabaseTxInput",title:"ResetDatabaseTxInput",description:"Input for resetDatabase",type:"object",properties:{confirmation:{description:"hash to confirm database delete",type:"string"},version:{description:"target semver for the database",type:"string"},options:{$ref:"#/definitions/reset_database_tx_options"}},definitions:{reset_database_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options_without_tx"}]}},additionalProperties:!1};var oi={$schema:"http://json-schema.org/draft-07/schema",$id:"ResetDatabaseTxOutput",title:"ResetDatabaseTxOutput",description:"Output of resetDatabase",type:"object",properties:{message:{description:"Message about operation",type:"string"},confirmation:{description:"confirmation hash to resend",type:"string"}},additionalProperties:!1};var pi={$schema:"http://json-schema.org/draft-07/schema",$id:"ReverseTransferTxInput",title:"ReverseTransferTxInput",description:"Input for reverseTransfer",type:"object",properties:{transfer:{$ref:"/txs/get-transfer/get-transfer.schema.input.json#/definitions/unique_transfer_filter"},reverse:{$ref:"#/definitions/transfer_reverse_modifications"},options:{$ref:"#/definitions/reverse_transfer_tx_options"}},definitions:{reverse_transfer_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/reverse_transfer_additional_options"}]},reverse_transfer_additional_options:{description:"Optional flags for input",type:"object",default:{},properties:{reverse_deposit:{$id:"reverse_deposit",description:"Whether to create withdrawal transaction for deposit (will default to pending)",type:"boolean",default:!1},reverse_withdrawal:{$id:"reverse_withdrawal",description:"Whether to create deposit transaction for withdrawal (will default to pending)",type:"boolean",default:!1},return_from_balance:{$id:"return_from_balance",description:"Whether the request should also return from wallet balance",type:"boolean",default:!1},return_to_balance:{$id:"return_to_balance",description:"Whether the request should also return to wallet balance",type:"boolean",default:!1},metadata_action:{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_action_for_reverse"}},$typescript:'{"additionalProperties": false}'},transfer_reverse_modifications:{description:"In case the transfer will be made then apply these modifications",type:"object",properties:{status:{$ref:"/db/transfer/transfer.schema.input.json#/properties/status"},identifier:{$ref:"/db/transfer/transfer.schema.input.json#/properties/identifier"},force:{$ref:"/db/transfer/transfer.schema.input.json#/properties/force"},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},extend_metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"}},default:{},additionalProperties:!1}},required:["transfer"],additionalProperties:!1};var di={$schema:"http://json-schema.org/draft-07/schema",$id:"ReverseTransferTxOutput",title:"ReverseTransferTxOutput",description:"Output of reverseTransfer",allOf:[{$ref:"/txs/update-transfer/update-transfer.schema.output.json"}]};var fi={$schema:"http://json-schema.org/draft-07/schema",$id:"ReverseTransferGroupTxInput",title:"ReverseTransferGroupTxInput",description:"Input for reverseTransferGroup",type:"object",properties:{transfer_group:{$ref:"/txs/get-transfer-group/get-transfer-group.schema.input.json#/definitions/unique_transfer_group_filter"},reverse:{$ref:"#/definitions/reverse_transfer_group_modifications"},options:{$ref:"#/definitions/reverse_transfer_group_tx_options"}},definitions:{reverse_transfer_group_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/reverse_transfer_group_additional_options"}]},reverse_transfer_group_additional_options:{description:"Optional flags for input",type:"object",default:{},properties:{reverse_deposit:{$id:"reverse_deposit",description:"Whether to create withdrawal transaction for deposits (will default to pending)",type:"boolean",default:!1},reverse_withdrawal:{$id:"reverse_withdrawal",description:"Whether to create deposit transaction for withdrawals (will default to pending)",type:"boolean",default:!1},return_transfers:{description:"Should the update return all transfers belonging to group",type:"boolean"},validate_final_balance_only:{type:"boolean",description:"If true then transfers within a group will ignore balance restrictions. Only final transfers for wallets are checked.",default:!1},metadata_action:{$id:"metadata_action",$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_action_for_reverse"},transfer_metadata_action:{$id:"transfer_metadata_action",$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_action_for_reverse"}},$typescript:'{"additionalProperties": false}'},reverse_transfer_group_modifications:{description:"In case the transferGroup will be made then apply these modifications",type:"object",properties:{status:{$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/status"},transfer_status:{$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/transfer_status"},identifier:{$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/identifier"},force:{$ref:"/db/transfer/transfer.schema.input.json#/properties/force"},metadata:{$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/metadata"},transfer_metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},extend_metadata:{description:"Key value object to be merged with existing metadata",$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/metadata"},transfer_extend_metadata:{description:"Key value object to be merged with each transfers existing metadata",$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"}},default:{},additionalProperties:!1}},additionalProperties:!1};var ui={$schema:"http://json-schema.org/draft-07/schema",$id:"ReverseTransferGroupTxOutput",title:"ReverseTransferGroupTxOutput",description:"Output of reverseTransferGroup",type:"object",properties:{transfer_group:{$ref:"/db/transfer-group/transfer-group.schema.json"},transfers:{description:"Created transfer objects",type:"array",items:{$ref:"/txs/get-transfer/get-transfer.schema.output.json#/definitions/transfer"}}},additionalProperties:!1};var li={$schema:"http://json-schema.org/draft-07/schema",$id:"ReverseTransferGroupManyTxInput",title:"ReverseTransferGroupManyTxInput",description:"Input for reverseTransferGroupMany",type:"object",properties:{transfer_group:{$ref:"/txs/find-transfer-group-many/find-transfer-group-many.schema.input.json#/definitions/find_transfer_group_many_filter"},reverse:{$ref:"#/definitions/reverse_transfer_group_many_modifications"},options:{$ref:"#/definitions/reverse_transfer_group_many_tx_options"}},definitions:{reverse_transfer_group_many_modifications:{description:"In case the transferGroup will be made then apply these modifications",type:"object",properties:{status:{$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/status"},transfer_status:{$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/transfer_status"},force:{$ref:"/db/transfer/transfer.schema.input.json#/properties/force"},metadata:{$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/metadata"},transfer_metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"},extend_metadata:{description:"Key value object to be merged with existing metadata",$ref:"/db/transfer-group/transfer-group.schema.input.json#/properties/metadata"},transfer_extend_metadata:{description:"Key value object to be merged with each transfers existing metadata",$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"}},default:{},additionalProperties:!1},reverse_transfer_group_many_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"/txs/reverse-transfer-group/reverse-transfer-group.schema.input.json#/definitions/reverse_transfer_group_additional_options"}]},reverse_transfer_group_many_additional_options:{description:"Optional flags for input",type:"object",default:{},$typescript:'{"additionalProperties":false}'}},required:["transfer_group"],additionalProperties:!1};var ci={$schema:"http://json-schema.org/draft-07/schema",$id:"ReverseTransferGroupManyTxOutput",title:"ReverseTransferGroupManyTxOutput",description:"Output of reverseTransferGroupMany",type:"object",properties:{transfer_groups:{description:"Reversed transfer groups",type:"array",items:{$ref:"/db/transfer-group/transfer-group.schema.json"}},transfers:{description:"Created transfer objects",type:"array",items:{$ref:"/txs/get-transfer/get-transfer.schema.output.json#/definitions/transfer"}}},additionalProperties:!1};var mi={$schema:"http://json-schema.org/draft-07/schema",$id:"ReverseTransferManyTxInput",title:"ReverseTransferManyTxInput",description:"Input for reverseTransferMany",type:"object",properties:{transfer:{$ref:"/txs/find-transfer-many/find-transfer-many.schema.input.json#/definitions/find_transfer_many_filter"},reverse:{$ref:"#/definitions/reverse_transfer_many_modifications"},options:{$ref:"#/definitions/reverse_transfer_many_tx_options"}},definitions:{reverse_transfer_many_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/reverse_transfer_many_additional_options"}]},reverse_transfer_many_additional_options:{description:"Optional flags for input",type:"object",default:{},properties:{reverse_deposit:{$id:"reverse_deposit",description:"Whether to create withdrawal transaction for deposit (will default to pending)",type:"boolean",default:!1},reverse_withdrawal:{$id:"reverse_withdrawal",description:"Whether to create deposit transaction for withdrawal (will default to pending)",type:"boolean",default:!1},metadata_action:{$id:"metadata_action",$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_action_for_reverse"}},$typescript:'{"additionalProperties": false}'},reverse_transfer_many_modifications:{description:"In case the transfer will be made then apply these modifications",type:"object",properties:{status:{$ref:"/db/transfer/transfer.schema.input.json#/properties/status"},force:{$ref:"/db/transfer/transfer.schema.input.json#/properties/force"},metadata:{$ref:"/db/transfer/transfer.schema.input.json#/properties/metadata"}},default:{},additionalProperties:!1}},required:["transfer"],additionalProperties:!1};var hi={$schema:"http://json-schema.org/draft-07/schema",$id:"ReverseTransferManyTxOutput",title:"ReverseTransferManyTxOutput",description:"Output of reverseTransferMany",properties:{transfers:{description:"Created transfer array",type:"array",items:{$ref:"/txs/get-transfer/get-transfer.schema.output.json#/definitions/transfer"}}},additionalProperties:!1};var _i={$schema:"http://json-schema.org/draft-07/schema",$id:"SetFlagsTxInput",title:"SetFlagsTxInput",description:"Input for setFlags",type:"object",properties:{flags:{$ref:"/db/consts.schema.json#/definitions/Flags"},options:{$ref:"#/definitions/set_flags_tx_options"}},definitions:{set_flags_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options_without_tx"}]}},required:["flags"],additionalProperties:!1};var gi={$schema:"http://json-schema.org/draft-07/schema",$id:"SetFlagsTxOutput",title:"SetFlagsTxOutput",description:"Output of setFlags",type:"object",properties:{flags:{$ref:"/db/consts.schema.json#/definitions/Flags"},message:{description:"optional message",type:"string"}},required:["flags"],additionalProperties:!1};var Ti={$schema:"http://json-schema.org/draft-07/schema",$id:"StartTransactionTxInput",title:"StartTransactionTxInput",description:"Input for startTransaction",type:"object",properties:{options:{$ref:"#/definitions/start_transaction_tx_options"}},definitions:{start_transaction_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options_without_tx"}]}},additionalProperties:!1};var yi={$schema:"http://json-schema.org/draft-07/schema",$id:"StartTransactionTxOutput",title:"StartTransactionTxOutput",description:"Output of startTransaction",type:"object",properties:{transaction_id:{type:"string"}},additionalProperties:!1};var bi={$schema:"http://json-schema.org/draft-07/schema",$id:"TxConsts",description:"Generics used by functions",definitions:{i_tx_general_options_without_tx:{description:"Generic flags for input",type:"object",default:{},properties:{tracking_id:{description:"User provided id added to logs for debugging",type:"string"}},$typescript:'{"additionalProperties":false}'},i_tx_general_options:{description:"Generic flags for input",type:"object",default:{},properties:{transaction_id:{description:"Id of the transaction context to run the query in",type:"string"},tracking_id:{description:"User provided id added to logs for debugging",type:"string"}},$typescript:'{"additionalProperties":false}'},i_tx_metadata_options:{description:"Metadata flags for input",type:"object",default:{},properties:{return_metadata_total:{description:"Return the total rows count in metadata",type:"boolean"}},$typescript:'{"additionalProperties":false}'},i_tx_limiting_options:{$typescript:'{"additionalProperties":false}',description:"Optional flags for input limiting",type:"object",properties:{limit:{description:"Number of records to return",type:"integer"},offset:{description:"Number of records to omit from the beginning",type:"integer"}},default:{limit:20,offset:0}},i_tx_ordering_options:{$typescript:'{"additionalProperties":false}',description:"Optional flags for input ordering",type:"object",properties:{order:{description:"Ordering options",type:"array",items:{$ref:"#/definitions/i_tx_ordering_input"}}}},i_tx_select_options:{$typescript:'{"additionalProperties":false}',description:"Optional flags to limit search result",type:"object",properties:{select:{description:"Select options",type:"array",items:{type:"string"}}}},i_tx_deselect_options:{$typescript:'{"additionalProperties":false}',description:"Optional flag to remove field from select",type:"object",properties:{deselect:{description:"Deselect options",type:"array",items:{type:"string"}}}},i_tx_aggregating_options:{$typescript:'{"additionalProperties":false}',description:"Optional flags to aggregate data",type:"object",properties:{aggregator:{$ref:"#/definitions/i_tx_aggregator"},aggregators:{type:"array",items:{$ref:"#/definitions/i_tx_aggregator"}},groups:{$ref:"#/definitions/i_tx_groups"}}},i_tx_find_metadata:{description:"Metadata about the search",type:"object",properties:{total:{description:"Total number of records matching the query",type:"integer"},offset:{description:"Current query offset",type:"integer"},limit:{description:"Current query limit",type:"integer"},more_rows:{description:"Boolean showing if there would be more rows to return with a higher offset/limit",type:"boolean"},order:{description:"Ordering options",type:"array",items:{$ref:"#/definitions/i_tx_ordering_input"}}},required:["offset","limit","more_rows"],additionalProperties:!1},i_tx_aggregating_metadata:{description:"Metadata about the aggregation",type:"object",properties:{aggregators:{type:"array",items:{$ref:"#/definitions/i_tx_aggregator"}},groups:{$ref:"#/definitions/i_tx_groups"}},required:["aggregators"],additionalProperties:!1},i_tx_ordering_input:{description:"Input for orderBy",type:"object",properties:{field:{description:"Field to order by",type:"string"},direction:{description:"Direction to order",default:"asc",type:"string",enum:["asc","desc"]},nulls:{description:"Should nulls be first or last",type:"string",enum:["first","last"]}},required:["field"],additionalProperties:!1},i_tx_groups:{type:"array",maxItems:5,items:{$ref:"#/definitions/i_tx_group"}},i_tx_group:{anyOf:[{$ref:"#/definitions/i_tx_group_period"},{$ref:"#/definitions/i_tx_group_field"},{$ref:"#/definitions/i_tx_group_metadata_field"}]},i_tx_group_period:{type:"object",properties:{type:{type:"string",enum:["period"]},field:{$ref:"#/definitions/i_tx_period"},alias:{type:"string"}},required:["type","field"],additionalProperties:!1},i_tx_group_field:{type:"object",properties:{type:{type:"string",enum:["field"]},field:{type:"string"},alias:{type:"string"}},required:["type","field"],additionalProperties:!1},i_tx_group_metadata_field:{type:"object",properties:{type:{type:"string",enum:["metadata_field"]},field:{type:"string"},alias:{type:"string"}},required:["type","field"],additionalProperties:!1},i_tx_period:{anyOf:[{$ref:"#/definitions/i_tx_period_simple"},{$ref:"#/definitions/i_tx_period_timezone"}]},i_tx_period_simple:{description:"Time period rows should be grouped by",type:"string",enum:["year","month","week","day","hour","minute"],default:"day"},i_tx_period_timezone:{type:"object",properties:{period:{$ref:"#/definitions/i_tx_period_simple"},timezone:{description:"",type:"string"}},required:["period","timezone"],additionalProperties:!1},i_tx_time_filter:{type:"object",properties:{start_time:{type:"string",format:"date-time"},end_time:{type:"string",format:"date-time"}},$typescript:'{"additionalProperties":false}'},i_tx_aggregator:{description:"Aggregator description",anyOf:[{$ref:"#/definitions/i_tx_aggregator_simple"},{$ref:"#/definitions/i_tx_aggregator_complex"}]},i_tx_aggregator_simple:{description:"Function to use for grouping",type:"string",enum:["count","countDistinct","sum","average","min","max"],default:"count"},i_tx_aggregator_complex:{description:"Function and field to group",type:"object",properties:{function:{$ref:"#/definitions/i_tx_aggregator_simple"},field:{description:"Field to group by",type:"string"},alias:{description:"Alias to group under",type:"string"}},$typescript:'{"additionalProperties":false}'},i_tx_aggregate_results:{type:"array",items:{$ref:"#/definitions/i_tx_aggregate_result"}},i_tx_aggregate_result:{type:"object",additionalProperties:{type:["string","number"]}},i_tx_distributor_leftover_rule:{description:"Rule for distribution grouping",type:"string",enum:["keep","random","largest","target"]},i_tx_metadata_action:{description:"Whether to replace or extend current metadata with new value",type:"string",enum:["replace","extend"],default:"replace"},i_tx_metadata_action_for_reverse:{description:"Whether to replace or extend current metadata with new value",type:"string",enum:["replace","replace_create_only","replace_cancel_only","extend","extend_create_only","extend_cancel_only"],default:"replace"}}};var Fi={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateTokenTxInput",title:"UpdateTokenTxInput",description:"Input for updateToken",type:"object",properties:{token:{$ref:"/txs/get-token/get-token.schema.input.json#/definitions/unique_token_filter"},update:{$ref:"#/definitions/update_token_fields"},options:{$ref:"#/definitions/update_token_tx_options"}},definitions:{update_token_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/update_token_additional_options"}]},update_token_additional_options:{description:"Optional flags for input",type:"object",default:{},$typescript:'{"additionalProperties":false}',properties:{return_when_not_updated:{$id:"return_when_not_updated",description:"Whether the request should return the token object even if it was not updated",type:"boolean",default:!1}}},update_token_fields:{type:"object",$typescript:'{"additionalProperties":false}',properties:{metadata:{$ref:"/db/token/token.schema.json#/properties/metadata"},public:{$ref:"/db/token/token.schema.json#/properties/public"},status:{$ref:"/db/token/token.schema.json#/properties/status"}}}},required:["token"],additionalProperties:!1};var xi={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateTokenTxOutput",title:"UpdateTokenTxOutput",description:"Output of updateToken",type:"object",properties:{token:{description:"Token object",$ref:"/db/token/token.schema.json"},updated:{description:"Boolean showing if the token was updated",type:"boolean"}},additionalProperties:!1};var Oi={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateTransferTxInput",title:"UpdateTransferTxInput",description:"Input for updateTransfer",type:"object",properties:{transfer:{$ref:"/txs/get-transfer/get-transfer.schema.input.json#/definitions/unique_transfer_filter"},update:{$ref:"#/definitions/update_transfer_fields"},options:{$ref:"#/definitions/update_transfer_tx_options"}},definitions:{update_transfer_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/update_transfer_additional_options"}]},update_transfer_additional_options:{description:"Optional flags for input",type:"object",default:{},properties:{return_from_balance:{$id:"return_from_balance",description:"Whether the request should also return from wallet balance",type:"boolean",default:!1},return_to_balance:{$id:"return_to_balance",description:"Whether the request should also return to wallet balance",type:"boolean",default:!1},return_when_not_updated:{$id:"return_when_not_updated",description:"Whether the request should return the transfer object even if it was not updated",type:"boolean",default:!1},metadata_action:{$id:"metadata_action",$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_action"}},$typescript:'{"additionalProperties": false}'},update_transfer_fields:{type:"object",description:"Changes to be made to the transfer",properties:{status:{description:"Status the transfer should be set as. Only pending transfers can be updated",default:"finished",$ref:"/db/consts.schema.json#/definitions/TransferStatus"},metadata:{$ref:"/db/transfer/transfer.schema.json#/properties/metadata"},extend_metadata:{$ref:"/db/transfer/transfer.schema.json#/properties/metadata"},updated_at:{$ref:"/db/transfer/transfer.schema.json#/properties/updated_at"}},default:{status:"finished"},additionalProperties:!1}},required:["transfer"],additionalProperties:!1};var $i={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateTransferTxOutput",title:"UpdateTransferTxOutput",description:"Output of updateTransfer",type:"object",properties:{transfer:{description:"Updated transfer object",$ref:"/txs/get-transfer/get-transfer.schema.output.json#/definitions/transfer"},updated:{description:"Boolean showing if the transfer was updated",type:"boolean"},from_balance:{description:"Debited wallet balance",$ref:"/txs/get-balance/get-balance.schema.output.json#/definitions/balance"},to_balance:{description:"Credited wallet balance",$ref:"/txs/get-balance/get-balance.schema.output.json#/definitions/balance"}},additionalProperties:!1};var wi={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateTransferGroupTxInput",title:"UpdateTransferGroupTxInput",description:"Input for updateTransferGroup",type:"object",properties:{transfer_group:{$ref:"/txs/get-transfer-group/get-transfer-group.schema.input.json#/definitions/unique_transfer_group_filter"},update:{$ref:"#/definitions/update_transfer_group_data"},options:{$ref:"#/definitions/update_transfer_group_tx_options"}},definitions:{update_transfer_group_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options_without_tx"},{$ref:"#/definitions/update_transfer_group_additional_options"}]},update_transfer_group_additional_options:{description:"Optional flags for input",type:"object",default:{},properties:{return_transfers:{description:"Should the update return all transfers belonging to group",type:"boolean"},return_when_not_updated:{$id:"return_to_balance",description:"Whether the request should return the transfer_group object even if it was not updated",type:"boolean",default:!1},metadata_action:{$id:"metadata_action",$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_action"},transfer_metadata_action:{$id:"transfer_metadata_action",$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_action"}},$typescript:'{"additionalProperties": false}'},update_transfer_group_data:{description:"Changes to be made to the transfer_group",anyOf:[{$ref:"#/definitions/update_transfer_group_status"},{$ref:"#/definitions/update_transfer_group_transfer_status"},{$ref:"#/definitions/update_transfer_group_metadata"}]},update_transfer_group_status:{type:"object",properties:{status:{description:"Lifecycle status of the TransferGroup",$ref:"/db/consts.schema.json#/definitions/TransferGroupStatus"},transfer_status:{description:"Status all the transfers should be set at.",$ref:"/db/consts.schema.json#/definitions/TransferStatus"},metadata:{description:"Key value object to be replaced or extended with existing TransferGroup metadata",$ref:"/db/transfer/transfer.schema.json#/properties/metadata"},transfer_metadata:{description:"Key value object to be replaced or extended with existing Transfer metadata",$ref:"/db/transfer/transfer.schema.json#/properties/metadata"}},required:["status"],additionalProperties:!1},update_transfer_group_transfer_status:{type:"object",properties:{status:{description:"Lifecycle status of the TransferGroup",$ref:"/db/consts.schema.json#/definitions/TransferGroupStatus"},transfer_status:{description:"Status all the transfers should be set at. Changing transfer_status will also close the group",$ref:"/db/consts.schema.json#/definitions/TransferStatus"},metadata:{description:"Key value object to be replaced or extended with existing TransferGroup metadata",$ref:"/db/transfer/transfer.schema.json#/properties/metadata"},transfer_metadata:{description:"Key value object to be replaced or extended with existing Transfer metadata",$ref:"/db/transfer/transfer.schema.json#/properties/metadata"}},required:["transfer_status"],additionalProperties:!1},update_transfer_group_metadata:{type:"object",properties:{status:{description:"Lifecycle status of the TransferGroup",$ref:"/db/consts.schema.json#/definitions/TransferGroupStatus"},transfer_status:{description:"Status all the transfers should be set at.",$ref:"/db/consts.schema.json#/definitions/TransferStatus"},metadata:{description:"Key value object to be replaced or extended with existing TransferGroup metadata",$ref:"/db/transfer/transfer.schema.json#/properties/metadata"},transfer_metadata:{description:"Key value object to be replaced or extended with existing Transfer metadata",$ref:"/db/transfer/transfer.schema.json#/properties/metadata"}},required:["metadata"],additionalProperties:!1}},required:["transfer_group"],additionalProperties:!1};var Ii={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateTransferGroupTxOutput",title:"UpdateTransferGroupTxOutput",description:"Output of updateTransferGroup",type:"object",properties:{transfer_group:{$ref:"/db/transfer-group/transfer-group.schema.json"},updated:{description:"Boolean showing if the transfer_group was updated",type:"boolean"},transfers:{description:"Updated transfers",type:"array",items:{$ref:"/txs/get-transfer/get-transfer.schema.output.json#/definitions/transfer"}}},additionalProperties:!1};var ji={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateTransferGroupManyTxInput",title:"UpdateTransferGroupManyTxInput",description:"Input for updateTransferGroupMany",type:"object",properties:{transfer_group:{$ref:"/txs/find-transfer-group-many/find-transfer-group-many.schema.input.json#/definitions/find_transfer_group_many_filter"},update:{$ref:"/txs/update-transfer-group/update-transfer-group.schema.input.json#/definitions/update_transfer_group_data"},options:{$ref:"/txs/update-transfer-group/update-transfer-group.schema.input.json#/definitions/update_transfer_group_tx_options"}},definitions:{update_transfer_group_many_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/update_transfer_group_many_additional_options"}]},update_transfer_group_many_additional_options:{description:"Optional flags for input",type:"object",default:{},$typescript:'{"additionalProperties":false}'}},required:["transfer_group"],additionalProperties:!1};var vi={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateTransferGroupManyTxOutput",title:"UpdateTransferGroupManyTxOutput",description:"Output of updateTransferGroupMany",type:"object",properties:{transfer_groups:{description:"Updated transfer groups",type:"array",items:{$ref:"/db/transfer-group/transfer-group.schema.json"}},updated:{description:"Boolean showing if the transfer_group was updated",type:"boolean"},transfers:{description:"Updated transfers",type:"array",items:{$ref:"/txs/get-transfer/get-transfer.schema.output.json#/definitions/transfer"}}},required:["transfer_groups"],additionalProperties:!1};var Si={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateTransferManyTxInput",title:"UpdateTransferManyTxInput",description:"Input for updateTransferMany",type:"object",properties:{transfer:{$ref:"/txs/find-transfer-many/find-transfer-many.schema.input.json#/definitions/find_transfer_many_filter"},update:{$ref:"/txs/update-transfer/update-transfer.schema.input.json#/definitions/update_transfer_fields"},options:{$ref:"#/definitions/update_transfer_many_tx_options"}},definitions:{update_transfer_many_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options_without_tx"},{$ref:"#/definitions/update_transfer_many_additional_options"}]},update_transfer_many_additional_options:{description:"Optional flags for input",type:"object",default:{},properties:{metadata_action:{$id:"metadata_action",$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_action"}},$typescript:'{"additionalProperties": false}'}},required:["transfer","update"],additionalProperties:!1};var ki={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateTransferManyTxOutput",title:"UpdateTransferManyTxOutput",description:"Output of updateTransferMany",type:"object",properties:{transfers:{description:"Updated transfers array",type:"array",items:{$ref:"/txs/get-transfer/get-transfer.schema.output.json#/definitions/transfer"}},updated:{description:"Boolean showing if the transfers were updated",type:"boolean"}},additionalProperties:!1};var Ci={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateWalletTxInput",title:"UpdateWalletTxInput",description:"Input for updateWallet",type:"object",properties:{wallet:{$ref:"/txs/get-wallet/get-wallet.schema.input.json#/definitions/unique_wallet_filter"},update:{$ref:"#/definitions/update_wallet_fields"},options:{$ref:"#/definitions/update_wallet_tx_options"}},definitions:{update_wallet_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/update_wallet_additional_options"}]},update_wallet_additional_options:{description:"Optional flags for input",type:"object",default:{},properties:{return_when_not_updated:{description:"Whether the request should return the wallet object even if it was not updated",type:"boolean",default:!1}},$typescript:'{"additionalProperties":false}'},update_wallet_fields:{type:"object",properties:{metadata:{$ref:"/db/wallet/wallet.schema.json#/properties/metadata"},name:{$ref:"/db/wallet/wallet.schema.json#/properties/name"},status:{$ref:"/db/wallet/wallet.schema.json#/properties/status"}},$typescript:'{"additionalProperties":false}'}},required:["wallet"],additionalProperties:!1};var Ri={$schema:"http://json-schema.org/draft-07/schema",$id:"UpdateWalletTxOutput",title:"UpdateWalletTxOutput",description:"Output of updateWallet",type:"object",properties:{wallet:{description:"Wallet object",anyOf:[{$ref:"/db/wallet/wallet.schema.json"},{$ref:"/db/wallet/wallet.schema.optional.json"}]},updated:{description:"Boolean showing if the wallet was updated",type:"boolean"}},additionalProperties:!1};var u=new Vc.default({removeAdditional:!0,useDefaults:!0,coerceTypes:!0,formats:{validkey:/^[A-Za-z_][A-Za-z0-9_-]+?$/},strict:!1});u.addFormat("date-time",{validate:Iu});function jd(r,e){if(e!==void 0)return new We({errors:r},e)}function Lc(r){return function(e){if(r===void 0)return{isValid:!1,inputCopy:e,error:jd([new Error("Undefined validator")],"Undefined validator")};try{let t=Li(e),n=r(t),a=n?void 0:r.errors,s=n?void 0:u.errorsText(a),i=jd(a,s);return{isValid:n,inputCopy:t,error:i}}catch(t){return{isValid:!1,inputCopy:e,error:jd([t],t.message)}}}}function m(r,e){let t=JSON.parse(JSON.stringify(r));return Hc(t,e)}function Hc(r,e){return typeof r!="object"||Object.keys(r).forEach(t=>{t==="$ref"&&r.$ref.startsWith("#")?r.$ref=e+r.$ref:r[t]=Hc(r[t],e)}),r}function zc(r,e){let t=m(r,e),n=t.properties.options;return v({$id:t.$id.replace("Input","Options"),definitions:t.definitions},n)}function Jc(r,e){let t=m(r,e),n=t.definitions[r.$allowStreamInput];return v({$id:t.$id.replace("Input","StreamChunk"),definitions:t.definitions},n)}var l={};u.addSchema(m(gd,"/api/jsonrpc/jsonrpc.request.schema.json"),"/api/jsonrpc/jsonrpc.request.schema.json");l.JSONRPCRequest=gd;u.addSchema(m(Td,"/api/jsonrpc/jsonrpc.response.schema.json"),"/api/jsonrpc/jsonrpc.response.schema.json");l.JSONRPCResponse=Td;u.addSchema(m(yd,"/client-options.schema.json"),"/client-options.schema.json");l.ClientOptions=yd;u.addSchema(m(zt,"/db/consts.schema.json"),"/db/consts.schema.json");l.Consts=zt;u.addSchema(m(cn,"/db/token/token.schema.input.json"),"/db/token/token.schema.input.json");l.TokenTableInput=cn;u.addSchema(m(mn,"/db/token/token.schema.json"),"/db/token/token.schema.json");l.TokenTable=mn;u.addSchema(m(bd,"/db/token/token.schema.optional.json"),"/db/token/token.schema.optional.json");l.TokenTableOptional=bd;u.addSchema(m(hn,"/db/transfer/transfer.schema.input.json"),"/db/transfer/transfer.schema.input.json");l.TransferTableInput=hn;u.addSchema(m(_n,"/db/transfer/transfer.schema.json"),"/db/transfer/transfer.schema.json");l.TransferTable=_n;u.addSchema(m(Fd,"/db/transfer/transfer.schema.optional.json"),"/db/transfer/transfer.schema.optional.json");l.TransferTableOptional=Fd;u.addSchema(m(gn,"/db/transfer-group/transfer-group.schema.input.json"),"/db/transfer-group/transfer-group.schema.input.json");l.TransferGroupTableInput=gn;u.addSchema(m(Tn,"/db/transfer-group/transfer-group.schema.json"),"/db/transfer-group/transfer-group.schema.json");l.TransferGroupTable=Tn;u.addSchema(m(xd,"/db/transfer-group/transfer-group.schema.optional.json"),"/db/transfer-group/transfer-group.schema.optional.json");l.TransferGroupTableOptional=xd;u.addSchema(m(yn,"/db/transfer-log/transfer-log.schema.input.json"),"/db/transfer-log/transfer-log.schema.input.json");l.TransferLogTableInput=yn;u.addSchema(m(bn,"/db/transfer-log/transfer-log.schema.json"),"/db/transfer-log/transfer-log.schema.json");l.TransferLogTable=bn;u.addSchema(m(Od,"/db/transfer-log/transfer-log.schema.optional.json"),"/db/transfer-log/transfer-log.schema.optional.json");l.TransferLogTableOptional=Od;u.addSchema(m(Fn,"/db/wallet/wallet.schema.input.json"),"/db/wallet/wallet.schema.input.json");l.WalletTableInput=Fn;u.addSchema(m(xn,"/db/wallet/wallet.schema.json"),"/db/wallet/wallet.schema.json");l.WalletTable=xn;u.addSchema(m($d,"/db/wallet/wallet.schema.optional.json"),"/db/wallet/wallet.schema.optional.json");l.WalletTableOptional=$d;u.addSchema(m(On,"/db/wallet-token-setting/wallet-token-setting.schema.input.json"),"/db/wallet-token-setting/wallet-token-setting.schema.input.json");l.WalletTokenSettingTableInput=On;u.addSchema(m($n,"/db/wallet-token-setting/wallet-token-setting.schema.json"),"/db/wallet-token-setting/wallet-token-setting.schema.json");l.WalletTokenSettingTable=$n;u.addSchema(m(wd,"/db/wallet-token-setting/wallet-token-setting.schema.optional.json"),"/db/wallet-token-setting/wallet-token-setting.schema.optional.json");l.WalletTokenSettingTableOptional=wd;u.addSchema(m(wn,"/db/wapi-setting/wapi-setting.schema.input.json"),"/db/wapi-setting/wapi-setting.schema.input.json");l.WapiSettingTableInput=wn;u.addSchema(m(In,"/db/wapi-setting/wapi-setting.schema.json"),"/db/wapi-setting/wapi-setting.schema.json");l.WapiSettingTable=In;u.addSchema(m(Id,"/db/wapi-setting/wapi-setting.schema.optional.json"),"/db/wapi-setting/wapi-setting.schema.optional.json");l.WapiSettingTableOptional=Id;u.addSchema(m(jn,"/fns/aggregate-transfers/aggregate-transfers.schema.input.json"),"/fns/aggregate-transfers/aggregate-transfers.schema.input.json");l.AggregateTransfersFnInput=jn;u.addSchema(m(vn,"/fns/aggregate-transfers/aggregate-transfers.schema.output.json"),"/fns/aggregate-transfers/aggregate-transfers.schema.output.json");l.AggregateTransfersFnOutput=vn;u.addSchema(m(Sn,"/fns/create-access-token/create-access-token.schema.input.json"),"/fns/create-access-token/create-access-token.schema.input.json");l.CreateAccessTokenFnInput=Sn;u.addSchema(m(kn,"/fns/create-access-token/create-access-token.schema.output.json"),"/fns/create-access-token/create-access-token.schema.output.json");l.CreateAccessTokenFnOutput=kn;u.addSchema(m(Cn,"/fns/create-contract/create-contract.schema.input.json"),"/fns/create-contract/create-contract.schema.input.json");l.CreateContractFnInput=Cn;u.addSchema(m(Rn,"/fns/create-contract/create-contract.schema.output.json"),"/fns/create-contract/create-contract.schema.output.json");l.CreateContractFnOutput=Rn;u.addSchema(m(Gn,"/fns/create-deposit/create-deposit.schema.input.json"),"/fns/create-deposit/create-deposit.schema.input.json");l.CreateDepositFnInput=Gn;u.addSchema(m(Pn,"/fns/create-deposit/create-deposit.schema.output.json"),"/fns/create-deposit/create-deposit.schema.output.json");l.CreateDepositFnOutput=Pn;u.addSchema(m(En,"/fns/create-exchange/create-exchange.schema.input.json"),"/fns/create-exchange/create-exchange.schema.input.json");l.CreateExchangeFnInput=En;u.addSchema(m(Mn,"/fns/create-exchange/create-exchange.schema.output.json"),"/fns/create-exchange/create-exchange.schema.output.json");l.CreateExchangeFnOutput=Mn;u.addSchema(m(Dn,"/fns/create-token/create-token.schema.input.json"),"/fns/create-token/create-token.schema.input.json");l.CreateTokenFnInput=Dn;u.addSchema(m(Wn,"/fns/create-token/create-token.schema.output.json"),"/fns/create-token/create-token.schema.output.json");l.CreateTokenFnOutput=Wn;u.addSchema(m(An,"/fns/create-transfer/create-transfer.schema.input.json"),"/fns/create-transfer/create-transfer.schema.input.json");l.CreateTransferFnInput=An;u.addSchema(m(Nn,"/fns/create-transfer/create-transfer.schema.output.json"),"/fns/create-transfer/create-transfer.schema.output.json");l.CreateTransferFnOutput=Nn;u.addSchema(m(Un,"/fns/create-transfer-group/create-transfer-group.schema.input.json"),"/fns/create-transfer-group/create-transfer-group.schema.input.json");l.CreateTransferGroupFnInput=Un;u.addSchema(m(qn,"/fns/create-transfer-group/create-transfer-group.schema.output.json"),"/fns/create-transfer-group/create-transfer-group.schema.output.json");l.CreateTransferGroupFnOutput=qn;u.addSchema(m(Bn,"/fns/create-transfers/create-transfers.schema.input.json"),"/fns/create-transfers/create-transfers.schema.input.json");l.CreateTransfersFnInput=Bn;u.addSchema(m(Ln,"/fns/create-transfers/create-transfers.schema.output.json"),"/fns/create-transfers/create-transfers.schema.output.json");l.CreateTransfersFnOutput=Ln;u.addSchema(m(Vn,"/fns/create-wallet/create-wallet.schema.input.json"),"/fns/create-wallet/create-wallet.schema.input.json");l.CreateWalletFnInput=Vn;u.addSchema(m(Hn,"/fns/create-wallet/create-wallet.schema.output.json"),"/fns/create-wallet/create-wallet.schema.output.json");l.CreateWalletFnOutput=Hn;u.addSchema(m(zn,"/fns/create-withdrawal/create-withdrawal.schema.input.json"),"/fns/create-withdrawal/create-withdrawal.schema.input.json");l.CreateWithdrawalFnInput=zn;u.addSchema(m(Jn,"/fns/create-withdrawal/create-withdrawal.schema.output.json"),"/fns/create-withdrawal/create-withdrawal.schema.output.json");l.CreateWithdrawalFnOutput=Jn;u.addSchema(m(Qn,"/fns/find-balances/find-balances.schema.input.json"),"/fns/find-balances/find-balances.schema.input.json");l.FindBalancesFnInput=Qn;u.addSchema(m(Kn,"/fns/find-balances/find-balances.schema.output.json"),"/fns/find-balances/find-balances.schema.output.json");l.FindBalancesFnOutput=Kn;u.addSchema(m(Yn,"/fns/find-tokens/find-tokens.schema.input.json"),"/fns/find-tokens/find-tokens.schema.input.json");l.FindTokensFnInput=Yn;u.addSchema(m(Xn,"/fns/find-tokens/find-tokens.schema.output.json"),"/fns/find-tokens/find-tokens.schema.output.json");l.FindTokensFnOutput=Xn;u.addSchema(m(Zn,"/fns/find-transfer-groups/find-transfer-groups.schema.input.json"),"/fns/find-transfer-groups/find-transfer-groups.schema.input.json");l.FindTransferGroupsFnInput=Zn;u.addSchema(m(ea,"/fns/find-transfer-groups/find-transfer-groups.schema.output.json"),"/fns/find-transfer-groups/find-transfer-groups.schema.output.json");l.FindTransferGroupsFnOutput=ea;u.addSchema(m(ta,"/fns/find-transfers/find-transfers.schema.input.json"),"/fns/find-transfers/find-transfers.schema.input.json");l.FindTransfersFnInput=ta;u.addSchema(m(ra,"/fns/find-transfers/find-transfers.schema.output.json"),"/fns/find-transfers/find-transfers.schema.output.json");l.FindTransfersFnOutput=ra;u.addSchema(m(na,"/fns/find-wallets/find-wallets.schema.input.json"),"/fns/find-wallets/find-wallets.schema.input.json");l.FindWalletsFnInput=na;u.addSchema(m(aa,"/fns/find-wallets/find-wallets.schema.output.json"),"/fns/find-wallets/find-wallets.schema.output.json");l.FindWalletsFnOutput=aa;u.addSchema(m(sa,"/fns/fn-consts.schema.json"),"/fns/fn-consts.schema.json");l.FnConsts=sa;u.addSchema(m(ia,"/fns/get-balance/get-balance.schema.input.json"),"/fns/get-balance/get-balance.schema.input.json");l.GetBalanceFnInput=ia;u.addSchema(m(oa,"/fns/get-balance/get-balance.schema.output.json"),"/fns/get-balance/get-balance.schema.output.json");l.GetBalanceFnOutput=oa;u.addSchema(m(pa,"/fns/get-balance-history/get-balance-history.schema.input.json"),"/fns/get-balance-history/get-balance-history.schema.input.json");l.GetBalanceHistoryFnInput=pa;u.addSchema(m(da,"/fns/get-balance-history/get-balance-history.schema.output.json"),"/fns/get-balance-history/get-balance-history.schema.output.json");l.GetBalanceHistoryFnOutput=da;u.addSchema(m(fa,"/fns/get-flags/get-flags.schema.input.json"),"/fns/get-flags/get-flags.schema.input.json");l.GetFlagsFnInput=fa;u.addSchema(m(ua,"/fns/get-flags/get-flags.schema.output.json"),"/fns/get-flags/get-flags.schema.output.json");l.GetFlagsFnOutput=ua;u.addSchema(m(la,"/fns/get-statistics/get-statistics.schema.input.json"),"/fns/get-statistics/get-statistics.schema.input.json");l.GetStatisticsFnInput=la;u.addSchema(m(ca,"/fns/get-statistics/get-statistics.schema.output.json"),"/fns/get-statistics/get-statistics.schema.output.json");l.GetStatisticsFnOutput=ca;u.addSchema(m(ma,"/fns/get-token/get-token.schema.input.json"),"/fns/get-token/get-token.schema.input.json");l.GetTokenFnInput=ma;u.addSchema(m(ha,"/fns/get-token/get-token.schema.output.json"),"/fns/get-token/get-token.schema.output.json");l.GetTokenFnOutput=ha;u.addSchema(m(_a,"/fns/get-transfer/get-transfer.schema.input.json"),"/fns/get-transfer/get-transfer.schema.input.json");l.GetTransferFnInput=_a;u.addSchema(m(ga,"/fns/get-transfer/get-transfer.schema.output.json"),"/fns/get-transfer/get-transfer.schema.output.json");l.GetTransferFnOutput=ga;u.addSchema(m(Ta,"/fns/get-transfer-group/get-transfer-group.schema.input.json"),"/fns/get-transfer-group/get-transfer-group.schema.input.json");l.GetTransferGroupFnInput=Ta;u.addSchema(m(ya,"/fns/get-transfer-group/get-transfer-group.schema.output.json"),"/fns/get-transfer-group/get-transfer-group.schema.output.json");l.GetTransferGroupFnOutput=ya;u.addSchema(m(ba,"/fns/get-wallet/get-wallet.schema.input.json"),"/fns/get-wallet/get-wallet.schema.input.json");l.GetWalletFnInput=ba;u.addSchema(m(Fa,"/fns/get-wallet/get-wallet.schema.output.json"),"/fns/get-wallet/get-wallet.schema.output.json");l.GetWalletFnOutput=Fa;u.addSchema(m(Jt,"/fns/import-data/import-data.schema.input.json"),"/fns/import-data/import-data.schema.input.json");l.ImportDataFnInput=Jt;var Qc=zc(Jt,"/fns/import-data/import-data.schema.input.json");u.addSchema(Qc,"/fns/import-data/import-data.schema.options.json");l.ImportDataFnOptions=Qc;var Kc=Jc(Jt,"/fns/import-data/import-data.schema.input.json");u.addSchema(Kc,"/fns/import-data/import-data.schema.chunk.json");l.ImportDataFnStreamChunk=Kc;u.addSchema(m(xa,"/fns/import-data/import-data.schema.output.json"),"/fns/import-data/import-data.schema.output.json");l.ImportDataFnOutput=xa;u.addSchema(m(Oa,"/fns/reverse-transfer/reverse-transfer.schema.input.json"),"/fns/reverse-transfer/reverse-transfer.schema.input.json");l.ReverseTransferFnInput=Oa;u.addSchema(m($a,"/fns/reverse-transfer/reverse-transfer.schema.output.json"),"/fns/reverse-transfer/reverse-transfer.schema.output.json");l.ReverseTransferFnOutput=$a;u.addSchema(m(wa,"/fns/reverse-transfer-group/reverse-transfer-group.schema.input.json"),"/fns/reverse-transfer-group/reverse-transfer-group.schema.input.json");l.ReverseTransferGroupFnInput=wa;u.addSchema(m(Ia,"/fns/reverse-transfer-group/reverse-transfer-group.schema.output.json"),"/fns/reverse-transfer-group/reverse-transfer-group.schema.output.json");l.ReverseTransferGroupFnOutput=Ia;u.addSchema(m(ja,"/fns/reverse-transfers/reverse-transfers.schema.input.json"),"/fns/reverse-transfers/reverse-transfers.schema.input.json");l.ReverseTransfersFnInput=ja;u.addSchema(m(va,"/fns/reverse-transfers/reverse-transfers.schema.output.json"),"/fns/reverse-transfers/reverse-transfers.schema.output.json");l.ReverseTransfersFnOutput=va;u.addSchema(m(Sa,"/fns/set-flags/set-flags.schema.input.json"),"/fns/set-flags/set-flags.schema.input.json");l.SetFlagsFnInput=Sa;u.addSchema(m(ka,"/fns/set-flags/set-flags.schema.output.json"),"/fns/set-flags/set-flags.schema.output.json");l.SetFlagsFnOutput=ka;u.addSchema(m(Ca,"/fns/update-token/update-token.schema.input.json"),"/fns/update-token/update-token.schema.input.json");l.UpdateTokenFnInput=Ca;u.addSchema(m(Ra,"/fns/update-token/update-token.schema.output.json"),"/fns/update-token/update-token.schema.output.json");l.UpdateTokenFnOutput=Ra;u.addSchema(m(Ga,"/fns/update-transfer/update-transfer.schema.input.json"),"/fns/update-transfer/update-transfer.schema.input.json");l.UpdateTransferFnInput=Ga;u.addSchema(m(Pa,"/fns/update-transfer/update-transfer.schema.output.json"),"/fns/update-transfer/update-transfer.schema.output.json");l.UpdateTransferFnOutput=Pa;u.addSchema(m(Ea,"/fns/update-transfer-group/update-transfer-group.schema.input.json"),"/fns/update-transfer-group/update-transfer-group.schema.input.json");l.UpdateTransferGroupFnInput=Ea;u.addSchema(m(Ma,"/fns/update-transfer-group/update-transfer-group.schema.output.json"),"/fns/update-transfer-group/update-transfer-group.schema.output.json");l.UpdateTransferGroupFnOutput=Ma;u.addSchema(m(Da,"/fns/update-transfer-groups/update-transfer-groups.schema.input.json"),"/fns/update-transfer-groups/update-transfer-groups.schema.input.json");l.UpdateTransferGroupsFnInput=Da;u.addSchema(m(Wa,"/fns/update-transfer-groups/update-transfer-groups.schema.output.json"),"/fns/update-transfer-groups/update-transfer-groups.schema.output.json");l.UpdateTransferGroupsFnOutput=Wa;u.addSchema(m(Aa,"/fns/update-transfers/update-transfers.schema.input.json"),"/fns/update-transfers/update-transfers.schema.input.json");l.UpdateTransfersFnInput=Aa;u.addSchema(m(Na,"/fns/update-transfers/update-transfers.schema.output.json"),"/fns/update-transfers/update-transfers.schema.output.json");l.UpdateTransfersFnOutput=Na;u.addSchema(m(Ua,"/fns/update-wallet/update-wallet.schema.input.json"),"/fns/update-wallet/update-wallet.schema.input.json");l.UpdateWalletFnInput=Ua;u.addSchema(m(qa,"/fns/update-wallet/update-wallet.schema.output.json"),"/fns/update-wallet/update-wallet.schema.output.json");l.UpdateWalletFnOutput=qa;u.addSchema(m(Ba,"/txs/aggregate-transfer-many/aggregate-transfer-many.schema.input.json"),"/txs/aggregate-transfer-many/aggregate-transfer-many.schema.input.json");l.AggregateTransferManyTxInput=Ba;u.addSchema(m(La,"/txs/aggregate-transfer-many/aggregate-transfer-many.schema.output.json"),"/txs/aggregate-transfer-many/aggregate-transfer-many.schema.output.json");l.AggregateTransferManyTxOutput=La;u.addSchema(m(Va,"/txs/authentication-check/authentication-check.schema.input.json"),"/txs/authentication-check/authentication-check.schema.input.json");l.AuthenticationCheckTxInput=Va;u.addSchema(m(Ha,"/txs/authentication-check/authentication-check.schema.output.json"),"/txs/authentication-check/authentication-check.schema.output.json");l.AuthenticationCheckTxOutput=Ha;u.addSchema(m(za,"/txs/create-access-token/create-access-token.schema.input.json"),"/txs/create-access-token/create-access-token.schema.input.json");l.CreateAccessTokenTxInput=za;u.addSchema(m(Ja,"/txs/create-access-token/create-access-token.schema.output.json"),"/txs/create-access-token/create-access-token.schema.output.json");l.CreateAccessTokenTxOutput=Ja;u.addSchema(m(Qa,"/txs/create-contract/create-contract.schema.input.json"),"/txs/create-contract/create-contract.schema.input.json");l.CreateContractTxInput=Qa;u.addSchema(m(Ka,"/txs/create-contract/create-contract.schema.output.json"),"/txs/create-contract/create-contract.schema.output.json");l.CreateContractTxOutput=Ka;u.addSchema(m(Ya,"/txs/create-deposit/create-deposit.schema.input.json"),"/txs/create-deposit/create-deposit.schema.input.json");l.CreateDepositTxInput=Ya;u.addSchema(m(Xa,"/txs/create-deposit/create-deposit.schema.output.json"),"/txs/create-deposit/create-deposit.schema.output.json");l.CreateDepositTxOutput=Xa;u.addSchema(m(Za,"/txs/create-distribution/create-distribution.schema.input.json"),"/txs/create-distribution/create-distribution.schema.input.json");l.CreateDistributionTxInput=Za;u.addSchema(m(es,"/txs/create-distribution/create-distribution.schema.output.json"),"/txs/create-distribution/create-distribution.schema.output.json");l.CreateDistributionTxOutput=es;u.addSchema(m(ts,"/txs/create-token/create-token.schema.input.json"),"/txs/create-token/create-token.schema.input.json");l.CreateTokenTxInput=ts;u.addSchema(m(rs,"/txs/create-token/create-token.schema.output.json"),"/txs/create-token/create-token.schema.output.json");l.CreateTokenTxOutput=rs;u.addSchema(m(ns,"/txs/create-transfer/create-transfer.schema.input.json"),"/txs/create-transfer/create-transfer.schema.input.json");l.CreateTransferTxInput=ns;u.addSchema(m(as,"/txs/create-transfer/create-transfer.schema.output.json"),"/txs/create-transfer/create-transfer.schema.output.json");l.CreateTransferTxOutput=as;u.addSchema(m(ss,"/txs/create-transfer-group/create-transfer-group.schema.input.json"),"/txs/create-transfer-group/create-transfer-group.schema.input.json");l.CreateTransferGroupTxInput=ss;u.addSchema(m(is,"/txs/create-transfer-group/create-transfer-group.schema.output.json"),"/txs/create-transfer-group/create-transfer-group.schema.output.json");l.CreateTransferGroupTxOutput=is;u.addSchema(m(os,"/txs/create-transfer-many/create-transfer-many.schema.input.json"),"/txs/create-transfer-many/create-transfer-many.schema.input.json");l.CreateTransferManyTxInput=os;u.addSchema(m(ps,"/txs/create-transfer-many/create-transfer-many.schema.output.json"),"/txs/create-transfer-many/create-transfer-many.schema.output.json");l.CreateTransferManyTxOutput=ps;u.addSchema(m(ds,"/txs/create-wallet/create-wallet.schema.input.json"),"/txs/create-wallet/create-wallet.schema.input.json");l.CreateWalletTxInput=ds;u.addSchema(m(fs,"/txs/create-wallet/create-wallet.schema.output.json"),"/txs/create-wallet/create-wallet.schema.output.json");l.CreateWalletTxOutput=fs;u.addSchema(m(us,"/txs/create-withdrawal/create-withdrawal.schema.input.json"),"/txs/create-withdrawal/create-withdrawal.schema.input.json");l.CreateWithdrawalTxInput=us;u.addSchema(m(ls,"/txs/create-withdrawal/create-withdrawal.schema.output.json"),"/txs/create-withdrawal/create-withdrawal.schema.output.json");l.CreateWithdrawalTxOutput=ls;u.addSchema(m(cs,"/txs/export-database/export-database.schema.input.json"),"/txs/export-database/export-database.schema.input.json");l.ExportDatabaseTxInput=cs;u.addSchema(m(ms,"/txs/export-database/export-database.schema.output.json"),"/txs/export-database/export-database.schema.output.json");l.ExportDatabaseTxOutput=ms;u.addSchema(m(hs,"/txs/find-balance-many/find-balance-many.schema.input.json"),"/txs/find-balance-many/find-balance-many.schema.input.json");l.FindBalanceManyTxInput=hs;u.addSchema(m(_s,"/txs/find-balance-many/find-balance-many.schema.output.json"),"/txs/find-balance-many/find-balance-many.schema.output.json");l.FindBalanceManyTxOutput=_s;u.addSchema(m(gs,"/txs/find-token-many/find-token-many.schema.input.json"),"/txs/find-token-many/find-token-many.schema.input.json");l.FindTokenManyTxInput=gs;u.addSchema(m(Ts,"/txs/find-token-many/find-token-many.schema.output.json"),"/txs/find-token-many/find-token-many.schema.output.json");l.FindTokenManyTxOutput=Ts;u.addSchema(m(ys,"/txs/find-transfer-group-many/find-transfer-group-many.schema.input.json"),"/txs/find-transfer-group-many/find-transfer-group-many.schema.input.json");l.FindTransferGroupManyTxInput=ys;u.addSchema(m(bs,"/txs/find-transfer-group-many/find-transfer-group-many.schema.output.json"),"/txs/find-transfer-group-many/find-transfer-group-many.schema.output.json");l.FindTransferGroupManyTxOutput=bs;u.addSchema(m(Fs,"/txs/find-transfer-many/find-transfer-many.schema.input.json"),"/txs/find-transfer-many/find-transfer-many.schema.input.json");l.FindTransferManyTxInput=Fs;u.addSchema(m(xs,"/txs/find-transfer-many/find-transfer-many.schema.output.json"),"/txs/find-transfer-many/find-transfer-many.schema.output.json");l.FindTransferManyTxOutput=xs;u.addSchema(m(Os,"/txs/find-wallet-many/find-wallet-many.schema.input.json"),"/txs/find-wallet-many/find-wallet-many.schema.input.json");l.FindWalletManyTxInput=Os;u.addSchema(m($s,"/txs/find-wallet-many/find-wallet-many.schema.output.json"),"/txs/find-wallet-many/find-wallet-many.schema.output.json");l.FindWalletManyTxOutput=$s;u.addSchema(m(ws,"/txs/finish-transaction/finish-transaction.schema.input.json"),"/txs/finish-transaction/finish-transaction.schema.input.json");l.FinishTransactionTxInput=ws;u.addSchema(m(Is,"/txs/finish-transaction/finish-transaction.schema.output.json"),"/txs/finish-transaction/finish-transaction.schema.output.json");l.FinishTransactionTxOutput=Is;u.addSchema(m(js,"/txs/get-balance/get-balance.schema.input.json"),"/txs/get-balance/get-balance.schema.input.json");l.GetBalanceTxInput=js;u.addSchema(m(vs,"/txs/get-balance/get-balance.schema.output.json"),"/txs/get-balance/get-balance.schema.output.json");l.GetBalanceTxOutput=vs;u.addSchema(m(Ss,"/txs/get-balance-history/get-balance-history.schema.input.json"),"/txs/get-balance-history/get-balance-history.schema.input.json");l.GetBalanceHistoryTxInput=Ss;u.addSchema(m(ks,"/txs/get-balance-history/get-balance-history.schema.output.json"),"/txs/get-balance-history/get-balance-history.schema.output.json");l.GetBalanceHistoryTxOutput=ks;u.addSchema(m(Cs,"/txs/get-database-export-progress/get-database-export-progress.schema.input.json"),"/txs/get-database-export-progress/get-database-export-progress.schema.input.json");l.GetDatabaseExportProgressTxInput=Cs;u.addSchema(m(Rs,"/txs/get-database-export-progress/get-database-export-progress.schema.output.json"),"/txs/get-database-export-progress/get-database-export-progress.schema.output.json");l.GetDatabaseExportProgressTxOutput=Rs;u.addSchema(m(Gs,"/txs/get-database-import-progress/get-database-import-progress.schema.input.json"),"/txs/get-database-import-progress/get-database-import-progress.schema.input.json");l.GetDatabaseImportProgressTxInput=Gs;u.addSchema(m(Ps,"/txs/get-database-import-progress/get-database-import-progress.schema.output.json"),"/txs/get-database-import-progress/get-database-import-progress.schema.output.json");l.GetDatabaseImportProgressTxOutput=Ps;u.addSchema(m(Es,"/txs/get-flags/get-flags.schema.input.json"),"/txs/get-flags/get-flags.schema.input.json");l.GetFlagsTxInput=Es;u.addSchema(m(Ms,"/txs/get-flags/get-flags.schema.output.json"),"/txs/get-flags/get-flags.schema.output.json");l.GetFlagsTxOutput=Ms;u.addSchema(m(Ds,"/txs/get-statistics/get-statistics.schema.input.json"),"/txs/get-statistics/get-statistics.schema.input.json");l.GetStatisticsTxInput=Ds;u.addSchema(m(Ws,"/txs/get-statistics/get-statistics.schema.output.json"),"/txs/get-statistics/get-statistics.schema.output.json");l.GetStatisticsTxOutput=Ws;u.addSchema(m(As,"/txs/get-token/get-token.schema.input.json"),"/txs/get-token/get-token.schema.input.json");l.GetTokenTxInput=As;u.addSchema(m(Ns,"/txs/get-token/get-token.schema.output.json"),"/txs/get-token/get-token.schema.output.json");l.GetTokenTxOutput=Ns;u.addSchema(m(Us,"/txs/get-token-many/get-token-many.schema.input.json"),"/txs/get-token-many/get-token-many.schema.input.json");l.GetTokenManyTxInput=Us;u.addSchema(m(qs,"/txs/get-token-many/get-token-many.schema.output.json"),"/txs/get-token-many/get-token-many.schema.output.json");l.GetTokenManyTxOutput=qs;u.addSchema(m(Bs,"/txs/get-transfer/get-transfer.schema.input.json"),"/txs/get-transfer/get-transfer.schema.input.json");l.GetTransferTxInput=Bs;u.addSchema(m(Ls,"/txs/get-transfer/get-transfer.schema.output.json"),"/txs/get-transfer/get-transfer.schema.output.json");l.GetTransferTxOutput=Ls;u.addSchema(m(Vs,"/txs/get-transfer-group/get-transfer-group.schema.input.json"),"/txs/get-transfer-group/get-transfer-group.schema.input.json");l.GetTransferGroupTxInput=Vs;u.addSchema(m(Hs,"/txs/get-transfer-group/get-transfer-group.schema.output.json"),"/txs/get-transfer-group/get-transfer-group.schema.output.json");l.GetTransferGroupTxOutput=Hs;u.addSchema(m(zs,"/txs/get-wallet/get-wallet.schema.input.json"),"/txs/get-wallet/get-wallet.schema.input.json");l.GetWalletTxInput=zs;u.addSchema(m(Js,"/txs/get-wallet/get-wallet.schema.output.json"),"/txs/get-wallet/get-wallet.schema.output.json");l.GetWalletTxOutput=Js;u.addSchema(m(Qs,"/txs/get-wallet-many/get-wallet-many.schema.input.json"),"/txs/get-wallet-many/get-wallet-many.schema.input.json");l.GetWalletManyTxInput=Qs;u.addSchema(m(Ks,"/txs/get-wallet-many/get-wallet-many.schema.output.json"),"/txs/get-wallet-many/get-wallet-many.schema.output.json");l.GetWalletManyTxOutput=Ks;u.addSchema(m(Qt,"/txs/import-actions/import-actions.schema.input.json"),"/txs/import-actions/import-actions.schema.input.json");l.ImportActionsTxInput=Qt;var Yc=zc(Qt,"/txs/import-actions/import-actions.schema.input.json");u.addSchema(Yc,"/txs/import-actions/import-actions.schema.options.json");l.ImportActionsTxOptions=Yc;var Xc=Jc(Qt,"/txs/import-actions/import-actions.schema.input.json");u.addSchema(Xc,"/txs/import-actions/import-actions.schema.chunk.json");l.ImportActionsTxStreamChunk=Xc;u.addSchema(m(Ys,"/txs/import-actions/import-actions.schema.output.json"),"/txs/import-actions/import-actions.schema.output.json");l.ImportActionsTxOutput=Ys;u.addSchema(m(Xs,"/txs/import-database/import-database.schema.input.json"),"/txs/import-database/import-database.schema.input.json");l.ImportDatabaseTxInput=Xs;u.addSchema(m(Zs,"/txs/import-database/import-database.schema.output.json"),"/txs/import-database/import-database.schema.output.json");l.ImportDatabaseTxOutput=Zs;u.addSchema(m(ei,"/txs/list-database-exports/list-database-exports.schema.input.json"),"/txs/list-database-exports/list-database-exports.schema.input.json");l.ListDatabaseExportsTxInput=ei;u.addSchema(m(ti,"/txs/list-database-exports/list-database-exports.schema.output.json"),"/txs/list-database-exports/list-database-exports.schema.output.json");l.ListDatabaseExportsTxOutput=ti;u.addSchema(m(ri,"/txs/query/query.schema.input.json"),"/txs/query/query.schema.input.json");l.QueryTxInput=ri;u.addSchema(m(ni,"/txs/query/query.schema.output.json"),"/txs/query/query.schema.output.json");l.QueryTxOutput=ni;u.addSchema(m(ai,"/txs/query-logs/query-logs.schema.input.json"),"/txs/query-logs/query-logs.schema.input.json");l.QueryLogsTxInput=ai;u.addSchema(m(si,"/txs/query-logs/query-logs.schema.output.json"),"/txs/query-logs/query-logs.schema.output.json");l.QueryLogsTxOutput=si;u.addSchema(m(ii,"/txs/reset-database/reset-database.schema.input.json"),"/txs/reset-database/reset-database.schema.input.json");l.ResetDatabaseTxInput=ii;u.addSchema(m(oi,"/txs/reset-database/reset-database.schema.output.json"),"/txs/reset-database/reset-database.schema.output.json");l.ResetDatabaseTxOutput=oi;u.addSchema(m(pi,"/txs/reverse-transfer/reverse-transfer.schema.input.json"),"/txs/reverse-transfer/reverse-transfer.schema.input.json");l.ReverseTransferTxInput=pi;u.addSchema(m(di,"/txs/reverse-transfer/reverse-transfer.schema.output.json"),"/txs/reverse-transfer/reverse-transfer.schema.output.json");l.ReverseTransferTxOutput=di;u.addSchema(m(fi,"/txs/reverse-transfer-group/reverse-transfer-group.schema.input.json"),"/txs/reverse-transfer-group/reverse-transfer-group.schema.input.json");l.ReverseTransferGroupTxInput=fi;u.addSchema(m(ui,"/txs/reverse-transfer-group/reverse-transfer-group.schema.output.json"),"/txs/reverse-transfer-group/reverse-transfer-group.schema.output.json");l.ReverseTransferGroupTxOutput=ui;u.addSchema(m(li,"/txs/reverse-transfer-group-many/reverse-transfer-group-many.schema.input.json"),"/txs/reverse-transfer-group-many/reverse-transfer-group-many.schema.input.json");l.ReverseTransferGroupManyTxInput=li;u.addSchema(m(ci,"/txs/reverse-transfer-group-many/reverse-transfer-group-many.schema.output.json"),"/txs/reverse-transfer-group-many/reverse-transfer-group-many.schema.output.json");l.ReverseTransferGroupManyTxOutput=ci;u.addSchema(m(mi,"/txs/reverse-transfer-many/reverse-transfer-many.schema.input.json"),"/txs/reverse-transfer-many/reverse-transfer-many.schema.input.json");l.ReverseTransferManyTxInput=mi;u.addSchema(m(hi,"/txs/reverse-transfer-many/reverse-transfer-many.schema.output.json"),"/txs/reverse-transfer-many/reverse-transfer-many.schema.output.json");l.ReverseTransferManyTxOutput=hi;u.addSchema(m(_i,"/txs/set-flags/set-flags.schema.input.json"),"/txs/set-flags/set-flags.schema.input.json");l.SetFlagsTxInput=_i;u.addSchema(m(gi,"/txs/set-flags/set-flags.schema.output.json"),"/txs/set-flags/set-flags.schema.output.json");l.SetFlagsTxOutput=gi;u.addSchema(m(Ti,"/txs/start-transaction/start-transaction.schema.input.json"),"/txs/start-transaction/start-transaction.schema.input.json");l.StartTransactionTxInput=Ti;u.addSchema(m(yi,"/txs/start-transaction/start-transaction.schema.output.json"),"/txs/start-transaction/start-transaction.schema.output.json");l.StartTransactionTxOutput=yi;u.addSchema(m(bi,"/txs/tx-consts.schema.json"),"/txs/tx-consts.schema.json");l.TxConsts=bi;u.addSchema(m(Fi,"/txs/update-token/update-token.schema.input.json"),"/txs/update-token/update-token.schema.input.json");l.UpdateTokenTxInput=Fi;u.addSchema(m(xi,"/txs/update-token/update-token.schema.output.json"),"/txs/update-token/update-token.schema.output.json");l.UpdateTokenTxOutput=xi;u.addSchema(m(Oi,"/txs/update-transfer/update-transfer.schema.input.json"),"/txs/update-transfer/update-transfer.schema.input.json");l.UpdateTransferTxInput=Oi;u.addSchema(m($i,"/txs/update-transfer/update-transfer.schema.output.json"),"/txs/update-transfer/update-transfer.schema.output.json");l.UpdateTransferTxOutput=$i;u.addSchema(m(wi,"/txs/update-transfer-group/update-transfer-group.schema.input.json"),"/txs/update-transfer-group/update-transfer-group.schema.input.json");l.UpdateTransferGroupTxInput=wi;u.addSchema(m(Ii,"/txs/update-transfer-group/update-transfer-group.schema.output.json"),"/txs/update-transfer-group/update-transfer-group.schema.output.json");l.UpdateTransferGroupTxOutput=Ii;u.addSchema(m(ji,"/txs/update-transfer-group-many/update-transfer-group-many.schema.input.json"),"/txs/update-transfer-group-many/update-transfer-group-many.schema.input.json");l.UpdateTransferGroupManyTxInput=ji;u.addSchema(m(vi,"/txs/update-transfer-group-many/update-transfer-group-many.schema.output.json"),"/txs/update-transfer-group-many/update-transfer-group-many.schema.output.json");l.UpdateTransferGroupManyTxOutput=vi;u.addSchema(m(Si,"/txs/update-transfer-many/update-transfer-many.schema.input.json"),"/txs/update-transfer-many/update-transfer-many.schema.input.json");l.UpdateTransferManyTxInput=Si;u.addSchema(m(ki,"/txs/update-transfer-many/update-transfer-many.schema.output.json"),"/txs/update-transfer-many/update-transfer-many.schema.output.json");l.UpdateTransferManyTxOutput=ki;u.addSchema(m(Ci,"/txs/update-wallet/update-wallet.schema.input.json"),"/txs/update-wallet/update-wallet.schema.input.json");l.UpdateWalletTxInput=Ci;u.addSchema(m(Ri,"/txs/update-wallet/update-wallet.schema.output.json"),"/txs/update-wallet/update-wallet.schema.output.json");l.UpdateWalletTxOutput=Ri;var N=(c=>(c.JSONRPCRequest="JSONRPCRequest",c.JSONRPCResponse="JSONRPCResponse",c.ClientOptions="ClientOptions",c.Consts="Consts",c.TokenTableInput="TokenTableInput",c.TokenTable="TokenTable",c.TokenTableOptional="TokenTableOptional",c.TransferTableInput="TransferTableInput",c.TransferTable="TransferTable",c.TransferTableOptional="TransferTableOptional",c.TransferGroupTableInput="TransferGroupTableInput",c.TransferGroupTable="TransferGroupTable",c.TransferGroupTableOptional="TransferGroupTableOptional",c.TransferLogTableInput="TransferLogTableInput",c.TransferLogTable="TransferLogTable",c.TransferLogTableOptional="TransferLogTableOptional",c.WalletTableInput="WalletTableInput",c.WalletTable="WalletTable",c.WalletTableOptional="WalletTableOptional",c.WalletTokenSettingTableInput="WalletTokenSettingTableInput",c.WalletTokenSettingTable="WalletTokenSettingTable",c.WalletTokenSettingTableOptional="WalletTokenSettingTableOptional",c.WapiSettingTableInput="WapiSettingTableInput",c.WapiSettingTable="WapiSettingTable",c.WapiSettingTableOptional="WapiSettingTableOptional",c.AggregateTransfersFnInput="AggregateTransfersFnInput",c.AggregateTransfersFnOutput="AggregateTransfersFnOutput",c.CreateAccessTokenFnInput="CreateAccessTokenFnInput",c.CreateAccessTokenFnOutput="CreateAccessTokenFnOutput",c.CreateContractFnInput="CreateContractFnInput",c.CreateContractFnOutput="CreateContractFnOutput",c.CreateDepositFnInput="CreateDepositFnInput",c.CreateDepositFnOutput="CreateDepositFnOutput",c.CreateExchangeFnInput="CreateExchangeFnInput",c.CreateExchangeFnOutput="CreateExchangeFnOutput",c.CreateTokenFnInput="CreateTokenFnInput",c.CreateTokenFnOutput="CreateTokenFnOutput",c.CreateTransferFnInput="CreateTransferFnInput",c.CreateTransferFnOutput="CreateTransferFnOutput",c.CreateTransferGroupFnInput="CreateTransferGroupFnInput",c.CreateTransferGroupFnOutput="CreateTransferGroupFnOutput",c.CreateTransfersFnInput="CreateTransfersFnInput",c.CreateTransfersFnOutput="CreateTransfersFnOutput",c.CreateWalletFnInput="CreateWalletFnInput",c.CreateWalletFnOutput="CreateWalletFnOutput",c.CreateWithdrawalFnInput="CreateWithdrawalFnInput",c.CreateWithdrawalFnOutput="CreateWithdrawalFnOutput",c.FindBalancesFnInput="FindBalancesFnInput",c.FindBalancesFnOutput="FindBalancesFnOutput",c.FindTokensFnInput="FindTokensFnInput",c.FindTokensFnOutput="FindTokensFnOutput",c.FindTransferGroupsFnInput="FindTransferGroupsFnInput",c.FindTransferGroupsFnOutput="FindTransferGroupsFnOutput",c.FindTransfersFnInput="FindTransfersFnInput",c.FindTransfersFnOutput="FindTransfersFnOutput",c.FindWalletsFnInput="FindWalletsFnInput",c.FindWalletsFnOutput="FindWalletsFnOutput",c.FnConsts="FnConsts",c.GetBalanceFnInput="GetBalanceFnInput",c.GetBalanceFnOutput="GetBalanceFnOutput",c.GetBalanceHistoryFnInput="GetBalanceHistoryFnInput",c.GetBalanceHistoryFnOutput="GetBalanceHistoryFnOutput",c.GetFlagsFnInput="GetFlagsFnInput",c.GetFlagsFnOutput="GetFlagsFnOutput",c.GetStatisticsFnInput="GetStatisticsFnInput",c.GetStatisticsFnOutput="GetStatisticsFnOutput",c.GetTokenFnInput="GetTokenFnInput",c.GetTokenFnOutput="GetTokenFnOutput",c.GetTransferFnInput="GetTransferFnInput",c.GetTransferFnOutput="GetTransferFnOutput",c.GetTransferGroupFnInput="GetTransferGroupFnInput",c.GetTransferGroupFnOutput="GetTransferGroupFnOutput",c.GetWalletFnInput="GetWalletFnInput",c.GetWalletFnOutput="GetWalletFnOutput",c.ImportDataFnInput="ImportDataFnInput",c.ImportDataFnOptions="ImportDataFnOptions",c.ImportDataFnStreamChunk="ImportDataFnStreamChunk",c.ImportDataFnOutput="ImportDataFnOutput",c.ReverseTransferFnInput="ReverseTransferFnInput",c.ReverseTransferFnOutput="ReverseTransferFnOutput",c.ReverseTransferGroupFnInput="ReverseTransferGroupFnInput",c.ReverseTransferGroupFnOutput="ReverseTransferGroupFnOutput",c.ReverseTransfersFnInput="ReverseTransfersFnInput",c.ReverseTransfersFnOutput="ReverseTransfersFnOutput",c.SetFlagsFnInput="SetFlagsFnInput",c.SetFlagsFnOutput="SetFlagsFnOutput",c.UpdateTokenFnInput="UpdateTokenFnInput",c.UpdateTokenFnOutput="UpdateTokenFnOutput",c.UpdateTransferFnInput="UpdateTransferFnInput",c.UpdateTransferFnOutput="UpdateTransferFnOutput",c.UpdateTransferGroupFnInput="UpdateTransferGroupFnInput",c.UpdateTransferGroupFnOutput="UpdateTransferGroupFnOutput",c.UpdateTransferGroupsFnInput="UpdateTransferGroupsFnInput",c.UpdateTransferGroupsFnOutput="UpdateTransferGroupsFnOutput",c.UpdateTransfersFnInput="UpdateTransfersFnInput",c.UpdateTransfersFnOutput="UpdateTransfersFnOutput",c.UpdateWalletFnInput="UpdateWalletFnInput",c.UpdateWalletFnOutput="UpdateWalletFnOutput",c.AggregateTransferManyTxInput="AggregateTransferManyTxInput",c.AggregateTransferManyTxOutput="AggregateTransferManyTxOutput",c.AuthenticationCheckTxInput="AuthenticationCheckTxInput",c.AuthenticationCheckTxOutput="AuthenticationCheckTxOutput",c.CreateAccessTokenTxInput="CreateAccessTokenTxInput",c.CreateAccessTokenTxOutput="CreateAccessTokenTxOutput",c.CreateContractTxInput="CreateContractTxInput",c.CreateContractTxOutput="CreateContractTxOutput",c.CreateDepositTxInput="CreateDepositTxInput",c.CreateDepositTxOutput="CreateDepositTxOutput",c.CreateDistributionTxInput="CreateDistributionTxInput",c.CreateDistributionTxOutput="CreateDistributionTxOutput",c.CreateTokenTxInput="CreateTokenTxInput",c.CreateTokenTxOutput="CreateTokenTxOutput",c.CreateTransferTxInput="CreateTransferTxInput",c.CreateTransferTxOutput="CreateTransferTxOutput",c.CreateTransferGroupTxInput="CreateTransferGroupTxInput",c.CreateTransferGroupTxOutput="CreateTransferGroupTxOutput",c.CreateTransferManyTxInput="CreateTransferManyTxInput",c.CreateTransferManyTxOutput="CreateTransferManyTxOutput",c.CreateWalletTxInput="CreateWalletTxInput",c.CreateWalletTxOutput="CreateWalletTxOutput",c.CreateWithdrawalTxInput="CreateWithdrawalTxInput",c.CreateWithdrawalTxOutput="CreateWithdrawalTxOutput",c.ExportDatabaseTxInput="ExportDatabaseTxInput",c.ExportDatabaseTxOutput="ExportDatabaseTxOutput",c.FindBalanceManyTxInput="FindBalanceManyTxInput",c.FindBalanceManyTxOutput="FindBalanceManyTxOutput",c.FindTokenManyTxInput="FindTokenManyTxInput",c.FindTokenManyTxOutput="FindTokenManyTxOutput",c.FindTransferGroupManyTxInput="FindTransferGroupManyTxInput",c.FindTransferGroupManyTxOutput="FindTransferGroupManyTxOutput",c.FindTransferManyTxInput="FindTransferManyTxInput",c.FindTransferManyTxOutput="FindTransferManyTxOutput",c.FindWalletManyTxInput="FindWalletManyTxInput",c.FindWalletManyTxOutput="FindWalletManyTxOutput",c.FinishTransactionTxInput="FinishTransactionTxInput",c.FinishTransactionTxOutput="FinishTransactionTxOutput",c.GetBalanceTxInput="GetBalanceTxInput",c.GetBalanceTxOutput="GetBalanceTxOutput",c.GetBalanceHistoryTxInput="GetBalanceHistoryTxInput",c.GetBalanceHistoryTxOutput="GetBalanceHistoryTxOutput",c.GetDatabaseExportProgressTxInput="GetDatabaseExportProgressTxInput",c.GetDatabaseExportProgressTxOutput="GetDatabaseExportProgressTxOutput",c.GetDatabaseImportProgressTxInput="GetDatabaseImportProgressTxInput",c.GetDatabaseImportProgressTxOutput="GetDatabaseImportProgressTxOutput",c.GetFlagsTxInput="GetFlagsTxInput",c.GetFlagsTxOutput="GetFlagsTxOutput",c.GetStatisticsTxInput="GetStatisticsTxInput",c.GetStatisticsTxOutput="GetStatisticsTxOutput",c.GetTokenTxInput="GetTokenTxInput",c.GetTokenTxOutput="GetTokenTxOutput",c.GetTokenManyTxInput="GetTokenManyTxInput",c.GetTokenManyTxOutput="GetTokenManyTxOutput",c.GetTransferTxInput="GetTransferTxInput",c.GetTransferTxOutput="GetTransferTxOutput",c.GetTransferGroupTxInput="GetTransferGroupTxInput",c.GetTransferGroupTxOutput="GetTransferGroupTxOutput",c.GetWalletTxInput="GetWalletTxInput",c.GetWalletTxOutput="GetWalletTxOutput",c.GetWalletManyTxInput="GetWalletManyTxInput",c.GetWalletManyTxOutput="GetWalletManyTxOutput",c.ImportActionsTxInput="ImportActionsTxInput",c.ImportActionsTxOptions="ImportActionsTxOptions",c.ImportActionsTxStreamChunk="ImportActionsTxStreamChunk",c.ImportActionsTxOutput="ImportActionsTxOutput",c.ImportDatabaseTxInput="ImportDatabaseTxInput",c.ImportDatabaseTxOutput="ImportDatabaseTxOutput",c.ListDatabaseExportsTxInput="ListDatabaseExportsTxInput",c.ListDatabaseExportsTxOutput="ListDatabaseExportsTxOutput",c.QueryTxInput="QueryTxInput",c.QueryTxOutput="QueryTxOutput",c.QueryLogsTxInput="QueryLogsTxInput",c.QueryLogsTxOutput="QueryLogsTxOutput",c.ResetDatabaseTxInput="ResetDatabaseTxInput",c.ResetDatabaseTxOutput="ResetDatabaseTxOutput",c.ReverseTransferTxInput="ReverseTransferTxInput",c.ReverseTransferTxOutput="ReverseTransferTxOutput",c.ReverseTransferGroupTxInput="ReverseTransferGroupTxInput",c.ReverseTransferGroupTxOutput="ReverseTransferGroupTxOutput",c.ReverseTransferGroupManyTxInput="ReverseTransferGroupManyTxInput",c.ReverseTransferGroupManyTxOutput="ReverseTransferGroupManyTxOutput",c.ReverseTransferManyTxInput="ReverseTransferManyTxInput",c.ReverseTransferManyTxOutput="ReverseTransferManyTxOutput",c.SetFlagsTxInput="SetFlagsTxInput",c.SetFlagsTxOutput="SetFlagsTxOutput",c.StartTransactionTxInput="StartTransactionTxInput",c.StartTransactionTxOutput="StartTransactionTxOutput",c.TxConsts="TxConsts",c.UpdateTokenTxInput="UpdateTokenTxInput",c.UpdateTokenTxOutput="UpdateTokenTxOutput",c.UpdateTransferTxInput="UpdateTransferTxInput",c.UpdateTransferTxOutput="UpdateTransferTxOutput",c.UpdateTransferGroupTxInput="UpdateTransferGroupTxInput",c.UpdateTransferGroupTxOutput="UpdateTransferGroupTxOutput",c.UpdateTransferGroupManyTxInput="UpdateTransferGroupManyTxInput",c.UpdateTransferGroupManyTxOutput="UpdateTransferGroupManyTxOutput",c.UpdateTransferManyTxInput="UpdateTransferManyTxInput",c.UpdateTransferManyTxOutput="UpdateTransferManyTxOutput",c.UpdateWalletTxInput="UpdateWalletTxInput",c.UpdateWalletTxOutput="UpdateWalletTxOutput",c))(N||{}),Gi={ajv:u,createValidator(r){let e=u.compile(r);return Lc(e)},getValidator(r){let e=u.getSchema(r);return Lc(e)},getSchema(r){return l[r]},Schemas:l,SchemaNames:N},AP=Gi.createValidator,y=Gi.getValidator;var Pi=(i=>(i.year="year",i.month="month",i.week="week",i.day="day",i.hour="hour",i.minute="minute",i))(Pi||{}),vd=(i=>(i.count="count",i.countDistinct="countDistinct",i.sum="sum",i.average="average",i.min="min",i.max="max",i))(vd||{}),Sd=(a=>(a.keep="keep",a.random="random",a.largest="largest",a.target="target",a))(Sd||{}),kd=(t=>(t.replace="replace",t.extend="extend",t))(kd||{}),Cd=(i=>(i.replace="replace",i.replace_create_only="replace_create_only",i.replace_cancel_only="replace_cancel_only",i.extend="extend",i.extend_create_only="extend_create_only",i.extend_cancel_only="extend_cancel_only",i))(Cd||{});var MO=y("AggregateTransferManyTxInput");var DO=y("AuthenticationCheckTxInput");var WO=y("CreateAccessTokenTxInput");var AO=y("CreateContractTxInput");var NO=y("CreateDepositTxInput");var UO=y("CreateDistributionTxInput");var qO=y("CreateTokenTxInput");var BO=y("CreateTransferTxInput");var LO=y("CreateTransferGroupTxInput");var VO=y("CreateTransferManyTxInput");var HO=y("CreateWalletTxInput");var zO=y("CreateWithdrawalTxInput");var JO=y("ExportDatabaseTxInput");var QO=y("FindBalanceManyTxInput");var KO=y("FindTokenManyTxInput");var YO=y("FindTransferGroupManyTxInput");var XO=y("FindTransferManyTxInput");var ZO=y("FindWalletManyTxInput");var e$=y("FinishTransactionTxInput");var t$=y("GetBalanceTxInput");var r$=y("GetBalanceHistoryTxInput");var n$=y("GetDatabaseExportProgressTxInput");var a$=y("GetDatabaseImportProgressTxInput");var s$=y("GetFlagsTxInput");var i$=y("GetStatisticsTxInput");var o$=y("GetTokenTxInput");var p$=y("GetTokenManyTxInput");var d$=y("GetTransferTxInput");var f$=y("GetTransferGroupTxInput");var u$=y("GetWalletTxInput");var l$=y("GetWalletManyTxInput");var c$=y("ImportActionsTxInput");var m$=y("ImportDatabaseTxInput");var h$=y("ListDatabaseExportsTxInput");var _$=y("QueryTxInput");var g$=y("QueryLogsTxInput");var T$=y("ResetDatabaseTxInput");var y$=y("ReverseTransferTxInput");var b$=y("ReverseTransferGroupTxInput");var F$=y("ReverseTransferGroupManyTxInput");var x$=y("ReverseTransferManyTxInput");var O$=y("SetFlagsTxInput");var $$=y("StartTransactionTxInput");var w$=y("UpdateTokenTxInput");var I$=y("UpdateTransferTxInput");var j$=y("UpdateTransferGroupTxInput");var v$=y("UpdateTransferGroupManyTxInput");var S$=y("UpdateTransferManyTxInput");var k$=y("UpdateWalletTxInput"),Rd={aggregateTransferMany:MO,authenticationCheck:DO,createAccessToken:WO,createContract:AO,createDeposit:NO,createDistribution:UO,createToken:qO,createTransfer:BO,createTransferGroup:LO,createTransferMany:VO,createWallet:HO,createWithdrawal:zO,exportDatabase:JO,findBalanceMany:QO,findTokenMany:KO,findTransferGroupMany:YO,findTransferMany:XO,findWalletMany:ZO,finishTransaction:e$,getBalance:t$,getBalanceHistory:r$,getDatabaseExportProgress:n$,getDatabaseImportProgress:a$,getFlags:s$,getStatistics:i$,getToken:o$,getTokenMany:p$,getTransfer:d$,getTransferGroup:f$,getWallet:u$,getWalletMany:l$,importActions:c$,importDatabase:m$,listDatabaseExports:h$,query:_$,queryLogs:g$,resetDatabase:T$,reverseTransfer:y$,reverseTransferGroup:b$,reverseTransferGroupMany:F$,reverseTransferMany:x$,setFlags:O$,startTransaction:$$,updateToken:w$,updateTransfer:I$,updateTransferGroup:j$,updateTransferGroupMany:v$,updateTransferMany:S$,updateWallet:k$},Gd=(P=>(P.aggregateTransferMany="aggregateTransferMany",P.authenticationCheck="authenticationCheck",P.createAccessToken="createAccessToken",P.createContract="createContract",P.createDeposit="createDeposit",P.createDistribution="createDistribution",P.createToken="createToken",P.createTransfer="createTransfer",P.createTransferGroup="createTransferGroup",P.createTransferMany="createTransferMany",P.createWallet="createWallet",P.createWithdrawal="createWithdrawal",P.exportDatabase="exportDatabase",P.findBalanceMany="findBalanceMany",P.findTokenMany="findTokenMany",P.findTransferGroupMany="findTransferGroupMany",P.findTransferMany="findTransferMany",P.findWalletMany="findWalletMany",P.finishTransaction="finishTransaction",P.getBalance="getBalance",P.getBalanceHistory="getBalanceHistory",P.getDatabaseExportProgress="getDatabaseExportProgress",P.getDatabaseImportProgress="getDatabaseImportProgress",P.getFlags="getFlags",P.getStatistics="getStatistics",P.getToken="getToken",P.getTokenMany="getTokenMany",P.getTransfer="getTransfer",P.getTransferGroup="getTransferGroup",P.getWallet="getWallet",P.getWalletMany="getWalletMany",P.importActions="importActions",P.importDatabase="importDatabase",P.listDatabaseExports="listDatabaseExports",P.query="query",P.queryLogs="queryLogs",P.resetDatabase="resetDatabase",P.reverseTransfer="reverseTransfer",P.reverseTransferGroup="reverseTransferGroup",P.reverseTransferGroupMany="reverseTransferGroupMany",P.reverseTransferMany="reverseTransferMany",P.setFlags="setFlags",P.startTransaction="startTransaction",P.updateToken="updateToken",P.updateTransfer="updateTransfer",P.updateTransferGroup="updateTransferGroup",P.updateTransferGroupMany="updateTransferGroupMany",P.updateTransferMany="updateTransferMany",P.updateWallet="updateWallet",P))(Gd||{});var C$=y("ImportActionsTxInput");function Zc(r){let{error:e}=C$(r);return e===void 0}var W0=y("ImportActionsTxOutput");var A0=y("ImportActionsTxStreamChunk");var R$=y("ImportActionsTxOptions");function em(r){let{error:e}=R$(r);return e===void 0}var Fr=class{constructor(e,t,n){this.isConnected=!1;this.hooks=new Proxy({},{set(e,t,n){if(typeof n!="function")throw new TypeError("Hooks can only be functions");return e[t]=n,!0}});this._requests=new Map;this._error=!1;this._sending=new Set;this.type=t,this._connection=e,this.connectionType=t,this.$connect=n}_setConnected(e){this.isConnected=e,this.isConnected&&this._error!==!1&&(this._error=!1),this.isConnected&&this.hooks.connected&&this.hooks.connected(this.socId),!this.isConnected&&this.hooks.disconnected&&this.hooks.disconnected()}_setErrored(e){this._error=e,this.isConnected&&this._setConnected(!1)}_send(e){throw new Error("This method must be implemented by child class")}_reconnect(){throw new Error("This method must be implemented by child class")}close(){return _e(this,null,function*(){throw new Error("This method must be implemented by child class")})}_connectionLost(){this._requests.forEach((e,t)=>{"stream"in e&&e.stream.destroy(new Be("CONNECTION_LOST",{method:"connectionLost"})),this._requests.delete(t)}),this.socId=void 0}_handleMessage(e){var o,d,g;if(this.hooks.message&&this.hooks.message(e),"method"in e){let h=e;if(h.method==="ping"){this._send({jsonrpc:"2.0",result:"pong",id:h.id});return}z("Unexpected JSONRPCRequest",e);return}let t=e;if(this.hooks.message&&this.hooks.message(t),t.id===null){z("Unexpected JSONRPCResponse",e);return}if(t.result==="ack"){this._sending.delete(t.id);return}let n=this._requests.get(t.id);if(!n){z("No Request found for incoming",e);return}if("handle"in n){n.handle(t),delete n.handle;return}t.error&&"error"in n&&n.error(t.error);let a=t;if(((o=a.result)==null?void 0:o.type)==="streamPause"&&"pause"in n){n.pause();return}if(((d=a.result)==null?void 0:d.type)==="streamResume"&&"resume"in n){n.resume();return}let{stream:s,start:i}=n;if(((g=a.result)==null?void 0:g.type)==="streamChunk"){s.push(a.result);return}s.push(a),s.destroyed||s.push(null),this._requests.delete(a.id),this.connectionType==="ws"&&this._send({jsonrpc:"2.0",method:"ack",params:Date.now()-i,id:a.id})}_sendTransaction(e,t){let{isValid:n,inputCopy:a,error:s}=Rd[e](t);if(!n)throw s;let i={jsonrpc:"2.0",method:e,params:a,id:Mt()};return this.hooks.preflight&&this.hooks.preflight(i)===!1?new _t:new _t(o=>_e(this,null,function*(){this._error&&this._reconnect(),this.isConnected||(yield this.$connect),this._requests.set(i.id,{stream:o,start:Date.now()}),this._sending.add(i.id),this._send(i)}))}_streamTransaction(e,t,n,a){let s=Date.now(),i=Mt(),o,d=({method:w,params:b})=>{if(o)return;let O={jsonrpc:"2.0",method:w,params:v({streamId:i},b),id:Mt()};this._sending.add(O.id),this._send(O)},g=(w,b)=>{o||(d({method:"streamError",params:{error:b}}),o=b,w.push({error:b}))},h=new Hi,T=a?h.pipe(a):h,$={jsonrpc:"2.0",method:"streamStart",params:{method:e,options:n},id:i};return this.hooks.preflight&&this.hooks.preflight($)===!1?new Wr:new Wr(w=>_e(this,null,function*(){this._error&&this._reconnect(),this.isConnected||(yield this.$connect);let b=setTimeout(()=>{w.push({error:new Be("INPUT_STREAM_TIMEOUT",{streamId:i})})},3e4);this._requests.set($.id,{stream:w,start:s,error(O){o=O,z("stream:error()>",O)},pause(){h.pause()},resume(){h.resume()},handle(O){if(O.error){w.push(O);return}T.on("data",I=>{if(!o){if(b&&(clearTimeout(b),b=null),!t(I)){g(w,new Be("INVALID_INPUT_STREAM_CHUNK",{streamId:i,chunk:I}));return}d({method:"streamData",params:{data:I}})}}).on("error",I=>{o||(b&&(clearTimeout(b),b=null),d({method:"streamError",params:{error:I}}),w.push({error:new Be("INPUT_STREAM_ERROR",{streamId:i,error:I})}))}).on("end",()=>{b&&(clearTimeout(b),b=null),d({method:"streamEnd",params:{}})})}}),this._sending.add($.id),this._send($)}),h)}aggregateTransferMany(e){return this._sendTransaction("aggregateTransferMany",e)}authenticationCheck(e){return this._sendTransaction("authenticationCheck",e)}createAccessToken(e){return this._sendTransaction("createAccessToken",e)}createContract(e){return this._sendTransaction("createContract",e)}createDeposit(e){return this._sendTransaction("createDeposit",e)}createDistribution(e){return this._sendTransaction("createDistribution",e)}createToken(e){return this._sendTransaction("createToken",e)}createTransfer(e){return this._sendTransaction("createTransfer",e)}createTransferGroup(e){return this._sendTransaction("createTransferGroup",e)}createTransferMany(e){return this._sendTransaction("createTransferMany",e)}createWallet(e){return this._sendTransaction("createWallet",e)}createWithdrawal(e){return this._sendTransaction("createWithdrawal",e)}exportDatabase(e){return this._sendTransaction("exportDatabase",e)}findBalanceMany(e){return this._sendTransaction("findBalanceMany",e)}findTokenMany(e){return this._sendTransaction("findTokenMany",e)}findTransferGroupMany(e){return this._sendTransaction("findTransferGroupMany",e)}findTransferMany(e){return this._sendTransaction("findTransferMany",e)}findWalletMany(e){return this._sendTransaction("findWalletMany",e)}finishTransaction(e){return this._sendTransaction("finishTransaction",e)}getBalance(e){return this._sendTransaction("getBalance",e)}getBalanceHistory(e){return this._sendTransaction("getBalanceHistory",e)}getDatabaseExportProgress(e){return this._sendTransaction("getDatabaseExportProgress",e)}getDatabaseImportProgress(e){return this._sendTransaction("getDatabaseImportProgress",e)}getFlags(e){return this._sendTransaction("getFlags",e)}getStatistics(e){return this._sendTransaction("getStatistics",e)}getToken(e){return this._sendTransaction("getToken",e)}getTokenMany(e){return this._sendTransaction("getTokenMany",e)}getTransfer(e){return this._sendTransaction("getTransfer",e)}getTransferGroup(e){return this._sendTransaction("getTransferGroup",e)}getWallet(e){return this._sendTransaction("getWallet",e)}getWalletMany(e){return this._sendTransaction("getWalletMany",e)}importActions(e){return this._sendTransaction("importActions",e)}importActionsStream(e,t){if(e!==void 0&&!em(e))throw new We({input:e});return this._streamTransaction("importActions",Zc,e,t)}importDatabase(e){return this._sendTransaction("importDatabase",e)}listDatabaseExports(e){return this._sendTransaction("listDatabaseExports",e)}query(e){return this._sendTransaction("query",e)}queryLogs(e){return this._sendTransaction("queryLogs",e)}resetDatabase(e){return this._sendTransaction("resetDatabase",e)}reverseTransfer(e){return this._sendTransaction("reverseTransfer",e)}reverseTransferGroup(e){return this._sendTransaction("reverseTransferGroup",e)}reverseTransferGroupMany(e){return this._sendTransaction("reverseTransferGroupMany",e)}reverseTransferMany(e){return this._sendTransaction("reverseTransferMany",e)}setFlags(e){return this._sendTransaction("setFlags",e)}startTransaction(e){return this._sendTransaction("startTransaction",e)}updateToken(e){return this._sendTransaction("updateToken",e)}updateTransfer(e){return this._sendTransaction("updateTransfer",e)}updateTransferGroup(e){return this._sendTransaction("updateTransferGroup",e)}updateTransferGroupMany(e){return this._sendTransaction("updateTransferGroupMany",e)}updateTransferMany(e){return this._sendTransaction("updateTransferMany",e)}updateWallet(e){return this._sendTransaction("updateWallet",e)}};var tm,G$=(tm=window.WAPI_VERSION)!=null?tm:"";function Ed(r){let e=rm(r);return new Pd(e,r)}function rm(r){var w;let e=Object.assign({rejectUnauthorized:(w=r.rejectUnauthorized)!=null?w:!0,clientVersion:G$},r),t=$u(e),n=new hu(...t),a,s,i=!1,o;n.onclose=d,n.onerror=g,n.onmessage=h;function d(b){if(z(`createConnection>close(reason:${b.reason},code:${b.code},wasClean:${b.wasClean})`),b.code===4030)return T(new Pt);T(new Error("WS closed"))}function g(b){z(`createConnection>error(message:${b.message},error:${b.error},type:${b.type})`),T(b.error)}function h(b){z(`createConnection>message(type:${b.type},data:${b.data})`);let{data:O}=b,I;try{I=JSON.parse(O.toString())}catch(j){return z("Invalid JSON response",j),T(new Error("Invalid JSON response"))}if(I.result!=="ready")return z("Invalid first message"),T(new Error("Invalid first message - "+JSON.stringify(I)));T()}function T(b){i||(delete n.onmessage,delete n.onerror,delete n.onclose,b?(s(b),n.close()):a(o),i=!0)}let $=new Promise((b,O)=>{a=b,s=O});return{ws:n,$connect:$}}var Pd=class extends Fr{constructor(t,n){super(t.ws,"ws",t.$connect);this._tryToReconnect=!0;this._config=n,this.host=n.host,this.$connect.then(a=>(this.socId=a,this._ready())).catch(a=>{this.socId||this._setErrored(a)})}_setErrored(t){super._setErrored(t),(t instanceof Pt||"code"in t&&t.code===he.AUTH.ERRORS.AUTHENTICATION_ERROR.code)&&(this._tryToReconnect=!1)}_ready(){this._setConnected(!0),this._connection.onmessage=t=>{let{data:n,type:a}=t;if(z(`message(type:${a},data:$0)`,n),a==="message"){let s=JSON.parse(n.toString());this._handleMessage(s),this._heartbeat()}},this._connection.onerror=t=>{let{message:n,error:a,type:s}=t;z(`error(message:$0,error:$1,type:${s})`,n,a)},this._connection.onclose=t=>{let{reason:n,code:a,wasClean:s}=t;z(`close(reason:$0,code:${a},wasClean:${s})`,n),this._setConnected(!1),clearTimeout(this._pingTimeout),this._connectionLost(),this._reconnect()},this._heartbeat()}_reconnect(){if(z("reconnect(),tryToReconnect:",this._tryToReconnect),!this._tryToReconnect)return;if(this.hooks.reconnect&&!this.hooks.reconnect()){z("reconnect hook returned false");return}let t=window.WAPI_RECONNECT_ATTEMPTS&&parseInt(window.WAPI_RECONNECT_ATTEMPTS)||10,n=window.WAPI_MAX_RECONNECT_WAIT&&parseInt(window.WAPI_MAX_RECONNECT_WAIT)||1e4;this.$connect=_e(this,null,function*(){let a;for(let s=0;s<t+1;s++)try{z("Trying to connect, attempt:",s);let{ws:i,$connect:o}=rm(this._config);a=yield o,this.socId=a,this._connection=i,this._ready();break}catch(i){if(i.code===he.AUTH.ERRORS.AUTHENTICATION_ERROR.code||s>t-1)throw i;yield Fu(Math.min(Math.pow(1.5,s)*1e3,n))}return a})}_heartbeat(){z("heartbeat"),clearTimeout(this._pingTimeout),this._pingTimeout=setTimeout(()=>{if(this._sending.size)return z("pingTimeout reached, but sending.size:",this._sending.size),this._heartbeat();z("timeout"),this._connection.close(),this._setConnected(!1),this._reconnect()},31e3)}_send(t){z("send()",t),this._connection.send(JSON.stringify(t))}close(){return _e(this,null,function*(){return z("close()"),this._tryToReconnect=!1,clearTimeout(this._pingTimeout),this._setConnected(!1),this._connection.close()})}};var Md=typeof globalThis!="undefined"&&globalThis||typeof self!="undefined"&&self||typeof Md!="undefined"&&Md,Dd=Md.fetch;function Ad(r){let e=P$(r);return new Wd(e,r)}function P$(r){let e=r.host.replace(/^wss:/,"https:"),t="x-wapi-req-id";function n(o){return _e(this,null,function*(){z("http_createConnection>message(body:$0)",o)})}function a(o,d){return _e(this,null,function*(){let g=JSON.parse(o),T=yield(yield Dd(`${e}/api`,{keepalive:!0,method:"POST",headers:{Authorization:`Bearer ${d}`,[t]:g==null?void 0:g.id},body:o})).json();this.onmessage(Z(v({},T),{id:g.id}))})}let s=Mt(),i=Dd(`${e}/api`,{method:"POST",headers:{Authorization:`Bearer ${r.jwt}`,[t]:s},body:JSON.stringify({jsonrpc:"2.0",method:"authenticationCheck",params:{},id:s})}).then(o=>o.json()).then(o=>{if(o.error)throw new Error(o.error.message)});return{send:a,onmessage:n,$connect:i}}var Wd=class extends Fr{constructor(e,t){super(e,"https",e.$connect),this.host=t.host,this.jwt=t.jwt,this.$connect.then(()=>{this._ready()}).catch(n=>{this._setErrored(n)})}_send(e){z("send()",e),this._connection.send(JSON.stringify(e),this.jwt)}_ready(){this._setConnected(!0),this._connection.onmessage=e=>_e(this,null,function*(){z("http_message($0)>",e),this._handleMessage(e)})}close(){return _e(this,null,function*(){z("close()"),this._setConnected(!1)})}_reconnect(){return _e(this,null,function*(){z("reconnect()")})}};var Ud=class r{constructor(e){this.filter=[];this.modifierFn=e}add(e){return this.filter.push(e),this}addWhere(e,t,n,a){if(typeof t=="object"){let s={};for(let[i,o]of Object.entries(t))s[i]=this.modifierFn?this.modifierFn(i,o):o;return this.add({function:e,value:s})}if(typeof t=="function"){let s=new r(this.modifierFn);return t.call(s,s),this.add({function:e,inner:s.toJSON().filter})}if(a!==void 0)return this.add({function:e,field:t,operator:n,value:a});if(typeof n=="object")return this.add({function:e,value:{[t]:n}});if(n!==void 0){let s=this.modifierFn?this.modifierFn(t,n):n;return this.add({function:e,field:t,value:s})}throw TypeError("Invalid input")}where(e,t,n){return this.addWhere("where",e,t,n)}orWhere(e,t,n){return this.addWhere("orWhere",e,t,n)}whereIn(e,t){return this.add({function:"whereIn",field:e,value:t})}orWhereIn(e,t){return this.add({function:"orWhereIn",field:e,value:t})}whereNull(e){return this.add({function:"whereNull",field:e})}orWhereNull(e){return this.add({function:"orWhereNull",field:e})}whereNotNull(e){return this.add({function:"whereNotNull",field:e})}orWhereNotNull(e){return this.add({function:"orWhereNotNull",field:e})}whereMetadata(e,t,n){return n===void 0?this.add({function:"whereMetadata",field:e,operator:"=",value:t}):this.add({function:"whereMetadata",field:e,operator:t,value:n})}orWhereMetadata(e,t,n){return n===void 0?this.add({function:"orWhereMetadata",field:e,operator:"=",value:t}):this.add({function:"orWhereMetadata",field:e,operator:t,value:n})}whereMetadataIn(e,t){return this.add({function:"whereMetadataIn",field:e,value:t})}orWhereMetadataIn(e,t){return this.add({function:"orWhereMetadataIn",field:e,value:t})}whereMetadataNull(e){return this.add({function:"whereMetadataNull",field:e})}orWhereMetadataNull(e){return this.add({function:"orWhereMetadataNull",field:e})}whereMetadataNotNull(e){return this.add({function:"whereMetadataNotNull",field:e})}orWhereMetadataNotNull(e){return this.add({function:"orWhereMetadataNotNull",field:e})}toJSON(){return{filter:JSON.parse(JSON.stringify(this.filter))}}};function Nd(r){return r.map(e=>{if(typeof e=="string"){if(e.includes(" "))throw new TypeError("invalid order option: "+e);return{field:e,direction:"asc"}}return{field:e.column,direction:e.order,nulls:e.nulls}})}var Or=class extends Ud{constructor({start:t,modifiers:n,optionsModifiers:a}){super(n);this.optionsObject={};this.execFn=t,this.optionsModifiers=a}start(){return this.execFn(this.toJSON())}toJSON(){return Z(v({},super.toJSON()),{options:v({},this.optionsObject)})}options(t){if(this.optionsModifiers===void 0)return this.optionsObject=v(v({},this.optionsObject),t),this;this.optionsObject=v({},this.optionsObject);for(let[n,a]of Object.entries(t))this.optionsObject[n]=this.optionsModifiers(n,a);return this}then(t,n){return this.start().then(t,n)}catch(t){return this.start().catch(t)}stream(){return this.start().stream()}},Pe=class extends Or{constructor({start:e,modifiers:t,optionsModifiers:n}){super({start:a=>e(a),modifiers:t,optionsModifiers:n})}limit(e){return this.optionsObject.limit=e,this}offset(e){return this.optionsObject.offset=e,this}orderBy(e,t,n){if(!Array.isArray(e)&&typeof e!="string")throw new TypeError("invalid input");if(Array.isArray(e))return this.optionsObject.order=Nd(e),this;if(!e.includes(" "))return this.optionsObject.order=Nd([{column:e,order:t||"asc",nulls:n}]),this;let[a,s,i,o]=e.split(" ");if(s!=="asc"&&s!=="desc")throw new TypeError("invalid order");let d={column:a,order:s};if(i==="nulls"){if(!["first","last"].includes(o))throw new TypeError("invalid nulls order");d.nulls=o}return this.optionsObject.order=Nd([e]),this}select(...e){return this.optionsObject.select=e,this}deselect(...e){return this.optionsObject.deselect=e,this}};function xr(r,e){if(!e)return{function:r,alias:r};if(!e.includes(" "))return{function:r,field:e,alias:r};if(!e.includes(" as "))throw new pe("UNCLEAR_AGGREGATOR",{input:e});let[t,n]=e.split(" as ");return{function:r,field:t,alias:n||t}}var Io=class extends Or{constructor({start:t,modifiers:n,optionsModifiers:a}){super({start:s=>t(s),modifiers:n,optionsModifiers:a});this.aggregatorObject={aggregators:[]};this.timezoneString=""}toJSON(){return Z(v({},super.toJSON()),{aggregators:JSON.parse(JSON.stringify(this.aggregatorObject.aggregators)),groups:JSON.parse(JSON.stringify(this.aggregatorObject.groups||[]))})}timezone(t){return this.timezoneString=t,this.aggregatorObject.groups&&Array.isArray(this.aggregatorObject.groups)&&this.aggregatorObject.groups.forEach(n=>{n.type==="period"&&(n.field={period:n.field,timezone:t})}),this}groupBy(t,...n){let a={};if(typeof t!="string")throw new TypeError("expected string as input, got"+typeof t);let[s,i]=t.split(" as ");if(Pi.hasOwnProperty(s))a.type="period",a.alias=i||s,this.timezoneString?a.field={period:s,timezone:this.timezoneString}:a.field=s;else if(s.startsWith("metadata.")){let[,o]=s.split(".");a.type="metadata_field",a.field=o,a.alias=i||o}else a.type="field",a.field=s,a.alias=i||s;return this.aggregatorObject.groups?this.aggregatorObject.groups.push(a):this.aggregatorObject.groups=[a],n.length&&n.forEach(o=>this.groupBy(o)),this}count(t){return this.aggregatorObject.aggregators.push(xr("count",t)),this}distinct(t){return this.aggregatorObject.aggregators.push(xr("countDistinct",t)),this}avg(t){return this.aggregatorObject.aggregators.push(xr("average",t)),this}min(t){return this.aggregatorObject.aggregators.push(xr("min",t)),this}max(t){return this.aggregatorObject.aggregators.push(xr("max",t)),this}sum(t){return this.aggregatorObject.aggregators.push(xr("sum",t)),this}},$r=class extends Or{constructor({start:t,modifiers:n,optionsModifiers:a}){super({start:t,modifiers:n,optionsModifiers:a});this.updateObject={}}toJSON(){return Z(v({},super.toJSON()),{update:JSON.parse(JSON.stringify(this.updateObject))})}update(t){return this.updateObject=Object.assign(this.updateObject,t),this}},jo=class extends Or{constructor({start:t,modifiers:n,optionsModifiers:a}){super({start:t,modifiers:n,optionsModifiers:a});this.reverseModifications={}}toJSON(){return Z(v({},super.toJSON()),{reverse:JSON.parse(JSON.stringify(this.reverseModifications))})}reverse(t){return this.reverseModifications=Object.assign(this.reverseModifications,t),this}};var E$=y("AggregateTransfersFnInput");function qd(r,e,t){let{client:n}=r;if(e===void 0)return new Io({start(b){return n.api.aggregateTransferMany({transfer:b.filter,options:b.options,groups:b.groups,aggregators:b.aggregators})},modifiers(b,O){return["token","wallet","from_wallet","to_wallet"].includes(b)?S(O):b==="transfer_group"?J(O):O}});let{inputCopy:a,error:s}=C({input:e,options:t,validate:E$});if(s)throw s;let{token:i,wallet:o,from_wallet:d,to_wallet:g,transfer_group:h,status:T,metadata:$}=a,w={token:S(i),wallet:S(o),from_wallet:S(d),to_wallet:S(g),transfer_group:J(h),status:T,metadata:$};return n.api.aggregateTransferMany({transfer:w,groups:a.groups,aggregators:a.aggregators})}var M$=new Map(Object.entries({aggregateTransfers:"aggregateTransferMany",findBalances:"findBalanceMany",findTokens:"findTokenMany",findTransferGroups:"findTransferGroupMany",findTransfers:"findTransferMany",findWallets:"findWalletMany"})),D$=y("CreateAccessTokenFnInput");function Bd(r,e,t){var i;let{client:n}=r,{inputCopy:a,error:s}=C({input:e,options:t,validate:D$});if(s)throw s;return a.token&&"scopes"in a.token&&(a.token.scopes=Array.from(new Set((i=a.token)==null?void 0:i.scopes.map(o=>{var d;return(d=M$.get(o))!=null?d:o})))),n.api.createAccessToken({token:a.token,options:t})}var W$=y("CreateContractFnInput");function Ld(r,e,t){let{client:n}=r,{inputCopy:a,error:s}=C({input:e,options:t,validate:W$});if(s)throw s;let i={token:{foreign:a.foreign+"",metadata:a.metadata,owner:S(a.owner),deposits:[{token:S(a.value_token),amount:a.value_amount}]}};return a.buyer&&(a.buyer.latest_control_hash&&console.warn("deprecated: latest_control_hash is deprecated and will be ignored"),i.exchange={from_wallet:S(a.buyer.wallet),amount:a.buyer.amount||a.value_amount,from_token:S(a.buyer.token||a.value_token),metadata:a.buyer.metadata}),n.api.createContract(i)}var A$=y("CreateDepositFnInput");function Vd(r,e,t){let{client:n}=r,a=st(e,"token",n.getConfig("token")),{inputCopy:s,error:i}=C({input:a,options:t,validate:A$});if(i)throw i;let o=s.token||n.getConfig("token");if(o===void 0)throw new pe("INPUT_NEEDS_TOKEN",{input:e});let d=s.options;delete s.options;let g=Z(v({},s),{identifier:s.identifier,transfer_group:J(s.transfer_group),token:S(o),to_wallet:S(s.wallet),type:"deposit"});return g.identifier||(g.identifier=je(g)),n.api.createTransfer({transfer:g,options:Vi(d,{return_balance:"return_to_balance",create_wallet_if_not_exists:"create_to_wallet_if_not_exists"})})}var Hd=(t=>(t.whereMetadata="whereMetadata",t.orWhereMetadata="orWhereMetadata",t))(Hd||{}),zd=(t=>(t.where="where",t.orWhere="orWhere",t))(zd||{}),Jd=(t=>(t.whereIn="whereIn",t.orWhereIn="orWhereIn",t))(Jd||{}),Qd=(t=>(t.whereMetadataIn="whereMetadataIn",t.orWhereMetadataIn="orWhereMetadataIn",t))(Qd||{}),Kd=(a=>(a.whereMetadataNull="whereMetadataNull",a.orWhereMetadataNull="orWhereMetadataNull",a.whereMetadataNotNull="whereMetadataNotNull",a.orWhereMetadataNotNull="orWhereMetadataNotNull",a))(Kd||{}),Yd=(a=>(a.whereNull="whereNull",a.orWhereNull="orWhereNull",a.whereNotNull="whereNotNull",a.orWhereNotNull="orWhereNotNull",a))(Yd||{}),Xd=(r=>(r["="]="=",r[">="]=">=",r["<="]="<=",r["<"]="<",r[">"]=">",r))(Xd||{}),Zd=(t=>(t.like="like",t.ilike="ilike",t))(Zd||{}),ef=(t=>(t["="]="=",t[">="]=">=",t["<="]="<=",t["<"]="<",t[">"]=">",t.like="like",t.ilike="ilike",t))(ef||{}),tf=(a=>(a.value="value",a.share="share",a.group="group",a.contract="contract",a))(tf||{}),rf=(t=>(t.active="active",t["dw-only"]="dw-only",t.disabled="disabled",t))(rf||{}),nf=(t=>(t.open="open",t.closed="closed",t))(nf||{}),af=(n=>(n.pending="pending",n.finished="finished",n.cancelled="cancelled",n))(af||{}),sf=(t=>(t.pending="pending",t.finished="finished",t))(sf||{}),of=(n=>(n.regular="regular",n.exchange="exchange",n.distribution="distribution",n))(of||{}),pf=(n=>(n.transfer="transfer",n.deposit="deposit",n.withdrawal="withdrawal",n))(pf||{}),df=(n=>(n.token="token",n.house="house",n.regular="regular",n))(df||{}),ff=(t=>(t.active="active",t.disabled="disabled",t))(ff||{}),uf=(t=>(t.flag="flag",t.setting="setting",t))(uf||{}),lf=(o=>(o.Token="Token",o.TransferGroup="TransferGroup",o.TransferLog="TransferLog",o.Transfer="Transfer",o.WalletTokenSetting="WalletTokenSetting",o.Wallet="Wallet",o.WapiSetting="WapiSetting",o))(lf||{});var N$=y("CreateExchangeFnInput");function cf(r,e,t){var o,d,g,h,T;let{client:n}=r,{inputCopy:a,error:s}=C({input:e,options:t,validate:N$});if(s)throw s;let i=a.options;return delete a.options,(o=a.identifier)!=null||(a.identifier=je(a)),n.api.createTransferGroup({transfer_group:{identifier:a.identifier,status:"closed",transfer_status:(d=a.status)!=null?d:"pending",metadata:a.metadata,children:[{identifier:(g=a.from_identifier)!=null?g:je(),from_wallet:S(a.from_wallet),to_wallet:S(a.to_wallet),token:S(a.from_token),type:a.from_wallet?"transfer":"deposit",amount:a.from_amount,metadata:a.metadata,force:a.force},{identifier:(h=a.to_identifier)!=null?h:je(),from_wallet:S(a.to_wallet),to_wallet:S(a.from_wallet),token:S(a.to_token),type:a.to_wallet?"transfer":"deposit",amount:(T=a.to_amount)!=null?T:a.from_amount,metadata:a.metadata,force:a.force}]},options:i})}var U$=y("CreateTokenFnInput");function mf(r,e,t){let{client:n}=r,{inputCopy:a,error:s}=C({input:e,options:t,validate:U$});if(s)throw s;let i=a.options;return delete a.options,n.api.createToken({token:Z(v({},a),{belongs_to:S(a.belongs_to)}),options:i})}var q$=y("CreateTransferFnInput");function hf(r,e,t){let{client:n}=r,a=st(e,"token",n.getConfig("token")),{inputCopy:s,error:i}=C({input:a,options:t,validate:q$});if(i)throw i;let o=Ei(s,n.getConfig("token"));return o.identifier||(o.identifier=je(o)),n.api.createTransfer({transfer:o,options:s.options})}function Ei(r,e){r.type=r.type||"transfer";let t={identifier:r.identifier,token:S(r.token||e),amount:r.amount,metadata:r.metadata,status:r.status,type:r.type,transfer_group:J(r.transfer_group),created_at:r.created_at};if(r.type==="transfer")return r.latest_control_hash&&console.warn("deprecated: latest_control_hash is deprecated"),Z(v({},t),{from_wallet:S(r.from_wallet),to_wallet:S(r.to_wallet)});if(r.type==="withdrawal")return r.latest_control_hash&&console.warn("deprecated: latest_control_hash is deprecated"),Z(v({},t),{from_wallet:S(r.wallet)});if(r.type==="deposit")return Z(v({},t),{to_wallet:S(r.wallet)})}var B$=y("CreateTransferGroupFnInput");function _f(r,e,t){let{client:n}=r,{inputCopy:a,error:s}=C({input:e,options:t,validate:B$});if(s)throw s;let i=JSON.parse(JSON.stringify(a));return delete i.options,i.children&&(i.children=i.children.map(o=>Ei(o,n.getConfig("token")))),i.identifier||(i.identifier=je(i)),n.api.createTransferGroup({transfer_group:i,options:a.options})}var L$=y("CreateTransfersFnInput");function gf(r,e,t){let{client:n}=r,{inputCopy:a,error:s}=C({input:e,options:t,validate:L$});if(s)throw s;let i=a.transfers.map(o=>Ei(o,n.getConfig("token")));for(let o of i)o.identifier||(o.identifier=je(o));return n.api.createTransferMany({transfers:i,options:a.options})}var V$=y("CreateWalletFnInput");function Tf(r,e,t){let{client:n}=r,{inputCopy:a,error:s}=C({input:e,options:t,validate:V$});if(s)throw s;let i=a.options;return delete a.options,n.api.createWallet({wallet:v({},a),options:i})}var H$=y("CreateWithdrawalFnInput");function yf(r,e,t){let{client:n}=r,a=st(e,"token",n.getConfig("token")),{inputCopy:s,error:i}=C({input:a,options:t,validate:H$});if(i)throw i;let o=s.options;delete s.options,s.latest_control_hash&&(console.warn("deprecated: latest_control_hash is deprecated"),delete s.latest_control_hash);let d=s.token||n.getConfig("token");if(d===void 0)throw new pe("INPUT_NEEDS_TOKEN",{input:e});let g=Z(v({},s),{identifier:s.identifier,transfer_group:J(s.transfer_group),token:S(d),from_wallet:S(s.wallet),type:"withdrawal"});return g.identifier||(g.identifier=je(g)),n.api.createTransfer({transfer:g,options:Vi(o,{return_balance:"return_from_balance"})})}var z$=y("FindBalancesFnInput");function bf(r,e,t){var g,h;let{client:n}=r;if(e===void 0)return new Pe({start(T){return n.api.findBalanceMany({balance:T.filter,options:T.options})},modifiers(T,$){return["wallet","token"].includes(T)?S($):$}});let{inputCopy:a,error:s}=C({input:e,options:t,validate:z$});if(s)throw s;let i={};a.wallet&&(i.wallet=S(a.wallet)),a.token&&(i.token=S(a.token));let o=(g=a.options)==null?void 0:g.order_by;(h=a.options)==null||delete h.order_by;let d=v({},a.options);return!d.order&&o&&(d.order=it(o)),n.api.findBalanceMany({balance:i,options:d})}var J$=y("FindTokensFnInput");function Ff(r,e,t){var g,h;let{client:n}=r;if(e===void 0)return new Pe({start(T){return n.api.findTokenMany({token:T.filter,options:T.options})},modifiers(T,$){return["belongs_to"].includes(T)?S($):$}});let{inputCopy:a,error:s}=C({input:e,options:t,validate:J$});if(s)throw s;let i={foreign:a.foreign?a.foreign+"":void 0,type:a.type,metadata:a.metadata};a.belongs_to&&(i.belongs_to=S(a.belongs_to));let o=(g=a.options)==null?void 0:g.order_by;(h=a.options)==null||delete h.order_by;let d=v({},a.options);return!d.order&&o&&(d.order=it(o)),n.api.findTokenMany({token:i,options:d})}var Q$=y("FindTransferGroupsFnInput");function xf(r,e,t){var b,O;let{client:n}=r;if(e===void 0)return new Pe({start(I){return n.api.findTransferGroupMany({transfer_group:I.filter,options:I.options})},modifiers(I,j){return["transfer_group","reverses"].includes(I)?J(j):j}});let{inputCopy:a,error:s}=C({input:e,options:t,validate:Q$});if(s)throw s;let{identifier:i,transfer_status:o,status:d,metadata:g,type:h}=a,T={identifier:i,transfer_status:o,status:d,metadata:g,type:h};a.reverses&&(T.reverses=J(a.reverses));let $=(b=a.options)==null?void 0:b.order_by;(O=a.options)==null||delete O.order_by;let w=v({},a.options);return!w.order&&$&&(w.order=it($)),n.api.findTransferGroupMany({transfer_group:T,options:w})}var K$=y("FindTransfersFnInput");function Of(r,e,t){var O;let{client:n}=r;if(e===void 0)return new Pe({start(I){return n.api.findTransferMany({transfer:I.filter,options:I.options})},modifiers(I,j){return["token","wallet","from_wallet","to_wallet"].includes(I)?S(j):I==="transfer_group"?J(j):j}});let{inputCopy:a,error:s}=C({input:e,options:t,validate:K$});if(s)throw s;let{token:i,wallet:o,from_wallet:d,to_wallet:g}=a,h={token:S(i),wallet:S(o),from_wallet:S(d),to_wallet:S(g)};a.transfer_group&&(h.transfer_group=J(a.transfer_group)),a.status&&(h.status=a.status),a.metadata&&(h.metadata=a.metadata),(O=a.options)!=null||(a.options={});let T=a.options.order_by;if(delete a.options.order_by,a.options.return_running_balance){if(a.options.return_running_balance_for_wallet)throw new pe("CONFLICTING_OPTIONS_FOR_BALANCE",{options:a.options});if(!h.wallet)throw new pe("RUNNING_BALANCE_WITHOUT_WALLET",{input:a});a.options.return_running_balance_for_wallet=a.wallet}let $=a.options.return_running_balance_for_wallet;if(delete a.options.return_running_balance_for_wallet,a.options.return_signed_amount){if(a.options.return_signed_amount_for_wallet)throw new pe("CONFLICTING_OPTIONS_FOR_SIGNED_AMOUNT",{options:a.options});if(!h.wallet)throw new pe("SIGNED_AMOUNT_WITHOUT_WALLET",{input:a});a.options.return_signed_amount_for_wallet=a.wallet}let w=a.options.return_signed_amount_for_wallet;delete a.options.return_signed_amount_for_wallet;let b=v({},a.options);return!b.order&&T&&(b.order=it(T)),$&&(b.return_running_balance_for_wallet=S($)),w&&(b.return_signed_amount_for_wallet=S(w)),n.api.findTransferMany({transfer:h,options:b})}var Y$=y("FindWalletsFnInput");function $f(r,e,t){var h;let{client:n}=r;if(e===void 0)return new Pe({start(T){return n.api.findWalletMany({wallet:T.filter,options:T.options})},optionsModifiers(T,$){return T==="include_balance_for_token"&&typeof $!="object"?S($):$}});let{inputCopy:a,error:s}=C({input:e,options:t,validate:Y$});if(s)throw s;let i=(h=a.options)!=null?h:{};delete a.options;let o=v({},a),d=i.order_by;delete i.order_by;let g=v({},i);return!g.order&&d&&(g.order=it(d)),n.api.findWalletMany({wallet:o,options:g})}var X$=y("GetBalanceFnInput");function wf(r,e,t){let{client:n}=r,a=st(e,"token",n.getConfig("token")),{inputCopy:s,error:i}=C({input:a,options:t,validate:X$});if(i)throw i;if(s.datetime&&wu(s.datetime))throw new pe("BAL_FUTURE_DATETIME",{input:s});let o=s.token||n.getConfig("token");if(o===void 0)throw new pe("INPUT_NEEDS_TOKEN",{input:s});return n.api.getBalance({balance:{wallet:S(s.wallet),token:S(o),datetime:s.datetime},options:s.options})}var Z$=y("GetBalanceHistoryFnInput");function If(r,e,t){let{client:n}=r,{inputCopy:a,error:s}=C({input:e,options:t,validate:Z$});if(s)throw s;let i=a.token||n.getConfig("token");if(i===void 0)throw new pe("INPUT_NEEDS_TOKEN",{input:e});return n.api.getBalanceHistory({balance:{wallet:S(a.wallet),token:S(i)},options:a.options})}var ew=y("GetFlagsFnInput");function jf(r,e,t){let{client:n}=r,{error:a,inputCopy:s}=C({input:e||{},options:t,validate:ew});if(a)throw a;return n.api.getFlags({options:s.options})}var tw=y("GetStatisticsFnInput");function vf(r,e,t){let{client:n}=r,{inputCopy:a,error:s}=C({input:e||{},options:t,validate:tw});if(s)throw s;return n.api.getStatistics({model:a.model||"Transfer",aggregator:a.aggregator||"count",groups:a.groups,filter:a.filter,options:a.options})}var rw=y("GetTokenFnInput");function Sf(r,e={},t){let{client:n}=r,a=st(e,"foreign",n.getConfig("token")),{inputCopy:s,error:i}=C({input:a,options:t,validate:rw});if(i)throw i;let o=s.foreign||n.getConfig("token");if(o===void 0)throw new pe("INPUT_NEEDS_TOKEN",{input:e});return n.api.getToken({token:S(o),options:s.options})}var nw=y("GetTransferFnInput");function kf(r,e,t){let{client:n}=r,{inputCopy:a,error:s}=C({input:e,options:t,validate:nw});if(s)throw s;return n.api.getTransfer({transfer:J(a.transfer),options:a.options})}var aw=y("GetTransferGroupFnInput");function Cf(r,e,t){let{client:n}=r,{inputCopy:a,error:s}=C({input:e,options:t,validate:aw});if(s)throw s;return n.api.getTransferGroup({transfer_group:J(a.transfer_group),options:a.options})}var sw=y("GetWalletFnInput");function Rf(r,e,t){let{client:n}=r,{inputCopy:a,error:s}=C({input:e,options:t,validate:sw});if(s)throw s;return n.api.getWallet({wallet:S(a.wallet),options:a.options})}var iw=y("ImportDataFnInput");function nm(r){let{error:e}=iw(r);return e===void 0}var $W=y("ImportDataFnOutput");var wW=y("ImportDataFnStreamChunk");var ow=y("ImportDataFnOptions");function am(r){let{error:e}=ow(r);return e===void 0}function Gf(){throw new Error("import-data available only in node client")}var pw=y("ReverseTransferFnInput");function Pf(r,e,t){let{client:n}=r,{inputCopy:a,error:s}=C({input:e,options:t,validate:pw});if(s)throw s;return a.extend_metadata&&console.warn("deprecated: extend_metadata is deprecated. Use metadata_action instead"),n.api.reverseTransfer({transfer:J(a.transfer),reverse:{force:a.force,metadata:a.metadata,extend_metadata:a.extend_metadata,identifier:a.identifier,status:a.status},options:a.options})}var dw=y("ReverseTransferGroupFnInput");function Ef(r,e,t){let{client:n}=r,{inputCopy:a,error:s}=C({input:e,options:t,validate:dw});if(s)throw s;return a.extend_metadata&&console.warn("deprecated: extend_metadata is deprecated. Use metadata_action instead"),n.api.reverseTransferGroup({transfer_group:J(a.transfer_group),reverse:{status:a.status,force:a.force,transfer_status:a.transfer_status,identifier:a.identifier,metadata:a.metadata,transfer_metadata:a.transfer_metadata,extend_metadata:a.extend_metadata,transfer_extend_metadata:a.transfer_extend_metadata},options:a.options})}var fw=y("ReverseTransfersFnInput");function Mf(r,e,t){let{client:n}=r;if(e===void 0)return new jo({start(T){return n.api.reverseTransferMany({transfer:T.filter,reverse:T.reverse,options:T.options})},modifiers(T,$){return["token","wallet","from_wallet","to_wallet"].includes(T)?S($):T==="transfer_group"?J($):$}});let{inputCopy:a,error:s}=C({input:e,options:t,validate:fw});if(s)throw s;let{token:i,wallet:o,from_wallet:d,to_wallet:g}=a,h={token:S(i),wallet:S(o),from_wallet:S(d),to_wallet:S(g)};return a.transfer_group&&(h.transfer_group=J(a.transfer_group)),a.status&&(h.status=a.status),a.metadata&&(h.metadata=a.metadata),n.api.reverseTransferMany({transfer:h,reverse:a.reverse,options:a.options})}var uw=y("SetFlagsFnInput");function Df(r,e,t){let{client:n}=r,{inputCopy:a,error:s}=C({input:e,options:t,validate:uw});if(s)throw s;let i=Object.keys(zt.definitions.Flags.properties),o={};if(i.forEach(d=>{d in a&&(o[d]=a[d])}),Object.keys(o).length<1)throw new pe("REQUIRED_INPUT_MISSING",{requiredOneOf:i,input:e});return n.api.setFlags({flags:o,options:a.options})}var lw=y("UpdateTokenFnInput");function Wf(r,e,t){let{client:n}=r,{inputCopy:a,error:s}=C({input:e,options:t,validate:lw});if(s)throw s;return n.api.updateToken({token:S(a.token),update:{public:a.public,metadata:a.metadata,status:a.status},options:a.options})}var cw=y("UpdateTransferFnInput");function Af(r,e,t){let{client:n}=r,{inputCopy:a,error:s}=C({input:e,options:t,validate:cw});if(s)throw s;return n.api.updateTransfer({transfer:J(a.transfer),update:{status:a.status,metadata:a.metadata},options:a.options})}var mw=y("UpdateTransferGroupFnInput");function Nf(r,e,t){let{client:n}=r,{inputCopy:a,error:s}=C({input:e,options:t,validate:mw});if(s)throw s;return n.api.updateTransferGroup({transfer_group:J(a.transfer_group),update:{transfer_status:a.transfer_status,status:a.status,metadata:a.metadata},options:a.options})}var hw=y("UpdateTransferGroupsFnInput");function Uf(r,e,t){let{client:n}=r;if(e===void 0)return new $r({start($){return n.api.updateTransferGroupMany({transfer_group:$.filter,update:$.update,options:$.options})},modifiers($,w){return["transfer_group","reverses"].includes($)?J(w):w}});let{inputCopy:a,error:s}=C({input:e,options:t,validate:hw});if(s)throw s;let{transfer_status:i,status:o,metadata:d,type:g,update:h}=a,T={transfer_status:i,status:o,metadata:d,type:g};return a.reverses&&(T.reverses=J(a.reverses)),n.api.updateTransferGroupMany({transfer_group:T,update:h,options:a.options})}var _w=y("UpdateTransfersFnInput");function qf(r,e,t){let{client:n}=r;if(e===void 0)return new $r({start(T){return n.api.updateTransferMany({transfer:T.filter,update:T.update,options:T.options})},modifiers(T,$){return["token","wallet","from_wallet","to_wallet"].includes(T)?S($):T==="transfer_group"?J($):$}});let{inputCopy:a,error:s}=C({input:e,options:t,validate:_w});if(s)throw s;let{token:i,wallet:o,from_wallet:d,to_wallet:g}=a,h={token:S(i),wallet:S(o),from_wallet:S(d),to_wallet:S(g)};return a.transfer_group&&(h.transfer_group=J(a.transfer_group)),a.status&&(h.status=a.status),a.metadata&&(h.metadata=a.metadata),n.api.updateTransferMany({transfer:h,update:a.update,options:a.options})}var gw=y("UpdateWalletFnInput");function Bf(r,e,t){let{client:n}=r,{inputCopy:a,error:s}=C({input:e,options:t,validate:gw});if(s)throw s;return n.api.updateWallet({wallet:S(a.wallet),update:{metadata:a.metadata,status:a.status,name:a.name},options:a.options})}var Tw={aggregateTransfers:y("AggregateTransfersFnInput"),createAccessToken:y("CreateAccessTokenFnInput"),createContract:y("CreateContractFnInput"),createDeposit:y("CreateDepositFnInput"),createExchange:y("CreateExchangeFnInput"),createToken:y("CreateTokenFnInput"),createTransfer:y("CreateTransferFnInput"),createTransferGroup:y("CreateTransferGroupFnInput"),createTransfers:y("CreateTransfersFnInput"),createWallet:y("CreateWalletFnInput"),createWithdrawal:y("CreateWithdrawalFnInput"),findBalances:y("FindBalancesFnInput"),findTokens:y("FindTokensFnInput"),findTransferGroups:y("FindTransferGroupsFnInput"),findTransfers:y("FindTransfersFnInput"),findWallets:y("FindWalletsFnInput"),getBalance:y("GetBalanceFnInput"),getBalanceHistory:y("GetBalanceHistoryFnInput"),getFlags:y("GetFlagsFnInput"),getStatistics:y("GetStatisticsFnInput"),getToken:y("GetTokenFnInput"),getTransfer:y("GetTransferFnInput"),getTransferGroup:y("GetTransferGroupFnInput"),getWallet:y("GetWalletFnInput"),importData:y("ImportDataFnInput"),reverseTransfer:y("ReverseTransferFnInput"),reverseTransferGroup:y("ReverseTransferGroupFnInput"),reverseTransfers:y("ReverseTransfersFnInput"),setFlags:y("SetFlagsFnInput"),updateToken:y("UpdateTokenFnInput"),updateTransfer:y("UpdateTransferFnInput"),updateTransferGroup:y("UpdateTransferGroupFnInput"),updateTransferGroups:y("UpdateTransferGroupsFnInput"),updateTransfers:y("UpdateTransfersFnInput"),updateWallet:y("UpdateWalletFnInput")},E={aggregateTransfers:qd,createAccessToken:Bd,createContract:Ld,createDeposit:Vd,createExchange:cf,createToken:mf,createTransfer:hf,createTransferGroup:_f,createTransfers:gf,createWallet:Tf,createWithdrawal:yf,findBalances:bf,findTokens:Ff,findTransferGroups:xf,findTransfers:Of,findWallets:$f,getBalance:wf,getBalanceHistory:If,getFlags:jf,getStatistics:vf,getToken:Sf,getTransfer:kf,getTransferGroup:Cf,getWallet:Rf,importData:Gf,reverseTransfer:Pf,reverseTransferGroup:Ef,reverseTransfers:Mf,setFlags:Df,updateToken:Wf,updateTransfer:Af,updateTransferGroup:Nf,updateTransferGroups:Uf,updateTransfers:qf,updateWallet:Bf},sm=(B=>(B.aggregateTransfers="aggregateTransfers",B.createAccessToken="createAccessToken",B.createContract="createContract",B.createDeposit="createDeposit",B.createExchange="createExchange",B.createToken="createToken",B.createTransfer="createTransfer",B.createTransferGroup="createTransferGroup",B.createTransfers="createTransfers",B.createWallet="createWallet",B.createWithdrawal="createWithdrawal",B.findBalances="findBalances",B.findTokens="findTokens",B.findTransferGroups="findTransferGroups",B.findTransfers="findTransfers",B.findWallets="findWallets",B.getBalance="getBalance",B.getBalanceHistory="getBalanceHistory",B.getFlags="getFlags",B.getStatistics="getStatistics",B.getToken="getToken",B.getTransfer="getTransfer",B.getTransferGroup="getTransferGroup",B.getWallet="getWallet",B.importData="importData",B.reverseTransfer="reverseTransfer",B.reverseTransferGroup="reverseTransferGroup",B.reverseTransfers="reverseTransfers",B.setFlags="setFlags",B.updateToken="updateToken",B.updateTransfer="updateTransfer",B.updateTransferGroup="updateTransferGroup",B.updateTransferGroups="updateTransferGroups",B.updateTransfers="updateTransfers",B.updateWallet="updateWallet",B))(sm||{}),im=(t=>(t.findTransfers="findTransfers",t.findWallets="findWallets",t))(im||{});var om,yw=(om=window.WAPI_VERSION)!=null?om:"",wr=class{constructor(e,t){this.config={};if(this.api=e,this.$connect=e.$connect,t&&(t.token&&(this.config=Z(v({},this.config),{token:t.token})),t.hooks))for(let[n,a]of Object.entries(t.hooks))this.setHook(n,a)}close(){return _e(this,null,function*(){return this.api.close()})}version(){return yw}setHook(e,t){if(typeof t!="function")throw new TypeError("Hooks can only be functions");return this.api.hooks[e]=t,this}configure(e){return this.config=v(v({},this.config),e),this}getConfig(e){return this.config[e]}aggregateTransfers(e,t){return e===void 0?E.aggregateTransfers({client:this}):E.aggregateTransfers({client:this},e,t)}createAccessToken(e,t){return E.createAccessToken({client:this},e,t)}createContract(e,t){return E.createContract({client:this},e,t)}createDeposit(e,t){return E.createDeposit({client:this},e,t)}createExchange(e,t){return E.createExchange({client:this},e,t)}createToken(e,t){return E.createToken({client:this},e,t)}createTransfer(e,t){return E.createTransfer({client:this},e,t)}createTransferGroup(e,t){return E.createTransferGroup({client:this},e,t)}createTransfers(e,t){return E.createTransfers({client:this},e,t)}createWallet(e,t){return E.createWallet({client:this},e,t)}createWithdrawal(e,t){return E.createWithdrawal({client:this},e,t)}findBalances(e,t){return e===void 0?E.findBalances({client:this}):E.findBalances({client:this},e,t)}findTokens(e,t){return e===void 0?E.findTokens({client:this}):E.findTokens({client:this},e,t)}findTransferGroups(e,t){return e===void 0?E.findTransferGroups({client:this}):E.findTransferGroups({client:this},e,t)}findTransfers(e,t){return e===void 0?E.findTransfers({client:this}):E.findTransfers({client:this},e,t)}findWallets(e,t){return e===void 0?E.findWallets({client:this}):E.findWallets({client:this},e,t)}getBalance(e,t){return E.getBalance({client:this},e,t)}getBalanceHistory(e,t){return E.getBalanceHistory({client:this},e,t)}getFlags(e,t){return E.getFlags({client:this},e,t)}getStatistics(e,t){return E.getStatistics({client:this},e,t)}getToken(e,t){return E.getToken({client:this},e,t)}getTransfer(e,t){return E.getTransfer({client:this},e,t)}getTransferGroup(e,t){return E.getTransferGroup({client:this},e,t)}getWallet(e,t){return E.getWallet({client:this},e,t)}importData(e,t){if(e===void 0&&t===void 0)return E.importData({client:this});if(t===void 0&&am(e))return E.importData({client:this},e);if(nm(e))return E.importData({client:this},e,t);throw new We({input:e,options:t})}reverseTransfer(e,t){return E.reverseTransfer({client:this},e,t)}reverseTransferGroup(e,t){return E.reverseTransferGroup({client:this},e,t)}reverseTransfers(e,t){return e===void 0?E.reverseTransfers({client:this}):E.reverseTransfers({client:this},e,t)}setFlags(e,t){return E.setFlags({client:this},e,t)}updateToken(e,t){return E.updateToken({client:this},e,t)}updateTransfer(e,t){return E.updateTransfer({client:this},e,t)}updateTransferGroup(e,t){return E.updateTransferGroup({client:this},e,t)}updateTransferGroups(e,t){return e===void 0?E.updateTransferGroups({client:this}):E.updateTransferGroups({client:this},e,t)}updateTransfers(e,t){return e===void 0?E.updateTransfers({client:this}):E.updateTransfers({client:this},e,t)}updateWallet(e,t){return E.updateWallet({client:this},e,t)}};function pm(r,e){let t=Ed(r);return new wr(t,e)}function dm(r,e){let t=Ad(r);return new wr(t,e)}var bw=Gi.getValidator("ClientOptions"),fm=(t=>(t.ws="ws",t.https="https",t))(fm||{});function Fw(r){let e=r.config,{inputCopy:t,error:n}=bw(r);if(n)throw n;if(t.client==="ws")return pm(t.connection,e);if(t.client==="https")return dm(t.connection,e);throw new TypeError("Invalid client type")}var xw={getIdentifier:xu};return Km(Ow);})();
9
9
  /*! Bundled license information:
10
10
 
11
11
  uri-js/dist/es5/uri.all.js: