wapi-client 0.10.11 → 0.10.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api/base-client.browser.cjs +1 -0
- package/dist/api/base-client.browser.js +1 -0
- package/dist/api/base-client.cjs +1 -0
- package/dist/api/base-client.js +1 -0
- package/dist/api/http-client.browser.cjs +13 -5
- package/dist/api/http-client.browser.js +13 -5
- package/dist/api/http-client.cjs +13 -5
- package/dist/api/http-client.js +13 -5
- package/dist/api/index.d.ts +2 -0
- package/dist/api/ws-client.browser.cjs +19 -7
- package/dist/api/ws-client.browser.js +21 -7
- package/dist/api/ws-client.cjs +20 -8
- package/dist/api/ws-client.d.ts +1 -0
- package/dist/api/ws-client.js +22 -8
- package/dist/client.browser.cjs +9 -11
- package/dist/client.browser.js +9 -11
- package/dist/client.cjs +10 -12
- package/dist/client.d.ts +2 -1
- package/dist/client.js +10 -12
- package/dist/lib/errors.browser.cjs +4 -2
- package/dist/lib/errors.browser.js +4 -2
- package/dist/lib/errors.cjs +4 -2
- package/dist/lib/errors.js +4 -2
- package/dist/lib/isomorphic/node/streams.cjs +1 -1
- package/dist/lib/isomorphic/node/streams.js +1 -1
- package/dist/lib/utils.browser.cjs +2 -1
- package/dist/lib/utils.browser.js +2 -1
- package/dist/lib/utils.cjs +2 -1
- package/dist/lib/utils.js +2 -1
- package/dist/lib/validator.browser.cjs +15 -20
- package/dist/lib/validator.browser.js +15 -20
- package/dist/types/index.d.ts +5 -1
- package/dist/wapi-client-web.iife.js +4 -4
- package/dist/wapi-client.iife.js +4 -4
- package/package.json +1 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
var WAPI=(()=>{var Wc=Object.create;var Mt=Object.defineProperty,Dc=Object.defineProperties,Ac=Object.getOwnPropertyDescriptor,Nc=Object.getOwnPropertyDescriptors,Uc=Object.getOwnPropertyNames,yf=Object.getOwnPropertySymbols,qc=Object.getPrototypeOf,xf=Object.prototype.hasOwnProperty,Bc=Object.prototype.propertyIsEnumerable;var Ff=(t,e,r)=>e in t?Mt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,b=(t,e)=>{for(var r in e||(e={}))xf.call(e,r)&&Ff(t,r,e[r]);if(yf)for(var r of yf(e))Bc.call(e,r)&&Ff(t,r,e[r]);return t},q=(t,e)=>Dc(t,Nc(e));var I=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Lc=(t,e)=>{for(var r in e)Mt(t,r,{get:e[r],enumerable:!0})},bf=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of Uc(e))!xf.call(t,a)&&a!==r&&Mt(t,a,{get:()=>e[a],enumerable:!(n=Ac(e,a))||n.enumerable});return t};var Hc=(t,e,r)=>(r=t!=null?Wc(qc(t)):{},bf(e||!t||!t.__esModule?Mt(r,"default",{value:t,enumerable:!0}):r,t)),Vc=t=>bf(Mt({},"__esModule",{value:!0}),t);var ee=(t,e,r)=>new Promise((n,a)=>{var s=p=>{try{o(r.next(p))}catch(m){a(m)}},i=p=>{try{o(r.throw(p))}catch(m){a(m)}},o=p=>p.done?n(p.value):Promise.resolve(p.value).then(s,i);o((r=r.apply(t,e)).next())});var Ut=I(V=>{"use strict";Object.defineProperty(V,"__esModule",{value:!0});V.regexpCode=V.getEsmExportName=V.getProperty=V.safeStringify=V.stringify=V.strConcat=V.addCodeArg=V.str=V._=V.nil=V._Code=V.Name=V.IDENTIFIER=V._CodeOrName=void 0;var At=class{};V._CodeOrName=At;V.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var tt=class extends At{constructor(e){if(super(),!V.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}}};V.Name=tt;var xe=class extends At{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((r,n)=>`${r}${n}`,"")}get names(){var e;return(e=this._names)!==null&&e!==void 0?e:this._names=this._items.reduce((r,n)=>(n instanceof tt&&(r[n.str]=(r[n.str]||0)+1),r),{})}};V._Code=xe;V.nil=new xe("");function Pf(t,...e){let r=[t[0]],n=0;for(;n<e.length;)to(r,e[n]),r.push(t[++n]);return new xe(r)}V._=Pf;var eo=new xe("+");function Wf(t,...e){let r=[Nt(t[0])],n=0;for(;n<e.length;)r.push(eo),to(r,e[n]),r.push(eo,Nt(t[++n]));return sm(r),new xe(r)}V.str=Wf;function to(t,e){e instanceof xe?t.push(...e._items):e instanceof tt?t.push(e):t.push(pm(e))}V.addCodeArg=to;function sm(t){let e=1;for(;e<t.length-1;){if(t[e]===eo){let r=im(t[e-1],t[e+1]);if(r!==void 0){t.splice(e-1,3,r);continue}t[e++]="+"}e++}}function im(t,e){if(e==='""')return t;if(t==='""')return e;if(typeof t=="string")return e instanceof tt||t[t.length-1]!=='"'?void 0:typeof e!="string"?`${t.slice(0,-1)}${e}"`:e[0]==='"'?t.slice(0,-1)+e.slice(1):void 0;if(typeof e=="string"&&e[0]==='"'&&!(t instanceof tt))return`"${t}${e.slice(1)}`}function om(t,e){return e.emptyStr()?t:t.emptyStr()?e:Wf`${t}${e}`}V.strConcat=om;function pm(t){return typeof t=="number"||typeof t=="boolean"||t===null?t:Nt(Array.isArray(t)?t.join(","):t)}function dm(t){return new xe(Nt(t))}V.stringify=dm;function Nt(t){return JSON.stringify(t).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}V.safeStringify=Nt;function fm(t){return typeof t=="string"&&V.IDENTIFIER.test(t)?new xe(`.${t}`):Pf`[${t}]`}V.getProperty=fm;function um(t){if(typeof t=="string"&&V.IDENTIFIER.test(t))return new xe(`${t}`);throw new Error(`CodeGen: invalid export name: ${t}, use explicit $id name mapping`)}V.getEsmExportName=um;function lm(t){return new xe(t.toString())}V.regexpCode=lm});var ao=I(he=>{"use strict";Object.defineProperty(he,"__esModule",{value:!0});he.ValueScope=he.ValueScopeName=he.Scope=he.varKinds=he.UsedValueState=void 0;var me=Ut(),ro=class extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`),this.value=e.value}},ui;(function(t){t[t.Started=0]="Started",t[t.Completed=1]="Completed"})(ui||(he.UsedValueState=ui={}));he.varKinds={const:new me.Name("const"),let:new me.Name("let"),var:new me.Name("var")};var li=class{constructor({prefixes:e,parent:r}={}){this._names={},this._prefixes=e,this._parent=r}toName(e){return e instanceof me.Name?e:this.name(e)}name(e){return new me.Name(this._newName(e))}_newName(e){let r=this._names[e]||this._nameGroup(e);return`${e}${r.index++}`}_nameGroup(e){var r,n;if(!((n=(r=this._parent)===null||r===void 0?void 0:r._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}}};he.Scope=li;var ci=class extends me.Name{constructor(e,r){super(r),this.prefix=e}setValue(e,{property:r,itemIndex:n}){this.value=e,this.scopePath=(0,me._)`.${new me.Name(r)}[${n}]`}};he.ValueScopeName=ci;var cm=(0,me._)`\n`,no=class extends li{constructor(e){super(e),this._values={},this._scope=e.scope,this.opts=q(b({},e),{_n:e.lines?cm:me.nil})}get(){return this._scope}name(e){return new ci(e,this._newName(e))}value(e,r){var n;if(r.ref===void 0)throw new Error("CodeGen: ref must be passed in value");let a=this.toName(e),{prefix:s}=a,i=(n=r.key)!==null&&n!==void 0?n:r.ref,o=this._values[s];if(o){let c=o.get(i);if(c)return c}else o=this._values[s]=new Map;o.set(i,a);let p=this._scope[s]||(this._scope[s]=[]),m=p.length;return p[m]=r.ref,a.setValue(r,{property:s,itemIndex:m}),a}getValue(e,r){let n=this._values[e];if(n)return n.get(r)}scopeRefs(e,r=this._values){return this._reduceValues(r,n=>{if(n.scopePath===void 0)throw new Error(`CodeGen: name "${n}" has no value`);return(0,me._)`${e}${n.scopePath}`})}scopeCode(e=this._values,r,n){return this._reduceValues(e,a=>{if(a.value===void 0)throw new Error(`CodeGen: name "${a}" has no value`);return a.value.code},r,n)}_reduceValues(e,r,n={},a){let s=me.nil;for(let i in e){let o=e[i];if(!o)continue;let p=n[i]=n[i]||new Map;o.forEach(m=>{if(p.has(m))return;p.set(m,ui.Started);let c=r(m);if(c){let h=this.opts.es5?he.varKinds.var:he.varKinds.const;s=(0,me._)`${s}${h} ${m} = ${c};${this.opts._n}`}else if(c=a==null?void 0:a(m))s=(0,me._)`${s}${c}${this.opts._n}`;else throw new ro(m);p.set(m,ui.Completed)})}return s}};he.ValueScope=no});var N=I(W=>{"use strict";Object.defineProperty(W,"__esModule",{value:!0});W.or=W.and=W.not=W.CodeGen=W.operators=W.varKinds=W.ValueScopeName=W.ValueScope=W.Scope=W.Name=W.regexpCode=W.stringify=W.getProperty=W.nil=W.strConcat=W.str=W._=void 0;var B=Ut(),Ie=ao(),Le=Ut();Object.defineProperty(W,"_",{enumerable:!0,get:function(){return Le._}});Object.defineProperty(W,"str",{enumerable:!0,get:function(){return Le.str}});Object.defineProperty(W,"strConcat",{enumerable:!0,get:function(){return Le.strConcat}});Object.defineProperty(W,"nil",{enumerable:!0,get:function(){return Le.nil}});Object.defineProperty(W,"getProperty",{enumerable:!0,get:function(){return Le.getProperty}});Object.defineProperty(W,"stringify",{enumerable:!0,get:function(){return Le.stringify}});Object.defineProperty(W,"regexpCode",{enumerable:!0,get:function(){return Le.regexpCode}});Object.defineProperty(W,"Name",{enumerable:!0,get:function(){return Le.Name}});var gi=ao();Object.defineProperty(W,"Scope",{enumerable:!0,get:function(){return gi.Scope}});Object.defineProperty(W,"ValueScope",{enumerable:!0,get:function(){return gi.ValueScope}});Object.defineProperty(W,"ValueScopeName",{enumerable:!0,get:function(){return gi.ValueScopeName}});Object.defineProperty(W,"varKinds",{enumerable:!0,get:function(){return gi.varKinds}});W.operators={GT:new B._Code(">"),GTE:new B._Code(">="),LT:new B._Code("<"),LTE:new B._Code("<="),EQ:new B._Code("==="),NEQ:new B._Code("!=="),NOT:new B._Code("!"),OR:new B._Code("||"),AND:new B._Code("&&"),ADD:new B._Code("+")};var Ae=class{optimizeNodes(){return this}optimizeNames(e,r){return this}},so=class extends Ae{constructor(e,r,n){super(),this.varKind=e,this.name=r,this.rhs=n}render({es5:e,_n:r}){let n=e?Ie.varKinds.var:this.varKind,a=this.rhs===void 0?"":` = ${this.rhs}`;return`${n} ${this.name}${a};`+r}optimizeNames(e,r){if(e[this.name.str])return this.rhs&&(this.rhs=_t(this.rhs,e,r)),this}get names(){return this.rhs instanceof B._CodeOrName?this.rhs.names:{}}},mi=class extends Ae{constructor(e,r,n){super(),this.lhs=e,this.rhs=r,this.sideEffects=n}render({_n:e}){return`${this.lhs} = ${this.rhs};`+e}optimizeNames(e,r){if(!(this.lhs instanceof B.Name&&!e[this.lhs.str]&&!this.sideEffects))return this.rhs=_t(this.rhs,e,r),this}get names(){let e=this.lhs instanceof B.Name?{}:b({},this.lhs.names);return _i(e,this.rhs)}},io=class extends mi{constructor(e,r,n,a){super(e,n,a),this.op=r}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}},oo=class extends Ae{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}},po=class extends Ae{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:""};`+e}},fo=class extends Ae{constructor(e){super(),this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}},uo=class extends Ae{constructor(e){super(),this.code=e}render({_n:e}){return`${this.code};`+e}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(e,r){return this.code=_t(this.code,e,r),this}get names(){return this.code instanceof B._CodeOrName?this.code.names:{}}},qt=class extends Ae{constructor(e=[]){super(),this.nodes=e}render(e){return this.nodes.reduce((r,n)=>r+n.render(e),"")}optimizeNodes(){let{nodes:e}=this,r=e.length;for(;r--;){let n=e[r].optimizeNodes();Array.isArray(n)?e.splice(r,1,...n):n?e[r]=n:e.splice(r,1)}return e.length>0?this:void 0}optimizeNames(e,r){let{nodes:n}=this,a=n.length;for(;a--;){let s=n[a];s.optimizeNames(e,r)||(mm(e,s.names),n.splice(a,1))}return n.length>0?this:void 0}get names(){return this.nodes.reduce((e,r)=>at(e,r.names),{})}},Ne=class extends qt{render(e){return"{"+e._n+super.render(e)+"}"+e._n}},lo=class extends qt{},ht=class extends Ne{};ht.kind="else";var rt=class t extends Ne{constructor(e,r){super(r),this.condition=e}render(e){let r=`if(${this.condition})`+super.render(e);return this.else&&(r+="else "+this.else.render(e)),r}optimizeNodes(){super.optimizeNodes();let e=this.condition;if(e===!0)return this.nodes;let r=this.else;if(r){let n=r.optimizeNodes();r=this.else=Array.isArray(n)?new ht(n):n}if(r)return e===!1?r instanceof t?r:r.nodes:this.nodes.length?this:new t(Df(e),r instanceof t?[r]:r.nodes);if(!(e===!1||!this.nodes.length))return this}optimizeNames(e,r){var n;if(this.else=(n=this.else)===null||n===void 0?void 0:n.optimizeNames(e,r),!!(super.optimizeNames(e,r)||this.else))return this.condition=_t(this.condition,e,r),this}get names(){let e=super.names;return _i(e,this.condition),this.else&&at(e,this.else.names),e}};rt.kind="if";var nt=class extends Ne{};nt.kind="for";var co=class extends nt{constructor(e){super(),this.iteration=e}render(e){return`for(${this.iteration})`+super.render(e)}optimizeNames(e,r){if(super.optimizeNames(e,r))return this.iteration=_t(this.iteration,e,r),this}get names(){return at(super.names,this.iteration.names)}},mo=class extends nt{constructor(e,r,n,a){super(),this.varKind=e,this.name=r,this.from=n,this.to=a}render(e){let r=e.es5?Ie.varKinds.var:this.varKind,{name:n,from:a,to:s}=this;return`for(${r} ${n}=${a}; ${n}<${s}; ${n}++)`+super.render(e)}get names(){let e=_i(super.names,this.from);return _i(e,this.to)}},hi=class extends nt{constructor(e,r,n,a){super(),this.loop=e,this.varKind=r,this.name=n,this.iterable=a}render(e){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(e)}optimizeNames(e,r){if(super.optimizeNames(e,r))return this.iterable=_t(this.iterable,e,r),this}get names(){return at(super.names,this.iterable.names)}},Bt=class extends Ne{constructor(e,r,n){super(),this.name=e,this.args=r,this.async=n}render(e){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(e)}};Bt.kind="func";var Lt=class extends qt{render(e){return"return "+super.render(e)}};Lt.kind="return";var ho=class extends Ne{render(e){let r="try"+super.render(e);return this.catch&&(r+=this.catch.render(e)),this.finally&&(r+=this.finally.render(e)),r}optimizeNodes(){var e,r;return super.optimizeNodes(),(e=this.catch)===null||e===void 0||e.optimizeNodes(),(r=this.finally)===null||r===void 0||r.optimizeNodes(),this}optimizeNames(e,r){var n,a;return super.optimizeNames(e,r),(n=this.catch)===null||n===void 0||n.optimizeNames(e,r),(a=this.finally)===null||a===void 0||a.optimizeNames(e,r),this}get names(){let e=super.names;return this.catch&&at(e,this.catch.names),this.finally&&at(e,this.finally.names),e}},Ht=class extends Ne{constructor(e){super(),this.error=e}render(e){return`catch(${this.error})`+super.render(e)}};Ht.kind="catch";var Vt=class extends Ne{render(e){return"finally"+super.render(e)}};Vt.kind="finally";var _o=class{constructor(e,r={}){this._values={},this._blockStarts=[],this._constants={},this.opts=q(b({},r),{_n:r.lines?`
|
|
2
|
-
`:""}),this._extScope=e,this._scope=new Ie.Scope({parent:e}),this._nodes=[new lo]}toString(){return this._root.render(this.opts)}name(e){return this._scope.name(e)}scopeName(e){return this._extScope.name(e)}scopeValue(e,r){let n=this._extScope.value(e,r);return(this._values[n.prefix]||(this._values[n.prefix]=new Set)).add(n),n}getScopeValue(e,r){return this._extScope.getValue(e,r)}scopeRefs(e){return this._extScope.scopeRefs(e,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(e,r,n,a){let s=this._scope.toName(r);return n!==void 0&&a&&(this._constants[s.str]=n),this._leafNode(new so(e,s,n)),s}const(e,r,n){return this._def(Ie.varKinds.const,e,r,n)}let(e,r,n){return this._def(Ie.varKinds.let,e,r,n)}var(e,r,n){return this._def(Ie.varKinds.var,e,r,n)}assign(e,r,n){return this._leafNode(new mi(e,r,n))}add(e,r){return this._leafNode(new io(e,W.operators.ADD,r))}code(e){return typeof e=="function"?e():e!==B.nil&&this._leafNode(new uo(e)),this}object(...e){let r=["{"];for(let[n,a]of e)r.length>1&&r.push(","),r.push(n),(n!==a||this.opts.es5)&&(r.push(":"),(0,B.addCodeArg)(r,a));return r.push("}"),new B._Code(r)}if(e,r,n){if(this._blockNode(new rt(e)),r&&n)this.code(r).else().code(n).endIf();else if(r)this.code(r).endIf();else if(n)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(e){return this._elseNode(new rt(e))}else(){return this._elseNode(new ht)}endIf(){return this._endBlockNode(rt,ht)}_for(e,r){return this._blockNode(e),r&&this.code(r).endFor(),this}for(e,r){return this._for(new co(e),r)}forRange(e,r,n,a,s=this.opts.es5?Ie.varKinds.var:Ie.varKinds.let){let i=this._scope.toName(e);return this._for(new mo(s,i,r,n),()=>a(i))}forOf(e,r,n,a=Ie.varKinds.const){let s=this._scope.toName(e);if(this.opts.es5){let i=r instanceof B.Name?r:this.var("_arr",r);return this.forRange("_i",0,(0,B._)`${i}.length`,o=>{this.var(s,(0,B._)`${i}[${o}]`),n(s)})}return this._for(new hi("of",a,s,r),()=>n(s))}forIn(e,r,n,a=this.opts.es5?Ie.varKinds.var:Ie.varKinds.const){if(this.opts.ownProperties)return this.forOf(e,(0,B._)`Object.keys(${r})`,n);let s=this._scope.toName(e);return this._for(new hi("in",a,s,r),()=>n(s))}endFor(){return this._endBlockNode(nt)}label(e){return this._leafNode(new oo(e))}break(e){return this._leafNode(new po(e))}return(e){let r=new Lt;if(this._blockNode(r),this.code(e),r.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(Lt)}try(e,r,n){if(!r&&!n)throw new Error('CodeGen: "try" without "catch" and "finally"');let a=new ho;if(this._blockNode(a),this.code(e),r){let s=this.name("e");this._currNode=a.catch=new Ht(s),r(s)}return n&&(this._currNode=a.finally=new Vt,this.code(n)),this._endBlockNode(Ht,Vt)}throw(e){return this._leafNode(new fo(e))}block(e,r){return this._blockStarts.push(this._nodes.length),e&&this.code(e).endBlock(r),this}endBlock(e){let r=this._blockStarts.pop();if(r===void 0)throw new Error("CodeGen: not in self-balancing block");let n=this._nodes.length-r;if(n<0||e!==void 0&&n!==e)throw new Error(`CodeGen: wrong number of nodes: ${n} vs ${e} expected`);return this._nodes.length=r,this}func(e,r=B.nil,n,a){return this._blockNode(new Bt(e,r,n)),a&&this.code(a).endFunc(),this}endFunc(){return this._endBlockNode(Bt)}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,r){let n=this._currNode;if(n instanceof e||r&&n instanceof r)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${r?`${e.kind}/${r.kind}`:e.kind}"`)}_elseNode(e){let r=this._currNode;if(!(r instanceof rt))throw new Error('CodeGen: "else" without "if"');return this._currNode=r.else=e,this}get _root(){return this._nodes[0]}get _currNode(){let e=this._nodes;return e[e.length-1]}set _currNode(e){let r=this._nodes;r[r.length-1]=e}};W.CodeGen=_o;function at(t,e){for(let r in e)t[r]=(t[r]||0)+(e[r]||0);return t}function _i(t,e){return e instanceof B._CodeOrName?at(t,e.names):t}function _t(t,e,r){if(t instanceof B.Name)return n(t);if(!a(t))return t;return new B._Code(t._items.reduce((s,i)=>(i instanceof B.Name&&(i=n(i)),i instanceof B._Code?s.push(...i._items):s.push(i),s),[]));function n(s){let i=r[s.str];return i===void 0||e[s.str]!==1?s:(delete e[s.str],i)}function a(s){return s instanceof B._Code&&s._items.some(i=>i instanceof B.Name&&e[i.str]===1&&r[i.str]!==void 0)}}function mm(t,e){for(let r in e)t[r]=(t[r]||0)-(e[r]||0)}function Df(t){return typeof t=="boolean"||typeof t=="number"||t===null?!t:(0,B._)`!${go(t)}`}W.not=Df;var hm=Af(W.operators.AND);function _m(...t){return t.reduce(hm)}W.and=_m;var gm=Af(W.operators.OR);function Tm(...t){return t.reduce(gm)}W.or=Tm;function Af(t){return(e,r)=>e===B.nil?r:r===B.nil?e:(0,B._)`${go(e)} ${t} ${go(r)}`}function go(t){return t instanceof B.Name?t:(0,B._)`(${t})`}});var z=I(U=>{"use strict";Object.defineProperty(U,"__esModule",{value:!0});U.checkStrictMode=U.getErrorPath=U.Type=U.useFunc=U.setEvaluated=U.evaluatedPropsToName=U.mergeEvaluated=U.eachItem=U.unescapeJsonPointer=U.escapeJsonPointer=U.escapeFragment=U.unescapeFragment=U.schemaRefOrVal=U.schemaHasRulesButRef=U.schemaHasRules=U.checkUnknownRules=U.alwaysValidSchema=U.toHash=void 0;var Q=N(),ym=Ut();function Fm(t){let e={};for(let r of t)e[r]=!0;return e}U.toHash=Fm;function xm(t,e){return typeof e=="boolean"?e:Object.keys(e).length===0?!0:(qf(t,e),!Bf(e,t.self.RULES.all))}U.alwaysValidSchema=xm;function qf(t,e=t.schema){let{opts:r,self:n}=t;if(!r.strictSchema||typeof e=="boolean")return;let a=n.RULES.keywords;for(let s in e)a[s]||Vf(t,`unknown keyword: "${s}"`)}U.checkUnknownRules=qf;function Bf(t,e){if(typeof t=="boolean")return!t;for(let r in t)if(e[r])return!0;return!1}U.schemaHasRules=Bf;function bm(t,e){if(typeof t=="boolean")return!t;for(let r in t)if(r!=="$ref"&&e.all[r])return!0;return!1}U.schemaHasRulesButRef=bm;function Om({topSchemaRef:t,schemaPath:e},r,n,a){if(!a){if(typeof r=="number"||typeof r=="boolean")return r;if(typeof r=="string")return(0,Q._)`${r}`}return(0,Q._)`${t}${e}${(0,Q.getProperty)(n)}`}U.schemaRefOrVal=Om;function $m(t){return Lf(decodeURIComponent(t))}U.unescapeFragment=$m;function wm(t){return encodeURIComponent(yo(t))}U.escapeFragment=wm;function yo(t){return typeof t=="number"?`${t}`:t.replace(/~/g,"~0").replace(/\//g,"~1")}U.escapeJsonPointer=yo;function Lf(t){return t.replace(/~1/g,"/").replace(/~0/g,"~")}U.unescapeJsonPointer=Lf;function Im(t,e){if(Array.isArray(t))for(let r of t)e(r);else e(t)}U.eachItem=Im;function Nf({mergeNames:t,mergeToName:e,mergeValues:r,resultToName:n}){return(a,s,i,o)=>{let p=i===void 0?s:i instanceof Q.Name?(s instanceof Q.Name?t(a,s,i):e(a,s,i),i):s instanceof Q.Name?(e(a,i,s),s):r(s,i);return o===Q.Name&&!(p instanceof Q.Name)?n(a,p):p}}U.mergeEvaluated={props:Nf({mergeNames:(t,e,r)=>t.if((0,Q._)`${r} !== true && ${e} !== undefined`,()=>{t.if((0,Q._)`${e} === true`,()=>t.assign(r,!0),()=>t.assign(r,(0,Q._)`${r} || {}`).code((0,Q._)`Object.assign(${r}, ${e})`))}),mergeToName:(t,e,r)=>t.if((0,Q._)`${r} !== true`,()=>{e===!0?t.assign(r,!0):(t.assign(r,(0,Q._)`${r} || {}`),Fo(t,r,e))}),mergeValues:(t,e)=>t===!0?!0:b(b({},t),e),resultToName:Hf}),items:Nf({mergeNames:(t,e,r)=>t.if((0,Q._)`${r} !== true && ${e} !== undefined`,()=>t.assign(r,(0,Q._)`${e} === true ? true : ${r} > ${e} ? ${r} : ${e}`)),mergeToName:(t,e,r)=>t.if((0,Q._)`${r} !== true`,()=>t.assign(r,e===!0?!0:(0,Q._)`${r} > ${e} ? ${r} : ${e}`)),mergeValues:(t,e)=>t===!0?!0:Math.max(t,e),resultToName:(t,e)=>t.var("items",e)})};function Hf(t,e){if(e===!0)return t.var("props",!0);let r=t.var("props",(0,Q._)`{}`);return e!==void 0&&Fo(t,r,e),r}U.evaluatedPropsToName=Hf;function Fo(t,e,r){Object.keys(r).forEach(n=>t.assign((0,Q._)`${e}${(0,Q.getProperty)(n)}`,!0))}U.setEvaluated=Fo;var Uf={};function jm(t,e){return t.scopeValue("func",{ref:e,code:Uf[e.code]||(Uf[e.code]=new ym._Code(e.code))})}U.useFunc=jm;var To;(function(t){t[t.Num=0]="Num",t[t.Str=1]="Str"})(To||(U.Type=To={}));function km(t,e,r){if(t instanceof Q.Name){let n=e===To.Num;return r?n?(0,Q._)`"[" + ${t} + "]"`:(0,Q._)`"['" + ${t} + "']"`:n?(0,Q._)`"/" + ${t}`:(0,Q._)`"/" + ${t}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return r?(0,Q.getProperty)(t).toString():"/"+yo(t)}U.getErrorPath=km;function Vf(t,e,r=t.opts.strictSchema){if(r){if(e=`strict mode: ${e}`,r===!0)throw new Error(e);t.self.logger.warn(e)}}U.checkStrictMode=Vf});var Ue=I(xo=>{"use strict";Object.defineProperty(xo,"__esModule",{value:!0});var oe=N(),Sm={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")};xo.default=Sm});var zt=I(pe=>{"use strict";Object.defineProperty(pe,"__esModule",{value:!0});pe.extendErrors=pe.resetErrorsCount=pe.reportExtraError=pe.reportError=pe.keyword$DataError=pe.keywordError=void 0;var H=N(),Ti=z(),ue=Ue();pe.keywordError={message:({keyword:t})=>(0,H.str)`must pass "${t}" keyword validation`};pe.keyword$DataError={message:({keyword:t,schemaType:e})=>e?(0,H.str)`"${t}" keyword must be ${e} ($data)`:(0,H.str)`"${t}" keyword is invalid ($data)`};function vm(t,e=pe.keywordError,r,n){let{it:a}=t,{gen:s,compositeRule:i,allErrors:o}=a,p=Qf(t,e,r);(n!=null?n:i||o)?zf(s,p):Jf(a,(0,H._)`[${p}]`)}pe.reportError=vm;function Em(t,e=pe.keywordError,r){let{it:n}=t,{gen:a,compositeRule:s,allErrors:i}=n,o=Qf(t,e,r);zf(a,o),s||i||Jf(n,ue.default.vErrors)}pe.reportExtraError=Em;function Gm(t,e){t.assign(ue.default.errors,e),t.if((0,H._)`${ue.default.vErrors} !== null`,()=>t.if(e,()=>t.assign((0,H._)`${ue.default.vErrors}.length`,e),()=>t.assign(ue.default.vErrors,null)))}pe.resetErrorsCount=Gm;function Cm({gen:t,keyword:e,schemaValue:r,data:n,errsCount:a,it:s}){if(a===void 0)throw new Error("ajv implementation error");let i=t.name("err");t.forRange("i",a,ue.default.errors,o=>{t.const(i,(0,H._)`${ue.default.vErrors}[${o}]`),t.if((0,H._)`${i}.instancePath === undefined`,()=>t.assign((0,H._)`${i}.instancePath`,(0,H.strConcat)(ue.default.instancePath,s.errorPath))),t.assign((0,H._)`${i}.schemaPath`,(0,H.str)`${s.errSchemaPath}/${e}`),s.opts.verbose&&(t.assign((0,H._)`${i}.schema`,r),t.assign((0,H._)`${i}.data`,n))})}pe.extendErrors=Cm;function zf(t,e){let r=t.const("err",e);t.if((0,H._)`${ue.default.vErrors} === null`,()=>t.assign(ue.default.vErrors,(0,H._)`[${r}]`),(0,H._)`${ue.default.vErrors}.push(${r})`),t.code((0,H._)`${ue.default.errors}++`)}function Jf(t,e){let{gen:r,validateName:n,schemaEnv:a}=t;a.$async?r.throw((0,H._)`new ${t.ValidationError}(${e})`):(r.assign((0,H._)`${n}.errors`,e),r.return(!1))}var st={keyword:new H.Name("keyword"),schemaPath:new H.Name("schemaPath"),params:new H.Name("params"),propertyName:new H.Name("propertyName"),message:new H.Name("message"),schema:new H.Name("schema"),parentSchema:new H.Name("parentSchema")};function Qf(t,e,r){let{createErrors:n}=t.it;return n===!1?(0,H._)`{}`:Rm(t,e,r)}function Rm(t,e,r={}){let{gen:n,it:a}=t,s=[Mm(a,r),Pm(t,r)];return Wm(t,e,s),n.object(...s)}function Mm({errorPath:t},{instancePath:e}){let r=e?(0,H.str)`${t}${(0,Ti.getErrorPath)(e,Ti.Type.Str)}`:t;return[ue.default.instancePath,(0,H.strConcat)(ue.default.instancePath,r)]}function Pm({keyword:t,it:{errSchemaPath:e}},{schemaPath:r,parentSchema:n}){let a=n?e:(0,H.str)`${e}/${t}`;return r&&(a=(0,H.str)`${a}${(0,Ti.getErrorPath)(r,Ti.Type.Str)}`),[st.schemaPath,a]}function Wm(t,{params:e,message:r},n){let{keyword:a,data:s,schemaValue:i,it:o}=t,{opts:p,propertyName:m,topSchemaRef:c,schemaPath:h}=o;n.push([st.keyword,a],[st.params,typeof e=="function"?e(t):e||(0,H._)`{}`]),p.messages&&n.push([st.message,typeof r=="function"?r(t):r]),p.verbose&&n.push([st.schema,i],[st.parentSchema,(0,H._)`${c}${h}`],[ue.default.data,s]),m&&n.push([st.propertyName,m])}});var Yf=I(gt=>{"use strict";Object.defineProperty(gt,"__esModule",{value:!0});gt.boolOrEmptySchema=gt.topBoolOrEmptySchema=void 0;var Dm=zt(),Am=N(),Nm=Ue(),Um={message:"boolean schema is false"};function qm(t){let{gen:e,schema:r,validateName:n}=t;r===!1?Kf(t,!1):typeof r=="object"&&r.$async===!0?e.return(Nm.default.data):(e.assign((0,Am._)`${n}.errors`,null),e.return(!0))}gt.topBoolOrEmptySchema=qm;function Bm(t,e){let{gen:r,schema:n}=t;n===!1?(r.var(e,!1),Kf(t)):r.var(e,!0)}gt.boolOrEmptySchema=Bm;function Kf(t,e){let{gen:r,data:n}=t,a={gen:r,keyword:"false schema",data:n,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:t};(0,Dm.reportError)(a,Um,void 0,e)}});var bo=I(Tt=>{"use strict";Object.defineProperty(Tt,"__esModule",{value:!0});Tt.getRules=Tt.isJSONType=void 0;var Lm=["string","number","integer","boolean","null","object","array"],Hm=new Set(Lm);function Vm(t){return typeof t=="string"&&Hm.has(t)}Tt.isJSONType=Vm;function zm(){let t={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:q(b({},t),{integer:!0,boolean:!0,null:!0}),rules:[{rules:[]},t.number,t.string,t.array,t.object],post:{rules:[]},all:{},keywords:{}}}Tt.getRules=zm});var Oo=I(He=>{"use strict";Object.defineProperty(He,"__esModule",{value:!0});He.shouldUseRule=He.shouldUseGroup=He.schemaHasRulesForType=void 0;function Jm({schema:t,self:e},r){let n=e.RULES.types[r];return n&&n!==!0&&Xf(t,n)}He.schemaHasRulesForType=Jm;function Xf(t,e){return e.rules.some(r=>Zf(t,r))}He.shouldUseGroup=Xf;function Zf(t,e){var r;return t[e.keyword]!==void 0||((r=e.definition.implements)===null||r===void 0?void 0:r.some(n=>t[n]!==void 0))}He.shouldUseRule=Zf});var Jt=I(de=>{"use strict";Object.defineProperty(de,"__esModule",{value:!0});de.reportTypeError=de.checkDataTypes=de.checkDataType=de.coerceAndCheckDataType=de.getJSONTypes=de.getSchemaTypes=de.DataType=void 0;var Qm=bo(),Km=Oo(),Ym=zt(),P=N(),eu=z(),yt;(function(t){t[t.Correct=0]="Correct",t[t.Wrong=1]="Wrong"})(yt||(de.DataType=yt={}));function Xm(t){let e=tu(t.type);if(e.includes("null")){if(t.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!e.length&&t.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');t.nullable===!0&&e.push("null")}return e}de.getSchemaTypes=Xm;function tu(t){let e=Array.isArray(t)?t:t?[t]:[];if(e.every(Qm.isJSONType))return e;throw new Error("type must be JSONType or JSONType[]: "+e.join(","))}de.getJSONTypes=tu;function Zm(t,e){let{gen:r,data:n,opts:a}=t,s=eh(e,a.coerceTypes),i=e.length>0&&!(s.length===0&&e.length===1&&(0,Km.schemaHasRulesForType)(t,e[0]));if(i){let o=wo(e,n,a.strictNumbers,yt.Wrong);r.if(o,()=>{s.length?th(t,e,s):Io(t)})}return i}de.coerceAndCheckDataType=Zm;var ru=new Set(["string","number","integer","boolean","null"]);function eh(t,e){return e?t.filter(r=>ru.has(r)||e==="array"&&r==="array"):[]}function th(t,e,r){let{gen:n,data:a,opts:s}=t,i=n.let("dataType",(0,P._)`typeof ${a}`),o=n.let("coerced",(0,P._)`undefined`);s.coerceTypes==="array"&&n.if((0,P._)`${i} == 'object' && Array.isArray(${a}) && ${a}.length == 1`,()=>n.assign(a,(0,P._)`${a}[0]`).assign(i,(0,P._)`typeof ${a}`).if(wo(e,a,s.strictNumbers),()=>n.assign(o,a))),n.if((0,P._)`${o} !== undefined`);for(let m of r)(ru.has(m)||m==="array"&&s.coerceTypes==="array")&&p(m);n.else(),Io(t),n.endIf(),n.if((0,P._)`${o} !== undefined`,()=>{n.assign(a,o),rh(t,o)});function p(m){switch(m){case"string":n.elseIf((0,P._)`${i} == "number" || ${i} == "boolean"`).assign(o,(0,P._)`"" + ${a}`).elseIf((0,P._)`${a} === null`).assign(o,(0,P._)`""`);return;case"number":n.elseIf((0,P._)`${i} == "boolean" || ${a} === null
|
|
1
|
+
var WAPI=(()=>{var Wc=Object.create;var Mt=Object.defineProperty,Dc=Object.defineProperties,Nc=Object.getOwnPropertyDescriptor,Ac=Object.getOwnPropertyDescriptors,Uc=Object.getOwnPropertyNames,yf=Object.getOwnPropertySymbols,qc=Object.getPrototypeOf,xf=Object.prototype.hasOwnProperty,Bc=Object.prototype.propertyIsEnumerable;var Ff=(t,e,r)=>e in t?Mt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,b=(t,e)=>{for(var r in e||(e={}))xf.call(e,r)&&Ff(t,r,e[r]);if(yf)for(var r of yf(e))Bc.call(e,r)&&Ff(t,r,e[r]);return t},q=(t,e)=>Dc(t,Ac(e));var I=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Lc=(t,e)=>{for(var r in e)Mt(t,r,{get:e[r],enumerable:!0})},bf=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of Uc(e))!xf.call(t,a)&&a!==r&&Mt(t,a,{get:()=>e[a],enumerable:!(n=Nc(e,a))||n.enumerable});return t};var Hc=(t,e,r)=>(r=t!=null?Wc(qc(t)):{},bf(e||!t||!t.__esModule?Mt(r,"default",{value:t,enumerable:!0}):r,t)),Vc=t=>bf(Mt({},"__esModule",{value:!0}),t);var ee=(t,e,r)=>new Promise((n,a)=>{var s=p=>{try{o(r.next(p))}catch(m){a(m)}},i=p=>{try{o(r.throw(p))}catch(m){a(m)}},o=p=>p.done?n(p.value):Promise.resolve(p.value).then(s,i);o((r=r.apply(t,e)).next())});var Ut=I(V=>{"use strict";Object.defineProperty(V,"__esModule",{value:!0});V.regexpCode=V.getEsmExportName=V.getProperty=V.safeStringify=V.stringify=V.strConcat=V.addCodeArg=V.str=V._=V.nil=V._Code=V.Name=V.IDENTIFIER=V._CodeOrName=void 0;var Nt=class{};V._CodeOrName=Nt;V.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;var tt=class extends Nt{constructor(e){if(super(),!V.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}}};V.Name=tt;var xe=class extends Nt{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((r,n)=>`${r}${n}`,"")}get names(){var e;return(e=this._names)!==null&&e!==void 0?e:this._names=this._items.reduce((r,n)=>(n instanceof tt&&(r[n.str]=(r[n.str]||0)+1),r),{})}};V._Code=xe;V.nil=new xe("");function Pf(t,...e){let r=[t[0]],n=0;for(;n<e.length;)to(r,e[n]),r.push(t[++n]);return new xe(r)}V._=Pf;var eo=new xe("+");function Wf(t,...e){let r=[At(t[0])],n=0;for(;n<e.length;)r.push(eo),to(r,e[n]),r.push(eo,At(t[++n]));return sm(r),new xe(r)}V.str=Wf;function to(t,e){e instanceof xe?t.push(...e._items):e instanceof tt?t.push(e):t.push(pm(e))}V.addCodeArg=to;function sm(t){let e=1;for(;e<t.length-1;){if(t[e]===eo){let r=im(t[e-1],t[e+1]);if(r!==void 0){t.splice(e-1,3,r);continue}t[e++]="+"}e++}}function im(t,e){if(e==='""')return t;if(t==='""')return e;if(typeof t=="string")return e instanceof tt||t[t.length-1]!=='"'?void 0:typeof e!="string"?`${t.slice(0,-1)}${e}"`:e[0]==='"'?t.slice(0,-1)+e.slice(1):void 0;if(typeof e=="string"&&e[0]==='"'&&!(t instanceof tt))return`"${t}${e.slice(1)}`}function om(t,e){return e.emptyStr()?t:t.emptyStr()?e:Wf`${t}${e}`}V.strConcat=om;function pm(t){return typeof t=="number"||typeof t=="boolean"||t===null?t:At(Array.isArray(t)?t.join(","):t)}function dm(t){return new xe(At(t))}V.stringify=dm;function At(t){return JSON.stringify(t).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}V.safeStringify=At;function fm(t){return typeof t=="string"&&V.IDENTIFIER.test(t)?new xe(`.${t}`):Pf`[${t}]`}V.getProperty=fm;function um(t){if(typeof t=="string"&&V.IDENTIFIER.test(t))return new xe(`${t}`);throw new Error(`CodeGen: invalid export name: ${t}, use explicit $id name mapping`)}V.getEsmExportName=um;function lm(t){return new xe(t.toString())}V.regexpCode=lm});var ao=I(he=>{"use strict";Object.defineProperty(he,"__esModule",{value:!0});he.ValueScope=he.ValueScopeName=he.Scope=he.varKinds=he.UsedValueState=void 0;var me=Ut(),ro=class extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`),this.value=e.value}},ui;(function(t){t[t.Started=0]="Started",t[t.Completed=1]="Completed"})(ui||(he.UsedValueState=ui={}));he.varKinds={const:new me.Name("const"),let:new me.Name("let"),var:new me.Name("var")};var li=class{constructor({prefixes:e,parent:r}={}){this._names={},this._prefixes=e,this._parent=r}toName(e){return e instanceof me.Name?e:this.name(e)}name(e){return new me.Name(this._newName(e))}_newName(e){let r=this._names[e]||this._nameGroup(e);return`${e}${r.index++}`}_nameGroup(e){var r,n;if(!((n=(r=this._parent)===null||r===void 0?void 0:r._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}}};he.Scope=li;var ci=class extends me.Name{constructor(e,r){super(r),this.prefix=e}setValue(e,{property:r,itemIndex:n}){this.value=e,this.scopePath=(0,me._)`.${new me.Name(r)}[${n}]`}};he.ValueScopeName=ci;var cm=(0,me._)`\n`,no=class extends li{constructor(e){super(e),this._values={},this._scope=e.scope,this.opts=q(b({},e),{_n:e.lines?cm:me.nil})}get(){return this._scope}name(e){return new ci(e,this._newName(e))}value(e,r){var n;if(r.ref===void 0)throw new Error("CodeGen: ref must be passed in value");let a=this.toName(e),{prefix:s}=a,i=(n=r.key)!==null&&n!==void 0?n:r.ref,o=this._values[s];if(o){let c=o.get(i);if(c)return c}else o=this._values[s]=new Map;o.set(i,a);let p=this._scope[s]||(this._scope[s]=[]),m=p.length;return p[m]=r.ref,a.setValue(r,{property:s,itemIndex:m}),a}getValue(e,r){let n=this._values[e];if(n)return n.get(r)}scopeRefs(e,r=this._values){return this._reduceValues(r,n=>{if(n.scopePath===void 0)throw new Error(`CodeGen: name "${n}" has no value`);return(0,me._)`${e}${n.scopePath}`})}scopeCode(e=this._values,r,n){return this._reduceValues(e,a=>{if(a.value===void 0)throw new Error(`CodeGen: name "${a}" has no value`);return a.value.code},r,n)}_reduceValues(e,r,n={},a){let s=me.nil;for(let i in e){let o=e[i];if(!o)continue;let p=n[i]=n[i]||new Map;o.forEach(m=>{if(p.has(m))return;p.set(m,ui.Started);let c=r(m);if(c){let h=this.opts.es5?he.varKinds.var:he.varKinds.const;s=(0,me._)`${s}${h} ${m} = ${c};${this.opts._n}`}else if(c=a==null?void 0:a(m))s=(0,me._)`${s}${c}${this.opts._n}`;else throw new ro(m);p.set(m,ui.Completed)})}return s}};he.ValueScope=no});var A=I(W=>{"use strict";Object.defineProperty(W,"__esModule",{value:!0});W.or=W.and=W.not=W.CodeGen=W.operators=W.varKinds=W.ValueScopeName=W.ValueScope=W.Scope=W.Name=W.regexpCode=W.stringify=W.getProperty=W.nil=W.strConcat=W.str=W._=void 0;var B=Ut(),Ie=ao(),Le=Ut();Object.defineProperty(W,"_",{enumerable:!0,get:function(){return Le._}});Object.defineProperty(W,"str",{enumerable:!0,get:function(){return Le.str}});Object.defineProperty(W,"strConcat",{enumerable:!0,get:function(){return Le.strConcat}});Object.defineProperty(W,"nil",{enumerable:!0,get:function(){return Le.nil}});Object.defineProperty(W,"getProperty",{enumerable:!0,get:function(){return Le.getProperty}});Object.defineProperty(W,"stringify",{enumerable:!0,get:function(){return Le.stringify}});Object.defineProperty(W,"regexpCode",{enumerable:!0,get:function(){return Le.regexpCode}});Object.defineProperty(W,"Name",{enumerable:!0,get:function(){return Le.Name}});var gi=ao();Object.defineProperty(W,"Scope",{enumerable:!0,get:function(){return gi.Scope}});Object.defineProperty(W,"ValueScope",{enumerable:!0,get:function(){return gi.ValueScope}});Object.defineProperty(W,"ValueScopeName",{enumerable:!0,get:function(){return gi.ValueScopeName}});Object.defineProperty(W,"varKinds",{enumerable:!0,get:function(){return gi.varKinds}});W.operators={GT:new B._Code(">"),GTE:new B._Code(">="),LT:new B._Code("<"),LTE:new B._Code("<="),EQ:new B._Code("==="),NEQ:new B._Code("!=="),NOT:new B._Code("!"),OR:new B._Code("||"),AND:new B._Code("&&"),ADD:new B._Code("+")};var Ne=class{optimizeNodes(){return this}optimizeNames(e,r){return this}},so=class extends Ne{constructor(e,r,n){super(),this.varKind=e,this.name=r,this.rhs=n}render({es5:e,_n:r}){let n=e?Ie.varKinds.var:this.varKind,a=this.rhs===void 0?"":` = ${this.rhs}`;return`${n} ${this.name}${a};`+r}optimizeNames(e,r){if(e[this.name.str])return this.rhs&&(this.rhs=_t(this.rhs,e,r)),this}get names(){return this.rhs instanceof B._CodeOrName?this.rhs.names:{}}},mi=class extends Ne{constructor(e,r,n){super(),this.lhs=e,this.rhs=r,this.sideEffects=n}render({_n:e}){return`${this.lhs} = ${this.rhs};`+e}optimizeNames(e,r){if(!(this.lhs instanceof B.Name&&!e[this.lhs.str]&&!this.sideEffects))return this.rhs=_t(this.rhs,e,r),this}get names(){let e=this.lhs instanceof B.Name?{}:b({},this.lhs.names);return _i(e,this.rhs)}},io=class extends mi{constructor(e,r,n,a){super(e,n,a),this.op=r}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}},oo=class extends Ne{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}},po=class extends Ne{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:""};`+e}},fo=class extends Ne{constructor(e){super(),this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}},uo=class extends Ne{constructor(e){super(),this.code=e}render({_n:e}){return`${this.code};`+e}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(e,r){return this.code=_t(this.code,e,r),this}get names(){return this.code instanceof B._CodeOrName?this.code.names:{}}},qt=class extends Ne{constructor(e=[]){super(),this.nodes=e}render(e){return this.nodes.reduce((r,n)=>r+n.render(e),"")}optimizeNodes(){let{nodes:e}=this,r=e.length;for(;r--;){let n=e[r].optimizeNodes();Array.isArray(n)?e.splice(r,1,...n):n?e[r]=n:e.splice(r,1)}return e.length>0?this:void 0}optimizeNames(e,r){let{nodes:n}=this,a=n.length;for(;a--;){let s=n[a];s.optimizeNames(e,r)||(mm(e,s.names),n.splice(a,1))}return n.length>0?this:void 0}get names(){return this.nodes.reduce((e,r)=>at(e,r.names),{})}},Ae=class extends qt{render(e){return"{"+e._n+super.render(e)+"}"+e._n}},lo=class extends qt{},ht=class extends Ae{};ht.kind="else";var rt=class t extends Ae{constructor(e,r){super(r),this.condition=e}render(e){let r=`if(${this.condition})`+super.render(e);return this.else&&(r+="else "+this.else.render(e)),r}optimizeNodes(){super.optimizeNodes();let e=this.condition;if(e===!0)return this.nodes;let r=this.else;if(r){let n=r.optimizeNodes();r=this.else=Array.isArray(n)?new ht(n):n}if(r)return e===!1?r instanceof t?r:r.nodes:this.nodes.length?this:new t(Df(e),r instanceof t?[r]:r.nodes);if(!(e===!1||!this.nodes.length))return this}optimizeNames(e,r){var n;if(this.else=(n=this.else)===null||n===void 0?void 0:n.optimizeNames(e,r),!!(super.optimizeNames(e,r)||this.else))return this.condition=_t(this.condition,e,r),this}get names(){let e=super.names;return _i(e,this.condition),this.else&&at(e,this.else.names),e}};rt.kind="if";var nt=class extends Ae{};nt.kind="for";var co=class extends nt{constructor(e){super(),this.iteration=e}render(e){return`for(${this.iteration})`+super.render(e)}optimizeNames(e,r){if(super.optimizeNames(e,r))return this.iteration=_t(this.iteration,e,r),this}get names(){return at(super.names,this.iteration.names)}},mo=class extends nt{constructor(e,r,n,a){super(),this.varKind=e,this.name=r,this.from=n,this.to=a}render(e){let r=e.es5?Ie.varKinds.var:this.varKind,{name:n,from:a,to:s}=this;return`for(${r} ${n}=${a}; ${n}<${s}; ${n}++)`+super.render(e)}get names(){let e=_i(super.names,this.from);return _i(e,this.to)}},hi=class extends nt{constructor(e,r,n,a){super(),this.loop=e,this.varKind=r,this.name=n,this.iterable=a}render(e){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(e)}optimizeNames(e,r){if(super.optimizeNames(e,r))return this.iterable=_t(this.iterable,e,r),this}get names(){return at(super.names,this.iterable.names)}},Bt=class extends Ae{constructor(e,r,n){super(),this.name=e,this.args=r,this.async=n}render(e){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(e)}};Bt.kind="func";var Lt=class extends qt{render(e){return"return "+super.render(e)}};Lt.kind="return";var ho=class extends Ae{render(e){let r="try"+super.render(e);return this.catch&&(r+=this.catch.render(e)),this.finally&&(r+=this.finally.render(e)),r}optimizeNodes(){var e,r;return super.optimizeNodes(),(e=this.catch)===null||e===void 0||e.optimizeNodes(),(r=this.finally)===null||r===void 0||r.optimizeNodes(),this}optimizeNames(e,r){var n,a;return super.optimizeNames(e,r),(n=this.catch)===null||n===void 0||n.optimizeNames(e,r),(a=this.finally)===null||a===void 0||a.optimizeNames(e,r),this}get names(){let e=super.names;return this.catch&&at(e,this.catch.names),this.finally&&at(e,this.finally.names),e}},Ht=class extends Ae{constructor(e){super(),this.error=e}render(e){return`catch(${this.error})`+super.render(e)}};Ht.kind="catch";var Vt=class extends Ae{render(e){return"finally"+super.render(e)}};Vt.kind="finally";var _o=class{constructor(e,r={}){this._values={},this._blockStarts=[],this._constants={},this.opts=q(b({},r),{_n:r.lines?`
|
|
2
|
+
`:""}),this._extScope=e,this._scope=new Ie.Scope({parent:e}),this._nodes=[new lo]}toString(){return this._root.render(this.opts)}name(e){return this._scope.name(e)}scopeName(e){return this._extScope.name(e)}scopeValue(e,r){let n=this._extScope.value(e,r);return(this._values[n.prefix]||(this._values[n.prefix]=new Set)).add(n),n}getScopeValue(e,r){return this._extScope.getValue(e,r)}scopeRefs(e){return this._extScope.scopeRefs(e,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(e,r,n,a){let s=this._scope.toName(r);return n!==void 0&&a&&(this._constants[s.str]=n),this._leafNode(new so(e,s,n)),s}const(e,r,n){return this._def(Ie.varKinds.const,e,r,n)}let(e,r,n){return this._def(Ie.varKinds.let,e,r,n)}var(e,r,n){return this._def(Ie.varKinds.var,e,r,n)}assign(e,r,n){return this._leafNode(new mi(e,r,n))}add(e,r){return this._leafNode(new io(e,W.operators.ADD,r))}code(e){return typeof e=="function"?e():e!==B.nil&&this._leafNode(new uo(e)),this}object(...e){let r=["{"];for(let[n,a]of e)r.length>1&&r.push(","),r.push(n),(n!==a||this.opts.es5)&&(r.push(":"),(0,B.addCodeArg)(r,a));return r.push("}"),new B._Code(r)}if(e,r,n){if(this._blockNode(new rt(e)),r&&n)this.code(r).else().code(n).endIf();else if(r)this.code(r).endIf();else if(n)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(e){return this._elseNode(new rt(e))}else(){return this._elseNode(new ht)}endIf(){return this._endBlockNode(rt,ht)}_for(e,r){return this._blockNode(e),r&&this.code(r).endFor(),this}for(e,r){return this._for(new co(e),r)}forRange(e,r,n,a,s=this.opts.es5?Ie.varKinds.var:Ie.varKinds.let){let i=this._scope.toName(e);return this._for(new mo(s,i,r,n),()=>a(i))}forOf(e,r,n,a=Ie.varKinds.const){let s=this._scope.toName(e);if(this.opts.es5){let i=r instanceof B.Name?r:this.var("_arr",r);return this.forRange("_i",0,(0,B._)`${i}.length`,o=>{this.var(s,(0,B._)`${i}[${o}]`),n(s)})}return this._for(new hi("of",a,s,r),()=>n(s))}forIn(e,r,n,a=this.opts.es5?Ie.varKinds.var:Ie.varKinds.const){if(this.opts.ownProperties)return this.forOf(e,(0,B._)`Object.keys(${r})`,n);let s=this._scope.toName(e);return this._for(new hi("in",a,s,r),()=>n(s))}endFor(){return this._endBlockNode(nt)}label(e){return this._leafNode(new oo(e))}break(e){return this._leafNode(new po(e))}return(e){let r=new Lt;if(this._blockNode(r),this.code(e),r.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(Lt)}try(e,r,n){if(!r&&!n)throw new Error('CodeGen: "try" without "catch" and "finally"');let a=new ho;if(this._blockNode(a),this.code(e),r){let s=this.name("e");this._currNode=a.catch=new Ht(s),r(s)}return n&&(this._currNode=a.finally=new Vt,this.code(n)),this._endBlockNode(Ht,Vt)}throw(e){return this._leafNode(new fo(e))}block(e,r){return this._blockStarts.push(this._nodes.length),e&&this.code(e).endBlock(r),this}endBlock(e){let r=this._blockStarts.pop();if(r===void 0)throw new Error("CodeGen: not in self-balancing block");let n=this._nodes.length-r;if(n<0||e!==void 0&&n!==e)throw new Error(`CodeGen: wrong number of nodes: ${n} vs ${e} expected`);return this._nodes.length=r,this}func(e,r=B.nil,n,a){return this._blockNode(new Bt(e,r,n)),a&&this.code(a).endFunc(),this}endFunc(){return this._endBlockNode(Bt)}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,r){let n=this._currNode;if(n instanceof e||r&&n instanceof r)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${r?`${e.kind}/${r.kind}`:e.kind}"`)}_elseNode(e){let r=this._currNode;if(!(r instanceof rt))throw new Error('CodeGen: "else" without "if"');return this._currNode=r.else=e,this}get _root(){return this._nodes[0]}get _currNode(){let e=this._nodes;return e[e.length-1]}set _currNode(e){let r=this._nodes;r[r.length-1]=e}};W.CodeGen=_o;function at(t,e){for(let r in e)t[r]=(t[r]||0)+(e[r]||0);return t}function _i(t,e){return e instanceof B._CodeOrName?at(t,e.names):t}function _t(t,e,r){if(t instanceof B.Name)return n(t);if(!a(t))return t;return new B._Code(t._items.reduce((s,i)=>(i instanceof B.Name&&(i=n(i)),i instanceof B._Code?s.push(...i._items):s.push(i),s),[]));function n(s){let i=r[s.str];return i===void 0||e[s.str]!==1?s:(delete e[s.str],i)}function a(s){return s instanceof B._Code&&s._items.some(i=>i instanceof B.Name&&e[i.str]===1&&r[i.str]!==void 0)}}function mm(t,e){for(let r in e)t[r]=(t[r]||0)-(e[r]||0)}function Df(t){return typeof t=="boolean"||typeof t=="number"||t===null?!t:(0,B._)`!${go(t)}`}W.not=Df;var hm=Nf(W.operators.AND);function _m(...t){return t.reduce(hm)}W.and=_m;var gm=Nf(W.operators.OR);function Tm(...t){return t.reduce(gm)}W.or=Tm;function Nf(t){return(e,r)=>e===B.nil?r:r===B.nil?e:(0,B._)`${go(e)} ${t} ${go(r)}`}function go(t){return t instanceof B.Name?t:(0,B._)`(${t})`}});var z=I(U=>{"use strict";Object.defineProperty(U,"__esModule",{value:!0});U.checkStrictMode=U.getErrorPath=U.Type=U.useFunc=U.setEvaluated=U.evaluatedPropsToName=U.mergeEvaluated=U.eachItem=U.unescapeJsonPointer=U.escapeJsonPointer=U.escapeFragment=U.unescapeFragment=U.schemaRefOrVal=U.schemaHasRulesButRef=U.schemaHasRules=U.checkUnknownRules=U.alwaysValidSchema=U.toHash=void 0;var Q=A(),ym=Ut();function Fm(t){let e={};for(let r of t)e[r]=!0;return e}U.toHash=Fm;function xm(t,e){return typeof e=="boolean"?e:Object.keys(e).length===0?!0:(qf(t,e),!Bf(e,t.self.RULES.all))}U.alwaysValidSchema=xm;function qf(t,e=t.schema){let{opts:r,self:n}=t;if(!r.strictSchema||typeof e=="boolean")return;let a=n.RULES.keywords;for(let s in e)a[s]||Vf(t,`unknown keyword: "${s}"`)}U.checkUnknownRules=qf;function Bf(t,e){if(typeof t=="boolean")return!t;for(let r in t)if(e[r])return!0;return!1}U.schemaHasRules=Bf;function bm(t,e){if(typeof t=="boolean")return!t;for(let r in t)if(r!=="$ref"&&e.all[r])return!0;return!1}U.schemaHasRulesButRef=bm;function Om({topSchemaRef:t,schemaPath:e},r,n,a){if(!a){if(typeof r=="number"||typeof r=="boolean")return r;if(typeof r=="string")return(0,Q._)`${r}`}return(0,Q._)`${t}${e}${(0,Q.getProperty)(n)}`}U.schemaRefOrVal=Om;function $m(t){return Lf(decodeURIComponent(t))}U.unescapeFragment=$m;function wm(t){return encodeURIComponent(yo(t))}U.escapeFragment=wm;function yo(t){return typeof t=="number"?`${t}`:t.replace(/~/g,"~0").replace(/\//g,"~1")}U.escapeJsonPointer=yo;function Lf(t){return t.replace(/~1/g,"/").replace(/~0/g,"~")}U.unescapeJsonPointer=Lf;function Im(t,e){if(Array.isArray(t))for(let r of t)e(r);else e(t)}U.eachItem=Im;function Af({mergeNames:t,mergeToName:e,mergeValues:r,resultToName:n}){return(a,s,i,o)=>{let p=i===void 0?s:i instanceof Q.Name?(s instanceof Q.Name?t(a,s,i):e(a,s,i),i):s instanceof Q.Name?(e(a,i,s),s):r(s,i);return o===Q.Name&&!(p instanceof Q.Name)?n(a,p):p}}U.mergeEvaluated={props:Af({mergeNames:(t,e,r)=>t.if((0,Q._)`${r} !== true && ${e} !== undefined`,()=>{t.if((0,Q._)`${e} === true`,()=>t.assign(r,!0),()=>t.assign(r,(0,Q._)`${r} || {}`).code((0,Q._)`Object.assign(${r}, ${e})`))}),mergeToName:(t,e,r)=>t.if((0,Q._)`${r} !== true`,()=>{e===!0?t.assign(r,!0):(t.assign(r,(0,Q._)`${r} || {}`),Fo(t,r,e))}),mergeValues:(t,e)=>t===!0?!0:b(b({},t),e),resultToName:Hf}),items:Af({mergeNames:(t,e,r)=>t.if((0,Q._)`${r} !== true && ${e} !== undefined`,()=>t.assign(r,(0,Q._)`${e} === true ? true : ${r} > ${e} ? ${r} : ${e}`)),mergeToName:(t,e,r)=>t.if((0,Q._)`${r} !== true`,()=>t.assign(r,e===!0?!0:(0,Q._)`${r} > ${e} ? ${r} : ${e}`)),mergeValues:(t,e)=>t===!0?!0:Math.max(t,e),resultToName:(t,e)=>t.var("items",e)})};function Hf(t,e){if(e===!0)return t.var("props",!0);let r=t.var("props",(0,Q._)`{}`);return e!==void 0&&Fo(t,r,e),r}U.evaluatedPropsToName=Hf;function Fo(t,e,r){Object.keys(r).forEach(n=>t.assign((0,Q._)`${e}${(0,Q.getProperty)(n)}`,!0))}U.setEvaluated=Fo;var Uf={};function jm(t,e){return t.scopeValue("func",{ref:e,code:Uf[e.code]||(Uf[e.code]=new ym._Code(e.code))})}U.useFunc=jm;var To;(function(t){t[t.Num=0]="Num",t[t.Str=1]="Str"})(To||(U.Type=To={}));function km(t,e,r){if(t instanceof Q.Name){let n=e===To.Num;return r?n?(0,Q._)`"[" + ${t} + "]"`:(0,Q._)`"['" + ${t} + "']"`:n?(0,Q._)`"/" + ${t}`:(0,Q._)`"/" + ${t}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return r?(0,Q.getProperty)(t).toString():"/"+yo(t)}U.getErrorPath=km;function Vf(t,e,r=t.opts.strictSchema){if(r){if(e=`strict mode: ${e}`,r===!0)throw new Error(e);t.self.logger.warn(e)}}U.checkStrictMode=Vf});var Ue=I(xo=>{"use strict";Object.defineProperty(xo,"__esModule",{value:!0});var oe=A(),Sm={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")};xo.default=Sm});var zt=I(pe=>{"use strict";Object.defineProperty(pe,"__esModule",{value:!0});pe.extendErrors=pe.resetErrorsCount=pe.reportExtraError=pe.reportError=pe.keyword$DataError=pe.keywordError=void 0;var H=A(),Ti=z(),ue=Ue();pe.keywordError={message:({keyword:t})=>(0,H.str)`must pass "${t}" keyword validation`};pe.keyword$DataError={message:({keyword:t,schemaType:e})=>e?(0,H.str)`"${t}" keyword must be ${e} ($data)`:(0,H.str)`"${t}" keyword is invalid ($data)`};function vm(t,e=pe.keywordError,r,n){let{it:a}=t,{gen:s,compositeRule:i,allErrors:o}=a,p=Qf(t,e,r);(n!=null?n:i||o)?zf(s,p):Jf(a,(0,H._)`[${p}]`)}pe.reportError=vm;function Em(t,e=pe.keywordError,r){let{it:n}=t,{gen:a,compositeRule:s,allErrors:i}=n,o=Qf(t,e,r);zf(a,o),s||i||Jf(n,ue.default.vErrors)}pe.reportExtraError=Em;function Gm(t,e){t.assign(ue.default.errors,e),t.if((0,H._)`${ue.default.vErrors} !== null`,()=>t.if(e,()=>t.assign((0,H._)`${ue.default.vErrors}.length`,e),()=>t.assign(ue.default.vErrors,null)))}pe.resetErrorsCount=Gm;function Cm({gen:t,keyword:e,schemaValue:r,data:n,errsCount:a,it:s}){if(a===void 0)throw new Error("ajv implementation error");let i=t.name("err");t.forRange("i",a,ue.default.errors,o=>{t.const(i,(0,H._)`${ue.default.vErrors}[${o}]`),t.if((0,H._)`${i}.instancePath === undefined`,()=>t.assign((0,H._)`${i}.instancePath`,(0,H.strConcat)(ue.default.instancePath,s.errorPath))),t.assign((0,H._)`${i}.schemaPath`,(0,H.str)`${s.errSchemaPath}/${e}`),s.opts.verbose&&(t.assign((0,H._)`${i}.schema`,r),t.assign((0,H._)`${i}.data`,n))})}pe.extendErrors=Cm;function zf(t,e){let r=t.const("err",e);t.if((0,H._)`${ue.default.vErrors} === null`,()=>t.assign(ue.default.vErrors,(0,H._)`[${r}]`),(0,H._)`${ue.default.vErrors}.push(${r})`),t.code((0,H._)`${ue.default.errors}++`)}function Jf(t,e){let{gen:r,validateName:n,schemaEnv:a}=t;a.$async?r.throw((0,H._)`new ${t.ValidationError}(${e})`):(r.assign((0,H._)`${n}.errors`,e),r.return(!1))}var st={keyword:new H.Name("keyword"),schemaPath:new H.Name("schemaPath"),params:new H.Name("params"),propertyName:new H.Name("propertyName"),message:new H.Name("message"),schema:new H.Name("schema"),parentSchema:new H.Name("parentSchema")};function Qf(t,e,r){let{createErrors:n}=t.it;return n===!1?(0,H._)`{}`:Rm(t,e,r)}function Rm(t,e,r={}){let{gen:n,it:a}=t,s=[Mm(a,r),Pm(t,r)];return Wm(t,e,s),n.object(...s)}function Mm({errorPath:t},{instancePath:e}){let r=e?(0,H.str)`${t}${(0,Ti.getErrorPath)(e,Ti.Type.Str)}`:t;return[ue.default.instancePath,(0,H.strConcat)(ue.default.instancePath,r)]}function Pm({keyword:t,it:{errSchemaPath:e}},{schemaPath:r,parentSchema:n}){let a=n?e:(0,H.str)`${e}/${t}`;return r&&(a=(0,H.str)`${a}${(0,Ti.getErrorPath)(r,Ti.Type.Str)}`),[st.schemaPath,a]}function Wm(t,{params:e,message:r},n){let{keyword:a,data:s,schemaValue:i,it:o}=t,{opts:p,propertyName:m,topSchemaRef:c,schemaPath:h}=o;n.push([st.keyword,a],[st.params,typeof e=="function"?e(t):e||(0,H._)`{}`]),p.messages&&n.push([st.message,typeof r=="function"?r(t):r]),p.verbose&&n.push([st.schema,i],[st.parentSchema,(0,H._)`${c}${h}`],[ue.default.data,s]),m&&n.push([st.propertyName,m])}});var Yf=I(gt=>{"use strict";Object.defineProperty(gt,"__esModule",{value:!0});gt.boolOrEmptySchema=gt.topBoolOrEmptySchema=void 0;var Dm=zt(),Nm=A(),Am=Ue(),Um={message:"boolean schema is false"};function qm(t){let{gen:e,schema:r,validateName:n}=t;r===!1?Kf(t,!1):typeof r=="object"&&r.$async===!0?e.return(Am.default.data):(e.assign((0,Nm._)`${n}.errors`,null),e.return(!0))}gt.topBoolOrEmptySchema=qm;function Bm(t,e){let{gen:r,schema:n}=t;n===!1?(r.var(e,!1),Kf(t)):r.var(e,!0)}gt.boolOrEmptySchema=Bm;function Kf(t,e){let{gen:r,data:n}=t,a={gen:r,keyword:"false schema",data:n,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:t};(0,Dm.reportError)(a,Um,void 0,e)}});var bo=I(Tt=>{"use strict";Object.defineProperty(Tt,"__esModule",{value:!0});Tt.getRules=Tt.isJSONType=void 0;var Lm=["string","number","integer","boolean","null","object","array"],Hm=new Set(Lm);function Vm(t){return typeof t=="string"&&Hm.has(t)}Tt.isJSONType=Vm;function zm(){let t={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:q(b({},t),{integer:!0,boolean:!0,null:!0}),rules:[{rules:[]},t.number,t.string,t.array,t.object],post:{rules:[]},all:{},keywords:{}}}Tt.getRules=zm});var Oo=I(He=>{"use strict";Object.defineProperty(He,"__esModule",{value:!0});He.shouldUseRule=He.shouldUseGroup=He.schemaHasRulesForType=void 0;function Jm({schema:t,self:e},r){let n=e.RULES.types[r];return n&&n!==!0&&Xf(t,n)}He.schemaHasRulesForType=Jm;function Xf(t,e){return e.rules.some(r=>Zf(t,r))}He.shouldUseGroup=Xf;function Zf(t,e){var r;return t[e.keyword]!==void 0||((r=e.definition.implements)===null||r===void 0?void 0:r.some(n=>t[n]!==void 0))}He.shouldUseRule=Zf});var Jt=I(de=>{"use strict";Object.defineProperty(de,"__esModule",{value:!0});de.reportTypeError=de.checkDataTypes=de.checkDataType=de.coerceAndCheckDataType=de.getJSONTypes=de.getSchemaTypes=de.DataType=void 0;var Qm=bo(),Km=Oo(),Ym=zt(),P=A(),eu=z(),yt;(function(t){t[t.Correct=0]="Correct",t[t.Wrong=1]="Wrong"})(yt||(de.DataType=yt={}));function Xm(t){let e=tu(t.type);if(e.includes("null")){if(t.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!e.length&&t.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');t.nullable===!0&&e.push("null")}return e}de.getSchemaTypes=Xm;function tu(t){let e=Array.isArray(t)?t:t?[t]:[];if(e.every(Qm.isJSONType))return e;throw new Error("type must be JSONType or JSONType[]: "+e.join(","))}de.getJSONTypes=tu;function Zm(t,e){let{gen:r,data:n,opts:a}=t,s=eh(e,a.coerceTypes),i=e.length>0&&!(s.length===0&&e.length===1&&(0,Km.schemaHasRulesForType)(t,e[0]));if(i){let o=wo(e,n,a.strictNumbers,yt.Wrong);r.if(o,()=>{s.length?th(t,e,s):Io(t)})}return i}de.coerceAndCheckDataType=Zm;var ru=new Set(["string","number","integer","boolean","null"]);function eh(t,e){return e?t.filter(r=>ru.has(r)||e==="array"&&r==="array"):[]}function th(t,e,r){let{gen:n,data:a,opts:s}=t,i=n.let("dataType",(0,P._)`typeof ${a}`),o=n.let("coerced",(0,P._)`undefined`);s.coerceTypes==="array"&&n.if((0,P._)`${i} == 'object' && Array.isArray(${a}) && ${a}.length == 1`,()=>n.assign(a,(0,P._)`${a}[0]`).assign(i,(0,P._)`typeof ${a}`).if(wo(e,a,s.strictNumbers),()=>n.assign(o,a))),n.if((0,P._)`${o} !== undefined`);for(let m of r)(ru.has(m)||m==="array"&&s.coerceTypes==="array")&&p(m);n.else(),Io(t),n.endIf(),n.if((0,P._)`${o} !== undefined`,()=>{n.assign(a,o),rh(t,o)});function p(m){switch(m){case"string":n.elseIf((0,P._)`${i} == "number" || ${i} == "boolean"`).assign(o,(0,P._)`"" + ${a}`).elseIf((0,P._)`${a} === null`).assign(o,(0,P._)`""`);return;case"number":n.elseIf((0,P._)`${i} == "boolean" || ${a} === null
|
|
3
3
|
|| (${i} == "string" && ${a} && ${a} == +${a})`).assign(o,(0,P._)`+${a}`);return;case"integer":n.elseIf((0,P._)`${i} === "boolean" || ${a} === null
|
|
4
4
|
|| (${i} === "string" && ${a} && ${a} == +${a} && !(${a} % 1))`).assign(o,(0,P._)`+${a}`);return;case"boolean":n.elseIf((0,P._)`${a} === "false" || ${a} === 0 || ${a} === null`).assign(o,!1).elseIf((0,P._)`${a} === "true" || ${a} === 1`).assign(o,!0);return;case"null":n.elseIf((0,P._)`${a} === "" || ${a} === 0 || ${a} === false`),n.assign(o,null);return;case"array":n.elseIf((0,P._)`${i} === "string" || ${i} === "number"
|
|
5
|
-
|| ${i} === "boolean" || ${a} === null`).assign(o,(0,P._)`[${a}]`)}}}function rh({gen:t,parentData:e,parentDataProperty:r},n){t.if((0,P._)`${e} !== undefined`,()=>t.assign((0,P._)`${e}[${r}]`,n))}function $o(t,e,r,n=yt.Correct){let a=n===yt.Correct?P.operators.EQ:P.operators.NEQ,s;switch(t){case"null":return(0,P._)`${e} ${a} null`;case"array":s=(0,P._)`Array.isArray(${e})`;break;case"object":s=(0,P._)`${e} && typeof ${e} == "object" && !Array.isArray(${e})`;break;case"integer":s=i((0,P._)`!(${e} % 1) && !isNaN(${e})`);break;case"number":s=i();break;default:return(0,P._)`typeof ${e} ${a} ${t}`}return n===yt.Correct?s:(0,P.not)(s);function i(o=P.nil){return(0,P.and)((0,P._)`typeof ${e} == "number"`,o,r?(0,P._)`isFinite(${e})`:P.nil)}}de.checkDataType=$o;function wo(t,e,r,n){if(t.length===1)return $o(t[0],e,r,n);let a,s=(0,eu.toHash)(t);if(s.array&&s.object){let i=(0,P._)`typeof ${e} != "object"`;a=s.null?i:(0,P._)`!${e} || ${i}`,delete s.null,delete s.array,delete s.object}else a=P.nil;s.number&&delete s.integer;for(let i in s)a=(0,P.and)(a,$o(i,e,r,n));return a}de.checkDataTypes=wo;var nh={message:({schema:t})=>`must be ${t}`,params:({schema:t,schemaValue:e})=>typeof t=="string"?(0,P._)`{type: ${t}}`:(0,P._)`{type: ${e}}`};function Io(t){let e=ah(t);(0,Ym.reportError)(e,nh)}de.reportTypeError=Io;function ah(t){let{gen:e,data:r,schema:n}=t,a=(0,eu.schemaRefOrVal)(t,n,"type");return{gen:e,keyword:"type",data:r,schema:n.type,schemaCode:a,schemaValue:a,parentSchema:n,params:{},it:t}}});var au=I(yi=>{"use strict";Object.defineProperty(yi,"__esModule",{value:!0});yi.assignDefaults=void 0;var Ft=N(),sh=z();function ih(t,e){let{properties:r,items:n}=t.schema;if(e==="object"&&r)for(let a in r)nu(t,a,r[a].default);else e==="array"&&Array.isArray(n)&&n.forEach((a,s)=>nu(t,s,a.default))}yi.assignDefaults=ih;function nu(t,e,r){let{gen:n,compositeRule:a,data:s,opts:i}=t;if(r===void 0)return;let o=(0,Ft._)`${s}${(0,Ft.getProperty)(e)}`;if(a){(0,sh.checkStrictMode)(t,`default is ignored for: ${o}`);return}let p=(0,Ft._)`${o} === undefined`;i.useDefaults==="empty"&&(p=(0,Ft._)`${p} || ${o} === null || ${o} === ""`),n.if(p,(0,Ft._)`${o} = ${(0,Ft.stringify)(r)}`)}});var be=I(J=>{"use strict";Object.defineProperty(J,"__esModule",{value:!0});J.validateUnion=J.validateArray=J.usePattern=J.callValidateCode=J.schemaProperties=J.allSchemaProperties=J.noPropertyInData=J.propertyInData=J.isOwnProperty=J.hasPropFunc=J.reportMissingProp=J.checkMissingProp=J.checkReportMissingProp=void 0;var Y=N(),jo=z(),Ve=Ue(),oh=z();function ph(t,e){let{gen:r,data:n,it:a}=t;r.if(So(r,n,e,a.opts.ownProperties),()=>{t.setParams({missingProperty:(0,Y._)`${e}`},!0),t.error()})}J.checkReportMissingProp=ph;function dh({gen:t,data:e,it:{opts:r}},n,a){return(0,Y.or)(...n.map(s=>(0,Y.and)(So(t,e,s,r.ownProperties),(0,Y._)`${a} = ${s}`)))}J.checkMissingProp=dh;function fh(t,e){t.setParams({missingProperty:e},!0),t.error()}J.reportMissingProp=fh;function su(t){return t.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,Y._)`Object.prototype.hasOwnProperty`})}J.hasPropFunc=su;function ko(t,e,r){return(0,Y._)`${su(t)}.call(${e}, ${r})`}J.isOwnProperty=ko;function uh(t,e,r,n){let a=(0,Y._)`${e}${(0,Y.getProperty)(r)} !== undefined`;return n?(0,Y._)`${a} && ${ko(t,e,r)}`:a}J.propertyInData=uh;function So(t,e,r,n){let a=(0,Y._)`${e}${(0,Y.getProperty)(r)} === undefined`;return n?(0,Y.or)(a,(0,Y.not)(ko(t,e,r))):a}J.noPropertyInData=So;function iu(t){return t?Object.keys(t).filter(e=>e!=="__proto__"):[]}J.allSchemaProperties=iu;function lh(t,e){return iu(e).filter(r=>!(0,jo.alwaysValidSchema)(t,e[r]))}J.schemaProperties=lh;function ch({schemaCode:t,data:e,it:{gen:r,topSchemaRef:n,schemaPath:a,errorPath:s},it:i},o,p,m){let c=m?(0,Y._)`${t}, ${e}, ${n}${a}`:e,h=[[Ve.default.instancePath,(0,Y.strConcat)(Ve.default.instancePath,s)],[Ve.default.parentData,i.parentData],[Ve.default.parentDataProperty,i.parentDataProperty],[Ve.default.rootData,Ve.default.rootData]];i.opts.dynamicRef&&h.push([Ve.default.dynamicAnchors,Ve.default.dynamicAnchors]);let T=(0,Y._)`${c}, ${r.object(...h)}`;return p!==Y.nil?(0,Y._)`${o}.call(${p}, ${T})`:(0,Y._)`${o}(${T})`}J.callValidateCode=ch;var mh=(0,Y._)`new RegExp`;function hh({gen:t,it:{opts:e}},r){let n=e.unicodeRegExp?"u":"",{regExp:a}=e.code,s=a(r,n);return t.scopeValue("pattern",{key:s.toString(),ref:s,code:(0,Y._)`${a.code==="new RegExp"?mh:(0,oh.useFunc)(t,a)}(${r}, ${n})`})}J.usePattern=hh;function _h(t){let{gen:e,data:r,keyword:n,it:a}=t,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 p=e.const("len",(0,Y._)`${r}.length`);e.forRange("i",0,p,m=>{t.subschema({keyword:n,dataProp:m,dataPropType:jo.Type.Num},s),e.if((0,Y.not)(s),o)})}}J.validateArray=_h;function gh(t){let{gen:e,schema:r,keyword:n,it:a}=t;if(!Array.isArray(r))throw new Error("ajv implementation error");if(r.some(p=>(0,jo.alwaysValidSchema)(a,p))&&!a.opts.unevaluated)return;let i=e.let("valid",!1),o=e.name("_valid");e.block(()=>r.forEach((p,m)=>{let c=t.subschema({keyword:n,schemaProp:m,compositeRule:!0},o);e.assign(i,(0,Y._)`${i} || ${o}`),t.mergeValidEvaluated(c,o)||e.if((0,Y.not)(i))})),t.result(i,()=>t.reset(),()=>t.error(!0))}J.validateUnion=gh});var du=I(Ge=>{"use strict";Object.defineProperty(Ge,"__esModule",{value:!0});Ge.validateKeywordUsage=Ge.validSchemaType=Ge.funcKeywordCode=Ge.macroKeywordCode=void 0;var le=N(),it=Ue(),Th=be(),yh=zt();function Fh(t,e){let{gen:r,keyword:n,schema:a,parentSchema:s,it:i}=t,o=e.macro.call(i.self,a,s,i),p=pu(r,n,o);i.opts.validateSchema!==!1&&i.self.validateSchema(o,!0);let m=r.name("valid");t.subschema({schema:o,schemaPath:le.nil,errSchemaPath:`${i.errSchemaPath}/${n}`,topSchemaRef:p,compositeRule:!0},m),t.pass(m,()=>t.error(!0))}Ge.macroKeywordCode=Fh;function xh(t,e){var r;let{gen:n,keyword:a,schema:s,parentSchema:i,$data:o,it:p}=t;Oh(p,e);let m=!o&&e.compile?e.compile.call(p.self,s,i,p):e.validate,c=pu(n,a,m),h=n.let("valid");t.block$data(h,T),t.ok((r=e.valid)!==null&&r!==void 0?r:h);function T(){if(e.errors===!1)F(),e.modifying&&ou(t),y(()=>t.error());else{let $=e.async?x():g();e.modifying&&ou(t),y(()=>bh(t,$))}}function x(){let $=n.let("ruleErrs",null);return n.try(()=>F((0,le._)`await `),D=>n.assign(h,!1).if((0,le._)`${D} instanceof ${p.ValidationError}`,()=>n.assign($,(0,le._)`${D}.errors`),()=>n.throw(D))),$}function g(){let $=(0,le._)`${c}.errors`;return n.assign($,null),F(le.nil),$}function F($=e.async?(0,le._)`await `:le.nil){let D=p.opts.passContext?it.default.this:it.default.self,A=!("compile"in e&&!o||e.schema===!1);n.assign(h,(0,le._)`${$}${(0,Th.callValidateCode)(t,c,D,A)}`,e.modifying)}function y($){var D;n.if((0,le.not)((D=e.valid)!==null&&D!==void 0?D:h),$)}}Ge.funcKeywordCode=xh;function ou(t){let{gen:e,data:r,it:n}=t;e.if(n.parentData,()=>e.assign(r,(0,le._)`${n.parentData}[${n.parentDataProperty}]`))}function bh(t,e){let{gen:r}=t;r.if((0,le._)`Array.isArray(${e})`,()=>{r.assign(it.default.vErrors,(0,le._)`${it.default.vErrors} === null ? ${e} : ${it.default.vErrors}.concat(${e})`).assign(it.default.errors,(0,le._)`${it.default.vErrors}.length`),(0,yh.extendErrors)(t)},()=>t.error())}function Oh({schemaEnv:t},e){if(e.async&&!t.$async)throw new Error("async keyword in sync schema")}function pu(t,e,r){if(r===void 0)throw new Error(`keyword "${e}" failed to compile`);return t.scopeValue("keyword",typeof r=="function"?{ref:r}:{ref:r,code:(0,le.stringify)(r)})}function $h(t,e,r=!1){return!e.length||e.some(n=>n==="array"?Array.isArray(t):n==="object"?t&&typeof t=="object"&&!Array.isArray(t):typeof t==n||r&&typeof t=="undefined")}Ge.validSchemaType=$h;function wh({schema:t,opts:e,self:r,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(t,o)))throw new Error(`parent schema must have dependencies of ${s}: ${i.join(",")}`);if(a.validateSchema&&!a.validateSchema(t[s])){let p=`keyword "${s}" value is invalid at path "${n}": `+r.errorsText(a.validateSchema.errors);if(e.validateSchema==="log")r.logger.error(p);else throw new Error(p)}}Ge.validateKeywordUsage=wh});var uu=I(ze=>{"use strict";Object.defineProperty(ze,"__esModule",{value:!0});ze.extendSubschemaMode=ze.extendSubschemaData=ze.getSubschema=void 0;var Ce=N(),fu=z();function Ih(t,{keyword:e,schemaProp:r,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=t.schema[e];return r===void 0?{schema:o,schemaPath:(0,Ce._)`${t.schemaPath}${(0,Ce.getProperty)(e)}`,errSchemaPath:`${t.errSchemaPath}/${e}`}:{schema:o[r],schemaPath:(0,Ce._)`${t.schemaPath}${(0,Ce.getProperty)(e)}${(0,Ce.getProperty)(r)}`,errSchemaPath:`${t.errSchemaPath}/${e}/${(0,fu.escapeFragment)(r)}`}}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')}ze.getSubschema=Ih;function jh(t,e,{dataProp:r,dataPropType:n,data:a,dataTypes:s,propertyName:i}){if(a!==void 0&&r!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');let{gen:o}=e;if(r!==void 0){let{errorPath:m,dataPathArr:c,opts:h}=e,T=o.let("data",(0,Ce._)`${e.data}${(0,Ce.getProperty)(r)}`,!0);p(T),t.errorPath=(0,Ce.str)`${m}${(0,fu.getErrorPath)(r,n,h.jsPropertySyntax)}`,t.parentDataProperty=(0,Ce._)`${r}`,t.dataPathArr=[...c,t.parentDataProperty]}if(a!==void 0){let m=a instanceof Ce.Name?a:o.let("data",a,!0);p(m),i!==void 0&&(t.propertyName=i)}s&&(t.dataTypes=s);function p(m){t.data=m,t.dataLevel=e.dataLevel+1,t.dataTypes=[],e.definedProperties=new Set,t.parentData=e.data,t.dataNames=[...e.dataNames,m]}}ze.extendSubschemaData=jh;function kh(t,{jtdDiscriminator:e,jtdMetadata:r,compositeRule:n,createErrors:a,allErrors:s}){n!==void 0&&(t.compositeRule=n),a!==void 0&&(t.createErrors=a),s!==void 0&&(t.allErrors=s),t.jtdDiscriminator=e,t.jtdMetadata=r}ze.extendSubschemaMode=kh});var vo=I((bI,lu)=>{"use strict";lu.exports=function t(e,r){if(e===r)return!0;if(e&&r&&typeof e=="object"&&typeof r=="object"){if(e.constructor!==r.constructor)return!1;var n,a,s;if(Array.isArray(e)){if(n=e.length,n!=r.length)return!1;for(a=n;a--!==0;)if(!t(e[a],r[a]))return!1;return!0}if(e.constructor===RegExp)return e.source===r.source&&e.flags===r.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===r.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===r.toString();if(s=Object.keys(e),n=s.length,n!==Object.keys(r).length)return!1;for(a=n;a--!==0;)if(!Object.prototype.hasOwnProperty.call(r,s[a]))return!1;for(a=n;a--!==0;){var i=s[a];if(!t(e[i],r[i]))return!1}return!0}return e!==e&&r!==r}});var mu=I((OI,cu)=>{"use strict";var Je=cu.exports=function(t,e,r){typeof e=="function"&&(r=e,e={}),r=e.cb||r;var n=typeof r=="function"?r:r.pre||function(){},a=r.post||function(){};Fi(e,n,a,t,"",t)};Je.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0};Je.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0};Je.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0};Je.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 Fi(t,e,r,n,a,s,i,o,p,m){if(n&&typeof n=="object"&&!Array.isArray(n)){e(n,a,s,i,o,p,m);for(var c in n){var h=n[c];if(Array.isArray(h)){if(c in Je.arrayKeywords)for(var T=0;T<h.length;T++)Fi(t,e,r,h[T],a+"/"+c+"/"+T,s,a,c,n,T)}else if(c in Je.propsKeywords){if(h&&typeof h=="object")for(var x in h)Fi(t,e,r,h[x],a+"/"+c+"/"+Sh(x),s,a,c,n,x)}else(c in Je.keywords||t.allKeys&&!(c in Je.skipKeywords))&&Fi(t,e,r,h,a+"/"+c,s,a,c,n)}r(n,a,s,i,o,p,m)}}function Sh(t){return t.replace(/~/g,"~0").replace(/\//g,"~1")}});var Qt=I(_e=>{"use strict";Object.defineProperty(_e,"__esModule",{value:!0});_e.getSchemaRefs=_e.resolveUrl=_e.normalizeId=_e._getFullPath=_e.getFullPath=_e.inlineRef=void 0;var vh=z(),Eh=vo(),Gh=mu(),Ch=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function Rh(t,e=!0){return typeof t=="boolean"?!0:e===!0?!Eo(t):e?hu(t)<=e:!1}_e.inlineRef=Rh;var Mh=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function Eo(t){for(let e in t){if(Mh.has(e))return!0;let r=t[e];if(Array.isArray(r)&&r.some(Eo)||typeof r=="object"&&Eo(r))return!0}return!1}function hu(t){let e=0;for(let r in t){if(r==="$ref")return 1/0;if(e++,!Ch.has(r)&&(typeof t[r]=="object"&&(0,vh.eachItem)(t[r],n=>e+=hu(n)),e===1/0))return 1/0}return e}function _u(t,e="",r){r!==!1&&(e=xt(e));let n=t.parse(e);return gu(t,n)}_e.getFullPath=_u;function gu(t,e){return t.serialize(e).split("#")[0]+"#"}_e._getFullPath=gu;var Ph=/#\/?$/;function xt(t){return t?t.replace(Ph,""):""}_e.normalizeId=xt;function Wh(t,e,r){return r=xt(r),t.resolve(e,r)}_e.resolveUrl=Wh;var Dh=/^[a-z_][-a-z0-9._]*$/i;function Ah(t,e){if(typeof t=="boolean")return{};let{schemaId:r,uriResolver:n}=this.opts,a=xt(t[r]||e),s={"":a},i=_u(n,a,!1),o={},p=new Set;return Gh(t,{allKeys:!0},(h,T,x,g)=>{if(g===void 0)return;let F=i+T,y=s[g];typeof h[r]=="string"&&(y=$.call(this,h[r])),D.call(this,h.$anchor),D.call(this,h.$dynamicAnchor),s[T]=y;function $(A){let K=this.opts.uriResolver.resolve;if(A=xt(y?K(y,A):A),p.has(A))throw c(A);p.add(A);let G=this.refs[A];return typeof G=="string"&&(G=this.refs[G]),typeof G=="object"?m(h,G.schema,A):A!==xt(F)&&(A[0]==="#"?(m(h,o[A],A),o[A]=h):this.refs[A]=F),A}function D(A){if(typeof A=="string"){if(!Dh.test(A))throw new Error(`invalid anchor "${A}"`);$.call(this,`#${A}`)}}}),o;function m(h,T,x){if(T!==void 0&&!Eh(h,T))throw c(x)}function c(h){return new Error(`reference "${h}" resolves to more than one schema`)}}_e.getSchemaRefs=Ah});var Xt=I(Qe=>{"use strict";Object.defineProperty(Qe,"__esModule",{value:!0});Qe.getData=Qe.KeywordCxt=Qe.validateFunctionCode=void 0;var bu=Yf(),Tu=Jt(),Co=Oo(),xi=Jt(),Nh=au(),Yt=du(),Go=uu(),k=N(),E=Ue(),Uh=Qt(),qe=z(),Kt=zt();function qh(t){if(wu(t)&&(Iu(t),$u(t))){Hh(t);return}Ou(t,()=>(0,bu.topBoolOrEmptySchema)(t))}Qe.validateFunctionCode=qh;function Ou({gen:t,validateName:e,schema:r,schemaEnv:n,opts:a},s){a.code.es5?t.func(e,(0,k._)`${E.default.data}, ${E.default.valCxt}`,n.$async,()=>{t.code((0,k._)`"use strict"; ${yu(r,a)}`),Lh(t,a),t.code(s)}):t.func(e,(0,k._)`${E.default.data}, ${Bh(a)}`,n.$async,()=>t.code(yu(r,a)).code(s))}function Bh(t){return(0,k._)`{${E.default.instancePath}="", ${E.default.parentData}, ${E.default.parentDataProperty}, ${E.default.rootData}=${E.default.data}${t.dynamicRef?(0,k._)`, ${E.default.dynamicAnchors}={}`:k.nil}}={}`}function Lh(t,e){t.if(E.default.valCxt,()=>{t.var(E.default.instancePath,(0,k._)`${E.default.valCxt}.${E.default.instancePath}`),t.var(E.default.parentData,(0,k._)`${E.default.valCxt}.${E.default.parentData}`),t.var(E.default.parentDataProperty,(0,k._)`${E.default.valCxt}.${E.default.parentDataProperty}`),t.var(E.default.rootData,(0,k._)`${E.default.valCxt}.${E.default.rootData}`),e.dynamicRef&&t.var(E.default.dynamicAnchors,(0,k._)`${E.default.valCxt}.${E.default.dynamicAnchors}`)},()=>{t.var(E.default.instancePath,(0,k._)`""`),t.var(E.default.parentData,(0,k._)`undefined`),t.var(E.default.parentDataProperty,(0,k._)`undefined`),t.var(E.default.rootData,E.default.data),e.dynamicRef&&t.var(E.default.dynamicAnchors,(0,k._)`{}`)})}function Hh(t){let{schema:e,opts:r,gen:n}=t;Ou(t,()=>{r.$comment&&e.$comment&&ku(t),Kh(t),n.let(E.default.vErrors,null),n.let(E.default.errors,0),r.unevaluated&&Vh(t),ju(t),Zh(t)})}function Vh(t){let{gen:e,validateName:r}=t;t.evaluated=e.const("evaluated",(0,k._)`${r}.evaluated`),e.if((0,k._)`${t.evaluated}.dynamicProps`,()=>e.assign((0,k._)`${t.evaluated}.props`,(0,k._)`undefined`)),e.if((0,k._)`${t.evaluated}.dynamicItems`,()=>e.assign((0,k._)`${t.evaluated}.items`,(0,k._)`undefined`))}function yu(t,e){let r=typeof t=="object"&&t[e.schemaId];return r&&(e.code.source||e.code.process)?(0,k._)`/*# sourceURL=${r} */`:k.nil}function zh(t,e){if(wu(t)&&(Iu(t),$u(t))){Jh(t,e);return}(0,bu.boolOrEmptySchema)(t,e)}function $u({schema:t,self:e}){if(typeof t=="boolean")return!t;for(let r in t)if(e.RULES.all[r])return!0;return!1}function wu(t){return typeof t.schema!="boolean"}function Jh(t,e){let{schema:r,gen:n,opts:a}=t;a.$comment&&r.$comment&&ku(t),Yh(t),Xh(t);let s=n.const("_errs",E.default.errors);ju(t,s),n.var(e,(0,k._)`${s} === ${E.default.errors}`)}function Iu(t){(0,qe.checkUnknownRules)(t),Qh(t)}function ju(t,e){if(t.opts.jtd)return Fu(t,[],!1,e);let r=(0,Tu.getSchemaTypes)(t.schema),n=(0,Tu.coerceAndCheckDataType)(t,r);Fu(t,r,!n,e)}function Qh(t){let{schema:e,errSchemaPath:r,opts:n,self:a}=t;e.$ref&&n.ignoreKeywordsWithRef&&(0,qe.schemaHasRulesButRef)(e,a.RULES)&&a.logger.warn(`$ref: keywords ignored in schema at path "${r}"`)}function Kh(t){let{schema:e,opts:r}=t;e.default!==void 0&&r.useDefaults&&r.strictSchema&&(0,qe.checkStrictMode)(t,"default is ignored in the schema root")}function Yh(t){let e=t.schema[t.opts.schemaId];e&&(t.baseId=(0,Uh.resolveUrl)(t.opts.uriResolver,t.baseId,e))}function Xh(t){if(t.schema.$async&&!t.schemaEnv.$async)throw new Error("async schema in sync schema")}function ku({gen:t,schemaEnv:e,schema:r,errSchemaPath:n,opts:a}){let s=r.$comment;if(a.$comment===!0)t.code((0,k._)`${E.default.self}.logger.log(${s})`);else if(typeof a.$comment=="function"){let i=(0,k.str)`${n}/$comment`,o=t.scopeValue("root",{ref:e.root});t.code((0,k._)`${E.default.self}.opts.$comment(${s}, ${i}, ${o}.schema)`)}}function Zh(t){let{gen:e,schemaEnv:r,validateName:n,ValidationError:a,opts:s}=t;r.$async?e.if((0,k._)`${E.default.errors} === 0`,()=>e.return(E.default.data),()=>e.throw((0,k._)`new ${a}(${E.default.vErrors})`)):(e.assign((0,k._)`${n}.errors`,E.default.vErrors),s.unevaluated&&e_(t),e.return((0,k._)`${E.default.errors} === 0`))}function e_({gen:t,evaluated:e,props:r,items:n}){r instanceof k.Name&&t.assign((0,k._)`${e}.props`,r),n instanceof k.Name&&t.assign((0,k._)`${e}.items`,n)}function Fu(t,e,r,n){let{gen:a,schema:s,data:i,allErrors:o,opts:p,self:m}=t,{RULES:c}=m;if(s.$ref&&(p.ignoreKeywordsWithRef||!(0,qe.schemaHasRulesButRef)(s,c))){a.block(()=>vu(t,"$ref",c.all.$ref.definition));return}p.jtd||t_(t,e),a.block(()=>{for(let T of c.rules)h(T);h(c.post)});function h(T){(0,Co.shouldUseGroup)(s,T)&&(T.type?(a.if((0,xi.checkDataType)(T.type,i,p.strictNumbers)),xu(t,T),e.length===1&&e[0]===T.type&&r&&(a.else(),(0,xi.reportTypeError)(t)),a.endIf()):xu(t,T),o||a.if((0,k._)`${E.default.errors} === ${n||0}`))}}function xu(t,e){let{gen:r,schema:n,opts:{useDefaults:a}}=t;a&&(0,Nh.assignDefaults)(t,e.type),r.block(()=>{for(let s of e.rules)(0,Co.shouldUseRule)(n,s)&&vu(t,s.keyword,s.definition,e.type)})}function t_(t,e){t.schemaEnv.meta||!t.opts.strictTypes||(r_(t,e),t.opts.allowUnionTypes||n_(t,e),a_(t,t.dataTypes))}function r_(t,e){if(e.length){if(!t.dataTypes.length){t.dataTypes=e;return}e.forEach(r=>{Su(t.dataTypes,r)||Ro(t,`type "${r}" not allowed by context "${t.dataTypes.join(",")}"`)}),i_(t,e)}}function n_(t,e){e.length>1&&!(e.length===2&&e.includes("null"))&&Ro(t,"use allowUnionTypes to allow union type keyword")}function a_(t,e){let r=t.self.RULES.all;for(let n in r){let a=r[n];if(typeof a=="object"&&(0,Co.shouldUseRule)(t.schema,a)){let{type:s}=a.definition;s.length&&!s.some(i=>s_(e,i))&&Ro(t,`missing type "${s.join(",")}" for keyword "${n}"`)}}}function s_(t,e){return t.includes(e)||e==="number"&&t.includes("integer")}function Su(t,e){return t.includes(e)||e==="integer"&&t.includes("number")}function i_(t,e){let r=[];for(let n of t.dataTypes)Su(e,n)?r.push(n):e.includes("integer")&&n==="number"&&r.push("integer");t.dataTypes=r}function Ro(t,e){let r=t.schemaEnv.baseId+t.errSchemaPath;e+=` at "${r}" (strictTypes)`,(0,qe.checkStrictMode)(t,e,t.opts.strictTypes)}var bi=class{constructor(e,r,n){if((0,Yt.validateKeywordUsage)(e,r,n),this.gen=e.gen,this.allErrors=e.allErrors,this.keyword=n,this.data=e.data,this.schema=e.schema[n],this.$data=r.$data&&e.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,qe.schemaRefOrVal)(e,this.schema,n,this.$data),this.schemaType=r.schemaType,this.parentSchema=e.schema,this.params={},this.it=e,this.def=r,this.$data)this.schemaCode=e.gen.const("vSchema",Eu(this.$data,e));else if(this.schemaCode=this.schemaValue,!(0,Yt.validSchemaType)(this.schema,r.schemaType,r.allowUndefined))throw new Error(`${n} value must be ${JSON.stringify(r.schemaType)}`);("code"in r?r.trackErrors:r.errors!==!1)&&(this.errsCount=e.gen.const("_errs",E.default.errors))}result(e,r,n){this.failResult((0,k.not)(e),r,n)}failResult(e,r,n){this.gen.if(e),n?n():this.error(),r?(this.gen.else(),r(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(e,r){this.failResult((0,k.not)(e),void 0,r)}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:r}=this;this.fail((0,k._)`${r} !== undefined && (${(0,k.or)(this.invalid$data(),e)})`)}error(e,r,n){if(r){this.setParams(r),this._error(e,n),this.setParams({});return}this._error(e,n)}_error(e,r){(e?Kt.reportExtraError:Kt.reportError)(this,this.def.error,r)}$dataError(){(0,Kt.reportError)(this,this.def.$dataError||Kt.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,Kt.resetErrorsCount)(this.gen,this.errsCount)}ok(e){this.allErrors||this.gen.if(e)}setParams(e,r){r?Object.assign(this.params,e):this.params=e}block$data(e,r,n=k.nil){this.gen.block(()=>{this.check$data(e,n),r()})}check$data(e=k.nil,r=k.nil){if(!this.$data)return;let{gen:n,schemaCode:a,schemaType:s,def:i}=this;n.if((0,k.or)((0,k._)`${a} === undefined`,r)),e!==k.nil&&n.assign(e,!0),(s.length||i.validateSchema)&&(n.elseIf(this.invalid$data()),this.$dataError(),e!==k.nil&&n.assign(e,!1)),n.else()}invalid$data(){let{gen:e,schemaCode:r,schemaType:n,def:a,it:s}=this;return(0,k.or)(i(),o());function i(){if(n.length){if(!(r instanceof k.Name))throw new Error("ajv implementation error");let p=Array.isArray(n)?n:[n];return(0,k._)`${(0,xi.checkDataTypes)(p,r,s.opts.strictNumbers,xi.DataType.Wrong)}`}return k.nil}function o(){if(a.validateSchema){let p=e.scopeValue("validate$data",{ref:a.validateSchema});return(0,k._)`!${p}(${r})`}return k.nil}}subschema(e,r){let n=(0,Go.getSubschema)(this.it,e);(0,Go.extendSubschemaData)(n,this.it,e),(0,Go.extendSubschemaMode)(n,e);let a=q(b(b({},this.it),n),{items:void 0,props:void 0});return zh(a,r),a}mergeEvaluated(e,r){let{it:n,gen:a}=this;n.opts.unevaluated&&(n.props!==!0&&e.props!==void 0&&(n.props=qe.mergeEvaluated.props(a,e.props,n.props,r)),n.items!==!0&&e.items!==void 0&&(n.items=qe.mergeEvaluated.items(a,e.items,n.items,r)))}mergeValidEvaluated(e,r){let{it:n,gen:a}=this;if(n.opts.unevaluated&&(n.props!==!0||n.items!==!0))return a.if(r,()=>this.mergeEvaluated(e,k.Name)),!0}};Qe.KeywordCxt=bi;function vu(t,e,r,n){let a=new bi(t,r,e);"code"in r?r.code(a,n):a.$data&&r.validate?(0,Yt.funcKeywordCode)(a,r):"macro"in r?(0,Yt.macroKeywordCode)(a,r):(r.compile||r.validate)&&(0,Yt.funcKeywordCode)(a,r)}var o_=/^\/(?:[^~]|~0|~1)*$/,p_=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function Eu(t,{dataLevel:e,dataNames:r,dataPathArr:n}){let a,s;if(t==="")return E.default.rootData;if(t[0]==="/"){if(!o_.test(t))throw new Error(`Invalid JSON-pointer: ${t}`);a=t,s=E.default.rootData}else{let m=p_.exec(t);if(!m)throw new Error(`Invalid JSON-pointer: ${t}`);let c=+m[1];if(a=m[2],a==="#"){if(c>=e)throw new Error(p("property/index",c));return n[e-c]}if(c>e)throw new Error(p("data",c));if(s=r[e-c],!a)return s}let i=s,o=a.split("/");for(let m of o)m&&(s=(0,k._)`${s}${(0,k.getProperty)((0,qe.unescapeJsonPointer)(m))}`,i=(0,k._)`${i} && ${s}`);return i;function p(m,c){return`Cannot access ${m} ${c} levels up, current level is ${e}`}}Qe.getData=Eu});var Oi=I(Po=>{"use strict";Object.defineProperty(Po,"__esModule",{value:!0});var Mo=class extends Error{constructor(e){super("validation failed"),this.errors=e,this.ajv=this.validation=!0}};Po.default=Mo});var Zt=I(Ao=>{"use strict";Object.defineProperty(Ao,"__esModule",{value:!0});var Wo=Qt(),Do=class extends Error{constructor(e,r,n,a){super(a||`can't resolve reference ${n} from id ${r}`),this.missingRef=(0,Wo.resolveUrl)(e,r,n),this.missingSchema=(0,Wo.normalizeId)((0,Wo.getFullPath)(e,this.missingRef))}};Ao.default=Do});var wi=I(Oe=>{"use strict";Object.defineProperty(Oe,"__esModule",{value:!0});Oe.resolveSchema=Oe.getCompilingSchema=Oe.resolveRef=Oe.compileSchema=Oe.SchemaEnv=void 0;var je=N(),d_=Oi(),ot=Ue(),ke=Qt(),Gu=z(),f_=Xt(),bt=class{constructor(e){var r;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=(r=e.baseId)!==null&&r!==void 0?r:(0,ke.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={}}};Oe.SchemaEnv=bt;function Uo(t){let e=Cu.call(this,t);if(e)return e;let r=(0,ke.getFullPath)(this.opts.uriResolver,t.root.baseId),{es5:n,lines:a}=this.opts.code,{ownProperties:s}=this.opts,i=new je.CodeGen(this.scope,{es5:n,lines:a,ownProperties:s}),o;t.$async&&(o=i.scopeValue("Error",{ref:d_.default,code:(0,je._)`require("ajv/dist/runtime/validation_error").default`}));let p=i.scopeName("validate");t.validateName=p;let m={gen:i,allErrors:this.opts.allErrors,data:ot.default.data,parentData:ot.default.parentData,parentDataProperty:ot.default.parentDataProperty,dataNames:[ot.default.data],dataPathArr:[je.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:i.scopeValue("schema",this.opts.code.source===!0?{ref:t.schema,code:(0,je.stringify)(t.schema)}:{ref:t.schema}),validateName:p,ValidationError:o,schema:t.schema,schemaEnv:t,rootId:r,baseId:t.baseId||r,schemaPath:je.nil,errSchemaPath:t.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,je._)`""`,opts:this.opts,self:this},c;try{this._compilations.add(t),(0,f_.validateFunctionCode)(m),i.optimize(this.opts.code.optimize);let h=i.toString();c=`${i.scopeRefs(ot.default.scope)}return ${h}`,this.opts.code.process&&(c=this.opts.code.process(c,t));let x=new Function(`${ot.default.self}`,`${ot.default.scope}`,c)(this,this.scope.get());if(this.scope.value(p,{ref:x}),x.errors=null,x.schema=t.schema,x.schemaEnv=t,t.$async&&(x.$async=!0),this.opts.code.source===!0&&(x.source={validateName:p,validateCode:h,scopeValues:i._values}),this.opts.unevaluated){let{props:g,items:F}=m;x.evaluated={props:g instanceof je.Name?void 0:g,items:F instanceof je.Name?void 0:F,dynamicProps:g instanceof je.Name,dynamicItems:F instanceof je.Name},x.source&&(x.source.evaluated=(0,je.stringify)(x.evaluated))}return t.validate=x,t}catch(h){throw delete t.validate,delete t.validateName,c&&this.logger.error("Error compiling schema, function code:",c),h}finally{this._compilations.delete(t)}}Oe.compileSchema=Uo;function u_(t,e,r){var n;r=(0,ke.resolveUrl)(this.opts.uriResolver,e,r);let a=t.refs[r];if(a)return a;let s=m_.call(this,t,r);if(s===void 0){let i=(n=t.localRefs)===null||n===void 0?void 0:n[r],{schemaId:o}=this.opts;i&&(s=new bt({schema:i,schemaId:o,root:t,baseId:e}))}if(s!==void 0)return t.refs[r]=l_.call(this,s)}Oe.resolveRef=u_;function l_(t){return(0,ke.inlineRef)(t.schema,this.opts.inlineRefs)?t.schema:t.validate?t:Uo.call(this,t)}function Cu(t){for(let e of this._compilations)if(c_(e,t))return e}Oe.getCompilingSchema=Cu;function c_(t,e){return t.schema===e.schema&&t.root===e.root&&t.baseId===e.baseId}function m_(t,e){let r;for(;typeof(r=this.refs[e])=="string";)e=r;return r||this.schemas[e]||$i.call(this,t,e)}function $i(t,e){let r=this.opts.uriResolver.parse(e),n=(0,ke._getFullPath)(this.opts.uriResolver,r),a=(0,ke.getFullPath)(this.opts.uriResolver,t.baseId,void 0);if(Object.keys(t.schema).length>0&&n===a)return No.call(this,r,t);let s=(0,ke.normalizeId)(n),i=this.refs[s]||this.schemas[s];if(typeof i=="string"){let o=$i.call(this,t,i);return typeof(o==null?void 0:o.schema)!="object"?void 0:No.call(this,r,o)}if(typeof(i==null?void 0:i.schema)=="object"){if(i.validate||Uo.call(this,i),s===(0,ke.normalizeId)(e)){let{schema:o}=i,{schemaId:p}=this.opts,m=o[p];return m&&(a=(0,ke.resolveUrl)(this.opts.uriResolver,a,m)),new bt({schema:o,schemaId:p,root:t,baseId:a})}return No.call(this,r,i)}}Oe.resolveSchema=$i;var h_=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function No(t,{baseId:e,schema:r,root:n}){var a;if(((a=t.fragment)===null||a===void 0?void 0:a[0])!=="/")return;for(let o of t.fragment.slice(1).split("/")){if(typeof r=="boolean")return;let p=r[(0,Gu.unescapeFragment)(o)];if(p===void 0)return;r=p;let m=typeof r=="object"&&r[this.opts.schemaId];!h_.has(o)&&m&&(e=(0,ke.resolveUrl)(this.opts.uriResolver,e,m))}let s;if(typeof r!="boolean"&&r.$ref&&!(0,Gu.schemaHasRulesButRef)(r,this.RULES)){let o=(0,ke.resolveUrl)(this.opts.uriResolver,e,r.$ref);s=$i.call(this,n,o)}let{schemaId:i}=this.opts;if(s=s||new bt({schema:r,schemaId:i,root:n,baseId:e}),s.schema!==s.root.schema)return s}});var Ru=I((vI,__)=>{__.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 Pu=I((EI,Mu)=>{"use strict";var g_={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15};Mu.exports={HEX:g_}});var Lu=I((GI,Bu)=>{"use strict";var{HEX:T_}=Pu();function Nu(t){if(qu(t,".")<3)return{host:t,isIPV4:!1};let e=t.match(/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/u)||[],[r]=e;return r?{host:F_(r,"."),isIPV4:!0}:{host:t,isIPV4:!1}}function qo(t,e=!1){let r="",n=!0;for(let a of t){if(T_[a]===void 0)return;a!=="0"&&n===!0&&(n=!1),n||(r+=a)}return e&&r.length===0&&(r="0"),r}function y_(t){let e=0,r={error:!1,address:"",zone:""},n=[],a=[],s=!1,i=!1,o=!1;function p(){if(a.length){if(s===!1){let m=qo(a);if(m!==void 0)n.push(m);else return r.error=!0,!1}a.length=0}return!0}for(let m=0;m<t.length;m++){let c=t[m];if(!(c==="["||c==="]"))if(c===":"){if(i===!0&&(o=!0),!p())break;if(e++,n.push(":"),e>7){r.error=!0;break}m-1>=0&&t[m-1]===":"&&(i=!0);continue}else if(c==="%"){if(!p())break;s=!0}else{a.push(c);continue}}return a.length&&(s?r.zone=a.join(""):o?n.push(a.join("")):n.push(qo(a))),r.address=n.join(""),r}function Uu(t,e={}){if(qu(t,":")<2)return{host:t,isIPV6:!1};let r=y_(t);if(r.error)return{host:t,isIPV6:!1};{let n=r.address,a=r.address;return r.zone&&(n+="%"+r.zone,a+="%25"+r.zone),{host:n,escapedHost:a,isIPV6:!0}}}function F_(t,e){let r="",n=!0,a=t.length;for(let s=0;s<a;s++){let i=t[s];i==="0"&&n?(s+1<=a&&t[s+1]===e||s+1===a)&&(r+=i,n=!1):(i===e?n=!0:n=!1,r+=i)}return r}function qu(t,e){let r=0;for(let n=0;n<t.length;n++)t[n]===e&&r++;return r}var Wu=/^\.\.?\//u,Du=/^\/\.(?:\/|$)/u,Au=/^\/\.\.(?:\/|$)/u,x_=/^\/?(?:.|\n)*?(?=\/|$)/u;function b_(t){let e=[];for(;t.length;)if(t.match(Wu))t=t.replace(Wu,"");else if(t.match(Du))t=t.replace(Du,"/");else if(t.match(Au))t=t.replace(Au,"/"),e.pop();else if(t==="."||t==="..")t="";else{let r=t.match(x_);if(r){let n=r[0];t=t.slice(n.length),e.push(n)}else throw new Error("Unexpected dot segment condition")}return e.join("")}function O_(t,e){let r=e!==!0?escape:unescape;return t.scheme!==void 0&&(t.scheme=r(t.scheme)),t.userinfo!==void 0&&(t.userinfo=r(t.userinfo)),t.host!==void 0&&(t.host=r(t.host)),t.path!==void 0&&(t.path=r(t.path)),t.query!==void 0&&(t.query=r(t.query)),t.fragment!==void 0&&(t.fragment=r(t.fragment)),t}function $_(t,e){let r=[];if(t.userinfo!==void 0&&(r.push(t.userinfo),r.push("@")),t.host!==void 0){let n=unescape(t.host),a=Nu(n);if(a.isIPV4)n=a.host;else{let s=Uu(a.host,{isIPV4:!1});s.isIPV6===!0?n=`[${s.escapedHost}]`:n=t.host}r.push(n)}return(typeof t.port=="number"||typeof t.port=="string")&&(r.push(":"),r.push(String(t.port))),r.length?r.join(""):void 0}Bu.exports={recomposeAuthority:$_,normalizeComponentEncoding:O_,removeDotSegments:b_,normalizeIPv4:Nu,normalizeIPv6:Uu,stringArrayToHexStripped:qo}});var Ku=I((CI,Qu)=>{"use strict";var w_=/^[\da-f]{8}\b-[\da-f]{4}\b-[\da-f]{4}\b-[\da-f]{4}\b-[\da-f]{12}$/iu,I_=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu;function Hu(t){return typeof t.secure=="boolean"?t.secure:String(t.scheme).toLowerCase()==="wss"}function Vu(t){return t.host||(t.error=t.error||"HTTP URIs must have a host."),t}function zu(t){let e=String(t.scheme).toLowerCase()==="https";return(t.port===(e?443:80)||t.port==="")&&(t.port=void 0),t.path||(t.path="/"),t}function j_(t){return t.secure=Hu(t),t.resourceName=(t.path||"/")+(t.query?"?"+t.query:""),t.path=void 0,t.query=void 0,t}function k_(t){if((t.port===(Hu(t)?443:80)||t.port==="")&&(t.port=void 0),typeof t.secure=="boolean"&&(t.scheme=t.secure?"wss":"ws",t.secure=void 0),t.resourceName){let[e,r]=t.resourceName.split("?");t.path=e&&e!=="/"?e:void 0,t.query=r,t.resourceName=void 0}return t.fragment=void 0,t}function S_(t,e){if(!t.path)return t.error="URN can not be parsed",t;let r=t.path.match(I_);if(r){let n=e.scheme||t.scheme||"urn";t.nid=r[1].toLowerCase(),t.nss=r[2];let a=`${n}:${e.nid||t.nid}`,s=Bo[a];t.path=void 0,s&&(t=s.parse(t,e))}else t.error=t.error||"URN can not be parsed.";return t}function v_(t,e){let r=e.scheme||t.scheme||"urn",n=t.nid.toLowerCase(),a=`${r}:${e.nid||n}`,s=Bo[a];s&&(t=s.serialize(t,e));let i=t,o=t.nss;return i.path=`${n||e.nid}:${o}`,e.skipEscape=!0,i}function E_(t,e){let r=t;return r.uuid=r.nss,r.nss=void 0,!e.tolerant&&(!r.uuid||!w_.test(r.uuid))&&(r.error=r.error||"UUID is not valid."),r}function G_(t){let e=t;return e.nss=(t.uuid||"").toLowerCase(),e}var Ju={scheme:"http",domainHost:!0,parse:Vu,serialize:zu},C_={scheme:"https",domainHost:Ju.domainHost,parse:Vu,serialize:zu},Ii={scheme:"ws",domainHost:!0,parse:j_,serialize:k_},R_={scheme:"wss",domainHost:Ii.domainHost,parse:Ii.parse,serialize:Ii.serialize},M_={scheme:"urn",parse:S_,serialize:v_,skipNormalize:!0},P_={scheme:"urn:uuid",parse:E_,serialize:G_,skipNormalize:!0},Bo={http:Ju,https:C_,ws:Ii,wss:R_,urn:M_,"urn:uuid":P_};Qu.exports=Bo});var Xu=I((RI,ki)=>{"use strict";var{normalizeIPv6:W_,normalizeIPv4:D_,removeDotSegments:er,recomposeAuthority:A_,normalizeComponentEncoding:ji}=Lu(),Lo=Ku();function N_(t,e){return typeof t=="string"?t=Re(Be(t,e),e):typeof t=="object"&&(t=Be(Re(t,e),e)),t}function U_(t,e,r){let n=Object.assign({scheme:"null"},r),a=Yu(Be(t,n),Be(e,n),n,!0);return Re(a,q(b({},n),{skipEscape:!0}))}function Yu(t,e,r,n){let a={};return n||(t=Be(Re(t,r),r),e=Be(Re(e,r),r)),r=r||{},!r.tolerant&&e.scheme?(a.scheme=e.scheme,a.userinfo=e.userinfo,a.host=e.host,a.port=e.port,a.path=er(e.path||""),a.query=e.query):(e.userinfo!==void 0||e.host!==void 0||e.port!==void 0?(a.userinfo=e.userinfo,a.host=e.host,a.port=e.port,a.path=er(e.path||""),a.query=e.query):(e.path?(e.path.charAt(0)==="/"?a.path=er(e.path):((t.userinfo!==void 0||t.host!==void 0||t.port!==void 0)&&!t.path?a.path="/"+e.path:t.path?a.path=t.path.slice(0,t.path.lastIndexOf("/")+1)+e.path:a.path=e.path,a.path=er(a.path)),a.query=e.query):(a.path=t.path,e.query!==void 0?a.query=e.query:a.query=t.query),a.userinfo=t.userinfo,a.host=t.host,a.port=t.port),a.scheme=t.scheme),a.fragment=e.fragment,a}function q_(t,e,r){return typeof t=="string"?(t=unescape(t),t=Re(ji(Be(t,r),!0),q(b({},r),{skipEscape:!0}))):typeof t=="object"&&(t=Re(ji(t,!0),q(b({},r),{skipEscape:!0}))),typeof e=="string"?(e=unescape(e),e=Re(ji(Be(e,r),!0),q(b({},r),{skipEscape:!0}))):typeof e=="object"&&(e=Re(ji(e,!0),q(b({},r),{skipEscape:!0}))),t.toLowerCase()===e.toLowerCase()}function Re(t,e){let r={host:t.host,scheme:t.scheme,userinfo:t.userinfo,port:t.port,path:t.path,query:t.query,nid:t.nid,nss:t.nss,uuid:t.uuid,fragment:t.fragment,reference:t.reference,resourceName:t.resourceName,secure:t.secure,error:""},n=Object.assign({},e),a=[],s=Lo[(n.scheme||r.scheme||"").toLowerCase()];s&&s.serialize&&s.serialize(r,n),r.path!==void 0&&(n.skipEscape?r.path=unescape(r.path):(r.path=escape(r.path),r.scheme!==void 0&&(r.path=r.path.split("%3A").join(":")))),n.reference!=="suffix"&&r.scheme&&(a.push(r.scheme),a.push(":"));let i=A_(r,n);if(i!==void 0&&(n.reference!=="suffix"&&a.push("//"),a.push(i),r.path&&r.path.charAt(0)!=="/"&&a.push("/")),r.path!==void 0){let o=r.path;!n.absolutePath&&(!s||!s.absolutePath)&&(o=er(o)),i===void 0&&(o=o.replace(/^\/\//u,"/%2F")),a.push(o)}return r.query!==void 0&&(a.push("?"),a.push(r.query)),r.fragment!==void 0&&(a.push("#"),a.push(r.fragment)),a.join("")}var B_=Array.from({length:127},(t,e)=>/[^!"$&'()*+,\-.;=_`a-z{}~]/u.test(String.fromCharCode(e)));function L_(t){let e=0;for(let r=0,n=t.length;r<n;++r)if(e=t.charCodeAt(r),e>126||B_[e])return!0;return!1}var H_=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function Be(t,e){let r=Object.assign({},e),n={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0},a=t.indexOf("%")!==-1,s=!1;r.reference==="suffix"&&(t=(r.scheme?r.scheme+":":"")+"//"+t);let i=t.match(H_);if(i){if(n.scheme=i[1],n.userinfo=i[3],n.host=i[4],n.port=parseInt(i[5],10),n.path=i[6]||"",n.query=i[7],n.fragment=i[8],isNaN(n.port)&&(n.port=i[5]),n.host){let p=D_(n.host);if(p.isIPV4===!1){let m=W_(p.host,{isIPV4:!1});n.host=m.host.toLowerCase(),s=m.isIPV6}else n.host=p.host,s=!0}n.scheme===void 0&&n.userinfo===void 0&&n.host===void 0&&n.port===void 0&&!n.path&&n.query===void 0?n.reference="same-document":n.scheme===void 0?n.reference="relative":n.fragment===void 0?n.reference="absolute":n.reference="uri",r.reference&&r.reference!=="suffix"&&r.reference!==n.reference&&(n.error=n.error||"URI is not a "+r.reference+" reference.");let o=Lo[(r.scheme||n.scheme||"").toLowerCase()];if(!r.unicodeSupport&&(!o||!o.unicodeSupport)&&n.host&&(r.domainHost||o&&o.domainHost)&&s===!1&&L_(n.host))try{n.host=URL.domainToASCII(n.host.toLowerCase())}catch(p){n.error=n.error||"Host's domain name can not be converted to ASCII: "+p}(!o||o&&!o.skipNormalize)&&(a&&n.scheme!==void 0&&(n.scheme=unescape(n.scheme)),a&&n.userinfo!==void 0&&(n.userinfo=unescape(n.userinfo)),a&&n.host!==void 0&&(n.host=unescape(n.host)),n.path!==void 0&&n.path.length&&(n.path=escape(unescape(n.path))),n.fragment!==void 0&&n.fragment.length&&(n.fragment=encodeURI(decodeURIComponent(n.fragment)))),o&&o.parse&&o.parse(n,r)}else n.error=n.error||"URI can not be parsed.";return n}var Ho={SCHEMES:Lo,normalize:N_,resolve:U_,resolveComponents:Yu,equal:q_,serialize:Re,parse:Be};ki.exports=Ho;ki.exports.default=Ho;ki.exports.fastUri=Ho});var el=I(Vo=>{"use strict";Object.defineProperty(Vo,"__esModule",{value:!0});var Zu=Xu();Zu.code='require("ajv/dist/runtime/uri").default';Vo.default=Zu});var pl=I(se=>{"use strict";Object.defineProperty(se,"__esModule",{value:!0});se.CodeGen=se.Name=se.nil=se.stringify=se.str=se._=se.KeywordCxt=void 0;var V_=Xt();Object.defineProperty(se,"KeywordCxt",{enumerable:!0,get:function(){return V_.KeywordCxt}});var Ot=N();Object.defineProperty(se,"_",{enumerable:!0,get:function(){return Ot._}});Object.defineProperty(se,"str",{enumerable:!0,get:function(){return Ot.str}});Object.defineProperty(se,"stringify",{enumerable:!0,get:function(){return Ot.stringify}});Object.defineProperty(se,"nil",{enumerable:!0,get:function(){return Ot.nil}});Object.defineProperty(se,"Name",{enumerable:!0,get:function(){return Ot.Name}});Object.defineProperty(se,"CodeGen",{enumerable:!0,get:function(){return Ot.CodeGen}});var z_=Oi(),sl=Zt(),J_=bo(),tr=wi(),Q_=N(),rr=Qt(),Si=Jt(),Jo=z(),tl=Ru(),K_=el(),il=(t,e)=>new RegExp(t,e);il.code="new RegExp";var Y_=["removeAdditional","useDefaults","coerceTypes"],X_=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),Z_={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."},eg={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},rl=200;function tg(t){var e,r,n,a,s,i,o,p,m,c,h,T,x,g,F,y,$,D,A,K,G,ve,Pe,zi,Ji;let Rt=t.strict,Qi=(e=t.code)===null||e===void 0?void 0:e.optimize,gf=Qi===!0||Qi===void 0?1:Qi||0,Tf=(n=(r=t.code)===null||r===void 0?void 0:r.regExp)!==null&&n!==void 0?n:il,Pc=(a=t.uriResolver)!==null&&a!==void 0?a:K_.default;return{strictSchema:(i=(s=t.strictSchema)!==null&&s!==void 0?s:Rt)!==null&&i!==void 0?i:!0,strictNumbers:(p=(o=t.strictNumbers)!==null&&o!==void 0?o:Rt)!==null&&p!==void 0?p:!0,strictTypes:(c=(m=t.strictTypes)!==null&&m!==void 0?m:Rt)!==null&&c!==void 0?c:"log",strictTuples:(T=(h=t.strictTuples)!==null&&h!==void 0?h:Rt)!==null&&T!==void 0?T:"log",strictRequired:(g=(x=t.strictRequired)!==null&&x!==void 0?x:Rt)!==null&&g!==void 0?g:!1,code:t.code?q(b({},t.code),{optimize:gf,regExp:Tf}):{optimize:gf,regExp:Tf},loopRequired:(F=t.loopRequired)!==null&&F!==void 0?F:rl,loopEnum:(y=t.loopEnum)!==null&&y!==void 0?y:rl,meta:($=t.meta)!==null&&$!==void 0?$:!0,messages:(D=t.messages)!==null&&D!==void 0?D:!0,inlineRefs:(A=t.inlineRefs)!==null&&A!==void 0?A:!0,schemaId:(K=t.schemaId)!==null&&K!==void 0?K:"$id",addUsedSchema:(G=t.addUsedSchema)!==null&&G!==void 0?G:!0,validateSchema:(ve=t.validateSchema)!==null&&ve!==void 0?ve:!0,validateFormats:(Pe=t.validateFormats)!==null&&Pe!==void 0?Pe:!0,unicodeRegExp:(zi=t.unicodeRegExp)!==null&&zi!==void 0?zi:!0,int32range:(Ji=t.int32range)!==null&&Ji!==void 0?Ji:!0,uriResolver:Pc}}var nr=class{constructor(e={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,e=this.opts=b(b({},e),tg(e));let{es5:r,lines:n}=this.opts.code;this.scope=new Q_.ValueScope({scope:{},prefixes:X_,es5:r,lines:n}),this.logger=og(e.logger);let a=e.validateFormats;e.validateFormats=!1,this.RULES=(0,J_.getRules)(),nl.call(this,Z_,e,"NOT SUPPORTED"),nl.call(this,eg,e,"DEPRECATED","warn"),this._metaOpts=sg.call(this),e.formats&&ng.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),e.keywords&&ag.call(this,e.keywords),typeof e.meta=="object"&&this.addMetaSchema(e.meta),rg.call(this),e.validateFormats=a}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){let{$data:e,meta:r,schemaId:n}=this.opts,a=tl;n==="id"&&(a=b({},tl),a.id=a.$id,delete a.$id),r&&e&&this.addMetaSchema(a,a[n],!1)}defaultMeta(){let{meta:e,schemaId:r}=this.opts;return this.opts.defaultMeta=typeof e=="object"?e[r]||e:void 0}validate(e,r){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(r);return"$async"in n||(this.errors=n.errors),a}compile(e,r){let n=this._addSchema(e,r);return n.validate||this._compileSchemaEnv(n)}compileAsync(e,r){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,r);function a(c,h){return ee(this,null,function*(){yield s.call(this,c.$schema);let T=this._addSchema(c,h);return T.validate||i.call(this,T)})}function s(c){return ee(this,null,function*(){c&&!this.getSchema(c)&&(yield a.call(this,{$ref:c},!0))})}function i(c){return ee(this,null,function*(){try{return this._compileSchemaEnv(c)}catch(h){if(!(h instanceof sl.default))throw h;return o.call(this,h),yield p.call(this,h.missingSchema),i.call(this,c)}})}function o({missingSchema:c,missingRef:h}){if(this.refs[c])throw new Error(`AnySchema ${c} is loaded but ${h} cannot be resolved`)}function p(c){return ee(this,null,function*(){let h=yield m.call(this,c);this.refs[c]||(yield s.call(this,h.$schema)),this.refs[c]||this.addSchema(h,c,r)})}function m(c){return ee(this,null,function*(){let h=this._loading[c];if(h)return h;try{return yield this._loading[c]=n(c)}finally{delete this._loading[c]}})}}addSchema(e,r,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 r=(0,rr.normalizeId)(r||s),this._checkUnique(r),this.schemas[r]=this._addSchema(e,n,r,a,!0),this}addMetaSchema(e,r,n=this.opts.validateSchema){return this.addSchema(e,r,!0,n),this}validateSchema(e,r){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&&r){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 r;for(;typeof(r=al.call(this,e))=="string";)e=r;if(r===void 0){let{schemaId:n}=this.opts,a=new tr.SchemaEnv({schema:{},schemaId:n});if(r=tr.resolveSchema.call(this,a,e),!r)return;this.refs[e]=r}return r.validate||this._compileSchemaEnv(r)}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 r=al.call(this,e);return typeof r=="object"&&this._cache.delete(r.schema),delete this.schemas[e],delete this.refs[e],this}case"object":{let r=e;this._cache.delete(r);let n=e[this.opts.schemaId];return n&&(n=(0,rr.normalizeId)(n),delete this.schemas[n],delete this.refs[n]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(e){for(let r of e)this.addKeyword(r);return this}addKeyword(e,r){let n;if(typeof e=="string")n=e,typeof r=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),r.keyword=n);else if(typeof e=="object"&&r===void 0){if(r=e,n=r.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(dg.call(this,n,r),!r)return(0,Jo.eachItem)(n,s=>zo.call(this,s)),this;ug.call(this,r);let a=q(b({},r),{type:(0,Si.getJSONTypes)(r.type),schemaType:(0,Si.getJSONTypes)(r.schemaType)});return(0,Jo.eachItem)(n,a.type.length===0?s=>zo.call(this,s,a):s=>a.type.forEach(i=>zo.call(this,s,a,i))),this}getKeyword(e){let r=this.RULES.all[e];return typeof r=="object"?r.definition:!!r}removeKeyword(e){let{RULES:r}=this;delete r.keywords[e],delete r.all[e];for(let n of r.rules){let a=n.rules.findIndex(s=>s.keyword===e);a>=0&&n.rules.splice(a,1)}return this}addFormat(e,r){return typeof r=="string"&&(r=new RegExp(r)),this.formats[e]=r,this}errorsText(e=this.errors,{separator:r=", ",dataVar:n="data"}={}){return!e||e.length===0?"No errors":e.map(a=>`${n}${a.instancePath} ${a.message}`).reduce((a,s)=>a+r+s)}$dataMetaSchema(e,r){let n=this.RULES.all;e=JSON.parse(JSON.stringify(e));for(let a of r){let s=a.split("/").slice(1),i=e;for(let o of s)i=i[o];for(let o in n){let p=n[o];if(typeof p!="object")continue;let{$data:m}=p.definition,c=i[o];m&&c&&(i[o]=ol(c))}}return e}_removeAllSchemas(e,r){for(let n in e){let a=e[n];(!r||r.test(n))&&(typeof a=="string"?delete e[n]:a&&!a.meta&&(this._cache.delete(a.schema),delete e[n]))}}_addSchema(e,r,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 p=this._cache.get(e);if(p!==void 0)return p;n=(0,rr.normalizeId)(i||n);let m=rr.getSchemaRefs.call(this,e,n);return p=new tr.SchemaEnv({schema:e,schemaId:o,meta:r,baseId:n,localRefs:m}),this._cache.set(p.schema,p),s&&!n.startsWith("#")&&(n&&this._checkUnique(n),this.refs[n]=p),a&&this.validateSchema(e,!0),p}_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):tr.compileSchema.call(this,e),!e.validate)throw new Error("ajv implementation error");return e.validate}_compileMetaSchema(e){let r=this.opts;this.opts=this._metaOpts;try{tr.compileSchema.call(this,e)}finally{this.opts=r}}};nr.ValidationError=z_.default;nr.MissingRefError=sl.default;se.default=nr;function nl(t,e,r,n="error"){for(let a in t){let s=a;s in e&&this.logger[n](`${r}: option ${a}. ${t[s]}`)}}function al(t){return t=(0,rr.normalizeId)(t),this.schemas[t]||this.refs[t]}function rg(){let t=this.opts.schemas;if(t)if(Array.isArray(t))this.addSchema(t);else for(let e in t)this.addSchema(t[e],e)}function ng(){for(let t in this.opts.formats){let e=this.opts.formats[t];e&&this.addFormat(t,e)}}function ag(t){if(Array.isArray(t)){this.addVocabulary(t);return}this.logger.warn("keywords option as map is deprecated, pass array");for(let e in t){let r=t[e];r.keyword||(r.keyword=e),this.addKeyword(r)}}function sg(){let t=b({},this.opts);for(let e of Y_)delete t[e];return t}var ig={log(){},warn(){},error(){}};function og(t){if(t===!1)return ig;if(t===void 0)return console;if(t.log&&t.warn&&t.error)return t;throw new Error("logger must implement log, warn and error methods")}var pg=/^[a-z_$][a-z0-9_$:-]*$/i;function dg(t,e){let{RULES:r}=this;if((0,Jo.eachItem)(t,n=>{if(r.keywords[n])throw new Error(`Keyword ${n} is already defined`);if(!pg.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 zo(t,e,r){var n;let a=e==null?void 0:e.post;if(r&&a)throw new Error('keyword with "post" flag cannot have "type"');let{RULES:s}=this,i=a?s.post:s.rules.find(({type:p})=>p===r);if(i||(i={type:r,rules:[]},s.rules.push(i)),s.keywords[t]=!0,!e)return;let o={keyword:t,definition:q(b({},e),{type:(0,Si.getJSONTypes)(e.type),schemaType:(0,Si.getJSONTypes)(e.schemaType)})};e.before?fg.call(this,i,o,e.before):i.rules.push(o),s.all[t]=o,(n=e.implements)===null||n===void 0||n.forEach(p=>this.addKeyword(p))}function fg(t,e,r){let n=t.rules.findIndex(a=>a.keyword===r);n>=0?t.rules.splice(n,0,e):(t.rules.push(e),this.logger.warn(`rule ${r} is not defined`))}function ug(t){let{metaSchema:e}=t;e!==void 0&&(t.$data&&this.opts.$data&&(e=ol(e)),t.validateSchema=this.compile(e,!0))}var lg={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function ol(t){return{anyOf:[t,lg]}}});var dl=I(Qo=>{"use strict";Object.defineProperty(Qo,"__esModule",{value:!0});var cg={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};Qo.default=cg});var cl=I(pt=>{"use strict";Object.defineProperty(pt,"__esModule",{value:!0});pt.callRef=pt.getValidate=void 0;var mg=Zt(),fl=be(),ge=N(),$t=Ue(),ul=wi(),vi=z(),hg={keyword:"$ref",schemaType:"string",code(t){let{gen:e,schema:r,it:n}=t,{baseId:a,schemaEnv:s,validateName:i,opts:o,self:p}=n,{root:m}=s;if((r==="#"||r==="#/")&&a===m.baseId)return h();let c=ul.resolveRef.call(p,m,a,r);if(c===void 0)throw new mg.default(n.opts.uriResolver,a,r);if(c instanceof ul.SchemaEnv)return T(c);return x(c);function h(){if(s===m)return Ei(t,i,s,s.$async);let g=e.scopeValue("root",{ref:m});return Ei(t,(0,ge._)`${g}.validate`,m,m.$async)}function T(g){let F=ll(t,g);Ei(t,F,g,g.$async)}function x(g){let F=e.scopeValue("schema",o.code.source===!0?{ref:g,code:(0,ge.stringify)(g)}:{ref:g}),y=e.name("valid"),$=t.subschema({schema:g,dataTypes:[],schemaPath:ge.nil,topSchemaRef:F,errSchemaPath:r},y);t.mergeEvaluated($),t.ok(y)}}};function ll(t,e){let{gen:r}=t;return e.validate?r.scopeValue("validate",{ref:e.validate}):(0,ge._)`${r.scopeValue("wrapper",{ref:e})}.validate`}pt.getValidate=ll;function Ei(t,e,r,n){let{gen:a,it:s}=t,{allErrors:i,schemaEnv:o,opts:p}=s,m=p.passContext?$t.default.this:ge.nil;n?c():h();function c(){if(!o.$async)throw new Error("async schema referenced by sync schema");let g=a.let("valid");a.try(()=>{a.code((0,ge._)`await ${(0,fl.callValidateCode)(t,e,m)}`),x(e),i||a.assign(g,!0)},F=>{a.if((0,ge._)`!(${F} instanceof ${s.ValidationError})`,()=>a.throw(F)),T(F),i||a.assign(g,!1)}),t.ok(g)}function h(){t.result((0,fl.callValidateCode)(t,e,m),()=>x(e),()=>T(e))}function T(g){let F=(0,ge._)`${g}.errors`;a.assign($t.default.vErrors,(0,ge._)`${$t.default.vErrors} === null ? ${F} : ${$t.default.vErrors}.concat(${F})`),a.assign($t.default.errors,(0,ge._)`${$t.default.vErrors}.length`)}function x(g){var F;if(!s.opts.unevaluated)return;let y=(F=r==null?void 0:r.validate)===null||F===void 0?void 0:F.evaluated;if(s.props!==!0)if(y&&!y.dynamicProps)y.props!==void 0&&(s.props=vi.mergeEvaluated.props(a,y.props,s.props));else{let $=a.var("props",(0,ge._)`${g}.evaluated.props`);s.props=vi.mergeEvaluated.props(a,$,s.props,ge.Name)}if(s.items!==!0)if(y&&!y.dynamicItems)y.items!==void 0&&(s.items=vi.mergeEvaluated.items(a,y.items,s.items));else{let $=a.var("items",(0,ge._)`${g}.evaluated.items`);s.items=vi.mergeEvaluated.items(a,$,s.items,ge.Name)}}}pt.callRef=Ei;pt.default=hg});var ml=I(Ko=>{"use strict";Object.defineProperty(Ko,"__esModule",{value:!0});var _g=dl(),gg=cl(),Tg=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",_g.default,gg.default];Ko.default=Tg});var hl=I(Yo=>{"use strict";Object.defineProperty(Yo,"__esModule",{value:!0});var Gi=N(),Ke=Gi.operators,Ci={maximum:{okStr:"<=",ok:Ke.LTE,fail:Ke.GT},minimum:{okStr:">=",ok:Ke.GTE,fail:Ke.LT},exclusiveMaximum:{okStr:"<",ok:Ke.LT,fail:Ke.GTE},exclusiveMinimum:{okStr:">",ok:Ke.GT,fail:Ke.LTE}},yg={message:({keyword:t,schemaCode:e})=>(0,Gi.str)`must be ${Ci[t].okStr} ${e}`,params:({keyword:t,schemaCode:e})=>(0,Gi._)`{comparison: ${Ci[t].okStr}, limit: ${e}}`},Fg={keyword:Object.keys(Ci),type:"number",schemaType:"number",$data:!0,error:yg,code(t){let{keyword:e,data:r,schemaCode:n}=t;t.fail$data((0,Gi._)`${r} ${Ci[e].fail} ${n} || isNaN(${r})`)}};Yo.default=Fg});var _l=I(Xo=>{"use strict";Object.defineProperty(Xo,"__esModule",{value:!0});var ar=N(),xg={message:({schemaCode:t})=>(0,ar.str)`must be multiple of ${t}`,params:({schemaCode:t})=>(0,ar._)`{multipleOf: ${t}}`},bg={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:xg,code(t){let{gen:e,data:r,schemaCode:n,it:a}=t,s=a.opts.multipleOfPrecision,i=e.let("res"),o=s?(0,ar._)`Math.abs(Math.round(${i}) - ${i}) > 1e-${s}`:(0,ar._)`${i} !== parseInt(${i})`;t.fail$data((0,ar._)`(${n} === 0 || (${i} = ${r}/${n}, ${o}))`)}};Xo.default=bg});var Tl=I(Zo=>{"use strict";Object.defineProperty(Zo,"__esModule",{value:!0});function gl(t){let e=t.length,r=0,n=0,a;for(;n<e;)r++,a=t.charCodeAt(n++),a>=55296&&a<=56319&&n<e&&(a=t.charCodeAt(n),(a&64512)===56320&&n++);return r}Zo.default=gl;gl.code='require("ajv/dist/runtime/ucs2length").default'});var yl=I(ep=>{"use strict";Object.defineProperty(ep,"__esModule",{value:!0});var dt=N(),Og=z(),$g=Tl(),wg={message({keyword:t,schemaCode:e}){let r=t==="maxLength"?"more":"fewer";return(0,dt.str)`must NOT have ${r} than ${e} characters`},params:({schemaCode:t})=>(0,dt._)`{limit: ${t}}`},Ig={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:wg,code(t){let{keyword:e,data:r,schemaCode:n,it:a}=t,s=e==="maxLength"?dt.operators.GT:dt.operators.LT,i=a.opts.unicode===!1?(0,dt._)`${r}.length`:(0,dt._)`${(0,Og.useFunc)(t.gen,$g.default)}(${r})`;t.fail$data((0,dt._)`${i} ${s} ${n}`)}};ep.default=Ig});var Fl=I(tp=>{"use strict";Object.defineProperty(tp,"__esModule",{value:!0});var jg=be(),Ri=N(),kg={message:({schemaCode:t})=>(0,Ri.str)`must match pattern "${t}"`,params:({schemaCode:t})=>(0,Ri._)`{pattern: ${t}}`},Sg={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:kg,code(t){let{data:e,$data:r,schema:n,schemaCode:a,it:s}=t,i=s.opts.unicodeRegExp?"u":"",o=r?(0,Ri._)`(new RegExp(${a}, ${i}))`:(0,jg.usePattern)(t,n);t.fail$data((0,Ri._)`!${o}.test(${e})`)}};tp.default=Sg});var xl=I(rp=>{"use strict";Object.defineProperty(rp,"__esModule",{value:!0});var sr=N(),vg={message({keyword:t,schemaCode:e}){let r=t==="maxProperties"?"more":"fewer";return(0,sr.str)`must NOT have ${r} than ${e} properties`},params:({schemaCode:t})=>(0,sr._)`{limit: ${t}}`},Eg={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:vg,code(t){let{keyword:e,data:r,schemaCode:n}=t,a=e==="maxProperties"?sr.operators.GT:sr.operators.LT;t.fail$data((0,sr._)`Object.keys(${r}).length ${a} ${n}`)}};rp.default=Eg});var bl=I(np=>{"use strict";Object.defineProperty(np,"__esModule",{value:!0});var ir=be(),or=N(),Gg=z(),Cg={message:({params:{missingProperty:t}})=>(0,or.str)`must have required property '${t}'`,params:({params:{missingProperty:t}})=>(0,or._)`{missingProperty: ${t}}`},Rg={keyword:"required",type:"object",schemaType:"array",$data:!0,error:Cg,code(t){let{gen:e,schema:r,schemaCode:n,data:a,$data:s,it:i}=t,{opts:o}=i;if(!s&&r.length===0)return;let p=r.length>=o.loopRequired;if(i.allErrors?m():c(),o.strictRequired){let x=t.parentSchema.properties,{definedProperties:g}=t.it;for(let F of r)if((x==null?void 0:x[F])===void 0&&!g.has(F)){let y=i.schemaEnv.baseId+i.errSchemaPath,$=`required property "${F}" is not defined at "${y}" (strictRequired)`;(0,Gg.checkStrictMode)(i,$,i.opts.strictRequired)}}function m(){if(p||s)t.block$data(or.nil,h);else for(let x of r)(0,ir.checkReportMissingProp)(t,x)}function c(){let x=e.let("missing");if(p||s){let g=e.let("valid",!0);t.block$data(g,()=>T(x,g)),t.ok(g)}else e.if((0,ir.checkMissingProp)(t,r,x)),(0,ir.reportMissingProp)(t,x),e.else()}function h(){e.forOf("prop",n,x=>{t.setParams({missingProperty:x}),e.if((0,ir.noPropertyInData)(e,a,x,o.ownProperties),()=>t.error())})}function T(x,g){t.setParams({missingProperty:x}),e.forOf(x,n,()=>{e.assign(g,(0,ir.propertyInData)(e,a,x,o.ownProperties)),e.if((0,or.not)(g),()=>{t.error(),e.break()})},or.nil)}}};np.default=Rg});var Ol=I(ap=>{"use strict";Object.defineProperty(ap,"__esModule",{value:!0});var pr=N(),Mg={message({keyword:t,schemaCode:e}){let r=t==="maxItems"?"more":"fewer";return(0,pr.str)`must NOT have ${r} than ${e} items`},params:({schemaCode:t})=>(0,pr._)`{limit: ${t}}`},Pg={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:Mg,code(t){let{keyword:e,data:r,schemaCode:n}=t,a=e==="maxItems"?pr.operators.GT:pr.operators.LT;t.fail$data((0,pr._)`${r}.length ${a} ${n}`)}};ap.default=Pg});var Mi=I(sp=>{"use strict";Object.defineProperty(sp,"__esModule",{value:!0});var $l=vo();$l.code='require("ajv/dist/runtime/equal").default';sp.default=$l});var wl=I(op=>{"use strict";Object.defineProperty(op,"__esModule",{value:!0});var ip=Jt(),ie=N(),Wg=z(),Dg=Mi(),Ag={message:({params:{i:t,j:e}})=>(0,ie.str)`must NOT have duplicate items (items ## ${e} and ${t} are identical)`,params:({params:{i:t,j:e}})=>(0,ie._)`{i: ${t}, j: ${e}}`},Ng={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:Ag,code(t){let{gen:e,data:r,$data:n,schema:a,parentSchema:s,schemaCode:i,it:o}=t;if(!n&&!a)return;let p=e.let("valid"),m=s.items?(0,ip.getSchemaTypes)(s.items):[];t.block$data(p,c,(0,ie._)`${i} === false`),t.ok(p);function c(){let g=e.let("i",(0,ie._)`${r}.length`),F=e.let("j");t.setParams({i:g,j:F}),e.assign(p,!0),e.if((0,ie._)`${g} > 1`,()=>(h()?T:x)(g,F))}function h(){return m.length>0&&!m.some(g=>g==="object"||g==="array")}function T(g,F){let y=e.name("item"),$=(0,ip.checkDataTypes)(m,y,o.opts.strictNumbers,ip.DataType.Wrong),D=e.const("indices",(0,ie._)`{}`);e.for((0,ie._)`;${g}--;`,()=>{e.let(y,(0,ie._)`${r}[${g}]`),e.if($,(0,ie._)`continue`),m.length>1&&e.if((0,ie._)`typeof ${y} == "string"`,(0,ie._)`${y} += "_"`),e.if((0,ie._)`typeof ${D}[${y}] == "number"`,()=>{e.assign(F,(0,ie._)`${D}[${y}]`),t.error(),e.assign(p,!1).break()}).code((0,ie._)`${D}[${y}] = ${g}`)})}function x(g,F){let y=(0,Wg.useFunc)(e,Dg.default),$=e.name("outer");e.label($).for((0,ie._)`;${g}--;`,()=>e.for((0,ie._)`${F} = ${g}; ${F}--;`,()=>e.if((0,ie._)`${y}(${r}[${g}], ${r}[${F}])`,()=>{t.error(),e.assign(p,!1).break($)})))}}};op.default=Ng});var Il=I(dp=>{"use strict";Object.defineProperty(dp,"__esModule",{value:!0});var pp=N(),Ug=z(),qg=Mi(),Bg={message:"must be equal to constant",params:({schemaCode:t})=>(0,pp._)`{allowedValue: ${t}}`},Lg={keyword:"const",$data:!0,error:Bg,code(t){let{gen:e,data:r,$data:n,schemaCode:a,schema:s}=t;n||s&&typeof s=="object"?t.fail$data((0,pp._)`!${(0,Ug.useFunc)(e,qg.default)}(${r}, ${a})`):t.fail((0,pp._)`${s} !== ${r}`)}};dp.default=Lg});var jl=I(fp=>{"use strict";Object.defineProperty(fp,"__esModule",{value:!0});var dr=N(),Hg=z(),Vg=Mi(),zg={message:"must be equal to one of the allowed values",params:({schemaCode:t})=>(0,dr._)`{allowedValues: ${t}}`},Jg={keyword:"enum",schemaType:"array",$data:!0,error:zg,code(t){let{gen:e,data:r,$data:n,schema:a,schemaCode:s,it:i}=t;if(!n&&a.length===0)throw new Error("enum must have non-empty array");let o=a.length>=i.opts.loopEnum,p,m=()=>p!=null?p:p=(0,Hg.useFunc)(e,Vg.default),c;if(o||n)c=e.let("valid"),t.block$data(c,h);else{if(!Array.isArray(a))throw new Error("ajv implementation error");let x=e.const("vSchema",s);c=(0,dr.or)(...a.map((g,F)=>T(x,F)))}t.pass(c);function h(){e.assign(c,!1),e.forOf("v",s,x=>e.if((0,dr._)`${m()}(${r}, ${x})`,()=>e.assign(c,!0).break()))}function T(x,g){let F=a[g];return typeof F=="object"&&F!==null?(0,dr._)`${m()}(${r}, ${x}[${g}])`:(0,dr._)`${r} === ${F}`}}};fp.default=Jg});var kl=I(up=>{"use strict";Object.defineProperty(up,"__esModule",{value:!0});var Qg=hl(),Kg=_l(),Yg=yl(),Xg=Fl(),Zg=xl(),eT=bl(),tT=Ol(),rT=wl(),nT=Il(),aT=jl(),sT=[Qg.default,Kg.default,Yg.default,Xg.default,Zg.default,eT.default,tT.default,rT.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},nT.default,aT.default];up.default=sT});var cp=I(fr=>{"use strict";Object.defineProperty(fr,"__esModule",{value:!0});fr.validateAdditionalItems=void 0;var ft=N(),lp=z(),iT={message:({params:{len:t}})=>(0,ft.str)`must NOT have more than ${t} items`,params:({params:{len:t}})=>(0,ft._)`{limit: ${t}}`},oT={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:iT,code(t){let{parentSchema:e,it:r}=t,{items:n}=e;if(!Array.isArray(n)){(0,lp.checkStrictMode)(r,'"additionalItems" is ignored when "items" is not an array of schemas');return}Sl(t,n)}};function Sl(t,e){let{gen:r,schema:n,data:a,keyword:s,it:i}=t;i.items=!0;let o=r.const("len",(0,ft._)`${a}.length`);if(n===!1)t.setParams({len:e.length}),t.pass((0,ft._)`${o} <= ${e.length}`);else if(typeof n=="object"&&!(0,lp.alwaysValidSchema)(i,n)){let m=r.var("valid",(0,ft._)`${o} <= ${e.length}`);r.if((0,ft.not)(m),()=>p(m)),t.ok(m)}function p(m){r.forRange("i",e.length,o,c=>{t.subschema({keyword:s,dataProp:c,dataPropType:lp.Type.Num},m),i.allErrors||r.if((0,ft.not)(m),()=>r.break())})}}fr.validateAdditionalItems=Sl;fr.default=oT});var mp=I(ur=>{"use strict";Object.defineProperty(ur,"__esModule",{value:!0});ur.validateTuple=void 0;var vl=N(),Pi=z(),pT=be(),dT={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(t){let{schema:e,it:r}=t;if(Array.isArray(e))return El(t,"additionalItems",e);r.items=!0,!(0,Pi.alwaysValidSchema)(r,e)&&t.ok((0,pT.validateArray)(t))}};function El(t,e,r=t.schema){let{gen:n,parentSchema:a,data:s,keyword:i,it:o}=t;c(a),o.opts.unevaluated&&r.length&&o.items!==!0&&(o.items=Pi.mergeEvaluated.items(n,r.length,o.items));let p=n.name("valid"),m=n.const("len",(0,vl._)`${s}.length`);r.forEach((h,T)=>{(0,Pi.alwaysValidSchema)(o,h)||(n.if((0,vl._)`${m} > ${T}`,()=>t.subschema({keyword:i,schemaProp:T,dataProp:T},p)),t.ok(p))});function c(h){let{opts:T,errSchemaPath:x}=o,g=r.length,F=g===h.minItems&&(g===h.maxItems||h[e]===!1);if(T.strictTuples&&!F){let y=`"${i}" is ${g}-tuple, but minItems or maxItems/${e} are not specified or different at path "${x}"`;(0,Pi.checkStrictMode)(o,y,T.strictTuples)}}}ur.validateTuple=El;ur.default=dT});var Gl=I(hp=>{"use strict";Object.defineProperty(hp,"__esModule",{value:!0});var fT=mp(),uT={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:t=>(0,fT.validateTuple)(t,"items")};hp.default=uT});var Rl=I(_p=>{"use strict";Object.defineProperty(_p,"__esModule",{value:!0});var Cl=N(),lT=z(),cT=be(),mT=cp(),hT={message:({params:{len:t}})=>(0,Cl.str)`must NOT have more than ${t} items`,params:({params:{len:t}})=>(0,Cl._)`{limit: ${t}}`},_T={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:hT,code(t){let{schema:e,parentSchema:r,it:n}=t,{prefixItems:a}=r;n.items=!0,!(0,lT.alwaysValidSchema)(n,e)&&(a?(0,mT.validateAdditionalItems)(t,a):t.ok((0,cT.validateArray)(t)))}};_p.default=_T});var Ml=I(gp=>{"use strict";Object.defineProperty(gp,"__esModule",{value:!0});var $e=N(),Wi=z(),gT={message:({params:{min:t,max:e}})=>e===void 0?(0,$e.str)`must contain at least ${t} valid item(s)`:(0,$e.str)`must contain at least ${t} and no more than ${e} valid item(s)`,params:({params:{min:t,max:e}})=>e===void 0?(0,$e._)`{minContains: ${t}}`:(0,$e._)`{minContains: ${t}, maxContains: ${e}}`},TT={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:gT,code(t){let{gen:e,schema:r,parentSchema:n,data:a,it:s}=t,i,o,{minContains:p,maxContains:m}=n;s.opts.next?(i=p===void 0?1:p,o=m):i=1;let c=e.const("len",(0,$e._)`${a}.length`);if(t.setParams({min:i,max:o}),o===void 0&&i===0){(0,Wi.checkStrictMode)(s,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(o!==void 0&&i>o){(0,Wi.checkStrictMode)(s,'"minContains" > "maxContains" is always invalid'),t.fail();return}if((0,Wi.alwaysValidSchema)(s,r)){let F=(0,$e._)`${c} >= ${i}`;o!==void 0&&(F=(0,$e._)`${F} && ${c} <= ${o}`),t.pass(F);return}s.items=!0;let h=e.name("valid");o===void 0&&i===1?x(h,()=>e.if(h,()=>e.break())):i===0?(e.let(h,!0),o!==void 0&&e.if((0,$e._)`${a}.length > 0`,T)):(e.let(h,!1),T()),t.result(h,()=>t.reset());function T(){let F=e.name("_valid"),y=e.let("count",0);x(F,()=>e.if(F,()=>g(y)))}function x(F,y){e.forRange("i",0,c,$=>{t.subschema({keyword:"contains",dataProp:$,dataPropType:Wi.Type.Num,compositeRule:!0},F),y()})}function g(F){e.code((0,$e._)`${F}++`),o===void 0?e.if((0,$e._)`${F} >= ${i}`,()=>e.assign(h,!0).break()):(e.if((0,$e._)`${F} > ${o}`,()=>e.assign(h,!1).break()),i===1?e.assign(h,!0):e.if((0,$e._)`${F} >= ${i}`,()=>e.assign(h,!0)))}}};gp.default=TT});var Dl=I(Me=>{"use strict";Object.defineProperty(Me,"__esModule",{value:!0});Me.validateSchemaDeps=Me.validatePropertyDeps=Me.error=void 0;var Tp=N(),yT=z(),lr=be();Me.error={message:({params:{property:t,depsCount:e,deps:r}})=>{let n=e===1?"property":"properties";return(0,Tp.str)`must have ${n} ${r} when property ${t} is present`},params:({params:{property:t,depsCount:e,deps:r,missingProperty:n}})=>(0,Tp._)`{property: ${t},
|
|
5
|
+
|| ${i} === "boolean" || ${a} === null`).assign(o,(0,P._)`[${a}]`)}}}function rh({gen:t,parentData:e,parentDataProperty:r},n){t.if((0,P._)`${e} !== undefined`,()=>t.assign((0,P._)`${e}[${r}]`,n))}function $o(t,e,r,n=yt.Correct){let a=n===yt.Correct?P.operators.EQ:P.operators.NEQ,s;switch(t){case"null":return(0,P._)`${e} ${a} null`;case"array":s=(0,P._)`Array.isArray(${e})`;break;case"object":s=(0,P._)`${e} && typeof ${e} == "object" && !Array.isArray(${e})`;break;case"integer":s=i((0,P._)`!(${e} % 1) && !isNaN(${e})`);break;case"number":s=i();break;default:return(0,P._)`typeof ${e} ${a} ${t}`}return n===yt.Correct?s:(0,P.not)(s);function i(o=P.nil){return(0,P.and)((0,P._)`typeof ${e} == "number"`,o,r?(0,P._)`isFinite(${e})`:P.nil)}}de.checkDataType=$o;function wo(t,e,r,n){if(t.length===1)return $o(t[0],e,r,n);let a,s=(0,eu.toHash)(t);if(s.array&&s.object){let i=(0,P._)`typeof ${e} != "object"`;a=s.null?i:(0,P._)`!${e} || ${i}`,delete s.null,delete s.array,delete s.object}else a=P.nil;s.number&&delete s.integer;for(let i in s)a=(0,P.and)(a,$o(i,e,r,n));return a}de.checkDataTypes=wo;var nh={message:({schema:t})=>`must be ${t}`,params:({schema:t,schemaValue:e})=>typeof t=="string"?(0,P._)`{type: ${t}}`:(0,P._)`{type: ${e}}`};function Io(t){let e=ah(t);(0,Ym.reportError)(e,nh)}de.reportTypeError=Io;function ah(t){let{gen:e,data:r,schema:n}=t,a=(0,eu.schemaRefOrVal)(t,n,"type");return{gen:e,keyword:"type",data:r,schema:n.type,schemaCode:a,schemaValue:a,parentSchema:n,params:{},it:t}}});var au=I(yi=>{"use strict";Object.defineProperty(yi,"__esModule",{value:!0});yi.assignDefaults=void 0;var Ft=A(),sh=z();function ih(t,e){let{properties:r,items:n}=t.schema;if(e==="object"&&r)for(let a in r)nu(t,a,r[a].default);else e==="array"&&Array.isArray(n)&&n.forEach((a,s)=>nu(t,s,a.default))}yi.assignDefaults=ih;function nu(t,e,r){let{gen:n,compositeRule:a,data:s,opts:i}=t;if(r===void 0)return;let o=(0,Ft._)`${s}${(0,Ft.getProperty)(e)}`;if(a){(0,sh.checkStrictMode)(t,`default is ignored for: ${o}`);return}let p=(0,Ft._)`${o} === undefined`;i.useDefaults==="empty"&&(p=(0,Ft._)`${p} || ${o} === null || ${o} === ""`),n.if(p,(0,Ft._)`${o} = ${(0,Ft.stringify)(r)}`)}});var be=I(J=>{"use strict";Object.defineProperty(J,"__esModule",{value:!0});J.validateUnion=J.validateArray=J.usePattern=J.callValidateCode=J.schemaProperties=J.allSchemaProperties=J.noPropertyInData=J.propertyInData=J.isOwnProperty=J.hasPropFunc=J.reportMissingProp=J.checkMissingProp=J.checkReportMissingProp=void 0;var Y=A(),jo=z(),Ve=Ue(),oh=z();function ph(t,e){let{gen:r,data:n,it:a}=t;r.if(So(r,n,e,a.opts.ownProperties),()=>{t.setParams({missingProperty:(0,Y._)`${e}`},!0),t.error()})}J.checkReportMissingProp=ph;function dh({gen:t,data:e,it:{opts:r}},n,a){return(0,Y.or)(...n.map(s=>(0,Y.and)(So(t,e,s,r.ownProperties),(0,Y._)`${a} = ${s}`)))}J.checkMissingProp=dh;function fh(t,e){t.setParams({missingProperty:e},!0),t.error()}J.reportMissingProp=fh;function su(t){return t.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,Y._)`Object.prototype.hasOwnProperty`})}J.hasPropFunc=su;function ko(t,e,r){return(0,Y._)`${su(t)}.call(${e}, ${r})`}J.isOwnProperty=ko;function uh(t,e,r,n){let a=(0,Y._)`${e}${(0,Y.getProperty)(r)} !== undefined`;return n?(0,Y._)`${a} && ${ko(t,e,r)}`:a}J.propertyInData=uh;function So(t,e,r,n){let a=(0,Y._)`${e}${(0,Y.getProperty)(r)} === undefined`;return n?(0,Y.or)(a,(0,Y.not)(ko(t,e,r))):a}J.noPropertyInData=So;function iu(t){return t?Object.keys(t).filter(e=>e!=="__proto__"):[]}J.allSchemaProperties=iu;function lh(t,e){return iu(e).filter(r=>!(0,jo.alwaysValidSchema)(t,e[r]))}J.schemaProperties=lh;function ch({schemaCode:t,data:e,it:{gen:r,topSchemaRef:n,schemaPath:a,errorPath:s},it:i},o,p,m){let c=m?(0,Y._)`${t}, ${e}, ${n}${a}`:e,h=[[Ve.default.instancePath,(0,Y.strConcat)(Ve.default.instancePath,s)],[Ve.default.parentData,i.parentData],[Ve.default.parentDataProperty,i.parentDataProperty],[Ve.default.rootData,Ve.default.rootData]];i.opts.dynamicRef&&h.push([Ve.default.dynamicAnchors,Ve.default.dynamicAnchors]);let y=(0,Y._)`${c}, ${r.object(...h)}`;return p!==Y.nil?(0,Y._)`${o}.call(${p}, ${y})`:(0,Y._)`${o}(${y})`}J.callValidateCode=ch;var mh=(0,Y._)`new RegExp`;function hh({gen:t,it:{opts:e}},r){let n=e.unicodeRegExp?"u":"",{regExp:a}=e.code,s=a(r,n);return t.scopeValue("pattern",{key:s.toString(),ref:s,code:(0,Y._)`${a.code==="new RegExp"?mh:(0,oh.useFunc)(t,a)}(${r}, ${n})`})}J.usePattern=hh;function _h(t){let{gen:e,data:r,keyword:n,it:a}=t,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 p=e.const("len",(0,Y._)`${r}.length`);e.forRange("i",0,p,m=>{t.subschema({keyword:n,dataProp:m,dataPropType:jo.Type.Num},s),e.if((0,Y.not)(s),o)})}}J.validateArray=_h;function gh(t){let{gen:e,schema:r,keyword:n,it:a}=t;if(!Array.isArray(r))throw new Error("ajv implementation error");if(r.some(p=>(0,jo.alwaysValidSchema)(a,p))&&!a.opts.unevaluated)return;let i=e.let("valid",!1),o=e.name("_valid");e.block(()=>r.forEach((p,m)=>{let c=t.subschema({keyword:n,schemaProp:m,compositeRule:!0},o);e.assign(i,(0,Y._)`${i} || ${o}`),t.mergeValidEvaluated(c,o)||e.if((0,Y.not)(i))})),t.result(i,()=>t.reset(),()=>t.error(!0))}J.validateUnion=gh});var du=I(Ge=>{"use strict";Object.defineProperty(Ge,"__esModule",{value:!0});Ge.validateKeywordUsage=Ge.validSchemaType=Ge.funcKeywordCode=Ge.macroKeywordCode=void 0;var le=A(),it=Ue(),Th=be(),yh=zt();function Fh(t,e){let{gen:r,keyword:n,schema:a,parentSchema:s,it:i}=t,o=e.macro.call(i.self,a,s,i),p=pu(r,n,o);i.opts.validateSchema!==!1&&i.self.validateSchema(o,!0);let m=r.name("valid");t.subschema({schema:o,schemaPath:le.nil,errSchemaPath:`${i.errSchemaPath}/${n}`,topSchemaRef:p,compositeRule:!0},m),t.pass(m,()=>t.error(!0))}Ge.macroKeywordCode=Fh;function xh(t,e){var r;let{gen:n,keyword:a,schema:s,parentSchema:i,$data:o,it:p}=t;Oh(p,e);let m=!o&&e.compile?e.compile.call(p.self,s,i,p):e.validate,c=pu(n,a,m),h=n.let("valid");t.block$data(h,y),t.ok((r=e.valid)!==null&&r!==void 0?r:h);function y(){if(e.errors===!1)x(),e.modifying&&ou(t),T(()=>t.error());else{let $=e.async?F():g();e.modifying&&ou(t),T(()=>bh(t,$))}}function F(){let $=n.let("ruleErrs",null);return n.try(()=>x((0,le._)`await `),D=>n.assign(h,!1).if((0,le._)`${D} instanceof ${p.ValidationError}`,()=>n.assign($,(0,le._)`${D}.errors`),()=>n.throw(D))),$}function g(){let $=(0,le._)`${c}.errors`;return n.assign($,null),x(le.nil),$}function x($=e.async?(0,le._)`await `:le.nil){let D=p.opts.passContext?it.default.this:it.default.self,N=!("compile"in e&&!o||e.schema===!1);n.assign(h,(0,le._)`${$}${(0,Th.callValidateCode)(t,c,D,N)}`,e.modifying)}function T($){var D;n.if((0,le.not)((D=e.valid)!==null&&D!==void 0?D:h),$)}}Ge.funcKeywordCode=xh;function ou(t){let{gen:e,data:r,it:n}=t;e.if(n.parentData,()=>e.assign(r,(0,le._)`${n.parentData}[${n.parentDataProperty}]`))}function bh(t,e){let{gen:r}=t;r.if((0,le._)`Array.isArray(${e})`,()=>{r.assign(it.default.vErrors,(0,le._)`${it.default.vErrors} === null ? ${e} : ${it.default.vErrors}.concat(${e})`).assign(it.default.errors,(0,le._)`${it.default.vErrors}.length`),(0,yh.extendErrors)(t)},()=>t.error())}function Oh({schemaEnv:t},e){if(e.async&&!t.$async)throw new Error("async keyword in sync schema")}function pu(t,e,r){if(r===void 0)throw new Error(`keyword "${e}" failed to compile`);return t.scopeValue("keyword",typeof r=="function"?{ref:r}:{ref:r,code:(0,le.stringify)(r)})}function $h(t,e,r=!1){return!e.length||e.some(n=>n==="array"?Array.isArray(t):n==="object"?t&&typeof t=="object"&&!Array.isArray(t):typeof t==n||r&&typeof t=="undefined")}Ge.validSchemaType=$h;function wh({schema:t,opts:e,self:r,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(t,o)))throw new Error(`parent schema must have dependencies of ${s}: ${i.join(",")}`);if(a.validateSchema&&!a.validateSchema(t[s])){let p=`keyword "${s}" value is invalid at path "${n}": `+r.errorsText(a.validateSchema.errors);if(e.validateSchema==="log")r.logger.error(p);else throw new Error(p)}}Ge.validateKeywordUsage=wh});var uu=I(ze=>{"use strict";Object.defineProperty(ze,"__esModule",{value:!0});ze.extendSubschemaMode=ze.extendSubschemaData=ze.getSubschema=void 0;var Ce=A(),fu=z();function Ih(t,{keyword:e,schemaProp:r,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=t.schema[e];return r===void 0?{schema:o,schemaPath:(0,Ce._)`${t.schemaPath}${(0,Ce.getProperty)(e)}`,errSchemaPath:`${t.errSchemaPath}/${e}`}:{schema:o[r],schemaPath:(0,Ce._)`${t.schemaPath}${(0,Ce.getProperty)(e)}${(0,Ce.getProperty)(r)}`,errSchemaPath:`${t.errSchemaPath}/${e}/${(0,fu.escapeFragment)(r)}`}}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')}ze.getSubschema=Ih;function jh(t,e,{dataProp:r,dataPropType:n,data:a,dataTypes:s,propertyName:i}){if(a!==void 0&&r!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');let{gen:o}=e;if(r!==void 0){let{errorPath:m,dataPathArr:c,opts:h}=e,y=o.let("data",(0,Ce._)`${e.data}${(0,Ce.getProperty)(r)}`,!0);p(y),t.errorPath=(0,Ce.str)`${m}${(0,fu.getErrorPath)(r,n,h.jsPropertySyntax)}`,t.parentDataProperty=(0,Ce._)`${r}`,t.dataPathArr=[...c,t.parentDataProperty]}if(a!==void 0){let m=a instanceof Ce.Name?a:o.let("data",a,!0);p(m),i!==void 0&&(t.propertyName=i)}s&&(t.dataTypes=s);function p(m){t.data=m,t.dataLevel=e.dataLevel+1,t.dataTypes=[],e.definedProperties=new Set,t.parentData=e.data,t.dataNames=[...e.dataNames,m]}}ze.extendSubschemaData=jh;function kh(t,{jtdDiscriminator:e,jtdMetadata:r,compositeRule:n,createErrors:a,allErrors:s}){n!==void 0&&(t.compositeRule=n),a!==void 0&&(t.createErrors=a),s!==void 0&&(t.allErrors=s),t.jtdDiscriminator=e,t.jtdMetadata=r}ze.extendSubschemaMode=kh});var vo=I((OI,lu)=>{"use strict";lu.exports=function t(e,r){if(e===r)return!0;if(e&&r&&typeof e=="object"&&typeof r=="object"){if(e.constructor!==r.constructor)return!1;var n,a,s;if(Array.isArray(e)){if(n=e.length,n!=r.length)return!1;for(a=n;a--!==0;)if(!t(e[a],r[a]))return!1;return!0}if(e.constructor===RegExp)return e.source===r.source&&e.flags===r.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===r.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===r.toString();if(s=Object.keys(e),n=s.length,n!==Object.keys(r).length)return!1;for(a=n;a--!==0;)if(!Object.prototype.hasOwnProperty.call(r,s[a]))return!1;for(a=n;a--!==0;){var i=s[a];if(!t(e[i],r[i]))return!1}return!0}return e!==e&&r!==r}});var mu=I(($I,cu)=>{"use strict";var Je=cu.exports=function(t,e,r){typeof e=="function"&&(r=e,e={}),r=e.cb||r;var n=typeof r=="function"?r:r.pre||function(){},a=r.post||function(){};Fi(e,n,a,t,"",t)};Je.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0};Je.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0};Je.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0};Je.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 Fi(t,e,r,n,a,s,i,o,p,m){if(n&&typeof n=="object"&&!Array.isArray(n)){e(n,a,s,i,o,p,m);for(var c in n){var h=n[c];if(Array.isArray(h)){if(c in Je.arrayKeywords)for(var y=0;y<h.length;y++)Fi(t,e,r,h[y],a+"/"+c+"/"+y,s,a,c,n,y)}else if(c in Je.propsKeywords){if(h&&typeof h=="object")for(var F in h)Fi(t,e,r,h[F],a+"/"+c+"/"+Sh(F),s,a,c,n,F)}else(c in Je.keywords||t.allKeys&&!(c in Je.skipKeywords))&&Fi(t,e,r,h,a+"/"+c,s,a,c,n)}r(n,a,s,i,o,p,m)}}function Sh(t){return t.replace(/~/g,"~0").replace(/\//g,"~1")}});var Qt=I(_e=>{"use strict";Object.defineProperty(_e,"__esModule",{value:!0});_e.getSchemaRefs=_e.resolveUrl=_e.normalizeId=_e._getFullPath=_e.getFullPath=_e.inlineRef=void 0;var vh=z(),Eh=vo(),Gh=mu(),Ch=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function Rh(t,e=!0){return typeof t=="boolean"?!0:e===!0?!Eo(t):e?hu(t)<=e:!1}_e.inlineRef=Rh;var Mh=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function Eo(t){for(let e in t){if(Mh.has(e))return!0;let r=t[e];if(Array.isArray(r)&&r.some(Eo)||typeof r=="object"&&Eo(r))return!0}return!1}function hu(t){let e=0;for(let r in t){if(r==="$ref")return 1/0;if(e++,!Ch.has(r)&&(typeof t[r]=="object"&&(0,vh.eachItem)(t[r],n=>e+=hu(n)),e===1/0))return 1/0}return e}function _u(t,e="",r){r!==!1&&(e=xt(e));let n=t.parse(e);return gu(t,n)}_e.getFullPath=_u;function gu(t,e){return t.serialize(e).split("#")[0]+"#"}_e._getFullPath=gu;var Ph=/#\/?$/;function xt(t){return t?t.replace(Ph,""):""}_e.normalizeId=xt;function Wh(t,e,r){return r=xt(r),t.resolve(e,r)}_e.resolveUrl=Wh;var Dh=/^[a-z_][-a-z0-9._]*$/i;function Nh(t,e){if(typeof t=="boolean")return{};let{schemaId:r,uriResolver:n}=this.opts,a=xt(t[r]||e),s={"":a},i=_u(n,a,!1),o={},p=new Set;return Gh(t,{allKeys:!0},(h,y,F,g)=>{if(g===void 0)return;let x=i+y,T=s[g];typeof h[r]=="string"&&(T=$.call(this,h[r])),D.call(this,h.$anchor),D.call(this,h.$dynamicAnchor),s[y]=T;function $(N){let K=this.opts.uriResolver.resolve;if(N=xt(T?K(T,N):N),p.has(N))throw c(N);p.add(N);let G=this.refs[N];return typeof G=="string"&&(G=this.refs[G]),typeof G=="object"?m(h,G.schema,N):N!==xt(x)&&(N[0]==="#"?(m(h,o[N],N),o[N]=h):this.refs[N]=x),N}function D(N){if(typeof N=="string"){if(!Dh.test(N))throw new Error(`invalid anchor "${N}"`);$.call(this,`#${N}`)}}}),o;function m(h,y,F){if(y!==void 0&&!Eh(h,y))throw c(F)}function c(h){return new Error(`reference "${h}" resolves to more than one schema`)}}_e.getSchemaRefs=Nh});var Xt=I(Qe=>{"use strict";Object.defineProperty(Qe,"__esModule",{value:!0});Qe.getData=Qe.KeywordCxt=Qe.validateFunctionCode=void 0;var bu=Yf(),Tu=Jt(),Co=Oo(),xi=Jt(),Ah=au(),Yt=du(),Go=uu(),k=A(),E=Ue(),Uh=Qt(),qe=z(),Kt=zt();function qh(t){if(wu(t)&&(Iu(t),$u(t))){Hh(t);return}Ou(t,()=>(0,bu.topBoolOrEmptySchema)(t))}Qe.validateFunctionCode=qh;function Ou({gen:t,validateName:e,schema:r,schemaEnv:n,opts:a},s){a.code.es5?t.func(e,(0,k._)`${E.default.data}, ${E.default.valCxt}`,n.$async,()=>{t.code((0,k._)`"use strict"; ${yu(r,a)}`),Lh(t,a),t.code(s)}):t.func(e,(0,k._)`${E.default.data}, ${Bh(a)}`,n.$async,()=>t.code(yu(r,a)).code(s))}function Bh(t){return(0,k._)`{${E.default.instancePath}="", ${E.default.parentData}, ${E.default.parentDataProperty}, ${E.default.rootData}=${E.default.data}${t.dynamicRef?(0,k._)`, ${E.default.dynamicAnchors}={}`:k.nil}}={}`}function Lh(t,e){t.if(E.default.valCxt,()=>{t.var(E.default.instancePath,(0,k._)`${E.default.valCxt}.${E.default.instancePath}`),t.var(E.default.parentData,(0,k._)`${E.default.valCxt}.${E.default.parentData}`),t.var(E.default.parentDataProperty,(0,k._)`${E.default.valCxt}.${E.default.parentDataProperty}`),t.var(E.default.rootData,(0,k._)`${E.default.valCxt}.${E.default.rootData}`),e.dynamicRef&&t.var(E.default.dynamicAnchors,(0,k._)`${E.default.valCxt}.${E.default.dynamicAnchors}`)},()=>{t.var(E.default.instancePath,(0,k._)`""`),t.var(E.default.parentData,(0,k._)`undefined`),t.var(E.default.parentDataProperty,(0,k._)`undefined`),t.var(E.default.rootData,E.default.data),e.dynamicRef&&t.var(E.default.dynamicAnchors,(0,k._)`{}`)})}function Hh(t){let{schema:e,opts:r,gen:n}=t;Ou(t,()=>{r.$comment&&e.$comment&&ku(t),Kh(t),n.let(E.default.vErrors,null),n.let(E.default.errors,0),r.unevaluated&&Vh(t),ju(t),Zh(t)})}function Vh(t){let{gen:e,validateName:r}=t;t.evaluated=e.const("evaluated",(0,k._)`${r}.evaluated`),e.if((0,k._)`${t.evaluated}.dynamicProps`,()=>e.assign((0,k._)`${t.evaluated}.props`,(0,k._)`undefined`)),e.if((0,k._)`${t.evaluated}.dynamicItems`,()=>e.assign((0,k._)`${t.evaluated}.items`,(0,k._)`undefined`))}function yu(t,e){let r=typeof t=="object"&&t[e.schemaId];return r&&(e.code.source||e.code.process)?(0,k._)`/*# sourceURL=${r} */`:k.nil}function zh(t,e){if(wu(t)&&(Iu(t),$u(t))){Jh(t,e);return}(0,bu.boolOrEmptySchema)(t,e)}function $u({schema:t,self:e}){if(typeof t=="boolean")return!t;for(let r in t)if(e.RULES.all[r])return!0;return!1}function wu(t){return typeof t.schema!="boolean"}function Jh(t,e){let{schema:r,gen:n,opts:a}=t;a.$comment&&r.$comment&&ku(t),Yh(t),Xh(t);let s=n.const("_errs",E.default.errors);ju(t,s),n.var(e,(0,k._)`${s} === ${E.default.errors}`)}function Iu(t){(0,qe.checkUnknownRules)(t),Qh(t)}function ju(t,e){if(t.opts.jtd)return Fu(t,[],!1,e);let r=(0,Tu.getSchemaTypes)(t.schema),n=(0,Tu.coerceAndCheckDataType)(t,r);Fu(t,r,!n,e)}function Qh(t){let{schema:e,errSchemaPath:r,opts:n,self:a}=t;e.$ref&&n.ignoreKeywordsWithRef&&(0,qe.schemaHasRulesButRef)(e,a.RULES)&&a.logger.warn(`$ref: keywords ignored in schema at path "${r}"`)}function Kh(t){let{schema:e,opts:r}=t;e.default!==void 0&&r.useDefaults&&r.strictSchema&&(0,qe.checkStrictMode)(t,"default is ignored in the schema root")}function Yh(t){let e=t.schema[t.opts.schemaId];e&&(t.baseId=(0,Uh.resolveUrl)(t.opts.uriResolver,t.baseId,e))}function Xh(t){if(t.schema.$async&&!t.schemaEnv.$async)throw new Error("async schema in sync schema")}function ku({gen:t,schemaEnv:e,schema:r,errSchemaPath:n,opts:a}){let s=r.$comment;if(a.$comment===!0)t.code((0,k._)`${E.default.self}.logger.log(${s})`);else if(typeof a.$comment=="function"){let i=(0,k.str)`${n}/$comment`,o=t.scopeValue("root",{ref:e.root});t.code((0,k._)`${E.default.self}.opts.$comment(${s}, ${i}, ${o}.schema)`)}}function Zh(t){let{gen:e,schemaEnv:r,validateName:n,ValidationError:a,opts:s}=t;r.$async?e.if((0,k._)`${E.default.errors} === 0`,()=>e.return(E.default.data),()=>e.throw((0,k._)`new ${a}(${E.default.vErrors})`)):(e.assign((0,k._)`${n}.errors`,E.default.vErrors),s.unevaluated&&e_(t),e.return((0,k._)`${E.default.errors} === 0`))}function e_({gen:t,evaluated:e,props:r,items:n}){r instanceof k.Name&&t.assign((0,k._)`${e}.props`,r),n instanceof k.Name&&t.assign((0,k._)`${e}.items`,n)}function Fu(t,e,r,n){let{gen:a,schema:s,data:i,allErrors:o,opts:p,self:m}=t,{RULES:c}=m;if(s.$ref&&(p.ignoreKeywordsWithRef||!(0,qe.schemaHasRulesButRef)(s,c))){a.block(()=>vu(t,"$ref",c.all.$ref.definition));return}p.jtd||t_(t,e),a.block(()=>{for(let y of c.rules)h(y);h(c.post)});function h(y){(0,Co.shouldUseGroup)(s,y)&&(y.type?(a.if((0,xi.checkDataType)(y.type,i,p.strictNumbers)),xu(t,y),e.length===1&&e[0]===y.type&&r&&(a.else(),(0,xi.reportTypeError)(t)),a.endIf()):xu(t,y),o||a.if((0,k._)`${E.default.errors} === ${n||0}`))}}function xu(t,e){let{gen:r,schema:n,opts:{useDefaults:a}}=t;a&&(0,Ah.assignDefaults)(t,e.type),r.block(()=>{for(let s of e.rules)(0,Co.shouldUseRule)(n,s)&&vu(t,s.keyword,s.definition,e.type)})}function t_(t,e){t.schemaEnv.meta||!t.opts.strictTypes||(r_(t,e),t.opts.allowUnionTypes||n_(t,e),a_(t,t.dataTypes))}function r_(t,e){if(e.length){if(!t.dataTypes.length){t.dataTypes=e;return}e.forEach(r=>{Su(t.dataTypes,r)||Ro(t,`type "${r}" not allowed by context "${t.dataTypes.join(",")}"`)}),i_(t,e)}}function n_(t,e){e.length>1&&!(e.length===2&&e.includes("null"))&&Ro(t,"use allowUnionTypes to allow union type keyword")}function a_(t,e){let r=t.self.RULES.all;for(let n in r){let a=r[n];if(typeof a=="object"&&(0,Co.shouldUseRule)(t.schema,a)){let{type:s}=a.definition;s.length&&!s.some(i=>s_(e,i))&&Ro(t,`missing type "${s.join(",")}" for keyword "${n}"`)}}}function s_(t,e){return t.includes(e)||e==="number"&&t.includes("integer")}function Su(t,e){return t.includes(e)||e==="integer"&&t.includes("number")}function i_(t,e){let r=[];for(let n of t.dataTypes)Su(e,n)?r.push(n):e.includes("integer")&&n==="number"&&r.push("integer");t.dataTypes=r}function Ro(t,e){let r=t.schemaEnv.baseId+t.errSchemaPath;e+=` at "${r}" (strictTypes)`,(0,qe.checkStrictMode)(t,e,t.opts.strictTypes)}var bi=class{constructor(e,r,n){if((0,Yt.validateKeywordUsage)(e,r,n),this.gen=e.gen,this.allErrors=e.allErrors,this.keyword=n,this.data=e.data,this.schema=e.schema[n],this.$data=r.$data&&e.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,qe.schemaRefOrVal)(e,this.schema,n,this.$data),this.schemaType=r.schemaType,this.parentSchema=e.schema,this.params={},this.it=e,this.def=r,this.$data)this.schemaCode=e.gen.const("vSchema",Eu(this.$data,e));else if(this.schemaCode=this.schemaValue,!(0,Yt.validSchemaType)(this.schema,r.schemaType,r.allowUndefined))throw new Error(`${n} value must be ${JSON.stringify(r.schemaType)}`);("code"in r?r.trackErrors:r.errors!==!1)&&(this.errsCount=e.gen.const("_errs",E.default.errors))}result(e,r,n){this.failResult((0,k.not)(e),r,n)}failResult(e,r,n){this.gen.if(e),n?n():this.error(),r?(this.gen.else(),r(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(e,r){this.failResult((0,k.not)(e),void 0,r)}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:r}=this;this.fail((0,k._)`${r} !== undefined && (${(0,k.or)(this.invalid$data(),e)})`)}error(e,r,n){if(r){this.setParams(r),this._error(e,n),this.setParams({});return}this._error(e,n)}_error(e,r){(e?Kt.reportExtraError:Kt.reportError)(this,this.def.error,r)}$dataError(){(0,Kt.reportError)(this,this.def.$dataError||Kt.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,Kt.resetErrorsCount)(this.gen,this.errsCount)}ok(e){this.allErrors||this.gen.if(e)}setParams(e,r){r?Object.assign(this.params,e):this.params=e}block$data(e,r,n=k.nil){this.gen.block(()=>{this.check$data(e,n),r()})}check$data(e=k.nil,r=k.nil){if(!this.$data)return;let{gen:n,schemaCode:a,schemaType:s,def:i}=this;n.if((0,k.or)((0,k._)`${a} === undefined`,r)),e!==k.nil&&n.assign(e,!0),(s.length||i.validateSchema)&&(n.elseIf(this.invalid$data()),this.$dataError(),e!==k.nil&&n.assign(e,!1)),n.else()}invalid$data(){let{gen:e,schemaCode:r,schemaType:n,def:a,it:s}=this;return(0,k.or)(i(),o());function i(){if(n.length){if(!(r instanceof k.Name))throw new Error("ajv implementation error");let p=Array.isArray(n)?n:[n];return(0,k._)`${(0,xi.checkDataTypes)(p,r,s.opts.strictNumbers,xi.DataType.Wrong)}`}return k.nil}function o(){if(a.validateSchema){let p=e.scopeValue("validate$data",{ref:a.validateSchema});return(0,k._)`!${p}(${r})`}return k.nil}}subschema(e,r){let n=(0,Go.getSubschema)(this.it,e);(0,Go.extendSubschemaData)(n,this.it,e),(0,Go.extendSubschemaMode)(n,e);let a=q(b(b({},this.it),n),{items:void 0,props:void 0});return zh(a,r),a}mergeEvaluated(e,r){let{it:n,gen:a}=this;n.opts.unevaluated&&(n.props!==!0&&e.props!==void 0&&(n.props=qe.mergeEvaluated.props(a,e.props,n.props,r)),n.items!==!0&&e.items!==void 0&&(n.items=qe.mergeEvaluated.items(a,e.items,n.items,r)))}mergeValidEvaluated(e,r){let{it:n,gen:a}=this;if(n.opts.unevaluated&&(n.props!==!0||n.items!==!0))return a.if(r,()=>this.mergeEvaluated(e,k.Name)),!0}};Qe.KeywordCxt=bi;function vu(t,e,r,n){let a=new bi(t,r,e);"code"in r?r.code(a,n):a.$data&&r.validate?(0,Yt.funcKeywordCode)(a,r):"macro"in r?(0,Yt.macroKeywordCode)(a,r):(r.compile||r.validate)&&(0,Yt.funcKeywordCode)(a,r)}var o_=/^\/(?:[^~]|~0|~1)*$/,p_=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function Eu(t,{dataLevel:e,dataNames:r,dataPathArr:n}){let a,s;if(t==="")return E.default.rootData;if(t[0]==="/"){if(!o_.test(t))throw new Error(`Invalid JSON-pointer: ${t}`);a=t,s=E.default.rootData}else{let m=p_.exec(t);if(!m)throw new Error(`Invalid JSON-pointer: ${t}`);let c=+m[1];if(a=m[2],a==="#"){if(c>=e)throw new Error(p("property/index",c));return n[e-c]}if(c>e)throw new Error(p("data",c));if(s=r[e-c],!a)return s}let i=s,o=a.split("/");for(let m of o)m&&(s=(0,k._)`${s}${(0,k.getProperty)((0,qe.unescapeJsonPointer)(m))}`,i=(0,k._)`${i} && ${s}`);return i;function p(m,c){return`Cannot access ${m} ${c} levels up, current level is ${e}`}}Qe.getData=Eu});var Oi=I(Po=>{"use strict";Object.defineProperty(Po,"__esModule",{value:!0});var Mo=class extends Error{constructor(e){super("validation failed"),this.errors=e,this.ajv=this.validation=!0}};Po.default=Mo});var Zt=I(No=>{"use strict";Object.defineProperty(No,"__esModule",{value:!0});var Wo=Qt(),Do=class extends Error{constructor(e,r,n,a){super(a||`can't resolve reference ${n} from id ${r}`),this.missingRef=(0,Wo.resolveUrl)(e,r,n),this.missingSchema=(0,Wo.normalizeId)((0,Wo.getFullPath)(e,this.missingRef))}};No.default=Do});var wi=I(Oe=>{"use strict";Object.defineProperty(Oe,"__esModule",{value:!0});Oe.resolveSchema=Oe.getCompilingSchema=Oe.resolveRef=Oe.compileSchema=Oe.SchemaEnv=void 0;var je=A(),d_=Oi(),ot=Ue(),ke=Qt(),Gu=z(),f_=Xt(),bt=class{constructor(e){var r;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=(r=e.baseId)!==null&&r!==void 0?r:(0,ke.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={}}};Oe.SchemaEnv=bt;function Uo(t){let e=Cu.call(this,t);if(e)return e;let r=(0,ke.getFullPath)(this.opts.uriResolver,t.root.baseId),{es5:n,lines:a}=this.opts.code,{ownProperties:s}=this.opts,i=new je.CodeGen(this.scope,{es5:n,lines:a,ownProperties:s}),o;t.$async&&(o=i.scopeValue("Error",{ref:d_.default,code:(0,je._)`require("ajv/dist/runtime/validation_error").default`}));let p=i.scopeName("validate");t.validateName=p;let m={gen:i,allErrors:this.opts.allErrors,data:ot.default.data,parentData:ot.default.parentData,parentDataProperty:ot.default.parentDataProperty,dataNames:[ot.default.data],dataPathArr:[je.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:i.scopeValue("schema",this.opts.code.source===!0?{ref:t.schema,code:(0,je.stringify)(t.schema)}:{ref:t.schema}),validateName:p,ValidationError:o,schema:t.schema,schemaEnv:t,rootId:r,baseId:t.baseId||r,schemaPath:je.nil,errSchemaPath:t.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,je._)`""`,opts:this.opts,self:this},c;try{this._compilations.add(t),(0,f_.validateFunctionCode)(m),i.optimize(this.opts.code.optimize);let h=i.toString();c=`${i.scopeRefs(ot.default.scope)}return ${h}`,this.opts.code.process&&(c=this.opts.code.process(c,t));let F=new Function(`${ot.default.self}`,`${ot.default.scope}`,c)(this,this.scope.get());if(this.scope.value(p,{ref:F}),F.errors=null,F.schema=t.schema,F.schemaEnv=t,t.$async&&(F.$async=!0),this.opts.code.source===!0&&(F.source={validateName:p,validateCode:h,scopeValues:i._values}),this.opts.unevaluated){let{props:g,items:x}=m;F.evaluated={props:g instanceof je.Name?void 0:g,items:x instanceof je.Name?void 0:x,dynamicProps:g instanceof je.Name,dynamicItems:x instanceof je.Name},F.source&&(F.source.evaluated=(0,je.stringify)(F.evaluated))}return t.validate=F,t}catch(h){throw delete t.validate,delete t.validateName,c&&this.logger.error("Error compiling schema, function code:",c),h}finally{this._compilations.delete(t)}}Oe.compileSchema=Uo;function u_(t,e,r){var n;r=(0,ke.resolveUrl)(this.opts.uriResolver,e,r);let a=t.refs[r];if(a)return a;let s=m_.call(this,t,r);if(s===void 0){let i=(n=t.localRefs)===null||n===void 0?void 0:n[r],{schemaId:o}=this.opts;i&&(s=new bt({schema:i,schemaId:o,root:t,baseId:e}))}if(s!==void 0)return t.refs[r]=l_.call(this,s)}Oe.resolveRef=u_;function l_(t){return(0,ke.inlineRef)(t.schema,this.opts.inlineRefs)?t.schema:t.validate?t:Uo.call(this,t)}function Cu(t){for(let e of this._compilations)if(c_(e,t))return e}Oe.getCompilingSchema=Cu;function c_(t,e){return t.schema===e.schema&&t.root===e.root&&t.baseId===e.baseId}function m_(t,e){let r;for(;typeof(r=this.refs[e])=="string";)e=r;return r||this.schemas[e]||$i.call(this,t,e)}function $i(t,e){let r=this.opts.uriResolver.parse(e),n=(0,ke._getFullPath)(this.opts.uriResolver,r),a=(0,ke.getFullPath)(this.opts.uriResolver,t.baseId,void 0);if(Object.keys(t.schema).length>0&&n===a)return Ao.call(this,r,t);let s=(0,ke.normalizeId)(n),i=this.refs[s]||this.schemas[s];if(typeof i=="string"){let o=$i.call(this,t,i);return typeof(o==null?void 0:o.schema)!="object"?void 0:Ao.call(this,r,o)}if(typeof(i==null?void 0:i.schema)=="object"){if(i.validate||Uo.call(this,i),s===(0,ke.normalizeId)(e)){let{schema:o}=i,{schemaId:p}=this.opts,m=o[p];return m&&(a=(0,ke.resolveUrl)(this.opts.uriResolver,a,m)),new bt({schema:o,schemaId:p,root:t,baseId:a})}return Ao.call(this,r,i)}}Oe.resolveSchema=$i;var h_=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function Ao(t,{baseId:e,schema:r,root:n}){var a;if(((a=t.fragment)===null||a===void 0?void 0:a[0])!=="/")return;for(let o of t.fragment.slice(1).split("/")){if(typeof r=="boolean")return;let p=r[(0,Gu.unescapeFragment)(o)];if(p===void 0)return;r=p;let m=typeof r=="object"&&r[this.opts.schemaId];!h_.has(o)&&m&&(e=(0,ke.resolveUrl)(this.opts.uriResolver,e,m))}let s;if(typeof r!="boolean"&&r.$ref&&!(0,Gu.schemaHasRulesButRef)(r,this.RULES)){let o=(0,ke.resolveUrl)(this.opts.uriResolver,e,r.$ref);s=$i.call(this,n,o)}let{schemaId:i}=this.opts;if(s=s||new bt({schema:r,schemaId:i,root:n,baseId:e}),s.schema!==s.root.schema)return s}});var Ru=I((EI,__)=>{__.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 Pu=I((GI,Mu)=>{"use strict";var g_={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15};Mu.exports={HEX:g_}});var Lu=I((CI,Bu)=>{"use strict";var{HEX:T_}=Pu(),y_=/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u;function Au(t){if(qu(t,".")<3)return{host:t,isIPV4:!1};let e=t.match(y_)||[],[r]=e;return r?{host:x_(r,"."),isIPV4:!0}:{host:t,isIPV4:!1}}function qo(t,e=!1){let r="",n=!0;for(let a of t){if(T_[a]===void 0)return;a!=="0"&&n===!0&&(n=!1),n||(r+=a)}return e&&r.length===0&&(r="0"),r}function F_(t){let e=0,r={error:!1,address:"",zone:""},n=[],a=[],s=!1,i=!1,o=!1;function p(){if(a.length){if(s===!1){let m=qo(a);if(m!==void 0)n.push(m);else return r.error=!0,!1}a.length=0}return!0}for(let m=0;m<t.length;m++){let c=t[m];if(!(c==="["||c==="]"))if(c===":"){if(i===!0&&(o=!0),!p())break;if(e++,n.push(":"),e>7){r.error=!0;break}m-1>=0&&t[m-1]===":"&&(i=!0);continue}else if(c==="%"){if(!p())break;s=!0}else{a.push(c);continue}}return a.length&&(s?r.zone=a.join(""):o?n.push(a.join("")):n.push(qo(a))),r.address=n.join(""),r}function Uu(t){if(qu(t,":")<2)return{host:t,isIPV6:!1};let e=F_(t);if(e.error)return{host:t,isIPV6:!1};{let r=e.address,n=e.address;return e.zone&&(r+="%"+e.zone,n+="%25"+e.zone),{host:r,escapedHost:n,isIPV6:!0}}}function x_(t,e){let r="",n=!0,a=t.length;for(let s=0;s<a;s++){let i=t[s];i==="0"&&n?(s+1<=a&&t[s+1]===e||s+1===a)&&(r+=i,n=!1):(i===e?n=!0:n=!1,r+=i)}return r}function qu(t,e){let r=0;for(let n=0;n<t.length;n++)t[n]===e&&r++;return r}var Wu=/^\.\.?\//u,Du=/^\/\.(?:\/|$)/u,Nu=/^\/\.\.(?:\/|$)/u,b_=/^\/?(?:.|\n)*?(?=\/|$)/u;function O_(t){let e=[];for(;t.length;)if(t.match(Wu))t=t.replace(Wu,"");else if(t.match(Du))t=t.replace(Du,"/");else if(t.match(Nu))t=t.replace(Nu,"/"),e.pop();else if(t==="."||t==="..")t="";else{let r=t.match(b_);if(r){let n=r[0];t=t.slice(n.length),e.push(n)}else throw new Error("Unexpected dot segment condition")}return e.join("")}function $_(t,e){let r=e!==!0?escape:unescape;return t.scheme!==void 0&&(t.scheme=r(t.scheme)),t.userinfo!==void 0&&(t.userinfo=r(t.userinfo)),t.host!==void 0&&(t.host=r(t.host)),t.path!==void 0&&(t.path=r(t.path)),t.query!==void 0&&(t.query=r(t.query)),t.fragment!==void 0&&(t.fragment=r(t.fragment)),t}function w_(t){let e=[];if(t.userinfo!==void 0&&(e.push(t.userinfo),e.push("@")),t.host!==void 0){let r=unescape(t.host),n=Au(r);if(n.isIPV4)r=n.host;else{let a=Uu(n.host);a.isIPV6===!0?r=`[${a.escapedHost}]`:r=t.host}e.push(r)}return(typeof t.port=="number"||typeof t.port=="string")&&(e.push(":"),e.push(String(t.port))),e.length?e.join(""):void 0}Bu.exports={recomposeAuthority:w_,normalizeComponentEncoding:$_,removeDotSegments:O_,normalizeIPv4:Au,normalizeIPv6:Uu,stringArrayToHexStripped:qo}});var Ku=I((RI,Qu)=>{"use strict";var I_=/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu,j_=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu;function Hu(t){return typeof t.secure=="boolean"?t.secure:String(t.scheme).toLowerCase()==="wss"}function Vu(t){return t.host||(t.error=t.error||"HTTP URIs must have a host."),t}function zu(t){let e=String(t.scheme).toLowerCase()==="https";return(t.port===(e?443:80)||t.port==="")&&(t.port=void 0),t.path||(t.path="/"),t}function k_(t){return t.secure=Hu(t),t.resourceName=(t.path||"/")+(t.query?"?"+t.query:""),t.path=void 0,t.query=void 0,t}function S_(t){if((t.port===(Hu(t)?443:80)||t.port==="")&&(t.port=void 0),typeof t.secure=="boolean"&&(t.scheme=t.secure?"wss":"ws",t.secure=void 0),t.resourceName){let[e,r]=t.resourceName.split("?");t.path=e&&e!=="/"?e:void 0,t.query=r,t.resourceName=void 0}return t.fragment=void 0,t}function v_(t,e){if(!t.path)return t.error="URN can not be parsed",t;let r=t.path.match(j_);if(r){let n=e.scheme||t.scheme||"urn";t.nid=r[1].toLowerCase(),t.nss=r[2];let a=`${n}:${e.nid||t.nid}`,s=Bo[a];t.path=void 0,s&&(t=s.parse(t,e))}else t.error=t.error||"URN can not be parsed.";return t}function E_(t,e){let r=e.scheme||t.scheme||"urn",n=t.nid.toLowerCase(),a=`${r}:${e.nid||n}`,s=Bo[a];s&&(t=s.serialize(t,e));let i=t,o=t.nss;return i.path=`${n||e.nid}:${o}`,e.skipEscape=!0,i}function G_(t,e){let r=t;return r.uuid=r.nss,r.nss=void 0,!e.tolerant&&(!r.uuid||!I_.test(r.uuid))&&(r.error=r.error||"UUID is not valid."),r}function C_(t){let e=t;return e.nss=(t.uuid||"").toLowerCase(),e}var Ju={scheme:"http",domainHost:!0,parse:Vu,serialize:zu},R_={scheme:"https",domainHost:Ju.domainHost,parse:Vu,serialize:zu},Ii={scheme:"ws",domainHost:!0,parse:k_,serialize:S_},M_={scheme:"wss",domainHost:Ii.domainHost,parse:Ii.parse,serialize:Ii.serialize},P_={scheme:"urn",parse:v_,serialize:E_,skipNormalize:!0},W_={scheme:"urn:uuid",parse:G_,serialize:C_,skipNormalize:!0},Bo={http:Ju,https:R_,ws:Ii,wss:M_,urn:P_,"urn:uuid":W_};Qu.exports=Bo});var Xu=I((MI,ki)=>{"use strict";var{normalizeIPv6:D_,normalizeIPv4:N_,removeDotSegments:er,recomposeAuthority:A_,normalizeComponentEncoding:ji}=Lu(),Lo=Ku();function U_(t,e){return typeof t=="string"?t=Re(Be(t,e),e):typeof t=="object"&&(t=Be(Re(t,e),e)),t}function q_(t,e,r){let n=Object.assign({scheme:"null"},r),a=Yu(Be(t,n),Be(e,n),n,!0);return Re(a,q(b({},n),{skipEscape:!0}))}function Yu(t,e,r,n){let a={};return n||(t=Be(Re(t,r),r),e=Be(Re(e,r),r)),r=r||{},!r.tolerant&&e.scheme?(a.scheme=e.scheme,a.userinfo=e.userinfo,a.host=e.host,a.port=e.port,a.path=er(e.path||""),a.query=e.query):(e.userinfo!==void 0||e.host!==void 0||e.port!==void 0?(a.userinfo=e.userinfo,a.host=e.host,a.port=e.port,a.path=er(e.path||""),a.query=e.query):(e.path?(e.path.charAt(0)==="/"?a.path=er(e.path):((t.userinfo!==void 0||t.host!==void 0||t.port!==void 0)&&!t.path?a.path="/"+e.path:t.path?a.path=t.path.slice(0,t.path.lastIndexOf("/")+1)+e.path:a.path=e.path,a.path=er(a.path)),a.query=e.query):(a.path=t.path,e.query!==void 0?a.query=e.query:a.query=t.query),a.userinfo=t.userinfo,a.host=t.host,a.port=t.port),a.scheme=t.scheme),a.fragment=e.fragment,a}function B_(t,e,r){return typeof t=="string"?(t=unescape(t),t=Re(ji(Be(t,r),!0),q(b({},r),{skipEscape:!0}))):typeof t=="object"&&(t=Re(ji(t,!0),q(b({},r),{skipEscape:!0}))),typeof e=="string"?(e=unescape(e),e=Re(ji(Be(e,r),!0),q(b({},r),{skipEscape:!0}))):typeof e=="object"&&(e=Re(ji(e,!0),q(b({},r),{skipEscape:!0}))),t.toLowerCase()===e.toLowerCase()}function Re(t,e){let r={host:t.host,scheme:t.scheme,userinfo:t.userinfo,port:t.port,path:t.path,query:t.query,nid:t.nid,nss:t.nss,uuid:t.uuid,fragment:t.fragment,reference:t.reference,resourceName:t.resourceName,secure:t.secure,error:""},n=Object.assign({},e),a=[],s=Lo[(n.scheme||r.scheme||"").toLowerCase()];s&&s.serialize&&s.serialize(r,n),r.path!==void 0&&(n.skipEscape?r.path=unescape(r.path):(r.path=escape(r.path),r.scheme!==void 0&&(r.path=r.path.split("%3A").join(":")))),n.reference!=="suffix"&&r.scheme&&a.push(r.scheme,":");let i=A_(r);if(i!==void 0&&(n.reference!=="suffix"&&a.push("//"),a.push(i),r.path&&r.path.charAt(0)!=="/"&&a.push("/")),r.path!==void 0){let o=r.path;!n.absolutePath&&(!s||!s.absolutePath)&&(o=er(o)),i===void 0&&(o=o.replace(/^\/\//u,"/%2F")),a.push(o)}return r.query!==void 0&&a.push("?",r.query),r.fragment!==void 0&&a.push("#",r.fragment),a.join("")}var L_=Array.from({length:127},(t,e)=>/[^!"$&'()*+,\-.;=_`a-z{}~]/u.test(String.fromCharCode(e)));function H_(t){let e=0;for(let r=0,n=t.length;r<n;++r)if(e=t.charCodeAt(r),e>126||L_[e])return!0;return!1}var V_=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function Be(t,e){let r=Object.assign({},e),n={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0},a=t.indexOf("%")!==-1,s=!1;r.reference==="suffix"&&(t=(r.scheme?r.scheme+":":"")+"//"+t);let i=t.match(V_);if(i){if(n.scheme=i[1],n.userinfo=i[3],n.host=i[4],n.port=parseInt(i[5],10),n.path=i[6]||"",n.query=i[7],n.fragment=i[8],isNaN(n.port)&&(n.port=i[5]),n.host){let p=N_(n.host);if(p.isIPV4===!1){let m=D_(p.host);n.host=m.host.toLowerCase(),s=m.isIPV6}else n.host=p.host,s=!0}n.scheme===void 0&&n.userinfo===void 0&&n.host===void 0&&n.port===void 0&&n.query===void 0&&!n.path?n.reference="same-document":n.scheme===void 0?n.reference="relative":n.fragment===void 0?n.reference="absolute":n.reference="uri",r.reference&&r.reference!=="suffix"&&r.reference!==n.reference&&(n.error=n.error||"URI is not a "+r.reference+" reference.");let o=Lo[(r.scheme||n.scheme||"").toLowerCase()];if(!r.unicodeSupport&&(!o||!o.unicodeSupport)&&n.host&&(r.domainHost||o&&o.domainHost)&&s===!1&&H_(n.host))try{n.host=URL.domainToASCII(n.host.toLowerCase())}catch(p){n.error=n.error||"Host's domain name can not be converted to ASCII: "+p}(!o||o&&!o.skipNormalize)&&(a&&n.scheme!==void 0&&(n.scheme=unescape(n.scheme)),a&&n.host!==void 0&&(n.host=unescape(n.host)),n.path&&(n.path=escape(unescape(n.path))),n.fragment&&(n.fragment=encodeURI(decodeURIComponent(n.fragment)))),o&&o.parse&&o.parse(n,r)}else n.error=n.error||"URI can not be parsed.";return n}var Ho={SCHEMES:Lo,normalize:U_,resolve:q_,resolveComponents:Yu,equal:B_,serialize:Re,parse:Be};ki.exports=Ho;ki.exports.default=Ho;ki.exports.fastUri=Ho});var el=I(Vo=>{"use strict";Object.defineProperty(Vo,"__esModule",{value:!0});var Zu=Xu();Zu.code='require("ajv/dist/runtime/uri").default';Vo.default=Zu});var pl=I(se=>{"use strict";Object.defineProperty(se,"__esModule",{value:!0});se.CodeGen=se.Name=se.nil=se.stringify=se.str=se._=se.KeywordCxt=void 0;var z_=Xt();Object.defineProperty(se,"KeywordCxt",{enumerable:!0,get:function(){return z_.KeywordCxt}});var Ot=A();Object.defineProperty(se,"_",{enumerable:!0,get:function(){return Ot._}});Object.defineProperty(se,"str",{enumerable:!0,get:function(){return Ot.str}});Object.defineProperty(se,"stringify",{enumerable:!0,get:function(){return Ot.stringify}});Object.defineProperty(se,"nil",{enumerable:!0,get:function(){return Ot.nil}});Object.defineProperty(se,"Name",{enumerable:!0,get:function(){return Ot.Name}});Object.defineProperty(se,"CodeGen",{enumerable:!0,get:function(){return Ot.CodeGen}});var J_=Oi(),sl=Zt(),Q_=bo(),tr=wi(),K_=A(),rr=Qt(),Si=Jt(),Jo=z(),tl=Ru(),Y_=el(),il=(t,e)=>new RegExp(t,e);il.code="new RegExp";var X_=["removeAdditional","useDefaults","coerceTypes"],Z_=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),eg={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."},tg={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},rl=200;function rg(t){var e,r,n,a,s,i,o,p,m,c,h,y,F,g,x,T,$,D,N,K,G,ve,Pe,zi,Ji;let Rt=t.strict,Qi=(e=t.code)===null||e===void 0?void 0:e.optimize,gf=Qi===!0||Qi===void 0?1:Qi||0,Tf=(n=(r=t.code)===null||r===void 0?void 0:r.regExp)!==null&&n!==void 0?n:il,Pc=(a=t.uriResolver)!==null&&a!==void 0?a:Y_.default;return{strictSchema:(i=(s=t.strictSchema)!==null&&s!==void 0?s:Rt)!==null&&i!==void 0?i:!0,strictNumbers:(p=(o=t.strictNumbers)!==null&&o!==void 0?o:Rt)!==null&&p!==void 0?p:!0,strictTypes:(c=(m=t.strictTypes)!==null&&m!==void 0?m:Rt)!==null&&c!==void 0?c:"log",strictTuples:(y=(h=t.strictTuples)!==null&&h!==void 0?h:Rt)!==null&&y!==void 0?y:"log",strictRequired:(g=(F=t.strictRequired)!==null&&F!==void 0?F:Rt)!==null&&g!==void 0?g:!1,code:t.code?q(b({},t.code),{optimize:gf,regExp:Tf}):{optimize:gf,regExp:Tf},loopRequired:(x=t.loopRequired)!==null&&x!==void 0?x:rl,loopEnum:(T=t.loopEnum)!==null&&T!==void 0?T:rl,meta:($=t.meta)!==null&&$!==void 0?$:!0,messages:(D=t.messages)!==null&&D!==void 0?D:!0,inlineRefs:(N=t.inlineRefs)!==null&&N!==void 0?N:!0,schemaId:(K=t.schemaId)!==null&&K!==void 0?K:"$id",addUsedSchema:(G=t.addUsedSchema)!==null&&G!==void 0?G:!0,validateSchema:(ve=t.validateSchema)!==null&&ve!==void 0?ve:!0,validateFormats:(Pe=t.validateFormats)!==null&&Pe!==void 0?Pe:!0,unicodeRegExp:(zi=t.unicodeRegExp)!==null&&zi!==void 0?zi:!0,int32range:(Ji=t.int32range)!==null&&Ji!==void 0?Ji:!0,uriResolver:Pc}}var nr=class{constructor(e={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,e=this.opts=b(b({},e),rg(e));let{es5:r,lines:n}=this.opts.code;this.scope=new K_.ValueScope({scope:{},prefixes:Z_,es5:r,lines:n}),this.logger=pg(e.logger);let a=e.validateFormats;e.validateFormats=!1,this.RULES=(0,Q_.getRules)(),nl.call(this,eg,e,"NOT SUPPORTED"),nl.call(this,tg,e,"DEPRECATED","warn"),this._metaOpts=ig.call(this),e.formats&&ag.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),e.keywords&&sg.call(this,e.keywords),typeof e.meta=="object"&&this.addMetaSchema(e.meta),ng.call(this),e.validateFormats=a}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){let{$data:e,meta:r,schemaId:n}=this.opts,a=tl;n==="id"&&(a=b({},tl),a.id=a.$id,delete a.$id),r&&e&&this.addMetaSchema(a,a[n],!1)}defaultMeta(){let{meta:e,schemaId:r}=this.opts;return this.opts.defaultMeta=typeof e=="object"?e[r]||e:void 0}validate(e,r){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(r);return"$async"in n||(this.errors=n.errors),a}compile(e,r){let n=this._addSchema(e,r);return n.validate||this._compileSchemaEnv(n)}compileAsync(e,r){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,r);function a(c,h){return ee(this,null,function*(){yield s.call(this,c.$schema);let y=this._addSchema(c,h);return y.validate||i.call(this,y)})}function s(c){return ee(this,null,function*(){c&&!this.getSchema(c)&&(yield a.call(this,{$ref:c},!0))})}function i(c){return ee(this,null,function*(){try{return this._compileSchemaEnv(c)}catch(h){if(!(h instanceof sl.default))throw h;return o.call(this,h),yield p.call(this,h.missingSchema),i.call(this,c)}})}function o({missingSchema:c,missingRef:h}){if(this.refs[c])throw new Error(`AnySchema ${c} is loaded but ${h} cannot be resolved`)}function p(c){return ee(this,null,function*(){let h=yield m.call(this,c);this.refs[c]||(yield s.call(this,h.$schema)),this.refs[c]||this.addSchema(h,c,r)})}function m(c){return ee(this,null,function*(){let h=this._loading[c];if(h)return h;try{return yield this._loading[c]=n(c)}finally{delete this._loading[c]}})}}addSchema(e,r,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 r=(0,rr.normalizeId)(r||s),this._checkUnique(r),this.schemas[r]=this._addSchema(e,n,r,a,!0),this}addMetaSchema(e,r,n=this.opts.validateSchema){return this.addSchema(e,r,!0,n),this}validateSchema(e,r){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&&r){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 r;for(;typeof(r=al.call(this,e))=="string";)e=r;if(r===void 0){let{schemaId:n}=this.opts,a=new tr.SchemaEnv({schema:{},schemaId:n});if(r=tr.resolveSchema.call(this,a,e),!r)return;this.refs[e]=r}return r.validate||this._compileSchemaEnv(r)}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 r=al.call(this,e);return typeof r=="object"&&this._cache.delete(r.schema),delete this.schemas[e],delete this.refs[e],this}case"object":{let r=e;this._cache.delete(r);let n=e[this.opts.schemaId];return n&&(n=(0,rr.normalizeId)(n),delete this.schemas[n],delete this.refs[n]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(e){for(let r of e)this.addKeyword(r);return this}addKeyword(e,r){let n;if(typeof e=="string")n=e,typeof r=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),r.keyword=n);else if(typeof e=="object"&&r===void 0){if(r=e,n=r.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(fg.call(this,n,r),!r)return(0,Jo.eachItem)(n,s=>zo.call(this,s)),this;lg.call(this,r);let a=q(b({},r),{type:(0,Si.getJSONTypes)(r.type),schemaType:(0,Si.getJSONTypes)(r.schemaType)});return(0,Jo.eachItem)(n,a.type.length===0?s=>zo.call(this,s,a):s=>a.type.forEach(i=>zo.call(this,s,a,i))),this}getKeyword(e){let r=this.RULES.all[e];return typeof r=="object"?r.definition:!!r}removeKeyword(e){let{RULES:r}=this;delete r.keywords[e],delete r.all[e];for(let n of r.rules){let a=n.rules.findIndex(s=>s.keyword===e);a>=0&&n.rules.splice(a,1)}return this}addFormat(e,r){return typeof r=="string"&&(r=new RegExp(r)),this.formats[e]=r,this}errorsText(e=this.errors,{separator:r=", ",dataVar:n="data"}={}){return!e||e.length===0?"No errors":e.map(a=>`${n}${a.instancePath} ${a.message}`).reduce((a,s)=>a+r+s)}$dataMetaSchema(e,r){let n=this.RULES.all;e=JSON.parse(JSON.stringify(e));for(let a of r){let s=a.split("/").slice(1),i=e;for(let o of s)i=i[o];for(let o in n){let p=n[o];if(typeof p!="object")continue;let{$data:m}=p.definition,c=i[o];m&&c&&(i[o]=ol(c))}}return e}_removeAllSchemas(e,r){for(let n in e){let a=e[n];(!r||r.test(n))&&(typeof a=="string"?delete e[n]:a&&!a.meta&&(this._cache.delete(a.schema),delete e[n]))}}_addSchema(e,r,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 p=this._cache.get(e);if(p!==void 0)return p;n=(0,rr.normalizeId)(i||n);let m=rr.getSchemaRefs.call(this,e,n);return p=new tr.SchemaEnv({schema:e,schemaId:o,meta:r,baseId:n,localRefs:m}),this._cache.set(p.schema,p),s&&!n.startsWith("#")&&(n&&this._checkUnique(n),this.refs[n]=p),a&&this.validateSchema(e,!0),p}_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):tr.compileSchema.call(this,e),!e.validate)throw new Error("ajv implementation error");return e.validate}_compileMetaSchema(e){let r=this.opts;this.opts=this._metaOpts;try{tr.compileSchema.call(this,e)}finally{this.opts=r}}};nr.ValidationError=J_.default;nr.MissingRefError=sl.default;se.default=nr;function nl(t,e,r,n="error"){for(let a in t){let s=a;s in e&&this.logger[n](`${r}: option ${a}. ${t[s]}`)}}function al(t){return t=(0,rr.normalizeId)(t),this.schemas[t]||this.refs[t]}function ng(){let t=this.opts.schemas;if(t)if(Array.isArray(t))this.addSchema(t);else for(let e in t)this.addSchema(t[e],e)}function ag(){for(let t in this.opts.formats){let e=this.opts.formats[t];e&&this.addFormat(t,e)}}function sg(t){if(Array.isArray(t)){this.addVocabulary(t);return}this.logger.warn("keywords option as map is deprecated, pass array");for(let e in t){let r=t[e];r.keyword||(r.keyword=e),this.addKeyword(r)}}function ig(){let t=b({},this.opts);for(let e of X_)delete t[e];return t}var og={log(){},warn(){},error(){}};function pg(t){if(t===!1)return og;if(t===void 0)return console;if(t.log&&t.warn&&t.error)return t;throw new Error("logger must implement log, warn and error methods")}var dg=/^[a-z_$][a-z0-9_$:-]*$/i;function fg(t,e){let{RULES:r}=this;if((0,Jo.eachItem)(t,n=>{if(r.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 zo(t,e,r){var n;let a=e==null?void 0:e.post;if(r&&a)throw new Error('keyword with "post" flag cannot have "type"');let{RULES:s}=this,i=a?s.post:s.rules.find(({type:p})=>p===r);if(i||(i={type:r,rules:[]},s.rules.push(i)),s.keywords[t]=!0,!e)return;let o={keyword:t,definition:q(b({},e),{type:(0,Si.getJSONTypes)(e.type),schemaType:(0,Si.getJSONTypes)(e.schemaType)})};e.before?ug.call(this,i,o,e.before):i.rules.push(o),s.all[t]=o,(n=e.implements)===null||n===void 0||n.forEach(p=>this.addKeyword(p))}function ug(t,e,r){let n=t.rules.findIndex(a=>a.keyword===r);n>=0?t.rules.splice(n,0,e):(t.rules.push(e),this.logger.warn(`rule ${r} is not defined`))}function lg(t){let{metaSchema:e}=t;e!==void 0&&(t.$data&&this.opts.$data&&(e=ol(e)),t.validateSchema=this.compile(e,!0))}var cg={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function ol(t){return{anyOf:[t,cg]}}});var dl=I(Qo=>{"use strict";Object.defineProperty(Qo,"__esModule",{value:!0});var mg={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};Qo.default=mg});var cl=I(pt=>{"use strict";Object.defineProperty(pt,"__esModule",{value:!0});pt.callRef=pt.getValidate=void 0;var hg=Zt(),fl=be(),ge=A(),$t=Ue(),ul=wi(),vi=z(),_g={keyword:"$ref",schemaType:"string",code(t){let{gen:e,schema:r,it:n}=t,{baseId:a,schemaEnv:s,validateName:i,opts:o,self:p}=n,{root:m}=s;if((r==="#"||r==="#/")&&a===m.baseId)return h();let c=ul.resolveRef.call(p,m,a,r);if(c===void 0)throw new hg.default(n.opts.uriResolver,a,r);if(c instanceof ul.SchemaEnv)return y(c);return F(c);function h(){if(s===m)return Ei(t,i,s,s.$async);let g=e.scopeValue("root",{ref:m});return Ei(t,(0,ge._)`${g}.validate`,m,m.$async)}function y(g){let x=ll(t,g);Ei(t,x,g,g.$async)}function F(g){let x=e.scopeValue("schema",o.code.source===!0?{ref:g,code:(0,ge.stringify)(g)}:{ref:g}),T=e.name("valid"),$=t.subschema({schema:g,dataTypes:[],schemaPath:ge.nil,topSchemaRef:x,errSchemaPath:r},T);t.mergeEvaluated($),t.ok(T)}}};function ll(t,e){let{gen:r}=t;return e.validate?r.scopeValue("validate",{ref:e.validate}):(0,ge._)`${r.scopeValue("wrapper",{ref:e})}.validate`}pt.getValidate=ll;function Ei(t,e,r,n){let{gen:a,it:s}=t,{allErrors:i,schemaEnv:o,opts:p}=s,m=p.passContext?$t.default.this:ge.nil;n?c():h();function c(){if(!o.$async)throw new Error("async schema referenced by sync schema");let g=a.let("valid");a.try(()=>{a.code((0,ge._)`await ${(0,fl.callValidateCode)(t,e,m)}`),F(e),i||a.assign(g,!0)},x=>{a.if((0,ge._)`!(${x} instanceof ${s.ValidationError})`,()=>a.throw(x)),y(x),i||a.assign(g,!1)}),t.ok(g)}function h(){t.result((0,fl.callValidateCode)(t,e,m),()=>F(e),()=>y(e))}function y(g){let x=(0,ge._)`${g}.errors`;a.assign($t.default.vErrors,(0,ge._)`${$t.default.vErrors} === null ? ${x} : ${$t.default.vErrors}.concat(${x})`),a.assign($t.default.errors,(0,ge._)`${$t.default.vErrors}.length`)}function F(g){var x;if(!s.opts.unevaluated)return;let T=(x=r==null?void 0:r.validate)===null||x===void 0?void 0:x.evaluated;if(s.props!==!0)if(T&&!T.dynamicProps)T.props!==void 0&&(s.props=vi.mergeEvaluated.props(a,T.props,s.props));else{let $=a.var("props",(0,ge._)`${g}.evaluated.props`);s.props=vi.mergeEvaluated.props(a,$,s.props,ge.Name)}if(s.items!==!0)if(T&&!T.dynamicItems)T.items!==void 0&&(s.items=vi.mergeEvaluated.items(a,T.items,s.items));else{let $=a.var("items",(0,ge._)`${g}.evaluated.items`);s.items=vi.mergeEvaluated.items(a,$,s.items,ge.Name)}}}pt.callRef=Ei;pt.default=_g});var ml=I(Ko=>{"use strict";Object.defineProperty(Ko,"__esModule",{value:!0});var gg=dl(),Tg=cl(),yg=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",gg.default,Tg.default];Ko.default=yg});var hl=I(Yo=>{"use strict";Object.defineProperty(Yo,"__esModule",{value:!0});var Gi=A(),Ke=Gi.operators,Ci={maximum:{okStr:"<=",ok:Ke.LTE,fail:Ke.GT},minimum:{okStr:">=",ok:Ke.GTE,fail:Ke.LT},exclusiveMaximum:{okStr:"<",ok:Ke.LT,fail:Ke.GTE},exclusiveMinimum:{okStr:">",ok:Ke.GT,fail:Ke.LTE}},Fg={message:({keyword:t,schemaCode:e})=>(0,Gi.str)`must be ${Ci[t].okStr} ${e}`,params:({keyword:t,schemaCode:e})=>(0,Gi._)`{comparison: ${Ci[t].okStr}, limit: ${e}}`},xg={keyword:Object.keys(Ci),type:"number",schemaType:"number",$data:!0,error:Fg,code(t){let{keyword:e,data:r,schemaCode:n}=t;t.fail$data((0,Gi._)`${r} ${Ci[e].fail} ${n} || isNaN(${r})`)}};Yo.default=xg});var _l=I(Xo=>{"use strict";Object.defineProperty(Xo,"__esModule",{value:!0});var ar=A(),bg={message:({schemaCode:t})=>(0,ar.str)`must be multiple of ${t}`,params:({schemaCode:t})=>(0,ar._)`{multipleOf: ${t}}`},Og={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:bg,code(t){let{gen:e,data:r,schemaCode:n,it:a}=t,s=a.opts.multipleOfPrecision,i=e.let("res"),o=s?(0,ar._)`Math.abs(Math.round(${i}) - ${i}) > 1e-${s}`:(0,ar._)`${i} !== parseInt(${i})`;t.fail$data((0,ar._)`(${n} === 0 || (${i} = ${r}/${n}, ${o}))`)}};Xo.default=Og});var Tl=I(Zo=>{"use strict";Object.defineProperty(Zo,"__esModule",{value:!0});function gl(t){let e=t.length,r=0,n=0,a;for(;n<e;)r++,a=t.charCodeAt(n++),a>=55296&&a<=56319&&n<e&&(a=t.charCodeAt(n),(a&64512)===56320&&n++);return r}Zo.default=gl;gl.code='require("ajv/dist/runtime/ucs2length").default'});var yl=I(ep=>{"use strict";Object.defineProperty(ep,"__esModule",{value:!0});var dt=A(),$g=z(),wg=Tl(),Ig={message({keyword:t,schemaCode:e}){let r=t==="maxLength"?"more":"fewer";return(0,dt.str)`must NOT have ${r} than ${e} characters`},params:({schemaCode:t})=>(0,dt._)`{limit: ${t}}`},jg={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:Ig,code(t){let{keyword:e,data:r,schemaCode:n,it:a}=t,s=e==="maxLength"?dt.operators.GT:dt.operators.LT,i=a.opts.unicode===!1?(0,dt._)`${r}.length`:(0,dt._)`${(0,$g.useFunc)(t.gen,wg.default)}(${r})`;t.fail$data((0,dt._)`${i} ${s} ${n}`)}};ep.default=jg});var Fl=I(tp=>{"use strict";Object.defineProperty(tp,"__esModule",{value:!0});var kg=be(),Ri=A(),Sg={message:({schemaCode:t})=>(0,Ri.str)`must match pattern "${t}"`,params:({schemaCode:t})=>(0,Ri._)`{pattern: ${t}}`},vg={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:Sg,code(t){let{data:e,$data:r,schema:n,schemaCode:a,it:s}=t,i=s.opts.unicodeRegExp?"u":"",o=r?(0,Ri._)`(new RegExp(${a}, ${i}))`:(0,kg.usePattern)(t,n);t.fail$data((0,Ri._)`!${o}.test(${e})`)}};tp.default=vg});var xl=I(rp=>{"use strict";Object.defineProperty(rp,"__esModule",{value:!0});var sr=A(),Eg={message({keyword:t,schemaCode:e}){let r=t==="maxProperties"?"more":"fewer";return(0,sr.str)`must NOT have ${r} than ${e} properties`},params:({schemaCode:t})=>(0,sr._)`{limit: ${t}}`},Gg={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:Eg,code(t){let{keyword:e,data:r,schemaCode:n}=t,a=e==="maxProperties"?sr.operators.GT:sr.operators.LT;t.fail$data((0,sr._)`Object.keys(${r}).length ${a} ${n}`)}};rp.default=Gg});var bl=I(np=>{"use strict";Object.defineProperty(np,"__esModule",{value:!0});var ir=be(),or=A(),Cg=z(),Rg={message:({params:{missingProperty:t}})=>(0,or.str)`must have required property '${t}'`,params:({params:{missingProperty:t}})=>(0,or._)`{missingProperty: ${t}}`},Mg={keyword:"required",type:"object",schemaType:"array",$data:!0,error:Rg,code(t){let{gen:e,schema:r,schemaCode:n,data:a,$data:s,it:i}=t,{opts:o}=i;if(!s&&r.length===0)return;let p=r.length>=o.loopRequired;if(i.allErrors?m():c(),o.strictRequired){let F=t.parentSchema.properties,{definedProperties:g}=t.it;for(let x of r)if((F==null?void 0:F[x])===void 0&&!g.has(x)){let T=i.schemaEnv.baseId+i.errSchemaPath,$=`required property "${x}" is not defined at "${T}" (strictRequired)`;(0,Cg.checkStrictMode)(i,$,i.opts.strictRequired)}}function m(){if(p||s)t.block$data(or.nil,h);else for(let F of r)(0,ir.checkReportMissingProp)(t,F)}function c(){let F=e.let("missing");if(p||s){let g=e.let("valid",!0);t.block$data(g,()=>y(F,g)),t.ok(g)}else e.if((0,ir.checkMissingProp)(t,r,F)),(0,ir.reportMissingProp)(t,F),e.else()}function h(){e.forOf("prop",n,F=>{t.setParams({missingProperty:F}),e.if((0,ir.noPropertyInData)(e,a,F,o.ownProperties),()=>t.error())})}function y(F,g){t.setParams({missingProperty:F}),e.forOf(F,n,()=>{e.assign(g,(0,ir.propertyInData)(e,a,F,o.ownProperties)),e.if((0,or.not)(g),()=>{t.error(),e.break()})},or.nil)}}};np.default=Mg});var Ol=I(ap=>{"use strict";Object.defineProperty(ap,"__esModule",{value:!0});var pr=A(),Pg={message({keyword:t,schemaCode:e}){let r=t==="maxItems"?"more":"fewer";return(0,pr.str)`must NOT have ${r} than ${e} items`},params:({schemaCode:t})=>(0,pr._)`{limit: ${t}}`},Wg={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:Pg,code(t){let{keyword:e,data:r,schemaCode:n}=t,a=e==="maxItems"?pr.operators.GT:pr.operators.LT;t.fail$data((0,pr._)`${r}.length ${a} ${n}`)}};ap.default=Wg});var Mi=I(sp=>{"use strict";Object.defineProperty(sp,"__esModule",{value:!0});var $l=vo();$l.code='require("ajv/dist/runtime/equal").default';sp.default=$l});var wl=I(op=>{"use strict";Object.defineProperty(op,"__esModule",{value:!0});var ip=Jt(),ie=A(),Dg=z(),Ng=Mi(),Ag={message:({params:{i:t,j:e}})=>(0,ie.str)`must NOT have duplicate items (items ## ${e} and ${t} are identical)`,params:({params:{i:t,j:e}})=>(0,ie._)`{i: ${t}, j: ${e}}`},Ug={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:Ag,code(t){let{gen:e,data:r,$data:n,schema:a,parentSchema:s,schemaCode:i,it:o}=t;if(!n&&!a)return;let p=e.let("valid"),m=s.items?(0,ip.getSchemaTypes)(s.items):[];t.block$data(p,c,(0,ie._)`${i} === false`),t.ok(p);function c(){let g=e.let("i",(0,ie._)`${r}.length`),x=e.let("j");t.setParams({i:g,j:x}),e.assign(p,!0),e.if((0,ie._)`${g} > 1`,()=>(h()?y:F)(g,x))}function h(){return m.length>0&&!m.some(g=>g==="object"||g==="array")}function y(g,x){let T=e.name("item"),$=(0,ip.checkDataTypes)(m,T,o.opts.strictNumbers,ip.DataType.Wrong),D=e.const("indices",(0,ie._)`{}`);e.for((0,ie._)`;${g}--;`,()=>{e.let(T,(0,ie._)`${r}[${g}]`),e.if($,(0,ie._)`continue`),m.length>1&&e.if((0,ie._)`typeof ${T} == "string"`,(0,ie._)`${T} += "_"`),e.if((0,ie._)`typeof ${D}[${T}] == "number"`,()=>{e.assign(x,(0,ie._)`${D}[${T}]`),t.error(),e.assign(p,!1).break()}).code((0,ie._)`${D}[${T}] = ${g}`)})}function F(g,x){let T=(0,Dg.useFunc)(e,Ng.default),$=e.name("outer");e.label($).for((0,ie._)`;${g}--;`,()=>e.for((0,ie._)`${x} = ${g}; ${x}--;`,()=>e.if((0,ie._)`${T}(${r}[${g}], ${r}[${x}])`,()=>{t.error(),e.assign(p,!1).break($)})))}}};op.default=Ug});var Il=I(dp=>{"use strict";Object.defineProperty(dp,"__esModule",{value:!0});var pp=A(),qg=z(),Bg=Mi(),Lg={message:"must be equal to constant",params:({schemaCode:t})=>(0,pp._)`{allowedValue: ${t}}`},Hg={keyword:"const",$data:!0,error:Lg,code(t){let{gen:e,data:r,$data:n,schemaCode:a,schema:s}=t;n||s&&typeof s=="object"?t.fail$data((0,pp._)`!${(0,qg.useFunc)(e,Bg.default)}(${r}, ${a})`):t.fail((0,pp._)`${s} !== ${r}`)}};dp.default=Hg});var jl=I(fp=>{"use strict";Object.defineProperty(fp,"__esModule",{value:!0});var dr=A(),Vg=z(),zg=Mi(),Jg={message:"must be equal to one of the allowed values",params:({schemaCode:t})=>(0,dr._)`{allowedValues: ${t}}`},Qg={keyword:"enum",schemaType:"array",$data:!0,error:Jg,code(t){let{gen:e,data:r,$data:n,schema:a,schemaCode:s,it:i}=t;if(!n&&a.length===0)throw new Error("enum must have non-empty array");let o=a.length>=i.opts.loopEnum,p,m=()=>p!=null?p:p=(0,Vg.useFunc)(e,zg.default),c;if(o||n)c=e.let("valid"),t.block$data(c,h);else{if(!Array.isArray(a))throw new Error("ajv implementation error");let F=e.const("vSchema",s);c=(0,dr.or)(...a.map((g,x)=>y(F,x)))}t.pass(c);function h(){e.assign(c,!1),e.forOf("v",s,F=>e.if((0,dr._)`${m()}(${r}, ${F})`,()=>e.assign(c,!0).break()))}function y(F,g){let x=a[g];return typeof x=="object"&&x!==null?(0,dr._)`${m()}(${r}, ${F}[${g}])`:(0,dr._)`${r} === ${x}`}}};fp.default=Qg});var kl=I(up=>{"use strict";Object.defineProperty(up,"__esModule",{value:!0});var Kg=hl(),Yg=_l(),Xg=yl(),Zg=Fl(),eT=xl(),tT=bl(),rT=Ol(),nT=wl(),aT=Il(),sT=jl(),iT=[Kg.default,Yg.default,Xg.default,Zg.default,eT.default,tT.default,rT.default,nT.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},aT.default,sT.default];up.default=iT});var cp=I(fr=>{"use strict";Object.defineProperty(fr,"__esModule",{value:!0});fr.validateAdditionalItems=void 0;var ft=A(),lp=z(),oT={message:({params:{len:t}})=>(0,ft.str)`must NOT have more than ${t} items`,params:({params:{len:t}})=>(0,ft._)`{limit: ${t}}`},pT={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:oT,code(t){let{parentSchema:e,it:r}=t,{items:n}=e;if(!Array.isArray(n)){(0,lp.checkStrictMode)(r,'"additionalItems" is ignored when "items" is not an array of schemas');return}Sl(t,n)}};function Sl(t,e){let{gen:r,schema:n,data:a,keyword:s,it:i}=t;i.items=!0;let o=r.const("len",(0,ft._)`${a}.length`);if(n===!1)t.setParams({len:e.length}),t.pass((0,ft._)`${o} <= ${e.length}`);else if(typeof n=="object"&&!(0,lp.alwaysValidSchema)(i,n)){let m=r.var("valid",(0,ft._)`${o} <= ${e.length}`);r.if((0,ft.not)(m),()=>p(m)),t.ok(m)}function p(m){r.forRange("i",e.length,o,c=>{t.subschema({keyword:s,dataProp:c,dataPropType:lp.Type.Num},m),i.allErrors||r.if((0,ft.not)(m),()=>r.break())})}}fr.validateAdditionalItems=Sl;fr.default=pT});var mp=I(ur=>{"use strict";Object.defineProperty(ur,"__esModule",{value:!0});ur.validateTuple=void 0;var vl=A(),Pi=z(),dT=be(),fT={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(t){let{schema:e,it:r}=t;if(Array.isArray(e))return El(t,"additionalItems",e);r.items=!0,!(0,Pi.alwaysValidSchema)(r,e)&&t.ok((0,dT.validateArray)(t))}};function El(t,e,r=t.schema){let{gen:n,parentSchema:a,data:s,keyword:i,it:o}=t;c(a),o.opts.unevaluated&&r.length&&o.items!==!0&&(o.items=Pi.mergeEvaluated.items(n,r.length,o.items));let p=n.name("valid"),m=n.const("len",(0,vl._)`${s}.length`);r.forEach((h,y)=>{(0,Pi.alwaysValidSchema)(o,h)||(n.if((0,vl._)`${m} > ${y}`,()=>t.subschema({keyword:i,schemaProp:y,dataProp:y},p)),t.ok(p))});function c(h){let{opts:y,errSchemaPath:F}=o,g=r.length,x=g===h.minItems&&(g===h.maxItems||h[e]===!1);if(y.strictTuples&&!x){let T=`"${i}" is ${g}-tuple, but minItems or maxItems/${e} are not specified or different at path "${F}"`;(0,Pi.checkStrictMode)(o,T,y.strictTuples)}}}ur.validateTuple=El;ur.default=fT});var Gl=I(hp=>{"use strict";Object.defineProperty(hp,"__esModule",{value:!0});var uT=mp(),lT={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:t=>(0,uT.validateTuple)(t,"items")};hp.default=lT});var Rl=I(_p=>{"use strict";Object.defineProperty(_p,"__esModule",{value:!0});var Cl=A(),cT=z(),mT=be(),hT=cp(),_T={message:({params:{len:t}})=>(0,Cl.str)`must NOT have more than ${t} items`,params:({params:{len:t}})=>(0,Cl._)`{limit: ${t}}`},gT={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:_T,code(t){let{schema:e,parentSchema:r,it:n}=t,{prefixItems:a}=r;n.items=!0,!(0,cT.alwaysValidSchema)(n,e)&&(a?(0,hT.validateAdditionalItems)(t,a):t.ok((0,mT.validateArray)(t)))}};_p.default=gT});var Ml=I(gp=>{"use strict";Object.defineProperty(gp,"__esModule",{value:!0});var $e=A(),Wi=z(),TT={message:({params:{min:t,max:e}})=>e===void 0?(0,$e.str)`must contain at least ${t} valid item(s)`:(0,$e.str)`must contain at least ${t} and no more than ${e} valid item(s)`,params:({params:{min:t,max:e}})=>e===void 0?(0,$e._)`{minContains: ${t}}`:(0,$e._)`{minContains: ${t}, maxContains: ${e}}`},yT={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:TT,code(t){let{gen:e,schema:r,parentSchema:n,data:a,it:s}=t,i,o,{minContains:p,maxContains:m}=n;s.opts.next?(i=p===void 0?1:p,o=m):i=1;let c=e.const("len",(0,$e._)`${a}.length`);if(t.setParams({min:i,max:o}),o===void 0&&i===0){(0,Wi.checkStrictMode)(s,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(o!==void 0&&i>o){(0,Wi.checkStrictMode)(s,'"minContains" > "maxContains" is always invalid'),t.fail();return}if((0,Wi.alwaysValidSchema)(s,r)){let x=(0,$e._)`${c} >= ${i}`;o!==void 0&&(x=(0,$e._)`${x} && ${c} <= ${o}`),t.pass(x);return}s.items=!0;let h=e.name("valid");o===void 0&&i===1?F(h,()=>e.if(h,()=>e.break())):i===0?(e.let(h,!0),o!==void 0&&e.if((0,$e._)`${a}.length > 0`,y)):(e.let(h,!1),y()),t.result(h,()=>t.reset());function y(){let x=e.name("_valid"),T=e.let("count",0);F(x,()=>e.if(x,()=>g(T)))}function F(x,T){e.forRange("i",0,c,$=>{t.subschema({keyword:"contains",dataProp:$,dataPropType:Wi.Type.Num,compositeRule:!0},x),T()})}function g(x){e.code((0,$e._)`${x}++`),o===void 0?e.if((0,$e._)`${x} >= ${i}`,()=>e.assign(h,!0).break()):(e.if((0,$e._)`${x} > ${o}`,()=>e.assign(h,!1).break()),i===1?e.assign(h,!0):e.if((0,$e._)`${x} >= ${i}`,()=>e.assign(h,!0)))}}};gp.default=yT});var Dl=I(Me=>{"use strict";Object.defineProperty(Me,"__esModule",{value:!0});Me.validateSchemaDeps=Me.validatePropertyDeps=Me.error=void 0;var Tp=A(),FT=z(),lr=be();Me.error={message:({params:{property:t,depsCount:e,deps:r}})=>{let n=e===1?"property":"properties";return(0,Tp.str)`must have ${n} ${r} when property ${t} is present`},params:({params:{property:t,depsCount:e,deps:r,missingProperty:n}})=>(0,Tp._)`{property: ${t},
|
|
6
6
|
missingProperty: ${n},
|
|
7
7
|
depsCount: ${e},
|
|
8
|
-
deps: ${r}}`};var FT={keyword:"dependencies",type:"object",schemaType:"object",error:Me.error,code(t){let[e,r]=xT(t);Pl(t,e),Wl(t,r)}};function xT({schema:t}){let e={},r={};for(let n in t){if(n==="__proto__")continue;let a=Array.isArray(t[n])?e:r;a[n]=t[n]}return[e,r]}function Pl(t,e=t.schema){let{gen:r,data:n,it:a}=t;if(Object.keys(e).length===0)return;let s=r.let("missing");for(let i in e){let o=e[i];if(o.length===0)continue;let p=(0,lr.propertyInData)(r,n,i,a.opts.ownProperties);t.setParams({property:i,depsCount:o.length,deps:o.join(", ")}),a.allErrors?r.if(p,()=>{for(let m of o)(0,lr.checkReportMissingProp)(t,m)}):(r.if((0,Tp._)`${p} && (${(0,lr.checkMissingProp)(t,o,s)})`),(0,lr.reportMissingProp)(t,s),r.else())}}Me.validatePropertyDeps=Pl;function Wl(t,e=t.schema){let{gen:r,data:n,keyword:a,it:s}=t,i=r.name("valid");for(let o in e)(0,yT.alwaysValidSchema)(s,e[o])||(r.if((0,lr.propertyInData)(r,n,o,s.opts.ownProperties),()=>{let p=t.subschema({keyword:a,schemaProp:o},i);t.mergeValidEvaluated(p,i)},()=>r.var(i,!0)),t.ok(i))}Me.validateSchemaDeps=Wl;Me.default=FT});var Nl=I(yp=>{"use strict";Object.defineProperty(yp,"__esModule",{value:!0});var Al=N(),bT=z(),OT={message:"property name must be valid",params:({params:t})=>(0,Al._)`{propertyName: ${t.propertyName}}`},$T={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:OT,code(t){let{gen:e,schema:r,data:n,it:a}=t;if((0,bT.alwaysValidSchema)(a,r))return;let s=e.name("valid");e.forIn("key",n,i=>{t.setParams({propertyName:i}),t.subschema({keyword:"propertyNames",data:i,dataTypes:["string"],propertyName:i,compositeRule:!0},s),e.if((0,Al.not)(s),()=>{t.error(!0),a.allErrors||e.break()})}),t.ok(s)}};yp.default=$T});var xp=I(Fp=>{"use strict";Object.defineProperty(Fp,"__esModule",{value:!0});var Di=be(),Se=N(),wT=Ue(),Ai=z(),IT={message:"must NOT have additional properties",params:({params:t})=>(0,Se._)`{additionalProperty: ${t.additionalProperty}}`},jT={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:IT,code(t){let{gen:e,schema:r,parentSchema:n,data:a,errsCount:s,it:i}=t;if(!s)throw new Error("ajv implementation error");let{allErrors:o,opts:p}=i;if(i.props=!0,p.removeAdditional!=="all"&&(0,Ai.alwaysValidSchema)(i,r))return;let m=(0,Di.allSchemaProperties)(n.properties),c=(0,Di.allSchemaProperties)(n.patternProperties);h(),t.ok((0,Se._)`${s} === ${wT.default.errors}`);function h(){e.forIn("key",a,y=>{!m.length&&!c.length?g(y):e.if(T(y),()=>g(y))})}function T(y){let $;if(m.length>8){let D=(0,Ai.schemaRefOrVal)(i,n.properties,"properties");$=(0,Di.isOwnProperty)(e,D,y)}else m.length?$=(0,Se.or)(...m.map(D=>(0,Se._)`${y} === ${D}`)):$=Se.nil;return c.length&&($=(0,Se.or)($,...c.map(D=>(0,Se._)`${(0,Di.usePattern)(t,D)}.test(${y})`))),(0,Se.not)($)}function x(y){e.code((0,Se._)`delete ${a}[${y}]`)}function g(y){if(p.removeAdditional==="all"||p.removeAdditional&&r===!1){x(y);return}if(r===!1){t.setParams({additionalProperty:y}),t.error(),o||e.break();return}if(typeof r=="object"&&!(0,Ai.alwaysValidSchema)(i,r)){let $=e.name("valid");p.removeAdditional==="failing"?(F(y,$,!1),e.if((0,Se.not)($),()=>{t.reset(),x(y)})):(F(y,$),o||e.if((0,Se.not)($),()=>e.break()))}}function F(y,$,D){let A={keyword:"additionalProperties",dataProp:y,dataPropType:Ai.Type.Str};D===!1&&Object.assign(A,{compositeRule:!0,createErrors:!1,allErrors:!1}),t.subschema(A,$)}}};Fp.default=jT});var Bl=I(Op=>{"use strict";Object.defineProperty(Op,"__esModule",{value:!0});var kT=Xt(),Ul=be(),bp=z(),ql=xp(),ST={keyword:"properties",type:"object",schemaType:"object",code(t){let{gen:e,schema:r,parentSchema:n,data:a,it:s}=t;s.opts.removeAdditional==="all"&&n.additionalProperties===void 0&&ql.default.code(new kT.KeywordCxt(s,ql.default,"additionalProperties"));let i=(0,Ul.allSchemaProperties)(r);for(let h of i)s.definedProperties.add(h);s.opts.unevaluated&&i.length&&s.props!==!0&&(s.props=bp.mergeEvaluated.props(e,(0,bp.toHash)(i),s.props));let o=i.filter(h=>!(0,bp.alwaysValidSchema)(s,r[h]));if(o.length===0)return;let p=e.name("valid");for(let h of o)m(h)?c(h):(e.if((0,Ul.propertyInData)(e,a,h,s.opts.ownProperties)),c(h),s.allErrors||e.else().var(p,!0),e.endIf()),t.it.definedProperties.add(h),t.ok(p);function m(h){return s.opts.useDefaults&&!s.compositeRule&&r[h].default!==void 0}function c(h){t.subschema({keyword:"properties",schemaProp:h,dataProp:h},p)}}};Op.default=ST});var zl=I($p=>{"use strict";Object.defineProperty($p,"__esModule",{value:!0});var Ll=be(),Ni=N(),Hl=z(),Vl=z(),vT={keyword:"patternProperties",type:"object",schemaType:"object",code(t){let{gen:e,schema:r,data:n,parentSchema:a,it:s}=t,{opts:i}=s,o=(0,Ll.allSchemaProperties)(r),p=o.filter(F=>(0,Hl.alwaysValidSchema)(s,r[F]));if(o.length===0||p.length===o.length&&(!s.opts.unevaluated||s.props===!0))return;let m=i.strictSchema&&!i.allowMatchingProperties&&a.properties,c=e.name("valid");s.props!==!0&&!(s.props instanceof Ni.Name)&&(s.props=(0,Vl.evaluatedPropsToName)(e,s.props));let{props:h}=s;T();function T(){for(let F of o)m&&x(F),s.allErrors?g(F):(e.var(c,!0),g(F),e.if(c))}function x(F){for(let y in m)new RegExp(F).test(y)&&(0,Hl.checkStrictMode)(s,`property ${y} matches pattern ${F} (use allowMatchingProperties)`)}function g(F){e.forIn("key",n,y=>{e.if((0,Ni._)`${(0,Ll.usePattern)(t,F)}.test(${y})`,()=>{let $=p.includes(F);$||t.subschema({keyword:"patternProperties",schemaProp:F,dataProp:y,dataPropType:Vl.Type.Str},c),s.opts.unevaluated&&h!==!0?e.assign((0,Ni._)`${h}[${y}]`,!0):!$&&!s.allErrors&&e.if((0,Ni.not)(c),()=>e.break())})})}}};$p.default=vT});var Jl=I(wp=>{"use strict";Object.defineProperty(wp,"__esModule",{value:!0});var ET=z(),GT={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(t){let{gen:e,schema:r,it:n}=t;if((0,ET.alwaysValidSchema)(n,r)){t.fail();return}let a=e.name("valid");t.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},a),t.failResult(a,()=>t.reset(),()=>t.error())},error:{message:"must NOT be valid"}};wp.default=GT});var Ql=I(Ip=>{"use strict";Object.defineProperty(Ip,"__esModule",{value:!0});var CT=be(),RT={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:CT.validateUnion,error:{message:"must match a schema in anyOf"}};Ip.default=RT});var Kl=I(jp=>{"use strict";Object.defineProperty(jp,"__esModule",{value:!0});var Ui=N(),MT=z(),PT={message:"must match exactly one schema in oneOf",params:({params:t})=>(0,Ui._)`{passingSchemas: ${t.passing}}`},WT={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:PT,code(t){let{gen:e,schema:r,parentSchema:n,it:a}=t;if(!Array.isArray(r))throw new Error("ajv implementation error");if(a.opts.discriminator&&n.discriminator)return;let s=r,i=e.let("valid",!1),o=e.let("passing",null),p=e.name("_valid");t.setParams({passing:o}),e.block(m),t.result(i,()=>t.reset(),()=>t.error(!0));function m(){s.forEach((c,h)=>{let T;(0,MT.alwaysValidSchema)(a,c)?e.var(p,!0):T=t.subschema({keyword:"oneOf",schemaProp:h,compositeRule:!0},p),h>0&&e.if((0,Ui._)`${p} && ${i}`).assign(i,!1).assign(o,(0,Ui._)`[${o}, ${h}]`).else(),e.if(p,()=>{e.assign(i,!0),e.assign(o,h),T&&t.mergeEvaluated(T,Ui.Name)})})}}};jp.default=WT});var Yl=I(kp=>{"use strict";Object.defineProperty(kp,"__esModule",{value:!0});var DT=z(),AT={keyword:"allOf",schemaType:"array",code(t){let{gen:e,schema:r,it:n}=t;if(!Array.isArray(r))throw new Error("ajv implementation error");let a=e.name("valid");r.forEach((s,i)=>{if((0,DT.alwaysValidSchema)(n,s))return;let o=t.subschema({keyword:"allOf",schemaProp:i},a);t.ok(a),t.mergeEvaluated(o)})}};kp.default=AT});var ec=I(Sp=>{"use strict";Object.defineProperty(Sp,"__esModule",{value:!0});var qi=N(),Zl=z(),NT={message:({params:t})=>(0,qi.str)`must match "${t.ifClause}" schema`,params:({params:t})=>(0,qi._)`{failingKeyword: ${t.ifClause}}`},UT={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:NT,code(t){let{gen:e,parentSchema:r,it:n}=t;r.then===void 0&&r.else===void 0&&(0,Zl.checkStrictMode)(n,'"if" without "then" and "else" is ignored');let a=Xl(n,"then"),s=Xl(n,"else");if(!a&&!s)return;let i=e.let("valid",!0),o=e.name("_valid");if(p(),t.reset(),a&&s){let c=e.let("ifClause");t.setParams({ifClause:c}),e.if(o,m("then",c),m("else",c))}else a?e.if(o,m("then")):e.if((0,qi.not)(o),m("else"));t.pass(i,()=>t.error(!0));function p(){let c=t.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},o);t.mergeEvaluated(c)}function m(c,h){return()=>{let T=t.subschema({keyword:c},o);e.assign(i,o),t.mergeValidEvaluated(T,i),h?e.assign(h,(0,qi._)`${c}`):t.setParams({ifClause:c})}}}};function Xl(t,e){let r=t.schema[e];return r!==void 0&&!(0,Zl.alwaysValidSchema)(t,r)}Sp.default=UT});var tc=I(vp=>{"use strict";Object.defineProperty(vp,"__esModule",{value:!0});var qT=z(),BT={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:t,parentSchema:e,it:r}){e.if===void 0&&(0,qT.checkStrictMode)(r,`"${t}" without "if" is ignored`)}};vp.default=BT});var rc=I(Ep=>{"use strict";Object.defineProperty(Ep,"__esModule",{value:!0});var LT=cp(),HT=Gl(),VT=mp(),zT=Rl(),JT=Ml(),QT=Dl(),KT=Nl(),YT=xp(),XT=Bl(),ZT=zl(),ey=Jl(),ty=Ql(),ry=Kl(),ny=Yl(),ay=ec(),sy=tc();function iy(t=!1){let e=[ey.default,ty.default,ry.default,ny.default,ay.default,sy.default,KT.default,YT.default,QT.default,XT.default,ZT.default];return t?e.push(HT.default,zT.default):e.push(LT.default,VT.default),e.push(JT.default),e}Ep.default=iy});var nc=I(Gp=>{"use strict";Object.defineProperty(Gp,"__esModule",{value:!0});var re=N(),oy={message:({schemaCode:t})=>(0,re.str)`must match format "${t}"`,params:({schemaCode:t})=>(0,re._)`{format: ${t}}`},py={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:oy,code(t,e){let{gen:r,data:n,$data:a,schema:s,schemaCode:i,it:o}=t,{opts:p,errSchemaPath:m,schemaEnv:c,self:h}=o;if(!p.validateFormats)return;a?T():x();function T(){let g=r.scopeValue("formats",{ref:h.formats,code:p.code.formats}),F=r.const("fDef",(0,re._)`${g}[${i}]`),y=r.let("fType"),$=r.let("format");r.if((0,re._)`typeof ${F} == "object" && !(${F} instanceof RegExp)`,()=>r.assign(y,(0,re._)`${F}.type || "string"`).assign($,(0,re._)`${F}.validate`),()=>r.assign(y,(0,re._)`"string"`).assign($,F)),t.fail$data((0,re.or)(D(),A()));function D(){return p.strictSchema===!1?re.nil:(0,re._)`${i} && !${$}`}function A(){let K=c.$async?(0,re._)`(${F}.async ? await ${$}(${n}) : ${$}(${n}))`:(0,re._)`${$}(${n})`,G=(0,re._)`(typeof ${$} == "function" ? ${K} : ${$}.test(${n}))`;return(0,re._)`${$} && ${$} !== true && ${y} === ${e} && !${G}`}}function x(){let g=h.formats[s];if(!g){D();return}if(g===!0)return;let[F,y,$]=A(g);F===e&&t.pass(K());function D(){if(p.strictSchema===!1){h.logger.warn(G());return}throw new Error(G());function G(){return`unknown format "${s}" ignored in schema at path "${m}"`}}function A(G){let ve=G instanceof RegExp?(0,re.regexpCode)(G):p.code.formats?(0,re._)`${p.code.formats}${(0,re.getProperty)(s)}`:void 0,Pe=r.scopeValue("formats",{key:s,ref:G,code:ve});return typeof G=="object"&&!(G instanceof RegExp)?[G.type||"string",G.validate,(0,re._)`${Pe}.validate`]:["string",G,Pe]}function K(){if(typeof g=="object"&&!(g instanceof RegExp)&&g.async){if(!c.$async)throw new Error("async format in sync schema");return(0,re._)`await ${$}(${n})`}return typeof y=="function"?(0,re._)`${$}(${n})`:(0,re._)`${$}.test(${n})`}}}};Gp.default=py});var ac=I(Cp=>{"use strict";Object.defineProperty(Cp,"__esModule",{value:!0});var dy=nc(),fy=[dy.default];Cp.default=fy});var sc=I(wt=>{"use strict";Object.defineProperty(wt,"__esModule",{value:!0});wt.contentVocabulary=wt.metadataVocabulary=void 0;wt.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];wt.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]});var oc=I(Rp=>{"use strict";Object.defineProperty(Rp,"__esModule",{value:!0});var uy=ml(),ly=kl(),cy=rc(),my=ac(),ic=sc(),hy=[uy.default,ly.default,(0,cy.default)(),my.default,ic.metadataVocabulary,ic.contentVocabulary];Rp.default=hy});var dc=I(Bi=>{"use strict";Object.defineProperty(Bi,"__esModule",{value:!0});Bi.DiscrError=void 0;var pc;(function(t){t.Tag="tag",t.Mapping="mapping"})(pc||(Bi.DiscrError=pc={}))});var uc=I(Pp=>{"use strict";Object.defineProperty(Pp,"__esModule",{value:!0});var It=N(),Mp=dc(),fc=wi(),_y=Zt(),gy=z(),Ty={message:({params:{discrError:t,tagName:e}})=>t===Mp.DiscrError.Tag?`tag "${e}" must be string`:`value of tag "${e}" must be in oneOf`,params:({params:{discrError:t,tag:e,tagName:r}})=>(0,It._)`{error: ${t}, tag: ${r}, tagValue: ${e}}`},yy={keyword:"discriminator",type:"object",schemaType:"object",error:Ty,code(t){let{gen:e,data:r,schema:n,parentSchema:a,it:s}=t,{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 p=e.let("valid",!1),m=e.const("tag",(0,It._)`${r}${(0,It.getProperty)(o)}`);e.if((0,It._)`typeof ${m} == "string"`,()=>c(),()=>t.error(!1,{discrError:Mp.DiscrError.Tag,tag:m,tagName:o})),t.ok(p);function c(){let x=T();e.if(!1);for(let g in x)e.elseIf((0,It._)`${m} === ${g}`),e.assign(p,h(x[g]));e.else(),t.error(!1,{discrError:Mp.DiscrError.Mapping,tag:m,tagName:o}),e.endIf()}function h(x){let g=e.name("valid"),F=t.subschema({keyword:"oneOf",schemaProp:x},g);return t.mergeEvaluated(F,It.Name),g}function T(){var x;let g={},F=$(a),y=!0;for(let K=0;K<i.length;K++){let G=i[K];if(G!=null&&G.$ref&&!(0,gy.schemaHasRulesButRef)(G,s.self.RULES)){let Pe=G.$ref;if(G=fc.resolveRef.call(s.self,s.schemaEnv.root,s.baseId,Pe),G instanceof fc.SchemaEnv&&(G=G.schema),G===void 0)throw new _y.default(s.opts.uriResolver,s.baseId,Pe)}let ve=(x=G==null?void 0:G.properties)===null||x===void 0?void 0:x[o];if(typeof ve!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${o}"`);y=y&&(F||$(G)),D(ve,K)}if(!y)throw new Error(`discriminator: "${o}" must be required`);return g;function $({required:K}){return Array.isArray(K)&&K.includes(o)}function D(K,G){if(K.const)A(K.const,G);else if(K.enum)for(let ve of K.enum)A(ve,G);else throw new Error(`discriminator: "properties/${o}" must have "const" or "enum"`)}function A(K,G){if(typeof K!="string"||K in g)throw new Error(`discriminator: "${o}" values must be unique strings`);g[K]=G}}}};Pp.default=yy});var lc=I(($j,Fy)=>{Fy.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 mc=I((X,Wp)=>{"use strict";Object.defineProperty(X,"__esModule",{value:!0});X.MissingRefError=X.ValidationError=X.CodeGen=X.Name=X.nil=X.stringify=X.str=X._=X.KeywordCxt=X.Ajv=void 0;var xy=pl(),by=oc(),Oy=uc(),cc=lc(),$y=["/properties"],Li="http://json-schema.org/draft-07/schema",jt=class extends xy.default{_addVocabularies(){super._addVocabularies(),by.default.forEach(e=>this.addVocabulary(e)),this.opts.discriminator&&this.addKeyword(Oy.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;let e=this.opts.$data?this.$dataMetaSchema(cc,$y):cc;this.addMetaSchema(e,Li,!1),this.refs["http://json-schema.org/schema"]=Li}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(Li)?Li:void 0)}};X.Ajv=jt;Wp.exports=X=jt;Wp.exports.Ajv=jt;Object.defineProperty(X,"__esModule",{value:!0});X.default=jt;var wy=Xt();Object.defineProperty(X,"KeywordCxt",{enumerable:!0,get:function(){return wy.KeywordCxt}});var kt=N();Object.defineProperty(X,"_",{enumerable:!0,get:function(){return kt._}});Object.defineProperty(X,"str",{enumerable:!0,get:function(){return kt.str}});Object.defineProperty(X,"stringify",{enumerable:!0,get:function(){return kt.stringify}});Object.defineProperty(X,"nil",{enumerable:!0,get:function(){return kt.nil}});Object.defineProperty(X,"Name",{enumerable:!0,get:function(){return kt.Name}});Object.defineProperty(X,"CodeGen",{enumerable:!0,get:function(){return kt.CodeGen}});var Iy=Oi();Object.defineProperty(X,"ValidationError",{enumerable:!0,get:function(){return Iy.default}});var jy=Zt();Object.defineProperty(X,"MissingRefError",{enumerable:!0,get:function(){return jy.default}})});var jw={};Lc(jw,{APIFunctions:()=>Yp,APIValidators:()=>Kp,AggregateTransferManyTxInputSchema:()=>pa,AggregateTransferManyTxOutputSchema:()=>da,AggregateTransfersFnInputSchema:()=>Sr,AggregateTransfersFnOutputSchema:()=>vr,AuthError:()=>We,AuthenticationCheckTxInputSchema:()=>fa,AuthenticationCheckTxOutputSchema:()=>ua,AuthenticationError:()=>Xe,AuthorizationError:()=>ai,Client:()=>Ct,ClientFunctions:()=>j,ClientFunctionsEnum:()=>vc,ClientQueryBuilderFunctionsEnum:()=>Ec,ClientValidators:()=>bw,ConfigError:()=>ce,ConstraintError:()=>Pt,ConstsSchema:()=>ut,CreateAccessTokenFnInputSchema:()=>Er,CreateAccessTokenFnOutputSchema:()=>Gr,CreateAccessTokenTxInputSchema:()=>la,CreateAccessTokenTxOutputSchema:()=>ca,CreateContractFnInputSchema:()=>Cr,CreateContractFnOutputSchema:()=>Rr,CreateContractTxInputSchema:()=>ma,CreateContractTxOutputSchema:()=>ha,CreateDepositFnInputSchema:()=>Mr,CreateDepositFnOutputSchema:()=>Pr,CreateDepositTxInputSchema:()=>_a,CreateDepositTxOutputSchema:()=>ga,CreateDistributionTxInputSchema:()=>Ta,CreateDistributionTxOutputSchema:()=>ya,CreateExchangeFnInputSchema:()=>Wr,CreateExchangeFnOutputSchema:()=>Dr,CreateTokenFnInputSchema:()=>Ar,CreateTokenFnOutputSchema:()=>Nr,CreateTokenTxInputSchema:()=>Fa,CreateTokenTxOutputSchema:()=>xa,CreateTransferFnInputSchema:()=>Ur,CreateTransferFnOutputSchema:()=>qr,CreateTransferGroupFnInputSchema:()=>Br,CreateTransferGroupFnOutputSchema:()=>Lr,CreateTransferGroupTxInputSchema:()=>$a,CreateTransferGroupTxOutputSchema:()=>wa,CreateTransferManyTxInputSchema:()=>Ia,CreateTransferManyTxOutputSchema:()=>ja,CreateTransferTxInputSchema:()=>ba,CreateTransferTxOutputSchema:()=>Oa,CreateTransfersFnInputSchema:()=>Hr,CreateTransfersFnOutputSchema:()=>Vr,CreateWalletFnInputSchema:()=>zr,CreateWalletFnOutputSchema:()=>Jr,CreateWalletTxInputSchema:()=>ka,CreateWalletTxOutputSchema:()=>Sa,CreateWithdrawalFnInputSchema:()=>Qr,CreateWithdrawalFnOutputSchema:()=>Kr,CreateWithdrawalTxInputSchema:()=>va,CreateWithdrawalTxOutputSchema:()=>Ea,DbFilterFunctionBasicEnum:()=>ld,DbFilterFunctionInEnum:()=>cd,DbFilterFunctionMetadataBasicEnum:()=>ud,DbFilterFunctionMetadataInEnum:()=>md,DbFilterFunctionMetadataNullEnum:()=>hd,DbFilterFunctionNullEnum:()=>_d,DbFilterOperatorEnum:()=>gd,DbFilterOperatorExtendedEnum:()=>yd,DbFilterOperatorStringEnum:()=>Td,DbModelNameEnum:()=>vd,ErrorDescription:()=>wf,ErrorMessage:()=>$f,ErrorType:()=>si,Errors:()=>ye,ExportBalanceHistoryFnInputSchema:()=>Yr,ExportBalanceHistoryFnOutputSchema:()=>Xr,ExportBalanceHistoryTxInputSchema:()=>Ga,ExportBalanceHistoryTxOutputSchema:()=>Ca,ExportTokenManyTxInputSchema:()=>Ra,ExportTokenManyTxOutputSchema:()=>Ma,ExportTokensFnInputSchema:()=>Zr,ExportTokensFnOutputSchema:()=>en,ExportTransferGroupManyTxInputSchema:()=>Pa,ExportTransferGroupManyTxOutputSchema:()=>Wa,ExportTransferGroupsFnInputSchema:()=>tn,ExportTransferGroupsFnOutputSchema:()=>rn,ExportTransferManyTxInputSchema:()=>Da,ExportTransferManyTxOutputSchema:()=>Aa,ExportTransfersFnInputSchema:()=>nn,ExportTransfersFnOutputSchema:()=>an,ExportWalletManyTxInputSchema:()=>Na,ExportWalletManyTxOutputSchema:()=>Ua,ExportWalletsFnInputSchema:()=>sn,ExportWalletsFnOutputSchema:()=>on,FindBalanceManyTxInputSchema:()=>qa,FindBalanceManyTxOutputSchema:()=>Ba,FindBalancesFnInputSchema:()=>pn,FindBalancesFnOutputSchema:()=>dn,FindTokenManyTxInputSchema:()=>La,FindTokenManyTxOutputSchema:()=>Ha,FindTokensFnInputSchema:()=>fn,FindTokensFnOutputSchema:()=>un,FindTransferGroupManyTxInputSchema:()=>Va,FindTransferGroupManyTxOutputSchema:()=>za,FindTransferGroupsFnInputSchema:()=>ln,FindTransferGroupsFnOutputSchema:()=>cn,FindTransferManyTxInputSchema:()=>Ja,FindTransferManyTxOutputSchema:()=>Qa,FindTransfersFnInputSchema:()=>mn,FindTransfersFnOutputSchema:()=>hn,FindWalletManyTxInputSchema:()=>Ka,FindWalletManyTxOutputSchema:()=>Ya,FindWalletsFnInputSchema:()=>_n,FindWalletsFnOutputSchema:()=>gn,FinishTransactionTxInputSchema:()=>Xa,FinishTransactionTxOutputSchema:()=>Za,FnConstsSchema:()=>Tn,GetBalanceFnInputSchema:()=>yn,GetBalanceFnOutputSchema:()=>Fn,GetBalanceHistoryFnInputSchema:()=>xn,GetBalanceHistoryFnOutputSchema:()=>bn,GetBalanceHistoryTxInputSchema:()=>rs,GetBalanceHistoryTxOutputSchema:()=>ns,GetBalanceTxInputSchema:()=>es,GetBalanceTxOutputSchema:()=>ts,GetExportFnInputSchema:()=>On,GetExportFnOutputSchema:()=>$n,GetExportTxInputSchema:()=>as,GetExportTxOutputSchema:()=>ss,GetFlagsFnInputSchema:()=>wn,GetFlagsFnOutputSchema:()=>In,GetFlagsTxInputSchema:()=>is,GetFlagsTxOutputSchema:()=>os,GetStatisticsFnInputSchema:()=>jn,GetStatisticsFnOutputSchema:()=>kn,GetStatisticsTxInputSchema:()=>ps,GetStatisticsTxOutputSchema:()=>ds,GetTokenFnInputSchema:()=>Sn,GetTokenFnOutputSchema:()=>vn,GetTokenManyTxInputSchema:()=>ls,GetTokenManyTxOutputSchema:()=>cs,GetTokenTxInputSchema:()=>fs,GetTokenTxOutputSchema:()=>us,GetTransferFnInputSchema:()=>En,GetTransferFnOutputSchema:()=>Gn,GetTransferGroupFnInputSchema:()=>Cn,GetTransferGroupFnOutputSchema:()=>Rn,GetTransferGroupTxInputSchema:()=>_s,GetTransferGroupTxOutputSchema:()=>gs,GetTransferTxInputSchema:()=>ms,GetTransferTxOutputSchema:()=>hs,GetWalletFnInputSchema:()=>Mn,GetWalletFnOutputSchema:()=>Pn,GetWalletManyTxInputSchema:()=>Fs,GetWalletManyTxOutputSchema:()=>xs,GetWalletTxInputSchema:()=>Ts,GetWalletTxOutputSchema:()=>ys,HealthcheckFnInputSchema:()=>Wn,HealthcheckFnOutputSchema:()=>Dn,HealthcheckTxInputSchema:()=>bs,HealthcheckTxOutputSchema:()=>Os,ImportActionsTxInputSchema:()=>ct,ImportActionsTxOutputSchema:()=>$s,ImportDataFnInputSchema:()=>lt,ImportDataFnOutputSchema:()=>An,InputError:()=>L,JSONRPCError:()=>Ye,ListExportManyTxInputSchema:()=>ws,ListExportManyTxOutputSchema:()=>Is,ListExportsFnInputSchema:()=>Nn,ListExportsFnOutputSchema:()=>Un,QueryBuilder:()=>te,QueryLogsTxInputSchema:()=>js,QueryLogsTxOutputSchema:()=>ks,ResetDatabaseTxInputSchema:()=>Ss,ResetDatabaseTxOutputSchema:()=>vs,ReverseTransferFnInputSchema:()=>qn,ReverseTransferFnOutputSchema:()=>Bn,ReverseTransferGroupFnInputSchema:()=>Ln,ReverseTransferGroupFnOutputSchema:()=>Hn,ReverseTransferGroupManyTxInputSchema:()=>Ms,ReverseTransferGroupManyTxOutputSchema:()=>Ps,ReverseTransferGroupTxInputSchema:()=>Cs,ReverseTransferGroupTxOutputSchema:()=>Rs,ReverseTransferManyTxInputSchema:()=>Ws,ReverseTransferManyTxOutputSchema:()=>Ds,ReverseTransferTxInputSchema:()=>Es,ReverseTransferTxOutputSchema:()=>Gs,ReverseTransfersFnInputSchema:()=>Vn,ReverseTransfersFnOutputSchema:()=>zn,SetFlagsFnInputSchema:()=>Jn,SetFlagsFnOutputSchema:()=>Qn,SetFlagsTxInputSchema:()=>As,SetFlagsTxOutputSchema:()=>Ns,StartTransactionTxInputSchema:()=>Us,StartTransactionTxOutputSchema:()=>qs,StreamError:()=>Fe,StreamPromise:()=>De,TokenStatusEnum:()=>xd,TokenTableInputSchema:()=>cr,TokenTableSchema:()=>mr,TokenTypeEnum:()=>Fd,TransferGroupStatusEnum:()=>bd,TransferGroupTableInputSchema:()=>gr,TransferGroupTableSchema:()=>Tr,TransferGroupTypeEnum:()=>wd,TransferLogTableInputSchema:()=>yr,TransferLogTableSchema:()=>Fr,TransferStatusEnum:()=>Od,TransferStatusInputEnum:()=>$d,TransferTableInputSchema:()=>hr,TransferTableSchema:()=>_r,TransferTypeEnum:()=>Id,TxConstsSchema:()=>Bs,UpdateTokenFnInputSchema:()=>Kn,UpdateTokenFnOutputSchema:()=>Yn,UpdateTokenTxInputSchema:()=>Ls,UpdateTokenTxOutputSchema:()=>Hs,UpdateTransferFnInputSchema:()=>Xn,UpdateTransferFnOutputSchema:()=>Zn,UpdateTransferGroupFnInputSchema:()=>ea,UpdateTransferGroupFnOutputSchema:()=>ta,UpdateTransferGroupManyTxInputSchema:()=>Ks,UpdateTransferGroupManyTxOutputSchema:()=>Ys,UpdateTransferGroupTxInputSchema:()=>Js,UpdateTransferGroupTxOutputSchema:()=>Qs,UpdateTransferGroupsFnInputSchema:()=>ra,UpdateTransferGroupsFnOutputSchema:()=>na,UpdateTransferManyTxInputSchema:()=>Xs,UpdateTransferManyTxOutputSchema:()=>Zs,UpdateTransferTxInputSchema:()=>Vs,UpdateTransferTxOutputSchema:()=>zs,UpdateTransfersFnInputSchema:()=>aa,UpdateTransfersFnOutputSchema:()=>sa,UpdateWalletFnInputSchema:()=>ia,UpdateWalletFnOutputSchema:()=>oa,UpdateWalletTxInputSchema:()=>ei,UpdateWalletTxOutputSchema:()=>ti,ValidationError:()=>Te,Validator:()=>ri,WAPIError:()=>we,WalletStatusEnum:()=>kd,WalletTableInputSchema:()=>xr,WalletTableSchema:()=>br,WalletTokenSettingTableInputSchema:()=>Or,WalletTokenSettingTableSchema:()=>$r,WalletTypeEnum:()=>jd,WapiClientType:()=>Mc,WapiSettingTableInputSchema:()=>wr,WapiSettingTableSchema:()=>Ir,WapiSettingTypeEnum:()=>Sd,WapiStatisticTableInputSchema:()=>jr,WapiStatisticTableSchema:()=>kr,aggregateTransfers:()=>od,create:()=>ww,createAccessToken:()=>pd,createContract:()=>dd,createDeposit:()=>fd,createExchange:()=>Ed,createToken:()=>Gd,createTransfer:()=>Cd,createTransferGroup:()=>Rd,createTransfers:()=>Md,createWallet:()=>Pd,createWithdrawal:()=>Wd,exportBalanceHistory:()=>Dd,exportTokens:()=>Ad,exportTransferGroups:()=>Nd,exportTransfers:()=>Ud,exportWallets:()=>qd,findBalances:()=>Bd,findTokens:()=>Ld,findTransferGroups:()=>Hd,findTransfers:()=>Vd,findWallets:()=>zd,getBalance:()=>Jd,getBalanceHistory:()=>Qd,getExport:()=>Kd,getFlags:()=>Yd,getStatistics:()=>Xd,getToken:()=>Zd,getTransfer:()=>ef,getTransferGroup:()=>tf,getWallet:()=>rf,healthcheck:()=>nf,importData:()=>af,listExports:()=>sf,reverseTransfer:()=>of,reverseTransferGroup:()=>pf,reverseTransfers:()=>df,setFlags:()=>ff,updateToken:()=>uf,updateTransfer:()=>lf,updateTransferGroup:()=>cf,updateTransferGroups:()=>mf,updateTransfers:()=>hf,updateWallet:()=>_f,utils:()=>Iw});var Of=WebSocket;function M(...t){window.WAPI_DEBUG&&console.log(...t.map(e=>e&&typeof e=="object"?JSON.stringify(e):e))}var Z={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 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."},TR_UNIQUE_IDENTIFIER:{code:-19115,message:"TR_UNIQUE_IDENTIFIER",description:"The identifier for Transfer object must be unique"},TR_DIFFERENT_WALLETS:{code:-19116,message:"TR_DIFFERENT_WALLETS",description:"To and from wallets have to be different"},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"},TRG_UNIQUE_IDENTIFIER:{code:-19204,message:"TRG_UNIQUE_IDENTIFIER",description:"The identifier for TransferGroup object must be unique"},TOKEN_UNIQUE_FOREIGN:{code:-19300,message:"TOKEN_UNIQUE_FOREIGN",description:"The foreign for Token object must be unique"},WALLET_UNIQUE_FOREIGN:{code:-19400,message:"WALLET_UNIQUE_FOREIGN",description:"The foreign for Wallet object must be unique"},UNIQUE_CONSTRAINT:{code:-19500,message:"UNIQUE_CONSTRAINT",description:"Insert violates unique constraint"}}},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"},CONNECTION_TIMEOUT:{code:-15004,message:"CONNECTION_TIMEOUT",description:"Unable to get initial response in specified time"},SENDING_TIMEOUT:{code:-15005,message:"SENDING_TIMEOUT",description:"Unable to get ack from server in specified time"},CONFIG_INVALID:{code:-15100,message:"CONFIG_INVALID",description:"Provided configuration is invalid"}}}},ye=b(b(b(b(b(b({},Z.JSONRPC.ERRORS),Z.AUTH.ERRORS),Z.CONFIG.ERRORS),Z.STREAM.ERRORS),Z.INPUT.ERRORS),Z.CONSTRAINT.ERRORS);function Ze(t){return Object.fromEntries(Object.keys(t).map(e=>[e,e]))}var si=Ze(ye),we=class extends Error{constructor({type:e,code:r,message:n,data:a}){var i;super(n);let s=(i=ye[e])!=null?i:ye.INTERNAL_SERVER_ERROR;this.type=e!=null?e:si.INTERNAL_SERVER_ERROR,this.code=r!=null?r:s.code,this.message=n!=null?n:s.message,this.data=b({description:s.description},a&&typeof a=="object"?a:{error:a})}toJSON(){return{code:this.code,message:this.message,data:this.data}}},Ye=class extends we{constructor(e,r,n,a){super({type:e,message:n,data:r,code:a})}static get group(){return Z.JSONRPC.ERRORS}static get types(){return Ze(Z.JSONRPC.ERRORS)}},Fe=class extends we{constructor(e,r,n,a){super({type:e,message:n,data:r,code:a})}static get group(){return Z.STREAM.ERRORS}static get types(){return Ze(Z.STREAM.ERRORS)}},L=class extends we{constructor(e,r,n,a){super({type:e,message:n,data:r,code:a})}static get group(){return Z.INPUT.ERRORS}static get types(){return Ze(Z.INPUT.ERRORS)}},ce=class extends we{constructor(e,r,n,a){super({type:e,message:n,data:r,code:a})}static get group(){return Z.CONFIG.ERRORS}static get types(){return Ze(Z.CONFIG.ERRORS)}},We=class extends we{constructor(e,r,n,a){super({type:e,message:n,data:r,code:a})}static get group(){return Z.AUTH.ERRORS}static get types(){return Ze(Z.AUTH.ERRORS)}},Pt=class extends we{constructor(e,r,n,a){super({type:e,message:n,data:r,code:a})}static get group(){return Z.CONSTRAINT.ERRORS}static get types(){return Ze(Z.CONSTRAINT.ERRORS)}},Te=class extends Ye{constructor(e,r){super(Ye.types.INVALID_PARAMS,e,r)}},Xe=class extends We{constructor(e){super(We.types.AUTHENTICATION_ERROR,e)}},ai=class extends We{constructor(e){super(We.types.AUTHORIZATION_ERROR,e)}};var zc=Object.fromEntries(Object.keys(ye).map(t=>[ye[t].code,t]));function Jc(t){let e=zc[t];if(!e){let n=Object.entries(Z).find(([a,s])=>t>=s.min&&t<=s.max);return{group:n==null?void 0:n[0],type:void 0}}let r=Object.keys(Z).find(n=>e in Z[n].ERRORS);return r?{group:r,type:e}:(console.error("ERRORS and ERROR_GROUPS are out of sync",e),{group:void 0,type:e})}function Ki({code:t,message:e,data:r}){let{group:n,type:a}=Jc(t);e=e&&e!==a?e:ye[a].description;let s;switch(n&&n!=="JSONRPC"&&a===void 0&&(M("Novel error from server",t,e,r),a=e,s=t,e=typeof r=="object"&&"description"in r&&typeof r.description=="string"?r.description:e),n){case"JSONRPC":return new Ye(a,r,e);case"AUTH":return new We(a,r,e,s);case"CONFIG":return new ce(a,r,e,s);case"CONSTRAINT":return new Pt(a,r,e,s);case"INPUT":return new L(a,r,e,s);case"STREAM":return new Fe(a,r,e,s);default:return new we({code:t,message:e,data:r,type:a!=null?a:si.INTERNAL_SERVER_ERROR})}}var $f=Object.fromEntries(Object.keys(ye).map(t=>[t,ye[t].message])),wf=Object.fromEntries(Object.keys(ye).map(t=>[t,ye[t].description]));var ii,Qc=new Uint8Array(16);function Yi(){if(!ii&&(ii=typeof crypto!="undefined"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!ii))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return ii(Qc)}var ae=[];for(let t=0;t<256;++t)ae.push((t+256).toString(16).slice(1));function If(t,e=0){return ae[t[e+0]]+ae[t[e+1]]+ae[t[e+2]]+ae[t[e+3]]+"-"+ae[t[e+4]]+ae[t[e+5]]+"-"+ae[t[e+6]]+ae[t[e+7]]+"-"+ae[t[e+8]]+ae[t[e+9]]+"-"+ae[t[e+10]]+ae[t[e+11]]+ae[t[e+12]]+ae[t[e+13]]+ae[t[e+14]]+ae[t[e+15]]}var Kc=typeof crypto!="undefined"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Xi={randomUUID:Kc};function Yc(t,e,r){if(Xi.randomUUID&&!e&&!t)return Xi.randomUUID();t=t||{};let n=t.random||(t.rng||Yi)();if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,e){r=r||0;for(let a=0;a<16;++a)e[r+a]=n[a];return e}return If(n)}var mt=Yc;function et(t=8){return mt().split("-").pop().substr(0,t)}var Zi={timeouts:{},values:{},set(t,e){this.timeouts[t]=setTimeout(()=>this.clear(t),3e4),this.values[t]=e},get(t){return this.values[t]},getKey(t){let e=JSON.parse(JSON.stringify(t)),r="";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]),r+=n+":"+a}),r},clear(t){this.timeouts[t]&&clearTimeout(this.timeouts[t]),delete this.timeouts[t],delete this.values[t]},clearAll(){Object.keys(this.timeouts).forEach(t=>{clearTimeout(this.timeouts[t])}),this.timeouts={},this.values={}}};function fe(t){if(!t)return mt();let e=Zi.getKey(t);if(Zi.get(e))throw new L("INPUT_NEEDS_IDENTIFIER",{object:t});let r=mt();return Zi.set(e,r),r}function kf(t){return new Promise(e=>setTimeout(e,t))}function Sf(){return fe()}function pi(t){return JSON.parse(JSON.stringify(t))}function Ee(t,e,r){if(e in t){if(t[e]===void 0)throw new Te({input:t},`undefined provided for ${e}`);return t}if(!r)throw new Te({input:t},`${e} is required if no default set`);let n=pi(t);return n[e]=r,n}function O(t){let e=vf(t);if(e!=null)return{foreign:e}}function R(t){let e=vf(t);if(e!=null)return{identifier:e}}function w({input:t,options:e,validate:r}){var a;let n=pi(t);return(a=n.options)!=null||(n.options=e!=null?e:{}),r(n)}function vf(t){return t==null?t:t+""}function Xc(t){return Object.keys(t).filter(e=>t[e]!==void 0).map(e=>`${encodeURIComponent(e)}=${encodeURIComponent(t[e])}`).join("&")}function jf(t){return t.host.replace(/^https:/,"wss:")+"?"+Xc({apikey:t.apikey,apisecret:t.apisecret,db:t.database,clientVersion:t.clientVersion})}function Ef(t){return typeof window=="undefined"?[jf(t),{rejectUnauthorized:t.rejectUnauthorized}]:[jf(t)]}function di(t,e){let r={};return Object.keys(t).forEach(n=>{e[n]?typeof e[n]=="string"?r[e[n]]=t[n]:r[n]=e[n](t[n]):r[n]=t[n]}),r}function ne(t){return t.split(",").map(e=>e.split(" ")).map(e=>{let[r,n]=e;return{field:r,direction:n==="desc"?"desc":"asc"}})}function Gf(t){if(!t)return;if(!t.order_by)return t;let e=t.order_by;return delete t.order_by,t.order||(t.order=ne(e)),t}function Cf(t){if(t!=null)return t+""}function Rf(t){return new Date(t).setHours(0,0,0,0)>new Date().setHours(0,0,0,0)}function Zc(t){return t%4===0&&(t%100!==0||t%400===0)}var em=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,tm=[0,31,28,31,30,31,30,31,31,30,31,30,31];function oi(t){let e=em.exec(t);if(!e)return!1;let r=+e[1],n=+e[2],a=+e[3];return n>=1&&n<=12&&a>=1&&a<=(n===2&&Zc(r)?29:tm[n])}var rm=/^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i;function nm(t,e){let r=rm.exec(t);if(!r)return!1;let n=+r[1],a=+r[2],s=+r[3],i=r[5];return(n<=23&&a<=59&&s<=59||n===23&&a===59&&s===60)&&(!e||i!=="")}var am=/t|\s/i;function Mf(t){let e=t.split(am);return e.length===1?oi(e[0]):e.length===2&&oi(e[0])&&nm(e[1])}var Wt=class{constructor(e){this._data=[];this._error=[];this._end=[];this._finished=!1;this._options=e}on(e,r){switch(e){case"data":return this._data.push(r),this;case"end":return this._end.push(r),this;case"error":return this._error.push(r),this}}push(e){if(this._finished)throw new Error("Stream is closed");return e===null?this.end():(this._data.forEach(r=>r(e)),this)}error(e){if(this._finished)throw new Error("Stream is closed");return this._error.forEach(r=>r(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}},fi=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 De=class{constructor(e){this.streamObject=new Wt({objectMode:!0});this.outStreamObject=new Wt({objectMode:!0});this.started=!1;this.makeRequest=e}start(e){if(M("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 r=[];if(this.mode==="stream"){this.streamObject.on("data",n=>{if(M("stream data",n),n||this.outStreamObject.push(n),n.error){let a=Ki(n.error);return this.outStreamObject.destroy(a),this.streamObject.destroy(a)}if(!n.prop){r.push(n);return}if(n.dataArr){let a=b({},n);delete a.dataArr,n.dataArr.forEach(s=>{this.outStreamObject.push(q(b({},a),{data:s}))});return}this.outStreamObject.push(n)}).on("end",()=>{M("stream ended");let n=r.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=>{M("stream error",n),this.outStreamObject.destroy(n)});return}if(this.mode==="promise"){let n=new Map;this.streamObject.on("data",a=>{var i;if(M("streamPromise data",a),a===void 0)return;if(a.error){let o=Ki(a.error);return this.streamObject.destroy(o)}if(!a.prop){r.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",()=>{M("streamPromise end");let a=r.pop();if(!a)return;let s=a.result;if(!n.size)return this.resolve(s);let i=!1;n.forEach((o,p)=>{Array.isArray(s[p])?(o.push(...s[p]),s[p]=o):o.length===1?s[p]=o:(this.streamObject.destroy(new Fe("INVALID_RESPONSE_STREAM_CHUNK",{property:p,value:o})),i=!0)}),i||this.resolve(s)}).on("error",a=>(M("streamPromise error",a),this.reject(a)))}}then(e,r){return this.start("promise"),this.promise.then(e,r)}catch(e){return this.start("promise"),this.promise.catch(e)}stream(){return this.start("stream"),this.outStreamObject}};var Dt=class extends De{constructor(e,r){super(e),this.inputStream=r}input(e){return e?typeof e=="function"?(e(this.inputStream),this):(console.warn("currently disabled"),this):this.inputStream}};var _c=Hc(mc(),1);var Dp={$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 Ap={$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 Np={$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 ut={$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 filter for custom properties",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","WapiStatistic"]}}};var cr={$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 mr={$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 Up={$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 hr={$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 _r={$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 qp={$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 gr={$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 Tr={$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 Bp={$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 yr={$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 Fr={$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 Lp={$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 xr={$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 br={$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 Hp={$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 Or={$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 $r={$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 Vp={$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 wr={$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 Ir={$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 zp={$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 jr={$schema:"http://json-schema.org/draft-07/schema",$id:"WapiStatisticTableInput",title:"WapiStatisticTableInput",description:"Database statistics",type:"object",properties:{model:{description:"Model name this statistic applies to",$ref:"/db/consts.schema.json#/definitions/DbModelName"},type:{description:"Type of the statistic",type:"string",maxLength:32,minLength:1},result:{description:"result of statistic calulation",type:"number"},max_id:{description:"Maximum id at the time of calculation",type:"number"}},additionalProperties:!1,required:["model","type","result","max_id"]};var kr={$schema:"http://json-schema.org/draft-07/schema",$id:"WapiStatisticTable",title:"WapiStatisticTable",description:"Database statistics",type:"object",properties:{id:{description:"System defined primary key",type:"integer"},model:{description:"Model name this statistic applies to",$ref:"/db/consts.schema.json#/definitions/DbModelName"},type:{description:"Type of the statistic",type:"string",maxLength:32,minLength:1},result:{description:"result of statistic calulation",type:"number"},max_id:{description:"Maximum id at the time of calculation",type:"number"},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:{WapiStatisticTableAccessibleFields:{$id:"WapiStatisticTableAccessibleFields",type:"string",enum:["id","model","type","result","max_id"]},WapiStatisticTableFields:{$id:"WapiStatisticTableFields",type:"string",enum:["id","model","type","result","max_id","created_at","updated_at"]},WapiStatisticTableStringFields:{$id:"WapiStatisticTableStringFields",type:"string",enum:["model","type","created_at","updated_at"]},WapiStatisticTableNumberFields:{$id:"WapiStatisticTableNumberFields",type:"string",enum:["id","result","max_id"]}},required:["id","model","type","result","max_id","created_at","updated_at"]};var Jp={$schema:"http://json-schema.org/draft-07/schema",$id:"WapiStatisticTableOptional",title:"WapiStatisticTableOptional",description:"Database statistics Only require id, other fields are optional",type:"object",properties:{id:{description:"System defined primary key",type:"integer"},model:{description:"Model name this statistic applies to",$ref:"/db/consts.schema.json#/definitions/DbModelName"},type:{description:"Type of the statistic",type:"string",maxLength:32,minLength:1},result:{description:"result of statistic calulation",type:"number"},max_id:{description:"Maximum id at the time of calculation",type:"number"},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 Sr={$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 vr={$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 Er={$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","exportBalanceHistory","exportTokens","exportTransferGroups","exportTransfers","exportWallets","findBalances","findTokens","findTransferGroups","findTransfers","findWallets","aggregateTransferMany","exportTokenMany","exportTransferGroupMany","exportTransferMany","exportWalletMany","findBalanceMany","findTokenMany","findTransferGroupMany","findTransferMany","findWalletMany","getBalance","getBalanceHistory","getExport","getStatistics","getToken","getTokenMany","getTransfer","getTransferGroup","getWallet","getWalletMany","healthcheck","listExportMany","listExports"]}},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 Gr={$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 Cr={$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 Rr={$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 Mr={$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 Pr={$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 Wr={$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 Dr={$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 Ar={$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 Nr={$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 Ur={$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 qr={$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 Br={$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 Lr={$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 Hr={$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 Vr={$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 zr={$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 Jr={$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 Qr={$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 Kr={$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 Yr={$schema:"http://json-schema.org/draft-07/schema",$id:"ExportBalanceHistoryFnInput",title:"ExportBalanceHistoryFnInput",description:"Input for exportBalanceHistory",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/export_balance_history_fn_options"}},definitions:{export_balance_history_fn_options:{description:"Optional flags for input",type:"object",allOf:[{$ref:"/txs/export-balance-history/export-balance-history.schema.input.json#/definitions/export_balance_history_tx_options"}]}},required:["wallet"],additionalProperties:!1};var Xr={$schema:"http://json-schema.org/draft-07/schema",$id:"ExportBalanceHistoryFnOutput",title:"ExportBalanceHistoryFnOutput",description:"Output of exportBalanceHistory",type:"object",$ref:"/txs/export-balance-history/export-balance-history.schema.output.json"};var Zr={$schema:"http://json-schema.org/draft-07/schema",$id:"ExportTokensFnInput",title:"ExportTokensFnInput",description:"Input for exportTokens",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/export_tokens_fn_options"}},definitions:{export_tokens_fn_options:{description:"Optional flags for input",type:"object",allOf:[{$ref:"/txs/export-token-many/export-token-many.schema.input.json#/definitions/export_token_many_tx_options"},{$ref:"/fns/fn-consts.schema.json#/definitions/i_fn_find_options_extra"}]}},$queryBuilder:!0,additionalProperties:!1};var en={$schema:"http://json-schema.org/draft-07/schema",$id:"ExportTokensFnOutput",title:"ExportTokensFnOutput",description:"Output of exportTokens",type:"object",$ref:"/txs/export-token-many/export-token-many.schema.output.json"};var tn={$schema:"http://json-schema.org/draft-07/schema",$id:"ExportTransferGroupsFnInput",title:"ExportTransferGroupsFnInput",description:"Input for exportTransferGroups",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/export_transfer_groups_fn_options"}},definitions:{export_transfer_groups_fn_options:{description:"Optional flags for input",type:"object",allOf:[{$ref:"/fns/find-transfer-groups/find-transfer-groups.schema.input.json#/definitions/find_transfer_groups_fn_options"}]}},$queryBuilder:!0,additionalProperties:!1};var rn={$schema:"http://json-schema.org/draft-07/schema",$id:"ExportTransferGroupsFnOutput",title:"ExportTransferGroupsFnOutput",description:"Output of exportTransferGroups",type:"object",$ref:"/txs/export-transfer-group-many/export-transfer-group-many.schema.output.json"};var nn={$schema:"http://json-schema.org/draft-07/schema",$id:"ExportTransfersFnInput",title:"ExportTransfersFnInput",description:"Input for exportTransfers",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/export_transfers_fn_options"}},definitions:{export_transfers_fn_options:{description:"exportTransfers 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:"/fns/find-transfers/find-transfers.schema.input.json#/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"}]}},$queryBuilder:!0,additionalProperties:!1};var an={$schema:"http://json-schema.org/draft-07/schema",$id:"ExportTransfersFnOutput",title:"ExportTransfersFnOutput",description:"Output of exportTransfers",type:"object",$ref:"/txs/export-transfer-many/export-transfer-many.schema.output.json"};var sn={$schema:"http://json-schema.org/draft-07/schema",$id:"ExportWalletsFnInput",title:"ExportWalletsFnInput",description:"Input for exportWallets",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/export_wallets_fn_options"}},definitions:{export_wallets_fn_extra_options:{allOf:[{$ref:"/fns/find-wallets/find-wallets.schema.input.json#/definitions/find_wallets_fn_extra_options"}]},export_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/export_wallets_fn_extra_options"}]}},$queryBuilder:!0,additionalProperties:!1};var on={$schema:"http://json-schema.org/draft-07/schema",$id:"ExportWalletsFnOutput",title:"ExportWalletsFnOutput",description:"Output of exportWallets",type:"object",$ref:"/txs/export-wallet-many/export-wallet-many.schema.output.json"};var pn={$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 dn={$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 fn={$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/find-token-many/find-token-many.schema.input.json#/definitions/find_token_many_tx_options"}]}},$queryBuilder:!0,additionalProperties:!1};var un={$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 ln={$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/find-transfer-group-many/find-transfer-group-many.schema.input.json#/definitions/find_transfer_group_many_tx_options"}]}},$queryBuilder:!0,additionalProperties:!1};var cn={$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 mn={$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 hn={$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 _n={$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 gn={$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 Tn={$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 yn={$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 Fn={$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 xn={$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"]},datetime:{description:"Select entries that are older than",type:["string"],format:"date-time"},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 bn={$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 On={$schema:"http://json-schema.org/draft-07/schema",$id:"GetExportFnInput",title:"GetExportFnInput",description:"Input for GetExport",type:"object",properties:{identifier:{description:"File name of the export to get",type:["string"]},options:{$ref:"#/definitions/get_export_fn_options"}},definitions:{get_export_fn_options:{allOf:[{$ref:"/txs/get-export/get-export.schema.input.json#/definitions/get_export_tx_options"}]}},required:["identifier"],additionalProperties:!1};var $n={$schema:"http://json-schema.org/draft-07/schema",$id:"GetExportFnOutput",title:"GetExportFnOutput",description:"Output of getExport",type:"object",$ref:"/txs/get-export/get-export.schema.output.json"};var wn={$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 In={$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 jn={$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 kn={$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 Sn={$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 vn={$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 En={$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 Gn={$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 Cn={$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 Rn={$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 Mn={$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 Pn={$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 Wn={$schema:"http://json-schema.org/draft-07/schema",$id:"HealthcheckFnInput",title:"HealthcheckFnInput",description:"Input for healthcheck",type:"object",properties:{options:{$ref:"#/definitions/healthcheck_fn_options"}},definitions:{healthcheck_fn_options:{description:"Optional flags for input",type:"object",allOf:[{$ref:"/txs/healthcheck/healthcheck.schema.input.json#/definitions/healthcheck_tx_options"}]}},required:[],additionalProperties:!1};var Dn={$schema:"http://json-schema.org/draft-07/schema",$id:"HealthcheckFnOutput",title:"HealthcheckFnOutput",description:"Output of healthcheck",type:"object",$ref:"/txs/healthcheck/healthcheck.schema.output.json"};var lt={$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 An={$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 Nn={$schema:"http://json-schema.org/draft-07/schema",$id:"ListExportsFnInput",title:"ListExportsFnInput",description:"Input for listExports",type:"object",properties:{type:{description:"Type of the export",$ref:"/txs/get-export/get-export.schema.output.json#/definitions/export_type"},date:{description:"Date of the export",type:"string",format:"date"},options:{$ref:"#/definitions/list_exports_fn_options"}},definitions:{list_exports_fn_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_limiting_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"/txs/list-export-many/list-export-many.schema.input.json#/definitions/list_export_many_ordering_options"},{$ref:"/fns/fn-consts.schema.json#/definitions/i_fn_find_options_extra"}]}},additionalProperties:!1};var Un={$schema:"http://json-schema.org/draft-07/schema",$id:"ListExportsFnOutput",title:"ListExportsFnOutput",description:"Output of listExports",type:"object",$ref:"/txs/list-export-many/list-export-many.schema.output.json"};var qn={$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 Bn={$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 Ln={$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 Hn={$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 Vn={$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 zn={$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 Jn={$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 Qn={$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 Kn={$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 Yn={$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 Xn={$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"},extend_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 Zn={$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 ta={$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 ra={$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 na={$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 sa={$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 ia={$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 oa={$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 pa={$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}'}},required:["aggregators"],additionalProperties:!1};var da={$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 fa={$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 ua={$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","exportBalanceHistory","exportTokenMany","exportTransferGroupMany","exportTransferMany","exportWalletMany","findBalanceMany","findTokenMany","findTransferGroupMany","findTransferMany","findWalletMany","getBalance","getBalanceHistory","getExport","getStatistics","getToken","getTokenMany","getTransfer","getTransferGroup","getWallet","getWalletMany","healthcheck","listExportMany"]}},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}},required:["token"],additionalProperties:!1};var ca={$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 ma={$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 ha={$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 _a={$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 ga={$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 Ta={$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 ya={$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 Fa={$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 xa={$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 ba={$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 Oa={$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 $a={$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}'}},additionalProperties:!1};var wa={$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 Ia={$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 ja={$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 ka={$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 Sa={$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 va={$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 Ea={$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 Ga={$schema:"http://json-schema.org/draft-07/schema",$id:"ExportBalanceHistoryTxInput",title:"ExportBalanceHistoryTxInput",description:"Input for exportBalanceHistory",type:"object",properties:{balance:{$ref:"/txs/get-balance/get-balance.schema.input.json#/definitions/unique_balance_filter"},options:{$ref:"#/definitions/export_balance_history_tx_options"}},definitions:{export_balance_history_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_limiting_options"},{$ref:"/txs/get-balance-history/get-balance-history.schema.input.json#/definitions/get_balance_history_ordering_options"},{$ref:"/txs/get-balance-history/get-balance-history.schema.input.json#/definitions/balance_history_select_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_options"}]}},required:["balance"],additionalProperties:!1};var Ca={$schema:"http://json-schema.org/draft-07/schema",$id:"ExportBalanceHistoryTxOutput",title:"ExportBalanceHistoryTxOutput",description:"Output of exportBalanceHistory",type:"object",properties:{export:{$ref:"/txs/get-export/get-export.schema.output.json#/definitions/export"}},required:["export"],additionalProperties:!1};var Ra={$schema:"http://json-schema.org/draft-07/schema",$id:"ExportTokenManyTxInput",title:"ExportTokenManyTxInput",description:"Input for exportTokenMany",type:"object",properties:{token:{$ref:"/txs/find-token-many/find-token-many.schema.input.json#/definitions/find_token_many_filter"},options:{$ref:"#/definitions/export_token_many_tx_options"}},definitions:{export_token_many_tx_options:{$ref:"/txs/find-token-many/find-token-many.schema.input.json#/definitions/find_token_many_tx_options"}},additionalProperties:!1};var Ma={$schema:"http://json-schema.org/draft-07/schema",$id:"ExportTokenManyTxOutput",title:"ExportTokenManyTxOutput",description:"Output of exportTokenMany",type:"object",properties:{export:{$ref:"/txs/get-export/get-export.schema.output.json#/definitions/export"}},required:["export"],additionalProperties:!1};var Pa={$schema:"http://json-schema.org/draft-07/schema",$id:"ExportTransferGroupManyTxInput",title:"ExportTransferGroupManyTxInput",description:"Input for exportTransferGroupMany",type:"object",properties:{transfer_group:{$ref:"/txs/find-transfer-group-many/find-transfer-group-many.schema.input.json#/definitions/find_transfer_group_many_filter"},options:{$ref:"#/definitions/export_transfer_group_many_tx_options"}},definitions:{export_transfer_group_many_tx_options:{$ref:"/txs/find-transfer-group-many/find-transfer-group-many.schema.input.json#/definitions/find_transfer_group_many_tx_options"}},additionalProperties:!1};var Wa={$schema:"http://json-schema.org/draft-07/schema",$id:"ExportTransferGroupManyTxOutput",title:"ExportTransferGroupManyTxOutput",description:"Output of exportTransferGroupMany",type:"object",properties:{export:{$ref:"/txs/get-export/get-export.schema.output.json#/definitions/export"}},required:["export"],additionalProperties:!1};var Da={$schema:"http://json-schema.org/draft-07/schema",$id:"ExportTransferManyTxInput",title:"ExportTransferManyTxInput",description:"Input for ExportTransferMany",type:"object",properties:{transfer:{$ref:"/txs/find-transfer-many/find-transfer-many.schema.input.json#/definitions/find_transfer_many_filter"},options:{$ref:"#/definitions/export_transfer_many_tx_options"}},definitions:{export_transfer_many_tx_options:{allOf:[{$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:"/txs/find-transfer-many/find-transfer-many.schema.input.json#/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"}]}},additionalProperties:!1};var Aa={$schema:"http://json-schema.org/draft-07/schema",$id:"ExportTransferManyTxOutput",title:"ExportTransferManyTxOutput",description:"Output of ExportTransferMany",type:"object",properties:{export:{$ref:"/txs/get-export/get-export.schema.output.json#/definitions/export"}},required:["export"],additionalProperties:!1};var Na={$schema:"http://json-schema.org/draft-07/schema",$id:"ExportWalletManyTxInput",title:"ExportWalletManyTxInput",description:"Input for exportWalletMany",type:"object",properties:{wallet:{$ref:"/txs/find-wallet-many/find-wallet-many.schema.input.json#/definitions/find_wallet_many_filter"},options:{$ref:"#/definitions/export_wallet_many_tx_options"}},definitions:{export_wallet_many_tx_options:{$ref:"/txs/find-wallet-many/find-wallet-many.schema.input.json#/definitions/find_wallet_many_tx_options"}},additionalProperties:!1};var Ua={$schema:"http://json-schema.org/draft-07/schema",$id:"ExportWalletManyTxOutput",title:"ExportWalletManyTxOutput",description:"Output of exportWalletMany",type:"object",properties:{export:{$ref:"/txs/get-export/get-export.schema.output.json#/definitions/export"}},required:["export"],additionalProperties:!1};var qa={$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 Ba={$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 La={$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:{},properties:{include_balance:{description:"Return the total system balance of token",type:"boolean"}},$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 Ha={$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:{anyOf:[{$ref:"/txs/get-token/get-token.schema.output.json#/definitions/token"},{$ref:"/txs/get-token/get-token.schema.output.json#/definitions/token_with_balance"}]}},metadata:{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_find_metadata"}},required:["tokens","metadata"],additionalProperties:!1};var Va={$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_count:{description:"Return number of transfers in the transfer_group",type:"boolean",default:!1}}},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"}]}},additionalProperties:!1};var za={$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:"#/definitions/transfer_group_with_transfers_count"}},metadata:{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_find_metadata"}},definitions:{transfer_group_transfers_count:{type:"object",properties:{transfers_count:{description:"Number of transfers in the group",type:"number"}},$typescript:'{"additionalProperties": false}'},transfer_group_with_transfers_count:{allOf:[{$ref:"/txs/get-transfer-group/get-transfer-group.schema.output.json#/definitions/transfer_group"},{$ref:"#/definitions/transfer_group_transfers_count"}]}},required:["transfer_groups","metadata"],additionalProperties:!1};var Ja={$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"}]}},additionalProperties:!1};var Qa={$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 Ka={$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 Ya={$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 Xa={$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 Za={$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 es={$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 ts={$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 rs={$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"}}}}},required:["balance"],additionalProperties:!1};var ns={$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"},status:{description:"The status of the change to balance",type:["string"],enum:["pending","finished"]},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","available_balance"]}},additionalProperties:!1};var as={$schema:"http://json-schema.org/draft-07/schema",$id:"GetExportTxInput",title:"GetExportTxInput",description:"Input for getExport",type:"object",properties:{export:{$ref:"#/definitions/unique_export_filter"},options:{$ref:"#/definitions/get_export_tx_options"}},definitions:{get_export_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/get_export_additional_options"}]},get_export_additional_options:{description:"Optional flags for input",type:"object",properties:{return_signed_url:{description:"Return signed url for downloading the export file, will only be returned if status === 'completed'",type:"boolean",default:!1}},default:{},$typescript:'{"additionalProperties": false}'},unique_export_filter:{description:"UNIQUE filtering options for export",type:"object",properties:{identifier:{description:"The name of the exported file",type:"string"}},required:["identifier"]}},required:["export"],additionalProperties:!1};var ss={$schema:"http://json-schema.org/draft-07/schema",$id:"GetExportTxOutput",title:"GetExportTxOutput",description:"Output of getExport",type:"object",properties:{export:{description:"requested export",anyOf:[{$ref:"#/definitions/export"}]}},definitions:{export_type:{description:"The type of the export",type:"string",enum:["transfers","transfer_groups","tokens","wallets","balance_history","unknown"]},export:{properties:{identifier:{description:"Unique identifier of the export",type:"string"},status:{description:"Status of the export",type:"string",enum:["started","completed","error"]},type:{$ref:"#/definitions/export_type"},created_at:{description:"Timestamp when export was initiated",type:"string"},completed_at:{description:"Timestamp when export was finished",type:"string"},fields:{description:"The fields selected for this export",type:"array",items:{type:"string"}},count:{description:"The number of entities exported in this file",type:"number"},signed_url:{description:"Signed URL for downloading the export file",type:"string"},size:{description:"Size of the exported file",type:"string"},message:{description:"Extra information about the state of the file",type:"string"}},required:["identifier"],$typescript:'{"additionalProperties": false}'}},additionalProperties:!1};var is={$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 os={$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 ps={$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 ds={$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 fs={$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:{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},include_balance:{type:"boolean",description:"Return the total system balance of token",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 us={$schema:"http://json-schema.org/draft-07/schema",$id:"GetTokenTxOutput",title:"GetTokenTxOutput",description:"Output of getToken",type:"object",properties:{token:{description:"requested token",anyOf:[{$ref:"#/definitions/token"},{$ref:"#/definitions/token_with_balance"}]}},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"},status:{$ref:"/db/token/token.schema.json#/properties/status"},belongs_to_foreign:{description:"Foreign of the belongs_to wallet if exists",type:["string","null"]}},required:["id"],$typescript:'{"additionalProperties": false}'},token_with_balance:{type:"object",allOf:[{$ref:"#/definitions/token"},{$ref:"#/definitions/token_balance"}]},token_balance:{type:"object",properties:{balance_transfer_id:{description:"Latest transfer id",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/transfer_id"},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"}},$typescript:'{"additionalProperties": false}'}},additionalProperties:!1};var ls={$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},include_balance:{type:"boolean",description:"Return the total system balance of token",default:!1}},default:{},$typescript:'{"additionalProperties": false}'}},required:["tokens"],additionalProperties:!1};var cs={$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"},{$ref:"/txs/get-token/get-token.schema.output.json#/definitions/token_with_balance"},{type:"null"}]}},required:["tokens"],additionalProperties:!1};var ms={$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 hs={$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 _s={$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 gs={$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 Ts={$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 ys={$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 Fs={$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}'}},required:["wallets"],additionalProperties:!1};var xs={$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 bs={$schema:"http://json-schema.org/draft-07/schema",$id:"HealthcheckTxInput",title:"HealthcheckTxInput",description:"Input for healthcheck",type:"object",properties:{options:{$ref:"#/definitions/healthcheck_tx_options"}},definitions:{healthcheck_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options_without_tx"}]}},additionalProperties:!1};var Os={$schema:"http://json-schema.org/draft-07/schema",$id:"HealthcheckTxOutput",title:"HealthcheckTxOutput",description:"Output of healthcheck",type:"object",properties:{status:{description:"Status of the service",type:"string",enum:["green","yellow","red"]},message:{description:"Error message if some error occurred",type:"string"},database_size:{description:"Size of the database in MB",type:"string"},indexes_size:{description:"Size of all indexes of database in MB",type:"string"},connection_count:{description:"Number of external connections to this database",type:"number"}},required:["status"],additionalProperties:!1};var ct={$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 $s={$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 ws={$schema:"http://json-schema.org/draft-07/schema",$id:"ListExportManyTxInput",title:"ListExportManyTxInput",description:"Input for ListExportMany",type:"object",properties:{export:{type:"object",properties:{date:{description:"Date the file was created on",type:"string",format:"date"},type:{description:"Entity that was exported",type:"string",$ref:"/txs/get-export/get-export.schema.output.json#/definitions/export_type"}}},options:{$ref:"#/definitions/list_export_many_tx_options"}},definitions:{list_export_many_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_limiting_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/list_export_many_ordering_options"}]},list_export_many_ordering_options:{$typescript:'{"additionalProperties":false}',description:"Optional flags for input ordering",type:"object",properties:{order:{description:"Ordering options",type:"array",items:{$ref:"#/definitions/list_export_many_ordering_input"}}}},list_export_many_ordering_input:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_ordering_input"},{$ref:"#/definitions/list_export_many_ordering_input_field"}]},list_export_many_ordering_input_field:{type:"object",properties:{field:{type:"string",enum:["identifier","completed_at","created_at"]}},$typescript:'{"additionalProperties": false}'}},additionalProperties:!1};var Is={$schema:"http://json-schema.org/draft-07/schema",$id:"ListExportManyTxOutput",title:"ListExportManyTxOutput",description:"Output of ListExportMany",type:"object",properties:{exports:{description:"The exports matching the query",type:"array",items:{$ref:"/txs/get-export/get-export.schema.output.json#/definitions/export"}}},required:["exports"],additionalProperties:!1};var js={$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 ks={$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 Ss={$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 vs={$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 Es={$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 Gs={$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 Cs={$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}},required:["transfer_group"],additionalProperties:!1};var Rs={$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 Ms={$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 Ps={$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 Ws={$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 Ds={$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 As={$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 Ns={$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 Us={$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 qs={$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 Bs={$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 Ls={$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","update"],additionalProperties:!1};var Hs={$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 Vs={$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",$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"}},additionalProperties:!1}},required:["transfer","update"],additionalProperties:!1};var zs={$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 Js={$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","update"],additionalProperties:!1};var Qs={$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 Ks={$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","update"],additionalProperties:!1};var Ys={$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 Xs={$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 Zs={$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 ei={$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","update"],additionalProperties:!1};var ti={$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 d=new _c.default({removeAdditional:!0,useDefaults:!0,coerceTypes:!0,formats:{validkey:/^(?!.*\.\.)[a-zA-Z_][a-zA-Z0-9_.-]*[a-zA-Z0-9_-]$/},strict:!1});d.addFormat("date-time",{validate:Mf});d.addFormat("date",{validate:oi});function Qp(t,e){if(e!==void 0)return new Te({errors:t},e)}function hc(t){return function(e){if(t===void 0)return{isValid:!1,inputCopy:e,error:Qp([new Error("Undefined validator")],"Undefined validator")};try{let r=pi(e),n=t(r),a=n?void 0:t.errors,s=n?void 0:d.errorsText(a),i=Qp(a,s);return{isValid:n,inputCopy:r,error:i}}catch(r){return{isValid:!1,inputCopy:e,error:Qp([r],r.message)}}}}function l(t,e){let r=JSON.parse(JSON.stringify(t));return gc(r,e)}function gc(t,e){return typeof t!="object"||Object.keys(t).forEach(r=>{r==="$ref"&&t.$ref.startsWith("#")?t.$ref=e+t.$ref:t[r]=gc(t[r],e)}),t}function Tc(t,e){let r=l(t,e),n=r.properties.options;return b({$id:r.$id.replace("Input","Options"),definitions:r.definitions},n)}function yc(t,e){let r=l(t,e),n=r.definitions[t.$allowStreamInput];return b({$id:r.$id.replace("Input","StreamChunk"),definitions:r.definitions},n)}var f={};d.addSchema(l(Dp,"/api/jsonrpc/jsonrpc.request.schema.json"),"/api/jsonrpc/jsonrpc.request.schema.json");f.JSONRPCRequest=Dp;d.addSchema(l(Ap,"/api/jsonrpc/jsonrpc.response.schema.json"),"/api/jsonrpc/jsonrpc.response.schema.json");f.JSONRPCResponse=Ap;d.addSchema(l(Np,"/client-options.schema.json"),"/client-options.schema.json");f.ClientOptions=Np;d.addSchema(l(ut,"/db/consts.schema.json"),"/db/consts.schema.json");f.Consts=ut;d.addSchema(l(cr,"/db/token/token.schema.input.json"),"/db/token/token.schema.input.json");f.TokenTableInput=cr;d.addSchema(l(mr,"/db/token/token.schema.json"),"/db/token/token.schema.json");f.TokenTable=mr;d.addSchema(l(Up,"/db/token/token.schema.optional.json"),"/db/token/token.schema.optional.json");f.TokenTableOptional=Up;d.addSchema(l(hr,"/db/transfer/transfer.schema.input.json"),"/db/transfer/transfer.schema.input.json");f.TransferTableInput=hr;d.addSchema(l(_r,"/db/transfer/transfer.schema.json"),"/db/transfer/transfer.schema.json");f.TransferTable=_r;d.addSchema(l(qp,"/db/transfer/transfer.schema.optional.json"),"/db/transfer/transfer.schema.optional.json");f.TransferTableOptional=qp;d.addSchema(l(gr,"/db/transfer-group/transfer-group.schema.input.json"),"/db/transfer-group/transfer-group.schema.input.json");f.TransferGroupTableInput=gr;d.addSchema(l(Tr,"/db/transfer-group/transfer-group.schema.json"),"/db/transfer-group/transfer-group.schema.json");f.TransferGroupTable=Tr;d.addSchema(l(Bp,"/db/transfer-group/transfer-group.schema.optional.json"),"/db/transfer-group/transfer-group.schema.optional.json");f.TransferGroupTableOptional=Bp;d.addSchema(l(yr,"/db/transfer-log/transfer-log.schema.input.json"),"/db/transfer-log/transfer-log.schema.input.json");f.TransferLogTableInput=yr;d.addSchema(l(Fr,"/db/transfer-log/transfer-log.schema.json"),"/db/transfer-log/transfer-log.schema.json");f.TransferLogTable=Fr;d.addSchema(l(Lp,"/db/transfer-log/transfer-log.schema.optional.json"),"/db/transfer-log/transfer-log.schema.optional.json");f.TransferLogTableOptional=Lp;d.addSchema(l(xr,"/db/wallet/wallet.schema.input.json"),"/db/wallet/wallet.schema.input.json");f.WalletTableInput=xr;d.addSchema(l(br,"/db/wallet/wallet.schema.json"),"/db/wallet/wallet.schema.json");f.WalletTable=br;d.addSchema(l(Hp,"/db/wallet/wallet.schema.optional.json"),"/db/wallet/wallet.schema.optional.json");f.WalletTableOptional=Hp;d.addSchema(l(Or,"/db/wallet-token-setting/wallet-token-setting.schema.input.json"),"/db/wallet-token-setting/wallet-token-setting.schema.input.json");f.WalletTokenSettingTableInput=Or;d.addSchema(l($r,"/db/wallet-token-setting/wallet-token-setting.schema.json"),"/db/wallet-token-setting/wallet-token-setting.schema.json");f.WalletTokenSettingTable=$r;d.addSchema(l(Vp,"/db/wallet-token-setting/wallet-token-setting.schema.optional.json"),"/db/wallet-token-setting/wallet-token-setting.schema.optional.json");f.WalletTokenSettingTableOptional=Vp;d.addSchema(l(wr,"/db/wapi-setting/wapi-setting.schema.input.json"),"/db/wapi-setting/wapi-setting.schema.input.json");f.WapiSettingTableInput=wr;d.addSchema(l(Ir,"/db/wapi-setting/wapi-setting.schema.json"),"/db/wapi-setting/wapi-setting.schema.json");f.WapiSettingTable=Ir;d.addSchema(l(zp,"/db/wapi-setting/wapi-setting.schema.optional.json"),"/db/wapi-setting/wapi-setting.schema.optional.json");f.WapiSettingTableOptional=zp;d.addSchema(l(jr,"/db/wapi-statistic/wapi-statistic.schema.input.json"),"/db/wapi-statistic/wapi-statistic.schema.input.json");f.WapiStatisticTableInput=jr;d.addSchema(l(kr,"/db/wapi-statistic/wapi-statistic.schema.json"),"/db/wapi-statistic/wapi-statistic.schema.json");f.WapiStatisticTable=kr;d.addSchema(l(Jp,"/db/wapi-statistic/wapi-statistic.schema.optional.json"),"/db/wapi-statistic/wapi-statistic.schema.optional.json");f.WapiStatisticTableOptional=Jp;d.addSchema(l(Sr,"/fns/aggregate-transfers/aggregate-transfers.schema.input.json"),"/fns/aggregate-transfers/aggregate-transfers.schema.input.json");f.AggregateTransfersFnInput=Sr;d.addSchema(l(vr,"/fns/aggregate-transfers/aggregate-transfers.schema.output.json"),"/fns/aggregate-transfers/aggregate-transfers.schema.output.json");f.AggregateTransfersFnOutput=vr;d.addSchema(l(Er,"/fns/create-access-token/create-access-token.schema.input.json"),"/fns/create-access-token/create-access-token.schema.input.json");f.CreateAccessTokenFnInput=Er;d.addSchema(l(Gr,"/fns/create-access-token/create-access-token.schema.output.json"),"/fns/create-access-token/create-access-token.schema.output.json");f.CreateAccessTokenFnOutput=Gr;d.addSchema(l(Cr,"/fns/create-contract/create-contract.schema.input.json"),"/fns/create-contract/create-contract.schema.input.json");f.CreateContractFnInput=Cr;d.addSchema(l(Rr,"/fns/create-contract/create-contract.schema.output.json"),"/fns/create-contract/create-contract.schema.output.json");f.CreateContractFnOutput=Rr;d.addSchema(l(Mr,"/fns/create-deposit/create-deposit.schema.input.json"),"/fns/create-deposit/create-deposit.schema.input.json");f.CreateDepositFnInput=Mr;d.addSchema(l(Pr,"/fns/create-deposit/create-deposit.schema.output.json"),"/fns/create-deposit/create-deposit.schema.output.json");f.CreateDepositFnOutput=Pr;d.addSchema(l(Wr,"/fns/create-exchange/create-exchange.schema.input.json"),"/fns/create-exchange/create-exchange.schema.input.json");f.CreateExchangeFnInput=Wr;d.addSchema(l(Dr,"/fns/create-exchange/create-exchange.schema.output.json"),"/fns/create-exchange/create-exchange.schema.output.json");f.CreateExchangeFnOutput=Dr;d.addSchema(l(Ar,"/fns/create-token/create-token.schema.input.json"),"/fns/create-token/create-token.schema.input.json");f.CreateTokenFnInput=Ar;d.addSchema(l(Nr,"/fns/create-token/create-token.schema.output.json"),"/fns/create-token/create-token.schema.output.json");f.CreateTokenFnOutput=Nr;d.addSchema(l(Ur,"/fns/create-transfer/create-transfer.schema.input.json"),"/fns/create-transfer/create-transfer.schema.input.json");f.CreateTransferFnInput=Ur;d.addSchema(l(qr,"/fns/create-transfer/create-transfer.schema.output.json"),"/fns/create-transfer/create-transfer.schema.output.json");f.CreateTransferFnOutput=qr;d.addSchema(l(Br,"/fns/create-transfer-group/create-transfer-group.schema.input.json"),"/fns/create-transfer-group/create-transfer-group.schema.input.json");f.CreateTransferGroupFnInput=Br;d.addSchema(l(Lr,"/fns/create-transfer-group/create-transfer-group.schema.output.json"),"/fns/create-transfer-group/create-transfer-group.schema.output.json");f.CreateTransferGroupFnOutput=Lr;d.addSchema(l(Hr,"/fns/create-transfers/create-transfers.schema.input.json"),"/fns/create-transfers/create-transfers.schema.input.json");f.CreateTransfersFnInput=Hr;d.addSchema(l(Vr,"/fns/create-transfers/create-transfers.schema.output.json"),"/fns/create-transfers/create-transfers.schema.output.json");f.CreateTransfersFnOutput=Vr;d.addSchema(l(zr,"/fns/create-wallet/create-wallet.schema.input.json"),"/fns/create-wallet/create-wallet.schema.input.json");f.CreateWalletFnInput=zr;d.addSchema(l(Jr,"/fns/create-wallet/create-wallet.schema.output.json"),"/fns/create-wallet/create-wallet.schema.output.json");f.CreateWalletFnOutput=Jr;d.addSchema(l(Qr,"/fns/create-withdrawal/create-withdrawal.schema.input.json"),"/fns/create-withdrawal/create-withdrawal.schema.input.json");f.CreateWithdrawalFnInput=Qr;d.addSchema(l(Kr,"/fns/create-withdrawal/create-withdrawal.schema.output.json"),"/fns/create-withdrawal/create-withdrawal.schema.output.json");f.CreateWithdrawalFnOutput=Kr;d.addSchema(l(Yr,"/fns/export-balance-history/export-balance-history.schema.input.json"),"/fns/export-balance-history/export-balance-history.schema.input.json");f.ExportBalanceHistoryFnInput=Yr;d.addSchema(l(Xr,"/fns/export-balance-history/export-balance-history.schema.output.json"),"/fns/export-balance-history/export-balance-history.schema.output.json");f.ExportBalanceHistoryFnOutput=Xr;d.addSchema(l(Zr,"/fns/export-tokens/export-tokens.schema.input.json"),"/fns/export-tokens/export-tokens.schema.input.json");f.ExportTokensFnInput=Zr;d.addSchema(l(en,"/fns/export-tokens/export-tokens.schema.output.json"),"/fns/export-tokens/export-tokens.schema.output.json");f.ExportTokensFnOutput=en;d.addSchema(l(tn,"/fns/export-transfer-groups/export-transfer-groups.schema.input.json"),"/fns/export-transfer-groups/export-transfer-groups.schema.input.json");f.ExportTransferGroupsFnInput=tn;d.addSchema(l(rn,"/fns/export-transfer-groups/export-transfer-groups.schema.output.json"),"/fns/export-transfer-groups/export-transfer-groups.schema.output.json");f.ExportTransferGroupsFnOutput=rn;d.addSchema(l(nn,"/fns/export-transfers/export-transfers.schema.input.json"),"/fns/export-transfers/export-transfers.schema.input.json");f.ExportTransfersFnInput=nn;d.addSchema(l(an,"/fns/export-transfers/export-transfers.schema.output.json"),"/fns/export-transfers/export-transfers.schema.output.json");f.ExportTransfersFnOutput=an;d.addSchema(l(sn,"/fns/export-wallets/export-wallets.schema.input.json"),"/fns/export-wallets/export-wallets.schema.input.json");f.ExportWalletsFnInput=sn;d.addSchema(l(on,"/fns/export-wallets/export-wallets.schema.output.json"),"/fns/export-wallets/export-wallets.schema.output.json");f.ExportWalletsFnOutput=on;d.addSchema(l(pn,"/fns/find-balances/find-balances.schema.input.json"),"/fns/find-balances/find-balances.schema.input.json");f.FindBalancesFnInput=pn;d.addSchema(l(dn,"/fns/find-balances/find-balances.schema.output.json"),"/fns/find-balances/find-balances.schema.output.json");f.FindBalancesFnOutput=dn;d.addSchema(l(fn,"/fns/find-tokens/find-tokens.schema.input.json"),"/fns/find-tokens/find-tokens.schema.input.json");f.FindTokensFnInput=fn;d.addSchema(l(un,"/fns/find-tokens/find-tokens.schema.output.json"),"/fns/find-tokens/find-tokens.schema.output.json");f.FindTokensFnOutput=un;d.addSchema(l(ln,"/fns/find-transfer-groups/find-transfer-groups.schema.input.json"),"/fns/find-transfer-groups/find-transfer-groups.schema.input.json");f.FindTransferGroupsFnInput=ln;d.addSchema(l(cn,"/fns/find-transfer-groups/find-transfer-groups.schema.output.json"),"/fns/find-transfer-groups/find-transfer-groups.schema.output.json");f.FindTransferGroupsFnOutput=cn;d.addSchema(l(mn,"/fns/find-transfers/find-transfers.schema.input.json"),"/fns/find-transfers/find-transfers.schema.input.json");f.FindTransfersFnInput=mn;d.addSchema(l(hn,"/fns/find-transfers/find-transfers.schema.output.json"),"/fns/find-transfers/find-transfers.schema.output.json");f.FindTransfersFnOutput=hn;d.addSchema(l(_n,"/fns/find-wallets/find-wallets.schema.input.json"),"/fns/find-wallets/find-wallets.schema.input.json");f.FindWalletsFnInput=_n;d.addSchema(l(gn,"/fns/find-wallets/find-wallets.schema.output.json"),"/fns/find-wallets/find-wallets.schema.output.json");f.FindWalletsFnOutput=gn;d.addSchema(l(Tn,"/fns/fn-consts.schema.json"),"/fns/fn-consts.schema.json");f.FnConsts=Tn;d.addSchema(l(yn,"/fns/get-balance/get-balance.schema.input.json"),"/fns/get-balance/get-balance.schema.input.json");f.GetBalanceFnInput=yn;d.addSchema(l(Fn,"/fns/get-balance/get-balance.schema.output.json"),"/fns/get-balance/get-balance.schema.output.json");f.GetBalanceFnOutput=Fn;d.addSchema(l(xn,"/fns/get-balance-history/get-balance-history.schema.input.json"),"/fns/get-balance-history/get-balance-history.schema.input.json");f.GetBalanceHistoryFnInput=xn;d.addSchema(l(bn,"/fns/get-balance-history/get-balance-history.schema.output.json"),"/fns/get-balance-history/get-balance-history.schema.output.json");f.GetBalanceHistoryFnOutput=bn;d.addSchema(l(On,"/fns/get-export/get-export.schema.input.json"),"/fns/get-export/get-export.schema.input.json");f.GetExportFnInput=On;d.addSchema(l($n,"/fns/get-export/get-export.schema.output.json"),"/fns/get-export/get-export.schema.output.json");f.GetExportFnOutput=$n;d.addSchema(l(wn,"/fns/get-flags/get-flags.schema.input.json"),"/fns/get-flags/get-flags.schema.input.json");f.GetFlagsFnInput=wn;d.addSchema(l(In,"/fns/get-flags/get-flags.schema.output.json"),"/fns/get-flags/get-flags.schema.output.json");f.GetFlagsFnOutput=In;d.addSchema(l(jn,"/fns/get-statistics/get-statistics.schema.input.json"),"/fns/get-statistics/get-statistics.schema.input.json");f.GetStatisticsFnInput=jn;d.addSchema(l(kn,"/fns/get-statistics/get-statistics.schema.output.json"),"/fns/get-statistics/get-statistics.schema.output.json");f.GetStatisticsFnOutput=kn;d.addSchema(l(Sn,"/fns/get-token/get-token.schema.input.json"),"/fns/get-token/get-token.schema.input.json");f.GetTokenFnInput=Sn;d.addSchema(l(vn,"/fns/get-token/get-token.schema.output.json"),"/fns/get-token/get-token.schema.output.json");f.GetTokenFnOutput=vn;d.addSchema(l(En,"/fns/get-transfer/get-transfer.schema.input.json"),"/fns/get-transfer/get-transfer.schema.input.json");f.GetTransferFnInput=En;d.addSchema(l(Gn,"/fns/get-transfer/get-transfer.schema.output.json"),"/fns/get-transfer/get-transfer.schema.output.json");f.GetTransferFnOutput=Gn;d.addSchema(l(Cn,"/fns/get-transfer-group/get-transfer-group.schema.input.json"),"/fns/get-transfer-group/get-transfer-group.schema.input.json");f.GetTransferGroupFnInput=Cn;d.addSchema(l(Rn,"/fns/get-transfer-group/get-transfer-group.schema.output.json"),"/fns/get-transfer-group/get-transfer-group.schema.output.json");f.GetTransferGroupFnOutput=Rn;d.addSchema(l(Mn,"/fns/get-wallet/get-wallet.schema.input.json"),"/fns/get-wallet/get-wallet.schema.input.json");f.GetWalletFnInput=Mn;d.addSchema(l(Pn,"/fns/get-wallet/get-wallet.schema.output.json"),"/fns/get-wallet/get-wallet.schema.output.json");f.GetWalletFnOutput=Pn;d.addSchema(l(Wn,"/fns/healthcheck/healthcheck.schema.input.json"),"/fns/healthcheck/healthcheck.schema.input.json");f.HealthcheckFnInput=Wn;d.addSchema(l(Dn,"/fns/healthcheck/healthcheck.schema.output.json"),"/fns/healthcheck/healthcheck.schema.output.json");f.HealthcheckFnOutput=Dn;d.addSchema(l(lt,"/fns/import-data/import-data.schema.input.json"),"/fns/import-data/import-data.schema.input.json");f.ImportDataFnInput=lt;var Fc=Tc(lt,"/fns/import-data/import-data.schema.input.json");d.addSchema(Fc,"/fns/import-data/import-data.schema.options.json");f.ImportDataFnOptions=Fc;var xc=yc(lt,"/fns/import-data/import-data.schema.input.json");d.addSchema(xc,"/fns/import-data/import-data.schema.chunk.json");f.ImportDataFnStreamChunk=xc;d.addSchema(l(An,"/fns/import-data/import-data.schema.output.json"),"/fns/import-data/import-data.schema.output.json");f.ImportDataFnOutput=An;d.addSchema(l(Nn,"/fns/list-exports/list-exports.schema.input.json"),"/fns/list-exports/list-exports.schema.input.json");f.ListExportsFnInput=Nn;d.addSchema(l(Un,"/fns/list-exports/list-exports.schema.output.json"),"/fns/list-exports/list-exports.schema.output.json");f.ListExportsFnOutput=Un;d.addSchema(l(qn,"/fns/reverse-transfer/reverse-transfer.schema.input.json"),"/fns/reverse-transfer/reverse-transfer.schema.input.json");f.ReverseTransferFnInput=qn;d.addSchema(l(Bn,"/fns/reverse-transfer/reverse-transfer.schema.output.json"),"/fns/reverse-transfer/reverse-transfer.schema.output.json");f.ReverseTransferFnOutput=Bn;d.addSchema(l(Ln,"/fns/reverse-transfer-group/reverse-transfer-group.schema.input.json"),"/fns/reverse-transfer-group/reverse-transfer-group.schema.input.json");f.ReverseTransferGroupFnInput=Ln;d.addSchema(l(Hn,"/fns/reverse-transfer-group/reverse-transfer-group.schema.output.json"),"/fns/reverse-transfer-group/reverse-transfer-group.schema.output.json");f.ReverseTransferGroupFnOutput=Hn;d.addSchema(l(Vn,"/fns/reverse-transfers/reverse-transfers.schema.input.json"),"/fns/reverse-transfers/reverse-transfers.schema.input.json");f.ReverseTransfersFnInput=Vn;d.addSchema(l(zn,"/fns/reverse-transfers/reverse-transfers.schema.output.json"),"/fns/reverse-transfers/reverse-transfers.schema.output.json");f.ReverseTransfersFnOutput=zn;d.addSchema(l(Jn,"/fns/set-flags/set-flags.schema.input.json"),"/fns/set-flags/set-flags.schema.input.json");f.SetFlagsFnInput=Jn;d.addSchema(l(Qn,"/fns/set-flags/set-flags.schema.output.json"),"/fns/set-flags/set-flags.schema.output.json");f.SetFlagsFnOutput=Qn;d.addSchema(l(Kn,"/fns/update-token/update-token.schema.input.json"),"/fns/update-token/update-token.schema.input.json");f.UpdateTokenFnInput=Kn;d.addSchema(l(Yn,"/fns/update-token/update-token.schema.output.json"),"/fns/update-token/update-token.schema.output.json");f.UpdateTokenFnOutput=Yn;d.addSchema(l(Xn,"/fns/update-transfer/update-transfer.schema.input.json"),"/fns/update-transfer/update-transfer.schema.input.json");f.UpdateTransferFnInput=Xn;d.addSchema(l(Zn,"/fns/update-transfer/update-transfer.schema.output.json"),"/fns/update-transfer/update-transfer.schema.output.json");f.UpdateTransferFnOutput=Zn;d.addSchema(l(ea,"/fns/update-transfer-group/update-transfer-group.schema.input.json"),"/fns/update-transfer-group/update-transfer-group.schema.input.json");f.UpdateTransferGroupFnInput=ea;d.addSchema(l(ta,"/fns/update-transfer-group/update-transfer-group.schema.output.json"),"/fns/update-transfer-group/update-transfer-group.schema.output.json");f.UpdateTransferGroupFnOutput=ta;d.addSchema(l(ra,"/fns/update-transfer-groups/update-transfer-groups.schema.input.json"),"/fns/update-transfer-groups/update-transfer-groups.schema.input.json");f.UpdateTransferGroupsFnInput=ra;d.addSchema(l(na,"/fns/update-transfer-groups/update-transfer-groups.schema.output.json"),"/fns/update-transfer-groups/update-transfer-groups.schema.output.json");f.UpdateTransferGroupsFnOutput=na;d.addSchema(l(aa,"/fns/update-transfers/update-transfers.schema.input.json"),"/fns/update-transfers/update-transfers.schema.input.json");f.UpdateTransfersFnInput=aa;d.addSchema(l(sa,"/fns/update-transfers/update-transfers.schema.output.json"),"/fns/update-transfers/update-transfers.schema.output.json");f.UpdateTransfersFnOutput=sa;d.addSchema(l(ia,"/fns/update-wallet/update-wallet.schema.input.json"),"/fns/update-wallet/update-wallet.schema.input.json");f.UpdateWalletFnInput=ia;d.addSchema(l(oa,"/fns/update-wallet/update-wallet.schema.output.json"),"/fns/update-wallet/update-wallet.schema.output.json");f.UpdateWalletFnOutput=oa;d.addSchema(l(pa,"/txs/aggregate-transfer-many/aggregate-transfer-many.schema.input.json"),"/txs/aggregate-transfer-many/aggregate-transfer-many.schema.input.json");f.AggregateTransferManyTxInput=pa;d.addSchema(l(da,"/txs/aggregate-transfer-many/aggregate-transfer-many.schema.output.json"),"/txs/aggregate-transfer-many/aggregate-transfer-many.schema.output.json");f.AggregateTransferManyTxOutput=da;d.addSchema(l(fa,"/txs/authentication-check/authentication-check.schema.input.json"),"/txs/authentication-check/authentication-check.schema.input.json");f.AuthenticationCheckTxInput=fa;d.addSchema(l(ua,"/txs/authentication-check/authentication-check.schema.output.json"),"/txs/authentication-check/authentication-check.schema.output.json");f.AuthenticationCheckTxOutput=ua;d.addSchema(l(la,"/txs/create-access-token/create-access-token.schema.input.json"),"/txs/create-access-token/create-access-token.schema.input.json");f.CreateAccessTokenTxInput=la;d.addSchema(l(ca,"/txs/create-access-token/create-access-token.schema.output.json"),"/txs/create-access-token/create-access-token.schema.output.json");f.CreateAccessTokenTxOutput=ca;d.addSchema(l(ma,"/txs/create-contract/create-contract.schema.input.json"),"/txs/create-contract/create-contract.schema.input.json");f.CreateContractTxInput=ma;d.addSchema(l(ha,"/txs/create-contract/create-contract.schema.output.json"),"/txs/create-contract/create-contract.schema.output.json");f.CreateContractTxOutput=ha;d.addSchema(l(_a,"/txs/create-deposit/create-deposit.schema.input.json"),"/txs/create-deposit/create-deposit.schema.input.json");f.CreateDepositTxInput=_a;d.addSchema(l(ga,"/txs/create-deposit/create-deposit.schema.output.json"),"/txs/create-deposit/create-deposit.schema.output.json");f.CreateDepositTxOutput=ga;d.addSchema(l(Ta,"/txs/create-distribution/create-distribution.schema.input.json"),"/txs/create-distribution/create-distribution.schema.input.json");f.CreateDistributionTxInput=Ta;d.addSchema(l(ya,"/txs/create-distribution/create-distribution.schema.output.json"),"/txs/create-distribution/create-distribution.schema.output.json");f.CreateDistributionTxOutput=ya;d.addSchema(l(Fa,"/txs/create-token/create-token.schema.input.json"),"/txs/create-token/create-token.schema.input.json");f.CreateTokenTxInput=Fa;d.addSchema(l(xa,"/txs/create-token/create-token.schema.output.json"),"/txs/create-token/create-token.schema.output.json");f.CreateTokenTxOutput=xa;d.addSchema(l(ba,"/txs/create-transfer/create-transfer.schema.input.json"),"/txs/create-transfer/create-transfer.schema.input.json");f.CreateTransferTxInput=ba;d.addSchema(l(Oa,"/txs/create-transfer/create-transfer.schema.output.json"),"/txs/create-transfer/create-transfer.schema.output.json");f.CreateTransferTxOutput=Oa;d.addSchema(l($a,"/txs/create-transfer-group/create-transfer-group.schema.input.json"),"/txs/create-transfer-group/create-transfer-group.schema.input.json");f.CreateTransferGroupTxInput=$a;d.addSchema(l(wa,"/txs/create-transfer-group/create-transfer-group.schema.output.json"),"/txs/create-transfer-group/create-transfer-group.schema.output.json");f.CreateTransferGroupTxOutput=wa;d.addSchema(l(Ia,"/txs/create-transfer-many/create-transfer-many.schema.input.json"),"/txs/create-transfer-many/create-transfer-many.schema.input.json");f.CreateTransferManyTxInput=Ia;d.addSchema(l(ja,"/txs/create-transfer-many/create-transfer-many.schema.output.json"),"/txs/create-transfer-many/create-transfer-many.schema.output.json");f.CreateTransferManyTxOutput=ja;d.addSchema(l(ka,"/txs/create-wallet/create-wallet.schema.input.json"),"/txs/create-wallet/create-wallet.schema.input.json");f.CreateWalletTxInput=ka;d.addSchema(l(Sa,"/txs/create-wallet/create-wallet.schema.output.json"),"/txs/create-wallet/create-wallet.schema.output.json");f.CreateWalletTxOutput=Sa;d.addSchema(l(va,"/txs/create-withdrawal/create-withdrawal.schema.input.json"),"/txs/create-withdrawal/create-withdrawal.schema.input.json");f.CreateWithdrawalTxInput=va;d.addSchema(l(Ea,"/txs/create-withdrawal/create-withdrawal.schema.output.json"),"/txs/create-withdrawal/create-withdrawal.schema.output.json");f.CreateWithdrawalTxOutput=Ea;d.addSchema(l(Ga,"/txs/export-balance-history/export-balance-history.schema.input.json"),"/txs/export-balance-history/export-balance-history.schema.input.json");f.ExportBalanceHistoryTxInput=Ga;d.addSchema(l(Ca,"/txs/export-balance-history/export-balance-history.schema.output.json"),"/txs/export-balance-history/export-balance-history.schema.output.json");f.ExportBalanceHistoryTxOutput=Ca;d.addSchema(l(Ra,"/txs/export-token-many/export-token-many.schema.input.json"),"/txs/export-token-many/export-token-many.schema.input.json");f.ExportTokenManyTxInput=Ra;d.addSchema(l(Ma,"/txs/export-token-many/export-token-many.schema.output.json"),"/txs/export-token-many/export-token-many.schema.output.json");f.ExportTokenManyTxOutput=Ma;d.addSchema(l(Pa,"/txs/export-transfer-group-many/export-transfer-group-many.schema.input.json"),"/txs/export-transfer-group-many/export-transfer-group-many.schema.input.json");f.ExportTransferGroupManyTxInput=Pa;d.addSchema(l(Wa,"/txs/export-transfer-group-many/export-transfer-group-many.schema.output.json"),"/txs/export-transfer-group-many/export-transfer-group-many.schema.output.json");f.ExportTransferGroupManyTxOutput=Wa;d.addSchema(l(Da,"/txs/export-transfer-many/export-transfer-many.schema.input.json"),"/txs/export-transfer-many/export-transfer-many.schema.input.json");f.ExportTransferManyTxInput=Da;d.addSchema(l(Aa,"/txs/export-transfer-many/export-transfer-many.schema.output.json"),"/txs/export-transfer-many/export-transfer-many.schema.output.json");f.ExportTransferManyTxOutput=Aa;d.addSchema(l(Na,"/txs/export-wallet-many/export-wallet-many.schema.input.json"),"/txs/export-wallet-many/export-wallet-many.schema.input.json");f.ExportWalletManyTxInput=Na;d.addSchema(l(Ua,"/txs/export-wallet-many/export-wallet-many.schema.output.json"),"/txs/export-wallet-many/export-wallet-many.schema.output.json");f.ExportWalletManyTxOutput=Ua;d.addSchema(l(qa,"/txs/find-balance-many/find-balance-many.schema.input.json"),"/txs/find-balance-many/find-balance-many.schema.input.json");f.FindBalanceManyTxInput=qa;d.addSchema(l(Ba,"/txs/find-balance-many/find-balance-many.schema.output.json"),"/txs/find-balance-many/find-balance-many.schema.output.json");f.FindBalanceManyTxOutput=Ba;d.addSchema(l(La,"/txs/find-token-many/find-token-many.schema.input.json"),"/txs/find-token-many/find-token-many.schema.input.json");f.FindTokenManyTxInput=La;d.addSchema(l(Ha,"/txs/find-token-many/find-token-many.schema.output.json"),"/txs/find-token-many/find-token-many.schema.output.json");f.FindTokenManyTxOutput=Ha;d.addSchema(l(Va,"/txs/find-transfer-group-many/find-transfer-group-many.schema.input.json"),"/txs/find-transfer-group-many/find-transfer-group-many.schema.input.json");f.FindTransferGroupManyTxInput=Va;d.addSchema(l(za,"/txs/find-transfer-group-many/find-transfer-group-many.schema.output.json"),"/txs/find-transfer-group-many/find-transfer-group-many.schema.output.json");f.FindTransferGroupManyTxOutput=za;d.addSchema(l(Ja,"/txs/find-transfer-many/find-transfer-many.schema.input.json"),"/txs/find-transfer-many/find-transfer-many.schema.input.json");f.FindTransferManyTxInput=Ja;d.addSchema(l(Qa,"/txs/find-transfer-many/find-transfer-many.schema.output.json"),"/txs/find-transfer-many/find-transfer-many.schema.output.json");f.FindTransferManyTxOutput=Qa;d.addSchema(l(Ka,"/txs/find-wallet-many/find-wallet-many.schema.input.json"),"/txs/find-wallet-many/find-wallet-many.schema.input.json");f.FindWalletManyTxInput=Ka;d.addSchema(l(Ya,"/txs/find-wallet-many/find-wallet-many.schema.output.json"),"/txs/find-wallet-many/find-wallet-many.schema.output.json");f.FindWalletManyTxOutput=Ya;d.addSchema(l(Xa,"/txs/finish-transaction/finish-transaction.schema.input.json"),"/txs/finish-transaction/finish-transaction.schema.input.json");f.FinishTransactionTxInput=Xa;d.addSchema(l(Za,"/txs/finish-transaction/finish-transaction.schema.output.json"),"/txs/finish-transaction/finish-transaction.schema.output.json");f.FinishTransactionTxOutput=Za;d.addSchema(l(es,"/txs/get-balance/get-balance.schema.input.json"),"/txs/get-balance/get-balance.schema.input.json");f.GetBalanceTxInput=es;d.addSchema(l(ts,"/txs/get-balance/get-balance.schema.output.json"),"/txs/get-balance/get-balance.schema.output.json");f.GetBalanceTxOutput=ts;d.addSchema(l(rs,"/txs/get-balance-history/get-balance-history.schema.input.json"),"/txs/get-balance-history/get-balance-history.schema.input.json");f.GetBalanceHistoryTxInput=rs;d.addSchema(l(ns,"/txs/get-balance-history/get-balance-history.schema.output.json"),"/txs/get-balance-history/get-balance-history.schema.output.json");f.GetBalanceHistoryTxOutput=ns;d.addSchema(l(as,"/txs/get-export/get-export.schema.input.json"),"/txs/get-export/get-export.schema.input.json");f.GetExportTxInput=as;d.addSchema(l(ss,"/txs/get-export/get-export.schema.output.json"),"/txs/get-export/get-export.schema.output.json");f.GetExportTxOutput=ss;d.addSchema(l(is,"/txs/get-flags/get-flags.schema.input.json"),"/txs/get-flags/get-flags.schema.input.json");f.GetFlagsTxInput=is;d.addSchema(l(os,"/txs/get-flags/get-flags.schema.output.json"),"/txs/get-flags/get-flags.schema.output.json");f.GetFlagsTxOutput=os;d.addSchema(l(ps,"/txs/get-statistics/get-statistics.schema.input.json"),"/txs/get-statistics/get-statistics.schema.input.json");f.GetStatisticsTxInput=ps;d.addSchema(l(ds,"/txs/get-statistics/get-statistics.schema.output.json"),"/txs/get-statistics/get-statistics.schema.output.json");f.GetStatisticsTxOutput=ds;d.addSchema(l(fs,"/txs/get-token/get-token.schema.input.json"),"/txs/get-token/get-token.schema.input.json");f.GetTokenTxInput=fs;d.addSchema(l(us,"/txs/get-token/get-token.schema.output.json"),"/txs/get-token/get-token.schema.output.json");f.GetTokenTxOutput=us;d.addSchema(l(ls,"/txs/get-token-many/get-token-many.schema.input.json"),"/txs/get-token-many/get-token-many.schema.input.json");f.GetTokenManyTxInput=ls;d.addSchema(l(cs,"/txs/get-token-many/get-token-many.schema.output.json"),"/txs/get-token-many/get-token-many.schema.output.json");f.GetTokenManyTxOutput=cs;d.addSchema(l(ms,"/txs/get-transfer/get-transfer.schema.input.json"),"/txs/get-transfer/get-transfer.schema.input.json");f.GetTransferTxInput=ms;d.addSchema(l(hs,"/txs/get-transfer/get-transfer.schema.output.json"),"/txs/get-transfer/get-transfer.schema.output.json");f.GetTransferTxOutput=hs;d.addSchema(l(_s,"/txs/get-transfer-group/get-transfer-group.schema.input.json"),"/txs/get-transfer-group/get-transfer-group.schema.input.json");f.GetTransferGroupTxInput=_s;d.addSchema(l(gs,"/txs/get-transfer-group/get-transfer-group.schema.output.json"),"/txs/get-transfer-group/get-transfer-group.schema.output.json");f.GetTransferGroupTxOutput=gs;d.addSchema(l(Ts,"/txs/get-wallet/get-wallet.schema.input.json"),"/txs/get-wallet/get-wallet.schema.input.json");f.GetWalletTxInput=Ts;d.addSchema(l(ys,"/txs/get-wallet/get-wallet.schema.output.json"),"/txs/get-wallet/get-wallet.schema.output.json");f.GetWalletTxOutput=ys;d.addSchema(l(Fs,"/txs/get-wallet-many/get-wallet-many.schema.input.json"),"/txs/get-wallet-many/get-wallet-many.schema.input.json");f.GetWalletManyTxInput=Fs;d.addSchema(l(xs,"/txs/get-wallet-many/get-wallet-many.schema.output.json"),"/txs/get-wallet-many/get-wallet-many.schema.output.json");f.GetWalletManyTxOutput=xs;d.addSchema(l(bs,"/txs/healthcheck/healthcheck.schema.input.json"),"/txs/healthcheck/healthcheck.schema.input.json");f.HealthcheckTxInput=bs;d.addSchema(l(Os,"/txs/healthcheck/healthcheck.schema.output.json"),"/txs/healthcheck/healthcheck.schema.output.json");f.HealthcheckTxOutput=Os;d.addSchema(l(ct,"/txs/import-actions/import-actions.schema.input.json"),"/txs/import-actions/import-actions.schema.input.json");f.ImportActionsTxInput=ct;var bc=Tc(ct,"/txs/import-actions/import-actions.schema.input.json");d.addSchema(bc,"/txs/import-actions/import-actions.schema.options.json");f.ImportActionsTxOptions=bc;var Oc=yc(ct,"/txs/import-actions/import-actions.schema.input.json");d.addSchema(Oc,"/txs/import-actions/import-actions.schema.chunk.json");f.ImportActionsTxStreamChunk=Oc;d.addSchema(l($s,"/txs/import-actions/import-actions.schema.output.json"),"/txs/import-actions/import-actions.schema.output.json");f.ImportActionsTxOutput=$s;d.addSchema(l(ws,"/txs/list-export-many/list-export-many.schema.input.json"),"/txs/list-export-many/list-export-many.schema.input.json");f.ListExportManyTxInput=ws;d.addSchema(l(Is,"/txs/list-export-many/list-export-many.schema.output.json"),"/txs/list-export-many/list-export-many.schema.output.json");f.ListExportManyTxOutput=Is;d.addSchema(l(js,"/txs/query-logs/query-logs.schema.input.json"),"/txs/query-logs/query-logs.schema.input.json");f.QueryLogsTxInput=js;d.addSchema(l(ks,"/txs/query-logs/query-logs.schema.output.json"),"/txs/query-logs/query-logs.schema.output.json");f.QueryLogsTxOutput=ks;d.addSchema(l(Ss,"/txs/reset-database/reset-database.schema.input.json"),"/txs/reset-database/reset-database.schema.input.json");f.ResetDatabaseTxInput=Ss;d.addSchema(l(vs,"/txs/reset-database/reset-database.schema.output.json"),"/txs/reset-database/reset-database.schema.output.json");f.ResetDatabaseTxOutput=vs;d.addSchema(l(Es,"/txs/reverse-transfer/reverse-transfer.schema.input.json"),"/txs/reverse-transfer/reverse-transfer.schema.input.json");f.ReverseTransferTxInput=Es;d.addSchema(l(Gs,"/txs/reverse-transfer/reverse-transfer.schema.output.json"),"/txs/reverse-transfer/reverse-transfer.schema.output.json");f.ReverseTransferTxOutput=Gs;d.addSchema(l(Cs,"/txs/reverse-transfer-group/reverse-transfer-group.schema.input.json"),"/txs/reverse-transfer-group/reverse-transfer-group.schema.input.json");f.ReverseTransferGroupTxInput=Cs;d.addSchema(l(Rs,"/txs/reverse-transfer-group/reverse-transfer-group.schema.output.json"),"/txs/reverse-transfer-group/reverse-transfer-group.schema.output.json");f.ReverseTransferGroupTxOutput=Rs;d.addSchema(l(Ms,"/txs/reverse-transfer-group-many/reverse-transfer-group-many.schema.input.json"),"/txs/reverse-transfer-group-many/reverse-transfer-group-many.schema.input.json");f.ReverseTransferGroupManyTxInput=Ms;d.addSchema(l(Ps,"/txs/reverse-transfer-group-many/reverse-transfer-group-many.schema.output.json"),"/txs/reverse-transfer-group-many/reverse-transfer-group-many.schema.output.json");f.ReverseTransferGroupManyTxOutput=Ps;d.addSchema(l(Ws,"/txs/reverse-transfer-many/reverse-transfer-many.schema.input.json"),"/txs/reverse-transfer-many/reverse-transfer-many.schema.input.json");f.ReverseTransferManyTxInput=Ws;d.addSchema(l(Ds,"/txs/reverse-transfer-many/reverse-transfer-many.schema.output.json"),"/txs/reverse-transfer-many/reverse-transfer-many.schema.output.json");f.ReverseTransferManyTxOutput=Ds;d.addSchema(l(As,"/txs/set-flags/set-flags.schema.input.json"),"/txs/set-flags/set-flags.schema.input.json");f.SetFlagsTxInput=As;d.addSchema(l(Ns,"/txs/set-flags/set-flags.schema.output.json"),"/txs/set-flags/set-flags.schema.output.json");f.SetFlagsTxOutput=Ns;d.addSchema(l(Us,"/txs/start-transaction/start-transaction.schema.input.json"),"/txs/start-transaction/start-transaction.schema.input.json");f.StartTransactionTxInput=Us;d.addSchema(l(qs,"/txs/start-transaction/start-transaction.schema.output.json"),"/txs/start-transaction/start-transaction.schema.output.json");f.StartTransactionTxOutput=qs;d.addSchema(l(Bs,"/txs/tx-consts.schema.json"),"/txs/tx-consts.schema.json");f.TxConsts=Bs;d.addSchema(l(Ls,"/txs/update-token/update-token.schema.input.json"),"/txs/update-token/update-token.schema.input.json");f.UpdateTokenTxInput=Ls;d.addSchema(l(Hs,"/txs/update-token/update-token.schema.output.json"),"/txs/update-token/update-token.schema.output.json");f.UpdateTokenTxOutput=Hs;d.addSchema(l(Vs,"/txs/update-transfer/update-transfer.schema.input.json"),"/txs/update-transfer/update-transfer.schema.input.json");f.UpdateTransferTxInput=Vs;d.addSchema(l(zs,"/txs/update-transfer/update-transfer.schema.output.json"),"/txs/update-transfer/update-transfer.schema.output.json");f.UpdateTransferTxOutput=zs;d.addSchema(l(Js,"/txs/update-transfer-group/update-transfer-group.schema.input.json"),"/txs/update-transfer-group/update-transfer-group.schema.input.json");f.UpdateTransferGroupTxInput=Js;d.addSchema(l(Qs,"/txs/update-transfer-group/update-transfer-group.schema.output.json"),"/txs/update-transfer-group/update-transfer-group.schema.output.json");f.UpdateTransferGroupTxOutput=Qs;d.addSchema(l(Ks,"/txs/update-transfer-group-many/update-transfer-group-many.schema.input.json"),"/txs/update-transfer-group-many/update-transfer-group-many.schema.input.json");f.UpdateTransferGroupManyTxInput=Ks;d.addSchema(l(Ys,"/txs/update-transfer-group-many/update-transfer-group-many.schema.output.json"),"/txs/update-transfer-group-many/update-transfer-group-many.schema.output.json");f.UpdateTransferGroupManyTxOutput=Ys;d.addSchema(l(Xs,"/txs/update-transfer-many/update-transfer-many.schema.input.json"),"/txs/update-transfer-many/update-transfer-many.schema.input.json");f.UpdateTransferManyTxInput=Xs;d.addSchema(l(Zs,"/txs/update-transfer-many/update-transfer-many.schema.output.json"),"/txs/update-transfer-many/update-transfer-many.schema.output.json");f.UpdateTransferManyTxOutput=Zs;d.addSchema(l(ei,"/txs/update-wallet/update-wallet.schema.input.json"),"/txs/update-wallet/update-wallet.schema.input.json");f.UpdateWalletTxInput=ei;d.addSchema(l(ti,"/txs/update-wallet/update-wallet.schema.output.json"),"/txs/update-wallet/update-wallet.schema.output.json");f.UpdateWalletTxOutput=ti;var v=(u=>(u.JSONRPCRequest="JSONRPCRequest",u.JSONRPCResponse="JSONRPCResponse",u.ClientOptions="ClientOptions",u.Consts="Consts",u.TokenTableInput="TokenTableInput",u.TokenTable="TokenTable",u.TokenTableOptional="TokenTableOptional",u.TransferTableInput="TransferTableInput",u.TransferTable="TransferTable",u.TransferTableOptional="TransferTableOptional",u.TransferGroupTableInput="TransferGroupTableInput",u.TransferGroupTable="TransferGroupTable",u.TransferGroupTableOptional="TransferGroupTableOptional",u.TransferLogTableInput="TransferLogTableInput",u.TransferLogTable="TransferLogTable",u.TransferLogTableOptional="TransferLogTableOptional",u.WalletTableInput="WalletTableInput",u.WalletTable="WalletTable",u.WalletTableOptional="WalletTableOptional",u.WalletTokenSettingTableInput="WalletTokenSettingTableInput",u.WalletTokenSettingTable="WalletTokenSettingTable",u.WalletTokenSettingTableOptional="WalletTokenSettingTableOptional",u.WapiSettingTableInput="WapiSettingTableInput",u.WapiSettingTable="WapiSettingTable",u.WapiSettingTableOptional="WapiSettingTableOptional",u.WapiStatisticTableInput="WapiStatisticTableInput",u.WapiStatisticTable="WapiStatisticTable",u.WapiStatisticTableOptional="WapiStatisticTableOptional",u.AggregateTransfersFnInput="AggregateTransfersFnInput",u.AggregateTransfersFnOutput="AggregateTransfersFnOutput",u.CreateAccessTokenFnInput="CreateAccessTokenFnInput",u.CreateAccessTokenFnOutput="CreateAccessTokenFnOutput",u.CreateContractFnInput="CreateContractFnInput",u.CreateContractFnOutput="CreateContractFnOutput",u.CreateDepositFnInput="CreateDepositFnInput",u.CreateDepositFnOutput="CreateDepositFnOutput",u.CreateExchangeFnInput="CreateExchangeFnInput",u.CreateExchangeFnOutput="CreateExchangeFnOutput",u.CreateTokenFnInput="CreateTokenFnInput",u.CreateTokenFnOutput="CreateTokenFnOutput",u.CreateTransferFnInput="CreateTransferFnInput",u.CreateTransferFnOutput="CreateTransferFnOutput",u.CreateTransferGroupFnInput="CreateTransferGroupFnInput",u.CreateTransferGroupFnOutput="CreateTransferGroupFnOutput",u.CreateTransfersFnInput="CreateTransfersFnInput",u.CreateTransfersFnOutput="CreateTransfersFnOutput",u.CreateWalletFnInput="CreateWalletFnInput",u.CreateWalletFnOutput="CreateWalletFnOutput",u.CreateWithdrawalFnInput="CreateWithdrawalFnInput",u.CreateWithdrawalFnOutput="CreateWithdrawalFnOutput",u.ExportBalanceHistoryFnInput="ExportBalanceHistoryFnInput",u.ExportBalanceHistoryFnOutput="ExportBalanceHistoryFnOutput",u.ExportTokensFnInput="ExportTokensFnInput",u.ExportTokensFnOutput="ExportTokensFnOutput",u.ExportTransferGroupsFnInput="ExportTransferGroupsFnInput",u.ExportTransferGroupsFnOutput="ExportTransferGroupsFnOutput",u.ExportTransfersFnInput="ExportTransfersFnInput",u.ExportTransfersFnOutput="ExportTransfersFnOutput",u.ExportWalletsFnInput="ExportWalletsFnInput",u.ExportWalletsFnOutput="ExportWalletsFnOutput",u.FindBalancesFnInput="FindBalancesFnInput",u.FindBalancesFnOutput="FindBalancesFnOutput",u.FindTokensFnInput="FindTokensFnInput",u.FindTokensFnOutput="FindTokensFnOutput",u.FindTransferGroupsFnInput="FindTransferGroupsFnInput",u.FindTransferGroupsFnOutput="FindTransferGroupsFnOutput",u.FindTransfersFnInput="FindTransfersFnInput",u.FindTransfersFnOutput="FindTransfersFnOutput",u.FindWalletsFnInput="FindWalletsFnInput",u.FindWalletsFnOutput="FindWalletsFnOutput",u.FnConsts="FnConsts",u.GetBalanceFnInput="GetBalanceFnInput",u.GetBalanceFnOutput="GetBalanceFnOutput",u.GetBalanceHistoryFnInput="GetBalanceHistoryFnInput",u.GetBalanceHistoryFnOutput="GetBalanceHistoryFnOutput",u.GetExportFnInput="GetExportFnInput",u.GetExportFnOutput="GetExportFnOutput",u.GetFlagsFnInput="GetFlagsFnInput",u.GetFlagsFnOutput="GetFlagsFnOutput",u.GetStatisticsFnInput="GetStatisticsFnInput",u.GetStatisticsFnOutput="GetStatisticsFnOutput",u.GetTokenFnInput="GetTokenFnInput",u.GetTokenFnOutput="GetTokenFnOutput",u.GetTransferFnInput="GetTransferFnInput",u.GetTransferFnOutput="GetTransferFnOutput",u.GetTransferGroupFnInput="GetTransferGroupFnInput",u.GetTransferGroupFnOutput="GetTransferGroupFnOutput",u.GetWalletFnInput="GetWalletFnInput",u.GetWalletFnOutput="GetWalletFnOutput",u.HealthcheckFnInput="HealthcheckFnInput",u.HealthcheckFnOutput="HealthcheckFnOutput",u.ImportDataFnInput="ImportDataFnInput",u.ImportDataFnOptions="ImportDataFnOptions",u.ImportDataFnStreamChunk="ImportDataFnStreamChunk",u.ImportDataFnOutput="ImportDataFnOutput",u.ListExportsFnInput="ListExportsFnInput",u.ListExportsFnOutput="ListExportsFnOutput",u.ReverseTransferFnInput="ReverseTransferFnInput",u.ReverseTransferFnOutput="ReverseTransferFnOutput",u.ReverseTransferGroupFnInput="ReverseTransferGroupFnInput",u.ReverseTransferGroupFnOutput="ReverseTransferGroupFnOutput",u.ReverseTransfersFnInput="ReverseTransfersFnInput",u.ReverseTransfersFnOutput="ReverseTransfersFnOutput",u.SetFlagsFnInput="SetFlagsFnInput",u.SetFlagsFnOutput="SetFlagsFnOutput",u.UpdateTokenFnInput="UpdateTokenFnInput",u.UpdateTokenFnOutput="UpdateTokenFnOutput",u.UpdateTransferFnInput="UpdateTransferFnInput",u.UpdateTransferFnOutput="UpdateTransferFnOutput",u.UpdateTransferGroupFnInput="UpdateTransferGroupFnInput",u.UpdateTransferGroupFnOutput="UpdateTransferGroupFnOutput",u.UpdateTransferGroupsFnInput="UpdateTransferGroupsFnInput",u.UpdateTransferGroupsFnOutput="UpdateTransferGroupsFnOutput",u.UpdateTransfersFnInput="UpdateTransfersFnInput",u.UpdateTransfersFnOutput="UpdateTransfersFnOutput",u.UpdateWalletFnInput="UpdateWalletFnInput",u.UpdateWalletFnOutput="UpdateWalletFnOutput",u.AggregateTransferManyTxInput="AggregateTransferManyTxInput",u.AggregateTransferManyTxOutput="AggregateTransferManyTxOutput",u.AuthenticationCheckTxInput="AuthenticationCheckTxInput",u.AuthenticationCheckTxOutput="AuthenticationCheckTxOutput",u.CreateAccessTokenTxInput="CreateAccessTokenTxInput",u.CreateAccessTokenTxOutput="CreateAccessTokenTxOutput",u.CreateContractTxInput="CreateContractTxInput",u.CreateContractTxOutput="CreateContractTxOutput",u.CreateDepositTxInput="CreateDepositTxInput",u.CreateDepositTxOutput="CreateDepositTxOutput",u.CreateDistributionTxInput="CreateDistributionTxInput",u.CreateDistributionTxOutput="CreateDistributionTxOutput",u.CreateTokenTxInput="CreateTokenTxInput",u.CreateTokenTxOutput="CreateTokenTxOutput",u.CreateTransferTxInput="CreateTransferTxInput",u.CreateTransferTxOutput="CreateTransferTxOutput",u.CreateTransferGroupTxInput="CreateTransferGroupTxInput",u.CreateTransferGroupTxOutput="CreateTransferGroupTxOutput",u.CreateTransferManyTxInput="CreateTransferManyTxInput",u.CreateTransferManyTxOutput="CreateTransferManyTxOutput",u.CreateWalletTxInput="CreateWalletTxInput",u.CreateWalletTxOutput="CreateWalletTxOutput",u.CreateWithdrawalTxInput="CreateWithdrawalTxInput",u.CreateWithdrawalTxOutput="CreateWithdrawalTxOutput",u.ExportBalanceHistoryTxInput="ExportBalanceHistoryTxInput",u.ExportBalanceHistoryTxOutput="ExportBalanceHistoryTxOutput",u.ExportTokenManyTxInput="ExportTokenManyTxInput",u.ExportTokenManyTxOutput="ExportTokenManyTxOutput",u.ExportTransferGroupManyTxInput="ExportTransferGroupManyTxInput",u.ExportTransferGroupManyTxOutput="ExportTransferGroupManyTxOutput",u.ExportTransferManyTxInput="ExportTransferManyTxInput",u.ExportTransferManyTxOutput="ExportTransferManyTxOutput",u.ExportWalletManyTxInput="ExportWalletManyTxInput",u.ExportWalletManyTxOutput="ExportWalletManyTxOutput",u.FindBalanceManyTxInput="FindBalanceManyTxInput",u.FindBalanceManyTxOutput="FindBalanceManyTxOutput",u.FindTokenManyTxInput="FindTokenManyTxInput",u.FindTokenManyTxOutput="FindTokenManyTxOutput",u.FindTransferGroupManyTxInput="FindTransferGroupManyTxInput",u.FindTransferGroupManyTxOutput="FindTransferGroupManyTxOutput",u.FindTransferManyTxInput="FindTransferManyTxInput",u.FindTransferManyTxOutput="FindTransferManyTxOutput",u.FindWalletManyTxInput="FindWalletManyTxInput",u.FindWalletManyTxOutput="FindWalletManyTxOutput",u.FinishTransactionTxInput="FinishTransactionTxInput",u.FinishTransactionTxOutput="FinishTransactionTxOutput",u.GetBalanceTxInput="GetBalanceTxInput",u.GetBalanceTxOutput="GetBalanceTxOutput",u.GetBalanceHistoryTxInput="GetBalanceHistoryTxInput",u.GetBalanceHistoryTxOutput="GetBalanceHistoryTxOutput",u.GetExportTxInput="GetExportTxInput",u.GetExportTxOutput="GetExportTxOutput",u.GetFlagsTxInput="GetFlagsTxInput",u.GetFlagsTxOutput="GetFlagsTxOutput",u.GetStatisticsTxInput="GetStatisticsTxInput",u.GetStatisticsTxOutput="GetStatisticsTxOutput",u.GetTokenTxInput="GetTokenTxInput",u.GetTokenTxOutput="GetTokenTxOutput",u.GetTokenManyTxInput="GetTokenManyTxInput",u.GetTokenManyTxOutput="GetTokenManyTxOutput",u.GetTransferTxInput="GetTransferTxInput",u.GetTransferTxOutput="GetTransferTxOutput",u.GetTransferGroupTxInput="GetTransferGroupTxInput",u.GetTransferGroupTxOutput="GetTransferGroupTxOutput",u.GetWalletTxInput="GetWalletTxInput",u.GetWalletTxOutput="GetWalletTxOutput",u.GetWalletManyTxInput="GetWalletManyTxInput",u.GetWalletManyTxOutput="GetWalletManyTxOutput",u.HealthcheckTxInput="HealthcheckTxInput",u.HealthcheckTxOutput="HealthcheckTxOutput",u.ImportActionsTxInput="ImportActionsTxInput",u.ImportActionsTxOptions="ImportActionsTxOptions",u.ImportActionsTxStreamChunk="ImportActionsTxStreamChunk",u.ImportActionsTxOutput="ImportActionsTxOutput",u.ListExportManyTxInput="ListExportManyTxInput",u.ListExportManyTxOutput="ListExportManyTxOutput",u.QueryLogsTxInput="QueryLogsTxInput",u.QueryLogsTxOutput="QueryLogsTxOutput",u.ResetDatabaseTxInput="ResetDatabaseTxInput",u.ResetDatabaseTxOutput="ResetDatabaseTxOutput",u.ReverseTransferTxInput="ReverseTransferTxInput",u.ReverseTransferTxOutput="ReverseTransferTxOutput",u.ReverseTransferGroupTxInput="ReverseTransferGroupTxInput",u.ReverseTransferGroupTxOutput="ReverseTransferGroupTxOutput",u.ReverseTransferGroupManyTxInput="ReverseTransferGroupManyTxInput",u.ReverseTransferGroupManyTxOutput="ReverseTransferGroupManyTxOutput",u.ReverseTransferManyTxInput="ReverseTransferManyTxInput",u.ReverseTransferManyTxOutput="ReverseTransferManyTxOutput",u.SetFlagsTxInput="SetFlagsTxInput",u.SetFlagsTxOutput="SetFlagsTxOutput",u.StartTransactionTxInput="StartTransactionTxInput",u.StartTransactionTxOutput="StartTransactionTxOutput",u.TxConsts="TxConsts",u.UpdateTokenTxInput="UpdateTokenTxInput",u.UpdateTokenTxOutput="UpdateTokenTxOutput",u.UpdateTransferTxInput="UpdateTransferTxInput",u.UpdateTransferTxOutput="UpdateTransferTxOutput",u.UpdateTransferGroupTxInput="UpdateTransferGroupTxInput",u.UpdateTransferGroupTxOutput="UpdateTransferGroupTxOutput",u.UpdateTransferGroupManyTxInput="UpdateTransferGroupManyTxInput",u.UpdateTransferGroupManyTxOutput="UpdateTransferGroupManyTxOutput",u.UpdateTransferManyTxInput="UpdateTransferManyTxInput",u.UpdateTransferManyTxOutput="UpdateTransferManyTxOutput",u.UpdateWalletTxInput="UpdateWalletTxInput",u.UpdateWalletTxOutput="UpdateWalletTxOutput",u))(v||{}),ri={ajv:d,createValidator(t){let e=d.compile(t);return hc(e)},getValidator(t){let e=d.getSchema(t);return hc(e)},getSchema(t){return f[t]},Schemas:f,SchemaNames:v},CM=ri.createValidator,_=ri.getValidator;var vO=_("AggregateTransferManyTxInput");var EO=_("AuthenticationCheckTxInput");var GO=_("CreateAccessTokenTxInput");var CO=_("CreateContractTxInput");var RO=_("CreateDepositTxInput");var MO=_("CreateDistributionTxInput");var PO=_("CreateTokenTxInput");var WO=_("CreateTransferTxInput");var DO=_("CreateTransferGroupTxInput");var AO=_("CreateTransferManyTxInput");var NO=_("CreateWalletTxInput");var UO=_("CreateWithdrawalTxInput");var qO=_("ExportBalanceHistoryTxInput");var BO=_("ExportTokenManyTxInput");var LO=_("ExportTransferGroupManyTxInput");var HO=_("ExportTransferManyTxInput");var VO=_("ExportWalletManyTxInput");var zO=_("FindBalanceManyTxInput");var JO=_("FindTokenManyTxInput");var QO=_("FindTransferGroupManyTxInput");var KO=_("FindTransferManyTxInput");var YO=_("FindWalletManyTxInput");var XO=_("FinishTransactionTxInput");var ZO=_("GetBalanceTxInput");var e$=_("GetBalanceHistoryTxInput");var t$=_("GetExportTxInput");var r$=_("GetFlagsTxInput");var n$=_("GetStatisticsTxInput");var a$=_("GetTokenTxInput");var s$=_("GetTokenManyTxInput");var i$=_("GetTransferTxInput");var o$=_("GetTransferGroupTxInput");var p$=_("GetWalletTxInput");var d$=_("GetWalletManyTxInput");var f$=_("HealthcheckTxInput");var u$=_("ImportActionsTxInput");var l$=_("ListExportManyTxInput");var c$=_("QueryLogsTxInput");var m$=_("ResetDatabaseTxInput");var h$=_("ReverseTransferTxInput");var _$=_("ReverseTransferGroupTxInput");var g$=_("ReverseTransferGroupManyTxInput");var T$=_("ReverseTransferManyTxInput");var y$=_("SetFlagsTxInput");var F$=_("StartTransactionTxInput");var x$=_("UpdateTokenTxInput");var b$=_("UpdateTransferTxInput");var O$=_("UpdateTransferGroupTxInput");var $$=_("UpdateTransferGroupManyTxInput");var w$=_("UpdateTransferManyTxInput");var I$=_("UpdateWalletTxInput"),Kp={aggregateTransferMany:vO,authenticationCheck:EO,createAccessToken:GO,createContract:CO,createDeposit:RO,createDistribution:MO,createToken:PO,createTransfer:WO,createTransferGroup:DO,createTransferMany:AO,createWallet:NO,createWithdrawal:UO,exportBalanceHistory:qO,exportTokenMany:BO,exportTransferGroupMany:LO,exportTransferMany:HO,exportWalletMany:VO,findBalanceMany:zO,findTokenMany:JO,findTransferGroupMany:QO,findTransferMany:KO,findWalletMany:YO,finishTransaction:XO,getBalance:ZO,getBalanceHistory:e$,getExport:t$,getFlags:r$,getStatistics:n$,getToken:a$,getTokenMany:s$,getTransfer:i$,getTransferGroup:o$,getWallet:p$,getWalletMany:d$,healthcheck:f$,importActions:u$,listExportMany:l$,queryLogs:c$,resetDatabase:m$,reverseTransfer:h$,reverseTransferGroup:_$,reverseTransferGroupMany:g$,reverseTransferMany:T$,setFlags:y$,startTransaction:F$,updateToken:x$,updateTransfer:b$,updateTransferGroup:O$,updateTransferGroupMany:$$,updateTransferMany:w$,updateWallet:I$},Yp=(S=>(S.aggregateTransferMany="aggregateTransferMany",S.authenticationCheck="authenticationCheck",S.createAccessToken="createAccessToken",S.createContract="createContract",S.createDeposit="createDeposit",S.createDistribution="createDistribution",S.createToken="createToken",S.createTransfer="createTransfer",S.createTransferGroup="createTransferGroup",S.createTransferMany="createTransferMany",S.createWallet="createWallet",S.createWithdrawal="createWithdrawal",S.exportBalanceHistory="exportBalanceHistory",S.exportTokenMany="exportTokenMany",S.exportTransferGroupMany="exportTransferGroupMany",S.exportTransferMany="exportTransferMany",S.exportWalletMany="exportWalletMany",S.findBalanceMany="findBalanceMany",S.findTokenMany="findTokenMany",S.findTransferGroupMany="findTransferGroupMany",S.findTransferMany="findTransferMany",S.findWalletMany="findWalletMany",S.finishTransaction="finishTransaction",S.getBalance="getBalance",S.getBalanceHistory="getBalanceHistory",S.getExport="getExport",S.getFlags="getFlags",S.getStatistics="getStatistics",S.getToken="getToken",S.getTokenMany="getTokenMany",S.getTransfer="getTransfer",S.getTransferGroup="getTransferGroup",S.getWallet="getWallet",S.getWalletMany="getWalletMany",S.healthcheck="healthcheck",S.importActions="importActions",S.listExportMany="listExportMany",S.queryLogs="queryLogs",S.resetDatabase="resetDatabase",S.reverseTransfer="reverseTransfer",S.reverseTransferGroup="reverseTransferGroup",S.reverseTransferGroupMany="reverseTransferGroupMany",S.reverseTransferMany="reverseTransferMany",S.setFlags="setFlags",S.startTransaction="startTransaction",S.updateToken="updateToken",S.updateTransfer="updateTransfer",S.updateTransferGroup="updateTransferGroup",S.updateTransferGroupMany="updateTransferGroupMany",S.updateTransferMany="updateTransferMany",S.updateWallet="updateWallet",S))(Yp||{});var j$=_("ImportActionsTxInput");function $c(t){let{error:e}=j$(t);return e===void 0}var RW=_("ImportActionsTxOutput");var MW=_("ImportActionsTxStreamChunk");var k$=_("ImportActionsTxOptions");function wc(t){let{error:e}=k$(t);return e===void 0}var St=class{constructor(e,r,n){this.isConnected=!1;this.hooks=new Proxy({},{set(e,r,n){if(typeof n!="function")throw new TypeError("Hooks can only be functions");return e[r]=n,!0}});this._requests=new Map;this._error=!1;this._sending=new Map;this.type=r,this._connection=e,this.connectionType=r,this.$connect=n}_setConnected(e){this.$connect=void 0,e&&this._error!==!1&&(this._error=!1),!this.isConnected&&e&&this.hooks.connected&&this.hooks.connected(this.socId),this.isConnected&&!e&&this.hooks.disconnected&&this.hooks.disconnected(),this.isConnected=e}_setErrored(e){this._error=e,this._setConnected(!1)}_clearError(){this._error=void 0}_send(e){throw new Error("This method must be implemented by child class")}_reconnect(e){throw new Error("This method must be implemented by child class")}close(){return ee(this,null,function*(){throw new Error("This method must be implemented by child class")})}_connectionLost(){this._requests.forEach((e,r)=>{"stream"in e&&e.stream.destroy(new Fe("CONNECTION_LOST",{method:"connectionLost"})),this._requests.delete(r)}),this.socId=void 0}_handleMessage(e){var o,p,m,c;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}M("Unexpected JSONRPCRequest",e);return}let r=e;if(this.hooks.message&&this.hooks.message(r),r.id===null){M("Unexpected JSONRPCResponse",e);return}if(r.result==="ack"){clearTimeout((o=this._sending.get(r.id))==null?void 0:o.timeout),this._sending.delete(r.id);return}let n=this._requests.get(r.id);if(!n){M("No Request found for incoming",e);return}if("handle"in n){n.handle(r),delete n.handle;return}r.error&&"error"in n&&n.error(r.error);let a=r;if(((p=a.result)==null?void 0:p.type)==="streamPause"&&"pause"in n){n.pause();return}if(((m=a.result)==null?void 0:m.type)==="streamResume"&&"resume"in n){n.resume();return}let{stream:s,start:i}=n;if(((c=a.result)==null?void 0:c.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,r){let{isValid:n,inputCopy:a,error:s}=Kp[e](r);if(!n)throw s;return this._sendRaw(e,a)}_setSending(e,r){this._sending.set(e.id,b({},this.sendingTimeout&&{timeout:setTimeout(()=>{this._sending.delete(e.id),r.push({error:new ce("SENDING_TIMEOUT",{timeout:this.sendingTimeout}).toJSON()}),this._requests.delete(e.id)},this.sendingTimeout)}))}_sendRaw(e,r){let n={jsonrpc:"2.0",method:e,params:r,id:et()};return this.hooks.preflight&&this.hooks.preflight(n)===!1?new De:new De(a=>ee(this,null,function*(){if(this._error&&this._reconnect(5),this.isConnected||(yield this.$connect),this._error)throw this._error;this._requests.set(n.id,{stream:a,start:Date.now()}),this._setSending(n,a),this._send(n)}))}_streamTransaction(e,r,n,a){let s=Date.now(),i=et(),o,p=({stream:x,method:g,params:F})=>{if(o)return;let y={jsonrpc:"2.0",method:g,params:b({streamId:i},F),id:et()};this._setSending(y,x),this._send(y)},m=(x,g)=>{o||(p({stream:x,method:"streamError",params:{error:g}}),o=g,x.push({error:g}))},c=new fi,h=a?c.pipe(a):c,T={jsonrpc:"2.0",method:"streamStart",params:{method:e,options:n},id:i};return this.hooks.preflight&&this.hooks.preflight(T)===!1?new Dt:new Dt(x=>ee(this,null,function*(){if(this._error&&this._reconnect(5),this.isConnected||(yield this.$connect),this._error)throw this._error;let g=setTimeout(()=>{x.push({error:new Fe("INPUT_STREAM_TIMEOUT",{streamId:i})})},3e4);this._requests.set(T.id,{stream:x,start:s,error(F){o=F,M("stream:error()>",F)},pause(){c.pause()},resume(){c.resume()},handle(F){if(F.error){x.push(F);return}h.on("data",y=>{if(!o){if(g&&(clearTimeout(g),g=null),!r(y)){m(x,new Fe("INVALID_INPUT_STREAM_CHUNK",{streamId:i,chunk:y}));return}p({stream:x,method:"streamData",params:{data:y}})}}).on("error",y=>{o||(g&&(clearTimeout(g),g=null),p({stream:x,method:"streamError",params:{error:y}}),x.push({error:new Fe("INPUT_STREAM_ERROR",{streamId:i,error:y})}))}).on("end",()=>{g&&(clearTimeout(g),g=null),p({stream:x,method:"streamEnd",params:{}})})}}),this._setSending(T,x),this._send(T)}),c)}aggregateTransferMany(e){return this._sendTransaction("aggregateTransferMany",e)}authenticationCheck(e){return this._sendTransaction("authenticationCheck",e!=null?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!=null?e:{})}createTransferMany(e){return this._sendTransaction("createTransferMany",e)}createWallet(e){return this._sendTransaction("createWallet",e)}createWithdrawal(e){return this._sendTransaction("createWithdrawal",e)}exportBalanceHistory(e){return this._sendTransaction("exportBalanceHistory",e)}exportTokenMany(e){return this._sendTransaction("exportTokenMany",e!=null?e:{})}exportTransferGroupMany(e){return this._sendTransaction("exportTransferGroupMany",e!=null?e:{})}exportTransferMany(e){return this._sendTransaction("exportTransferMany",e!=null?e:{})}exportWalletMany(e){return this._sendTransaction("exportWalletMany",e!=null?e:{})}findBalanceMany(e){return this._sendTransaction("findBalanceMany",e!=null?e:{})}findTokenMany(e){return this._sendTransaction("findTokenMany",e!=null?e:{})}findTransferGroupMany(e){return this._sendTransaction("findTransferGroupMany",e!=null?e:{})}findTransferMany(e){return this._sendTransaction("findTransferMany",e!=null?e:{})}findWalletMany(e){return this._sendTransaction("findWalletMany",e!=null?e:{})}finishTransaction(e){return this._sendTransaction("finishTransaction",e)}getBalance(e){return this._sendTransaction("getBalance",e)}getBalanceHistory(e){return this._sendTransaction("getBalanceHistory",e)}getExport(e){return this._sendTransaction("getExport",e)}getFlags(e){return this._sendTransaction("getFlags",e!=null?e:{})}getStatistics(e){return this._sendTransaction("getStatistics",e!=null?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)}healthcheck(e){return this._sendTransaction("healthcheck",e!=null?e:{})}importActions(e){return this._sendTransaction("importActions",e)}importActionsStream(e,r){if(e!==void 0&&!wc(e))throw new Te({input:e});return this._streamTransaction("importActions",$c,e,r)}listExportMany(e){return this._sendTransaction("listExportMany",e!=null?e:{})}queryLogs(e){return this._sendTransaction("queryLogs",e!=null?e:{})}resetDatabase(e){return this._sendTransaction("resetDatabase",e!=null?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!=null?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 Ic,S$=(Ic=window.WAPI_VERSION)!=null?Ic:"";function Zp(t,e){let r=jc(t,{timeout:e==null?void 0:e.connectingTimeout});return new Xp(r,t,e)}function jc(t,e){var F;let r=Object.assign({rejectUnauthorized:(F=t.rejectUnauthorized)!=null?F:!0,clientVersion:S$},t),n=Ef(r),a=new Of(...n),s,i,o=!1,p;a.onclose=m,a.onerror=c,a.onmessage=h;function m(y){if(M(`createConnection>close(reason:${y.reason},code:${y.code},wasClean:${y.wasClean})`),y.code===4030)return x(new Xe);x(new Error("WS closed"))}function c(y){M(`createConnection>error(message:${y.message},error:${y.error},type:${y.type})`),x(y.error)}function h(y){M(`createConnection>message(type:${y.type},data:${y.data})`);let{data:$}=y,D;try{D=JSON.parse($.toString())}catch(A){return M("Invalid JSON response",A),x(new Error("Invalid JSON response"))}if(D.result!=="ready")return M("Invalid first message"),x(new Error("Invalid first message - "+JSON.stringify(D)));x()}M(`createConnection>(message:setting up ws connection${e!=null&&e.timeout?" with timeout "+e.timeout:""})`);let T=e!=null&&e.timeout?setTimeout(()=>{x(new ce("CONNECTION_TIMEOUT",{timeout:e.timeout}))},e.timeout):void 0;function x(y){o||(clearTimeout(T),delete a.onmessage,delete a.onerror,delete a.onclose,y?(i(y),a.close()):s(p),o=!0)}let g=new Promise((y,$)=>{s=y,i=$});return{ws:a,$connect:g}}var Xp=class extends St{constructor(r,n,a){super(r.ws,"ws",r.$connect);this._tryToReconnect=!0;this._opts=n,this._connectionConfig=a,this.host=n.host,this.$connect.then(s=>(this.socId=s,this._ready())).catch(s=>{this.socId||this._setErrored(s)})}_setErrored(r){super._setErrored(r),(r instanceof Xe||"code"in r&&r.code===Z.AUTH.ERRORS.AUTHENTICATION_ERROR.code)&&(this._tryToReconnect=!1)}_ready(){this._setConnected(!0),this._connection.onmessage=r=>{let{data:n,type:a}=r;if(M(`message(type:${a},data:$0)`,n),a==="message"){let s=JSON.parse(n.toString());this._handleMessage(s),this._heartbeat()}},this._connection.onerror=r=>{let{message:n,error:a,type:s}=r;M(`error(message:$0,error:$1,type:${s})`,n,a)},this._connection.onclose=r=>{let{reason:n,code:a,wasClean:s}=r;M(`close(reason:$0,code:${a},wasClean:${s})`,n),this._setConnected(!1),clearTimeout(this._pingTimeout),this._connectionLost(),this._reconnect()},this._heartbeat()}_reconnect(r){if(M("reconnect(),tryToReconnect:",this._tryToReconnect),!this._tryToReconnect)return;if(this.hooks.reconnect&&this.hooks.reconnect()===!1){M("reconnect hook returned false");return}if(this.$connect){M("already connecting");return}super._clearError(),r!=null||(r=window.WAPI_RECONNECT_ATTEMPTS&&parseInt(window.WAPI_RECONNECT_ATTEMPTS)||10);let n=window.WAPI_MAX_RECONNECT_WAIT&&parseInt(window.WAPI_MAX_RECONNECT_WAIT)||1e4;this.$connect=ee(this,null,function*(){var s,i,o;let a;for(let p=0;p<r+1;p++)try{M("Trying to connect, attempt:",p);let{ws:m,$connect:c}=jc(this._opts,{timeout:(s=this._connectionConfig)==null?void 0:s.reconnectingTimeout});a=yield c,this.socId=a,this._connection=m,this._ready();break}catch(m){let c=m.code===Z.AUTH.ERRORS.AUTHENTICATION_ERROR.code,h=p>r-1;if(c||h){this._setErrored(m),(o=(i=this.hooks).reconnectError)==null||o.call(i,m);break}yield kf(Math.min(Math.pow(1.5,p)*1e3,n))}return a})}_heartbeat(){M("heartbeat"),clearTimeout(this._pingTimeout),this._pingTimeout=setTimeout(()=>{if(this._sending.size)return M("pingTimeout reached, but sending.size:",this._sending.size),this._heartbeat();M("timeout"),this._connection.close(),this._setConnected(!1),this._reconnect()},31e3)}_send(r){M("send()",r),this._connection.send(JSON.stringify(r))}close(){return ee(this,null,function*(){return M("close()"),this._tryToReconnect=!1,clearTimeout(this._pingTimeout),this._setConnected(!1),this._connection.close()})}};var ed=typeof globalThis!="undefined"&&globalThis||typeof self!="undefined"&&self||typeof ed!="undefined"&&ed,td=ed.fetch;function nd(t,e){let r=v$(t,{timeout:e==null?void 0:e.connectingTimeout});return new rd(r,t)}function v$(t,e){let r=t.host.replace(/^wss:/,"https:"),n="x-wapi-req-id";function a(p){return ee(this,null,function*(){M("http_createConnection>message(body:$0)",p)})}function s(p,m){return ee(this,null,function*(){let c=JSON.parse(p),T=yield(yield td(`${r}/api`,{keepalive:!0,method:"POST",headers:{Authorization:`Bearer ${m}`,[n]:c==null?void 0:c.id},body:p})).json();this.onmessage(q(b({},T),{id:c.id}))})}let i=et(),o=new Promise((p,m)=>{let c=new AbortController;M(`createConnection(sending http auth request${e!=null&&e.timeout?" with timeout "+e.timeout:""})`);let h=e!=null&&e.timeout?setTimeout(()=>{c.abort(),m(new ce("CONNECTION_TIMEOUT",{timeout:e.timeout}))},e.timeout):void 0;td(`${r}/api`,{method:"POST",headers:{Authorization:`Bearer ${t.jwt}`,[n]:i},body:JSON.stringify({jsonrpc:"2.0",method:"authenticationCheck",params:{},id:i}),signal:c.signal}).then(T=>T.json()).then(T=>{if(clearTimeout(h),T.error)throw new Error(T.error.message);p(void 0)}).catch(m)});return{send:s,onmessage:a,$connect:o}}var rd=class extends St{constructor(e,r){super(e,"https",e.$connect),this.host=r.host,this.jwt=r.jwt,this.$connect.then(()=>{this._ready()}).catch(n=>{this._setErrored(n)})}_send(e){M("send()",e),this._connection.send(JSON.stringify(e),this.jwt)}_ready(){this._setConnected(!0),this._connection.onmessage=e=>ee(this,null,function*(){M("http_message($0)>",e),this._handleMessage(e)})}close(){return ee(this,null,function*(){M("close()"),this._setConnected(!1)})}_reconnect(){return ee(this,null,function*(){M("reconnect()")})}};var ad=(i=>(i.year="year",i.month="month",i.week="week",i.day="day",i.hour="hour",i.minute="minute",i))(ad||{});var id=class t{constructor(e){this.filter=[];this.modifierFn=e}add(e){return this.filter.push(e),this}addWhere(e,r,n,a){if(typeof r=="object"){let s={};for(let[i,o]of Object.entries(r))s[i]=this.modifierFn?this.modifierFn(i,o):o;return this.add({function:e,value:s})}if(typeof r=="function"){let s=new t(this.modifierFn);return r.call(s,s),this.add({function:e,inner:s.toJSON().filter})}if(a!==void 0)return this.add({function:e,field:r,operator:n,value:a});if(typeof n=="object")return this.add({function:e,value:{[r]:n}});if(n!==void 0){let s=this.modifierFn?this.modifierFn(r,n):n;return this.add({function:e,field:r,value:s})}throw TypeError("Invalid input")}where(e,r,n){return this.addWhere("where",e,r,n)}orWhere(e,r,n){return this.addWhere("orWhere",e,r,n)}whereIn(e,r){return this.add({function:"whereIn",field:e,value:r})}orWhereIn(e,r){return this.add({function:"orWhereIn",field:e,value:r})}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,r,n){return n===void 0?this.add({function:"whereMetadata",field:e,operator:"=",value:r}):this.add({function:"whereMetadata",field:e,operator:r,value:n})}orWhereMetadata(e,r,n){return n===void 0?this.add({function:"orWhereMetadata",field:e,operator:"=",value:r}):this.add({function:"orWhereMetadata",field:e,operator:r,value:n})}whereMetadataIn(e,r){return this.add({function:"whereMetadataIn",field:e,value:r})}orWhereMetadataIn(e,r){return this.add({function:"orWhereMetadataIn",field:e,value:r})}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 sd(t){return t.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 Et=class extends id{constructor({start:r,modifiers:n,optionsModifiers:a}){super(n);this.optionsObject={};this.execFn=r,this.optionsModifiers=a}start(){return this.execFn(this.toJSON())}toJSON(){return q(b({},super.toJSON()),{options:b({},this.optionsObject)})}options(r){if(this.optionsModifiers===void 0)return this.optionsObject=b(b({},this.optionsObject),r),this;this.optionsObject=b({},this.optionsObject);for(let[n,a]of Object.entries(r))this.optionsObject[n]=this.optionsModifiers(n,a);return this}then(r,n){return this.start().then(r,n)}catch(r){return this.start().catch(r)}stream(){return this.start().stream()}},te=class extends Et{constructor({start:e,modifiers:r,optionsModifiers:n}){super({start:a=>e(a),modifiers:r,optionsModifiers:n})}limit(e){return this.optionsObject.limit=e,this}offset(e){return this.optionsObject.offset=e,this}orderBy(e,r,n){if(!Array.isArray(e)&&typeof e!="string")throw new TypeError("invalid input");if(Array.isArray(e))return this.optionsObject.order=sd(e),this;if(!e.includes(" "))return this.optionsObject.order=sd([{column:e,order:r||"asc",nulls:n}]),this;let[a,s,i,o]=e.split(" ");if(s!=="asc"&&s!=="desc")throw new TypeError("invalid order");let p={column:a,order:s};if(i==="nulls"){if(!["first","last"].includes(o))throw new TypeError("invalid nulls order");p.nulls=o}return this.optionsObject.order=sd([e]),this}select(...e){return this.optionsObject.select=e,this}deselect(...e){return this.optionsObject.deselect=e,this}};function vt(t,e){if(!e)return{function:t,alias:t};if(!e.includes(" "))return{function:t,field:e,alias:t};if(!e.includes(" as "))throw new L("UNCLEAR_AGGREGATOR",{input:e});let[r,n]=e.split(" as ");return{function:t,field:r,alias:n||r}}var Hi=class extends Et{constructor({start:r,modifiers:n,optionsModifiers:a}){super({start:s=>r(s),modifiers:n,optionsModifiers:a});this.aggregatorObject={aggregators:[]};this.timezoneString=""}toJSON(){return q(b({},super.toJSON()),{aggregators:JSON.parse(JSON.stringify(this.aggregatorObject.aggregators)),groups:JSON.parse(JSON.stringify(this.aggregatorObject.groups||[]))})}timezone(r){return this.timezoneString=r,this.aggregatorObject.groups&&Array.isArray(this.aggregatorObject.groups)&&this.aggregatorObject.groups.forEach(n=>{n.type==="period"&&(n.field={period:n.field,timezone:r})}),this}groupBy(r,...n){let a={};if(typeof r!="string")throw new TypeError("expected string as input, got"+typeof r);let[s,i]=r.split(" as ");if(ad.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(r){return this.aggregatorObject.aggregators.push(vt("count",r)),this}distinct(r){return this.aggregatorObject.aggregators.push(vt("countDistinct",r)),this}avg(r){return this.aggregatorObject.aggregators.push(vt("average",r)),this}min(r){return this.aggregatorObject.aggregators.push(vt("min",r)),this}max(r){return this.aggregatorObject.aggregators.push(vt("max",r)),this}sum(r){return this.aggregatorObject.aggregators.push(vt("sum",r)),this}},Gt=class extends Et{constructor({start:r,modifiers:n,optionsModifiers:a}){super({start:r,modifiers:n,optionsModifiers:a});this.updateObject={}}toJSON(){return q(b({},super.toJSON()),{update:JSON.parse(JSON.stringify(this.updateObject))})}update(r){return this.updateObject=Object.assign(this.updateObject,r),this}},Vi=class extends Et{constructor({start:r,modifiers:n,optionsModifiers:a}){super({start:r,modifiers:n,optionsModifiers:a});this.reverseModifications={}}toJSON(){return q(b({},super.toJSON()),{reverse:JSON.parse(JSON.stringify(this.reverseModifications))})}reverse(r){return this.reverseModifications=Object.assign(this.reverseModifications,r),this}};var E$=_("AggregateTransfersFnInput");function od(t,e,r){let{client:n}=t;if(e===void 0)return new Hi({start(g){return n.api.aggregateTransferMany({transfer:g.filter,options:g.options,groups:g.groups,aggregators:g.aggregators})},modifiers(g,F){return["token","wallet","from_wallet","to_wallet"].includes(g)?O(F):g==="transfer_group"?R(F):F}});let{inputCopy:a,error:s}=w({input:e,options:r,validate:E$});if(s)throw s;let{token:i,wallet:o,from_wallet:p,to_wallet:m,transfer_group:c,status:h,metadata:T}=a,x={token:O(i),wallet:O(o),from_wallet:O(p),to_wallet:O(m),transfer_group:R(c),status:h,metadata:T};return n.api.aggregateTransferMany({transfer:x,groups:a.groups,aggregators:a.aggregators})}var G$=new Map(Object.entries({aggregateTransfers:"aggregateTransferMany",exportTokens:"exportTokenMany",exportTransferGroups:"exportTransferGroupMany",exportTransfers:"exportTransferMany",exportWallets:"exportWalletMany",findBalances:"findBalanceMany",findTokens:"findTokenMany",findTransferGroups:"findTransferGroupMany",findTransfers:"findTransferMany",findWallets:"findWalletMany",listExports:"listExportMany"})),C$=_("CreateAccessTokenFnInput");function pd(t,e,r){var i;let{client:n}=t,{inputCopy:a,error:s}=w({input:e,options:r,validate:C$});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 p;return(p=G$.get(o))!=null?p:o})))),n.api.createAccessToken({token:a.token,options:r})}var R$=_("CreateContractFnInput");function dd(t,e,r){let{client:n}=t,{inputCopy:a,error:s}=w({input:e,options:r,validate:R$});if(s)throw s;let i={token:{foreign:a.foreign+"",metadata:a.metadata,owner:O(a.owner),deposits:[{token:O(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:O(a.buyer.wallet),amount:a.buyer.amount||a.value_amount,from_token:O(a.buyer.token||a.value_token),metadata:a.buyer.metadata}),n.api.createContract(i)}var M$=_("CreateDepositFnInput");function fd(t,e,r){let{client:n}=t,a=Ee(e,"token",n.getConfig("token")),{inputCopy:s,error:i}=w({input:a,options:r,validate:M$});if(i)throw i;let o=s.token||n.getConfig("token");if(o===void 0)throw new L("INPUT_NEEDS_TOKEN",{input:e});let p=s.options;delete s.options;let m=q(b({},s),{identifier:s.identifier,transfer_group:R(s.transfer_group),token:O(o),to_wallet:O(s.wallet),type:"deposit"});return m.identifier||(m.identifier=fe(m)),n.api.createTransfer({transfer:m,options:di(p,{return_balance:"return_to_balance",create_wallet_if_not_exists:"create_to_wallet_if_not_exists"})})}var ud=(r=>(r.whereMetadata="whereMetadata",r.orWhereMetadata="orWhereMetadata",r))(ud||{}),ld=(r=>(r.where="where",r.orWhere="orWhere",r))(ld||{}),cd=(r=>(r.whereIn="whereIn",r.orWhereIn="orWhereIn",r))(cd||{}),md=(r=>(r.whereMetadataIn="whereMetadataIn",r.orWhereMetadataIn="orWhereMetadataIn",r))(md||{}),hd=(a=>(a.whereMetadataNull="whereMetadataNull",a.orWhereMetadataNull="orWhereMetadataNull",a.whereMetadataNotNull="whereMetadataNotNull",a.orWhereMetadataNotNull="orWhereMetadataNotNull",a))(hd||{}),_d=(a=>(a.whereNull="whereNull",a.orWhereNull="orWhereNull",a.whereNotNull="whereNotNull",a.orWhereNotNull="orWhereNotNull",a))(_d||{}),gd=(t=>(t["="]="=",t[">="]=">=",t["<="]="<=",t["<"]="<",t[">"]=">",t))(gd||{}),Td=(r=>(r.like="like",r.ilike="ilike",r))(Td||{}),yd=(r=>(r["="]="=",r[">="]=">=",r["<="]="<=",r["<"]="<",r[">"]=">",r.like="like",r.ilike="ilike",r))(yd||{}),Fd=(a=>(a.value="value",a.share="share",a.group="group",a.contract="contract",a))(Fd||{}),xd=(r=>(r.active="active",r["dw-only"]="dw-only",r.disabled="disabled",r))(xd||{}),bd=(r=>(r.open="open",r.closed="closed",r))(bd||{}),Od=(n=>(n.pending="pending",n.finished="finished",n.cancelled="cancelled",n))(Od||{}),$d=(r=>(r.pending="pending",r.finished="finished",r))($d||{}),wd=(n=>(n.regular="regular",n.exchange="exchange",n.distribution="distribution",n))(wd||{}),Id=(n=>(n.transfer="transfer",n.deposit="deposit",n.withdrawal="withdrawal",n))(Id||{}),jd=(n=>(n.token="token",n.house="house",n.regular="regular",n))(jd||{}),kd=(r=>(r.active="active",r.disabled="disabled",r))(kd||{}),Sd=(r=>(r.flag="flag",r.setting="setting",r))(Sd||{}),vd=(o=>(o.Token="Token",o.TransferGroup="TransferGroup",o.TransferLog="TransferLog",o.Transfer="Transfer",o.WalletTokenSetting="WalletTokenSetting",o.Wallet="Wallet",o.WapiSetting="WapiSetting",o))(vd||{});var P$=_("CreateExchangeFnInput");function Ed(t,e,r){var o,p,m,c,h;let{client:n}=t,{inputCopy:a,error:s}=w({input:e,options:r,validate:P$});if(s)throw s;let i=a.options;return delete a.options,(o=a.identifier)!=null||(a.identifier=fe(a)),n.api.createTransferGroup({transfer_group:{identifier:a.identifier,status:"closed",transfer_status:(p=a.status)!=null?p:"pending",metadata:a.metadata,children:[{identifier:(m=a.from_identifier)!=null?m:fe(),from_wallet:O(a.from_wallet),to_wallet:O(a.to_wallet),token:O(a.from_token),type:a.from_wallet?"transfer":"deposit",amount:a.from_amount,metadata:a.metadata,force:a.force},{identifier:(c=a.to_identifier)!=null?c:fe(),from_wallet:O(a.to_wallet),to_wallet:O(a.from_wallet),token:O(a.to_token),type:a.to_wallet?"transfer":"deposit",amount:(h=a.to_amount)!=null?h:a.from_amount,metadata:a.metadata,force:a.force}]},options:i})}var W$=_("CreateTokenFnInput");function Gd(t,e,r){let{client:n}=t,{inputCopy:a,error:s}=w({input:e,options:r,validate:W$});if(s)throw s;let i=a.options;return delete a.options,n.api.createToken({token:q(b({},a),{belongs_to:O(a.belongs_to)}),options:i})}var D$=_("CreateTransferFnInput");function Cd(t,e,r){let{client:n}=t,a=Ee(e,"token",n.getConfig("token")),{inputCopy:s,error:i}=w({input:a,options:r,validate:D$});if(i)throw i;let o=ni(s,n.getConfig("token"));return o.identifier||(o.identifier=fe(o)),n.api.createTransfer({transfer:o,options:s.options})}function ni(t,e){t.type=t.type||"transfer";let r={identifier:t.identifier,token:O(t.token||e),amount:t.amount,metadata:t.metadata,status:t.status,type:t.type,transfer_group:R(t.transfer_group),created_at:t.created_at};if(t.type==="transfer")return t.latest_control_hash&&console.warn("deprecated: latest_control_hash is deprecated"),q(b({},r),{from_wallet:O(t.from_wallet),to_wallet:O(t.to_wallet)});if(t.type==="withdrawal")return t.latest_control_hash&&console.warn("deprecated: latest_control_hash is deprecated"),q(b({},r),{from_wallet:O(t.wallet)});if(t.type==="deposit")return q(b({},r),{to_wallet:O(t.wallet)})}var A$=_("CreateTransferGroupFnInput");function Rd(t,e,r){let{client:n}=t,{inputCopy:a,error:s}=w({input:e,options:r,validate:A$});if(s)throw s;let i=JSON.parse(JSON.stringify(a));return delete i.options,i.children&&(i.children=i.children.map(o=>ni(o,n.getConfig("token")))),i.identifier||(i.identifier=fe(i)),n.api.createTransferGroup({transfer_group:i,options:a.options})}var N$=_("CreateTransfersFnInput");function Md(t,e,r){let{client:n}=t,{inputCopy:a,error:s}=w({input:e,options:r,validate:N$});if(s)throw s;let i=a.transfers.map(o=>ni(o,n.getConfig("token")));for(let o of i)o.identifier||(o.identifier=fe(o));return n.api.createTransferMany({transfers:i,options:a.options})}var U$=_("CreateWalletFnInput");function Pd(t,e,r){let{client:n}=t,{inputCopy:a,error:s}=w({input:e,options:r,validate:U$});if(s)throw s;let i=a.options;return delete a.options,n.api.createWallet({wallet:b({},a),options:i})}var q$=_("CreateWithdrawalFnInput");function Wd(t,e,r){let{client:n}=t,a=Ee(e,"token",n.getConfig("token")),{inputCopy:s,error:i}=w({input:a,options:r,validate:q$});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 p=s.token||n.getConfig("token");if(p===void 0)throw new L("INPUT_NEEDS_TOKEN",{input:e});let m=q(b({},s),{identifier:s.identifier,transfer_group:R(s.transfer_group),token:O(p),from_wallet:O(s.wallet),type:"withdrawal"});return m.identifier||(m.identifier=fe(m)),n.api.createTransfer({transfer:m,options:di(o,{return_balance:"return_from_balance"})})}var B$=_("ExportBalanceHistoryFnInput");function Dd(t,e,r){let{client:n}=t,{inputCopy:a,error:s}=w({input:e,options:r,validate:B$});if(s)throw s;let i=a.token||n.getConfig("token");if(i===void 0)throw new L("INPUT_NEEDS_TOKEN",{input:e});return n.api.exportBalanceHistory({balance:{wallet:O(a.wallet),token:O(i)},options:r})}var L$=_("ExportTokensFnInput");function Ad(t,e,r){var m,c;let{client:n}=t;if(e===void 0)return new te({start(h){return n.api.exportTokenMany({token:h.filter,options:h.options})},modifiers(h,T){return["belongs_to"].includes(h)?O(T):T}});let{inputCopy:a,error:s}=w({input:e,options:r,validate:L$});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=O(a.belongs_to));let o=(m=a.options)==null?void 0:m.order_by;(c=a.options)==null||delete c.order_by;let p=b({},a.options);return!p.order&&o&&(p.order=ne(o)),n.api.exportTokenMany({token:i,options:p})}var H$=_("ExportTransferGroupsFnInput");function Nd(t,e,r){var g,F;let{client:n}=t;if(e===void 0)return new te({start(y){return n.api.exportTransferGroupMany({transfer_group:y.filter,options:y.options})},modifiers(y,$){return["transfer_group","reverses"].includes(y)?R($):$}});let{inputCopy:a,error:s}=w({input:e,options:r,validate:H$});if(s)throw s;let{identifier:i,transfer_status:o,status:p,metadata:m,type:c}=a,h={identifier:i,transfer_status:o,status:p,metadata:m,type:c};a.reverses&&(h.reverses=R(a.reverses));let T=(g=a.options)==null?void 0:g.order_by;(F=a.options)==null||delete F.order_by;let x=b({},a.options);return!x.order&&T&&(x.order=ne(T)),n.api.exportTransferGroupMany({transfer_group:h,options:x})}var V$=_("ExportTransfersFnInput");function Ud(t,e,r){var F;let{client:n}=t;if(e===void 0)return new te({start(y){return n.api.exportTransferMany({transfer:y.filter,options:y.options})},modifiers(y,$){return["token","wallet","from_wallet","to_wallet"].includes(y)?O($):y==="transfer_group"?R($):$}});let{inputCopy:a,error:s}=w({input:e,options:r,validate:V$});if(s)throw s;let{token:i,wallet:o,from_wallet:p,to_wallet:m}=a,c={token:O(i),wallet:O(o),from_wallet:O(p),to_wallet:O(m)};a.transfer_group&&(c.transfer_group=R(a.transfer_group)),a.status&&(c.status=a.status),a.metadata&&(c.metadata=a.metadata),(F=a.options)!=null||(a.options={});let h=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 L("CONFLICTING_OPTIONS_FOR_BALANCE",{options:a.options});if(!c.wallet)throw new L("RUNNING_BALANCE_WITHOUT_WALLET",{input:a});a.options.return_running_balance_for_wallet=a.wallet}let T=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 L("CONFLICTING_OPTIONS_FOR_SIGNED_AMOUNT",{options:a.options});if(!c.wallet)throw new L("SIGNED_AMOUNT_WITHOUT_WALLET",{input:a});a.options.return_signed_amount_for_wallet=a.wallet}let x=a.options.return_signed_amount_for_wallet;delete a.options.return_signed_amount_for_wallet;let g=b({},a.options);return!g.order&&h&&(g.order=ne(h)),T&&(g.return_running_balance_for_wallet=O(T)),x&&(g.return_signed_amount_for_wallet=O(x)),n.api.exportTransferMany({transfer:c,options:g})}var z$=_("ExportWalletsFnInput");function qd(t,e,r){var c;let{client:n}=t;if(e===void 0)return new te({start(h){return n.api.exportWalletMany({wallet:h.filter,options:h.options})},optionsModifiers(h,T){return h==="include_balance_for_token"&&typeof T!="object"?O(T):T}});let{inputCopy:a,error:s}=w({input:e,options:r,validate:z$});if(s)throw s;let i=(c=a.options)!=null?c:{};delete a.options;let o=b({},a),p=i.order_by;delete i.order_by;let m=b({},i);return!m.order&&p&&(m.order=ne(p)),n.api.exportWalletMany({wallet:o,options:m})}var J$=_("FindBalancesFnInput");function Bd(t,e,r){var m,c;let{client:n}=t;if(e===void 0)return new te({start(h){return n.api.findBalanceMany({balance:h.filter,options:h.options})},modifiers(h,T){return["wallet","token"].includes(h)?O(T):T}});let{inputCopy:a,error:s}=w({input:e,options:r,validate:J$});if(s)throw s;let i={};a.wallet&&(i.wallet=O(a.wallet)),a.token&&(i.token=O(a.token));let o=(m=a.options)==null?void 0:m.order_by;(c=a.options)==null||delete c.order_by;let p=b({},a.options);return!p.order&&o&&(p.order=ne(o)),n.api.findBalanceMany({balance:i,options:p})}var Q$=_("FindTokensFnInput");function Ld(t,e,r){var m,c;let{client:n}=t;if(e===void 0)return new te({start(h){return n.api.findTokenMany({token:h.filter,options:h.options})},modifiers(h,T){return["belongs_to"].includes(h)?O(T):T}});let{inputCopy:a,error:s}=w({input:e,options:r,validate:Q$});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=O(a.belongs_to));let o=(m=a.options)==null?void 0:m.order_by;(c=a.options)==null||delete c.order_by;let p=b({},a.options);return!p.order&&o&&(p.order=ne(o)),n.api.findTokenMany({token:i,options:p})}var K$=_("FindTransferGroupsFnInput");function Hd(t,e,r){var g,F;let{client:n}=t;if(e===void 0)return new te({start(y){return n.api.findTransferGroupMany({transfer_group:y.filter,options:y.options})},modifiers(y,$){return["transfer_group","reverses"].includes(y)?R($):$}});let{inputCopy:a,error:s}=w({input:e,options:r,validate:K$});if(s)throw s;let{identifier:i,transfer_status:o,status:p,metadata:m,type:c}=a,h={identifier:i,transfer_status:o,status:p,metadata:m,type:c};a.reverses&&(h.reverses=R(a.reverses));let T=(g=a.options)==null?void 0:g.order_by;(F=a.options)==null||delete F.order_by;let x=b({},a.options);return!x.order&&T&&(x.order=ne(T)),n.api.findTransferGroupMany({transfer_group:h,options:x})}var Y$=_("FindTransfersFnInput");function Vd(t,e,r){var F;let{client:n}=t;if(e===void 0)return new te({start(y){return n.api.findTransferMany({transfer:y.filter,options:y.options})},modifiers(y,$){return["token","wallet","from_wallet","to_wallet"].includes(y)?O($):y==="transfer_group"?R($):$}});let{inputCopy:a,error:s}=w({input:e,options:r,validate:Y$});if(s)throw s;let{token:i,wallet:o,from_wallet:p,to_wallet:m}=a,c={token:O(i),wallet:O(o),from_wallet:O(p),to_wallet:O(m)};a.transfer_group&&(c.transfer_group=R(a.transfer_group)),a.status&&(c.status=a.status),a.metadata&&(c.metadata=a.metadata),(F=a.options)!=null||(a.options={});let h=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 L("CONFLICTING_OPTIONS_FOR_BALANCE",{options:a.options});if(!c.wallet)throw new L("RUNNING_BALANCE_WITHOUT_WALLET",{input:a});a.options.return_running_balance_for_wallet=a.wallet}let T=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 L("CONFLICTING_OPTIONS_FOR_SIGNED_AMOUNT",{options:a.options});if(!c.wallet)throw new L("SIGNED_AMOUNT_WITHOUT_WALLET",{input:a});a.options.return_signed_amount_for_wallet=a.wallet}let x=a.options.return_signed_amount_for_wallet;delete a.options.return_signed_amount_for_wallet;let g=b({},a.options);return!g.order&&h&&(g.order=ne(h)),T&&(g.return_running_balance_for_wallet=O(T)),x&&(g.return_signed_amount_for_wallet=O(x)),n.api.findTransferMany({transfer:c,options:g})}var X$=_("FindWalletsFnInput");function zd(t,e,r){var c;let{client:n}=t;if(e===void 0)return new te({start(h){return n.api.findWalletMany({wallet:h.filter,options:h.options})},optionsModifiers(h,T){return h==="include_balance_for_token"&&typeof T!="object"?O(T):T}});let{inputCopy:a,error:s}=w({input:e,options:r,validate:X$});if(s)throw s;let i=(c=a.options)!=null?c:{};delete a.options;let o=b({},a),p=i.order_by;delete i.order_by;let m=b({},i);return!m.order&&p&&(m.order=ne(p)),n.api.findWalletMany({wallet:o,options:m})}var Z$=_("GetBalanceFnInput");function Jd(t,e,r){let{client:n}=t,a=Ee(e,"token",n.getConfig("token")),{inputCopy:s,error:i}=w({input:a,options:r,validate:Z$});if(i)throw i;if(s.datetime&&Rf(s.datetime))throw new L("BAL_FUTURE_DATETIME",{input:s});let o=s.token||n.getConfig("token");if(o===void 0)throw new L("INPUT_NEEDS_TOKEN",{input:s});return n.api.getBalance({balance:{wallet:O(s.wallet),token:O(o),datetime:s.datetime},options:s.options})}var ew=_("GetBalanceHistoryFnInput");function Qd(t,e,r){let{client:n}=t,{inputCopy:a,error:s}=w({input:e,options:r,validate:ew});if(s)throw s;let i=a.token||n.getConfig("token");if(i===void 0)throw new L("INPUT_NEEDS_TOKEN",{input:e});return n.api.getBalanceHistory({balance:{wallet:O(a.wallet),token:O(i),datetime:a.datetime},options:a.options})}var tw=_("GetExportFnInput");function Kd(t,e,r){let{client:n}=t,{inputCopy:a,error:s}=w({input:e,options:r,validate:tw});if(s)throw s;return n.api.getExport({export:{identifier:a.identifier},options:a.options})}var rw=_("GetFlagsFnInput");function Yd(t,e,r){let{client:n}=t,{error:a,inputCopy:s}=w({input:e||{},options:r,validate:rw});if(a)throw a;return n.api.getFlags({options:s.options})}var nw=_("GetStatisticsFnInput");function Xd(t,e,r){let{client:n}=t,{inputCopy:a,error:s}=w({input:e||{},options:r,validate:nw});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 aw=_("GetTokenFnInput");function Zd(t,e={},r){let{client:n}=t,a=Ee(e,"foreign",n.getConfig("token")),{inputCopy:s,error:i}=w({input:a,options:r,validate:aw});if(i)throw i;let o=s.foreign||n.getConfig("token");if(o===void 0)throw new L("INPUT_NEEDS_TOKEN",{input:e});return n.api.getToken({token:O(o),options:s.options})}var sw=_("GetTransferFnInput");function ef(t,e,r){let{client:n}=t,{inputCopy:a,error:s}=w({input:e,options:r,validate:sw});if(s)throw s;return n.api.getTransfer({transfer:R(a.transfer),options:a.options})}var iw=_("GetTransferGroupFnInput");function tf(t,e,r){let{client:n}=t,{inputCopy:a,error:s}=w({input:e,options:r,validate:iw});if(s)throw s;return n.api.getTransferGroup({transfer_group:R(a.transfer_group),options:a.options})}var ow=_("GetWalletFnInput");function rf(t,e,r){let{client:n}=t,{inputCopy:a,error:s}=w({input:e,options:r,validate:ow});if(s)throw s;return n.api.getWallet({wallet:O(a.wallet),options:a.options})}var pw=_("HealthcheckFnInput");function nf(t,e,r){let{client:n}=t,{inputCopy:a,error:s}=w({input:e,options:r,validate:pw});if(s)throw s;return n.api.healthcheck({options:b(b({},a.options),r)})}var dw=_("ImportDataFnInput");function kc(t){let{error:e}=dw(t);return e===void 0}var YA=_("ImportDataFnOutput");var XA=_("ImportDataFnStreamChunk");var fw=_("ImportDataFnOptions");function Sc(t){let{error:e}=fw(t);return e===void 0}function af(){throw new Error("import-data available only in node client")}var uw=_("ListExportsFnInput");function sf(t,e,r){let{client:n}=t,{inputCopy:a,error:s}=w({input:e,options:r,validate:uw});if(s)throw s;let i=Cf(a==null?void 0:a.date);return r=Gf(r),n.api.listExportMany({export:{date:i,type:a.type},options:r})}var lw=_("ReverseTransferFnInput");function of(t,e,r){let{client:n}=t,{inputCopy:a,error:s}=w({input:e,options:r,validate:lw});if(s)throw s;return a.extend_metadata&&console.warn("deprecated: extend_metadata is deprecated. Use metadata_action instead"),n.api.reverseTransfer({transfer:R(a.transfer),reverse:{force:a.force,metadata:a.metadata,extend_metadata:a.extend_metadata,identifier:a.identifier,status:a.status},options:a.options})}var cw=_("ReverseTransferGroupFnInput");function pf(t,e,r){let{client:n}=t,{inputCopy:a,error:s}=w({input:e,options:r,validate:cw});if(s)throw s;return a.extend_metadata&&console.warn("deprecated: extend_metadata is deprecated. Use metadata_action instead"),n.api.reverseTransferGroup({transfer_group:R(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 mw=_("ReverseTransfersFnInput");function df(t,e,r){let{client:n}=t;if(e===void 0)return new Vi({start(h){return n.api.reverseTransferMany({transfer:h.filter,reverse:h.reverse,options:h.options})},modifiers(h,T){return["token","wallet","from_wallet","to_wallet"].includes(h)?O(T):h==="transfer_group"?R(T):T}});let{inputCopy:a,error:s}=w({input:e,options:r,validate:mw});if(s)throw s;let{token:i,wallet:o,from_wallet:p,to_wallet:m}=a,c={token:O(i),wallet:O(o),from_wallet:O(p),to_wallet:O(m)};return a.transfer_group&&(c.transfer_group=R(a.transfer_group)),a.status&&(c.status=a.status),a.metadata&&(c.metadata=a.metadata),n.api.reverseTransferMany({transfer:c,reverse:a.reverse,options:a.options})}var hw=_("SetFlagsFnInput");function ff(t,e,r){let{client:n}=t,{inputCopy:a,error:s}=w({input:e,options:r,validate:hw});if(s)throw s;let i=Object.keys(ut.definitions.Flags.properties),o={};if(i.forEach(p=>{p in a&&(o[p]=a[p])}),Object.keys(o).length<1)throw new L("REQUIRED_INPUT_MISSING",{requiredOneOf:i,input:e});return n.api.setFlags({flags:o,options:a.options})}var _w=_("UpdateTokenFnInput");function uf(t,e,r){let{client:n}=t,{inputCopy:a,error:s}=w({input:e,options:r,validate:_w});if(s)throw s;return n.api.updateToken({token:O(a.token),update:{public:a.public,metadata:a.metadata,status:a.status},options:a.options})}var gw=_("UpdateTransferFnInput");function lf(t,e,r){let{client:n}=t,{inputCopy:a,error:s}=w({input:e,options:r,validate:gw});if(s)throw s;return n.api.updateTransfer({transfer:R(a.transfer),update:{status:a.status,metadata:a.metadata,extend_metadata:a.extend_metadata},options:a.options})}var Tw=_("UpdateTransferGroupFnInput");function cf(t,e,r){let{client:n}=t,{inputCopy:a,error:s}=w({input:e,options:r,validate:Tw});if(s)throw s;return n.api.updateTransferGroup({transfer_group:R(a.transfer_group),update:{transfer_status:a.transfer_status,status:a.status,metadata:a.metadata},options:a.options})}var yw=_("UpdateTransferGroupsFnInput");function mf(t,e,r){let{client:n}=t;if(e===void 0)return new Gt({start(T){return n.api.updateTransferGroupMany({transfer_group:T.filter,update:T.update,options:T.options})},modifiers(T,x){return["transfer_group","reverses"].includes(T)?R(x):x}});let{inputCopy:a,error:s}=w({input:e,options:r,validate:yw});if(s)throw s;let{transfer_status:i,status:o,metadata:p,type:m,update:c}=a,h={transfer_status:i,status:o,metadata:p,type:m};return a.reverses&&(h.reverses=R(a.reverses)),n.api.updateTransferGroupMany({transfer_group:h,update:c,options:a.options})}var Fw=_("UpdateTransfersFnInput");function hf(t,e,r){let{client:n}=t;if(e===void 0)return new Gt({start(h){return n.api.updateTransferMany({transfer:h.filter,update:h.update,options:h.options})},modifiers(h,T){return["token","wallet","from_wallet","to_wallet"].includes(h)?O(T):h==="transfer_group"?R(T):T}});let{inputCopy:a,error:s}=w({input:e,options:r,validate:Fw});if(s)throw s;let{token:i,wallet:o,from_wallet:p,to_wallet:m}=a,c={token:O(i),wallet:O(o),from_wallet:O(p),to_wallet:O(m)};return a.transfer_group&&(c.transfer_group=R(a.transfer_group)),a.status&&(c.status=a.status),a.metadata&&(c.metadata=a.metadata),n.api.updateTransferMany({transfer:c,update:a.update,options:a.options})}var xw=_("UpdateWalletFnInput");function _f(t,e,r){let{client:n}=t,{inputCopy:a,error:s}=w({input:e,options:r,validate:xw});if(s)throw s;return n.api.updateWallet({wallet:O(a.wallet),update:{metadata:a.metadata,status:a.status,name:a.name},options:a.options})}var bw={aggregateTransfers:_("AggregateTransfersFnInput"),createAccessToken:_("CreateAccessTokenFnInput"),createContract:_("CreateContractFnInput"),createDeposit:_("CreateDepositFnInput"),createExchange:_("CreateExchangeFnInput"),createToken:_("CreateTokenFnInput"),createTransfer:_("CreateTransferFnInput"),createTransferGroup:_("CreateTransferGroupFnInput"),createTransfers:_("CreateTransfersFnInput"),createWallet:_("CreateWalletFnInput"),createWithdrawal:_("CreateWithdrawalFnInput"),exportBalanceHistory:_("ExportBalanceHistoryFnInput"),exportTokens:_("ExportTokensFnInput"),exportTransferGroups:_("ExportTransferGroupsFnInput"),exportTransfers:_("ExportTransfersFnInput"),exportWallets:_("ExportWalletsFnInput"),findBalances:_("FindBalancesFnInput"),findTokens:_("FindTokensFnInput"),findTransferGroups:_("FindTransferGroupsFnInput"),findTransfers:_("FindTransfersFnInput"),findWallets:_("FindWalletsFnInput"),getBalance:_("GetBalanceFnInput"),getBalanceHistory:_("GetBalanceHistoryFnInput"),getExport:_("GetExportFnInput"),getFlags:_("GetFlagsFnInput"),getStatistics:_("GetStatisticsFnInput"),getToken:_("GetTokenFnInput"),getTransfer:_("GetTransferFnInput"),getTransferGroup:_("GetTransferGroupFnInput"),getWallet:_("GetWalletFnInput"),healthcheck:_("HealthcheckFnInput"),importData:_("ImportDataFnInput"),listExports:_("ListExportsFnInput"),reverseTransfer:_("ReverseTransferFnInput"),reverseTransferGroup:_("ReverseTransferGroupFnInput"),reverseTransfers:_("ReverseTransfersFnInput"),setFlags:_("SetFlagsFnInput"),updateToken:_("UpdateTokenFnInput"),updateTransfer:_("UpdateTransferFnInput"),updateTransferGroup:_("UpdateTransferGroupFnInput"),updateTransferGroups:_("UpdateTransferGroupsFnInput"),updateTransfers:_("UpdateTransfersFnInput"),updateWallet:_("UpdateWalletFnInput")},j={aggregateTransfers:od,createAccessToken:pd,createContract:dd,createDeposit:fd,createExchange:Ed,createToken:Gd,createTransfer:Cd,createTransferGroup:Rd,createTransfers:Md,createWallet:Pd,createWithdrawal:Wd,exportBalanceHistory:Dd,exportTokens:Ad,exportTransferGroups:Nd,exportTransfers:Ud,exportWallets:qd,findBalances:Bd,findTokens:Ld,findTransferGroups:Hd,findTransfers:Vd,findWallets:zd,getBalance:Jd,getBalanceHistory:Qd,getExport:Kd,getFlags:Yd,getStatistics:Xd,getToken:Zd,getTransfer:ef,getTransferGroup:tf,getWallet:rf,healthcheck:nf,importData:af,listExports:sf,reverseTransfer:of,reverseTransferGroup:pf,reverseTransfers:df,setFlags:ff,updateToken:uf,updateTransfer:lf,updateTransferGroup:cf,updateTransferGroups:mf,updateTransfers:hf,updateWallet:_f},vc=(C=>(C.aggregateTransfers="aggregateTransfers",C.createAccessToken="createAccessToken",C.createContract="createContract",C.createDeposit="createDeposit",C.createExchange="createExchange",C.createToken="createToken",C.createTransfer="createTransfer",C.createTransferGroup="createTransferGroup",C.createTransfers="createTransfers",C.createWallet="createWallet",C.createWithdrawal="createWithdrawal",C.exportBalanceHistory="exportBalanceHistory",C.exportTokens="exportTokens",C.exportTransferGroups="exportTransferGroups",C.exportTransfers="exportTransfers",C.exportWallets="exportWallets",C.findBalances="findBalances",C.findTokens="findTokens",C.findTransferGroups="findTransferGroups",C.findTransfers="findTransfers",C.findWallets="findWallets",C.getBalance="getBalance",C.getBalanceHistory="getBalanceHistory",C.getExport="getExport",C.getFlags="getFlags",C.getStatistics="getStatistics",C.getToken="getToken",C.getTransfer="getTransfer",C.getTransferGroup="getTransferGroup",C.getWallet="getWallet",C.healthcheck="healthcheck",C.importData="importData",C.listExports="listExports",C.reverseTransfer="reverseTransfer",C.reverseTransferGroup="reverseTransferGroup",C.reverseTransfers="reverseTransfers",C.setFlags="setFlags",C.updateToken="updateToken",C.updateTransfer="updateTransfer",C.updateTransferGroup="updateTransferGroup",C.updateTransferGroups="updateTransferGroups",C.updateTransfers="updateTransfers",C.updateWallet="updateWallet",C))(vc||{}),Ec=(a=>(a.findTokens="findTokens",a.findTransferGroups="findTransferGroups",a.findTransfers="findTransfers",a.findWallets="findWallets",a))(Ec||{});var Gc,Ow=(Gc=window.WAPI_VERSION)!=null?Gc:"",Ct=class{constructor(e,r){this.config={};this.api=e,this.$connect=e.$connect,r&&this.configure(b(b(b(b(b({},r.token&&{token:r.token}),r.sendingTimeout&&{sendingTimeout:r.sendingTimeout}),r.connectingTimeout&&{connectingTimeout:r.connectingTimeout}),r.reconnectingTimeout&&{reconnectingTimeout:r.reconnectingTimeout}),r.hooks&&{hooks:r.hooks}))}close(){return ee(this,null,function*(){return this.api.close()})}version(){return Ow}setHook(e,r){if(typeof r!="function")throw new TypeError("Hooks can only be functions");return this.api.hooks[e]=r,this}configure(e){if(e.token&&typeof e.token!="string"&&typeof e.token!="number")throw new ce("CONFIG_INVALID",{field:"token",error:`Must be a string|number, '${e.token}' provided`});["sendingTimeout","connectingTimeout","reconnectingTimeout"].forEach(n=>{if(e[n]&&typeof e[n]!="number")throw new ce("CONFIG_INVALID",{field:n,error:`Must be a number, '${e[n]}' provided`})});let r=e.hooks;if(delete e.hooks,this.config=b(b({},this.config),e),this.config.sendingTimeout&&(this.api.sendingTimeout=this.config.sendingTimeout),r)for(let[n,a]of Object.entries(r))this.setHook(n,a);return this}getConfig(e){return this.config[e]}aggregateTransfers(e,r){return e===void 0?j.aggregateTransfers({client:this}):j.aggregateTransfers({client:this},e,r)}createAccessToken(e,r){return j.createAccessToken({client:this},e!=null?e:{},r)}createContract(e,r){return j.createContract({client:this},e,r)}createDeposit(e,r){return j.createDeposit({client:this},e,r)}createExchange(e,r){return j.createExchange({client:this},e,r)}createToken(e,r){return j.createToken({client:this},e,r)}createTransfer(e,r){return j.createTransfer({client:this},e,r)}createTransferGroup(e,r){return j.createTransferGroup({client:this},e,r)}createTransfers(e,r){return j.createTransfers({client:this},e,r)}createWallet(e,r){return j.createWallet({client:this},e,r)}createWithdrawal(e,r){return j.createWithdrawal({client:this},e,r)}exportBalanceHistory(e,r){return j.exportBalanceHistory({client:this},e,r)}exportTokens(e,r){return e===void 0?j.exportTokens({client:this}):j.exportTokens({client:this},e,r)}exportTransferGroups(e,r){return e===void 0?j.exportTransferGroups({client:this}):j.exportTransferGroups({client:this},e,r)}exportTransfers(e,r){return e===void 0?j.exportTransfers({client:this}):j.exportTransfers({client:this},e,r)}exportWallets(e,r){return e===void 0?j.exportWallets({client:this}):j.exportWallets({client:this},e,r)}findBalances(e,r){return e===void 0?j.findBalances({client:this}):j.findBalances({client:this},e,r)}findTokens(e,r){return e===void 0?j.findTokens({client:this}):j.findTokens({client:this},e,r)}findTransferGroups(e,r){return e===void 0?j.findTransferGroups({client:this}):j.findTransferGroups({client:this},e,r)}findTransfers(e,r){return e===void 0?j.findTransfers({client:this}):j.findTransfers({client:this},e,r)}findWallets(e,r){return e===void 0?j.findWallets({client:this}):j.findWallets({client:this},e,r)}getBalance(e,r){return j.getBalance({client:this},e,r)}getBalanceHistory(e,r){return j.getBalanceHistory({client:this},e,r)}getExport(e,r){return j.getExport({client:this},e,r)}getFlags(e,r){return j.getFlags({client:this},e!=null?e:{},r)}getStatistics(e,r){return j.getStatistics({client:this},e!=null?e:{},r)}getToken(e,r){return j.getToken({client:this},e!=null?e:{},r)}getTransfer(e,r){return j.getTransfer({client:this},e,r)}getTransferGroup(e,r){return j.getTransferGroup({client:this},e,r)}getWallet(e,r){return j.getWallet({client:this},e,r)}healthcheck(e,r){return j.healthcheck({client:this},e!=null?e:{},r)}importData(e,r){if(e===void 0&&r===void 0)return j.importData({client:this});if(r===void 0&&Sc(e))return j.importData({client:this},e);if(kc(e))return j.importData({client:this},e,r);throw new Te({input:e,options:r})}listExports(e,r){return j.listExports({client:this},e!=null?e:{},r)}reverseTransfer(e,r){return j.reverseTransfer({client:this},e,r)}reverseTransferGroup(e,r){return j.reverseTransferGroup({client:this},e,r)}reverseTransfers(e,r){return e===void 0?j.reverseTransfers({client:this}):j.reverseTransfers({client:this},e,r)}setFlags(e,r){return j.setFlags({client:this},e,r)}updateToken(e,r){return j.updateToken({client:this},e,r)}updateTransfer(e,r){return j.updateTransfer({client:this},e,r)}updateTransferGroup(e,r){return j.updateTransferGroup({client:this},e,r)}updateTransferGroups(e,r){return e===void 0?j.updateTransferGroups({client:this}):j.updateTransferGroups({client:this},e,r)}updateTransfers(e,r){return e===void 0?j.updateTransfers({client:this}):j.updateTransfers({client:this},e,r)}updateWallet(e,r){return j.updateWallet({client:this},e,r)}};function Cc(t,e){let r=Zp(t,{connectingTimeout:e==null?void 0:e.connectingTimeout,reconnectingTimeout:e==null?void 0:e.reconnectingTimeout});return new Ct(r,e)}function Rc(t,e){let r=nd(t,{connectingTimeout:e==null?void 0:e.connectingTimeout,reconnectingTimeout:e==null?void 0:e.reconnectingTimeout});return new Ct(r,e)}var $w=ri.getValidator("ClientOptions"),Mc=(r=>(r.ws="ws",r.https="https",r))(Mc||{});function ww(t){var a;let e=t.config;delete t.config,(a=t.client)!=null||(t.client="ws");let{inputCopy:r,error:n}=$w(t);if(n)throw n;if(r.client==="ws")return Cc(r.connection,e);if(r.client==="https")return Rc(r.connection,e);throw new TypeError("Invalid client type")}var Iw={getIdentifier:Sf};return Vc(jw);})();
|
|
8
|
+
deps: ${r}}`};var xT={keyword:"dependencies",type:"object",schemaType:"object",error:Me.error,code(t){let[e,r]=bT(t);Pl(t,e),Wl(t,r)}};function bT({schema:t}){let e={},r={};for(let n in t){if(n==="__proto__")continue;let a=Array.isArray(t[n])?e:r;a[n]=t[n]}return[e,r]}function Pl(t,e=t.schema){let{gen:r,data:n,it:a}=t;if(Object.keys(e).length===0)return;let s=r.let("missing");for(let i in e){let o=e[i];if(o.length===0)continue;let p=(0,lr.propertyInData)(r,n,i,a.opts.ownProperties);t.setParams({property:i,depsCount:o.length,deps:o.join(", ")}),a.allErrors?r.if(p,()=>{for(let m of o)(0,lr.checkReportMissingProp)(t,m)}):(r.if((0,Tp._)`${p} && (${(0,lr.checkMissingProp)(t,o,s)})`),(0,lr.reportMissingProp)(t,s),r.else())}}Me.validatePropertyDeps=Pl;function Wl(t,e=t.schema){let{gen:r,data:n,keyword:a,it:s}=t,i=r.name("valid");for(let o in e)(0,FT.alwaysValidSchema)(s,e[o])||(r.if((0,lr.propertyInData)(r,n,o,s.opts.ownProperties),()=>{let p=t.subschema({keyword:a,schemaProp:o},i);t.mergeValidEvaluated(p,i)},()=>r.var(i,!0)),t.ok(i))}Me.validateSchemaDeps=Wl;Me.default=xT});var Al=I(yp=>{"use strict";Object.defineProperty(yp,"__esModule",{value:!0});var Nl=A(),OT=z(),$T={message:"property name must be valid",params:({params:t})=>(0,Nl._)`{propertyName: ${t.propertyName}}`},wT={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:$T,code(t){let{gen:e,schema:r,data:n,it:a}=t;if((0,OT.alwaysValidSchema)(a,r))return;let s=e.name("valid");e.forIn("key",n,i=>{t.setParams({propertyName:i}),t.subschema({keyword:"propertyNames",data:i,dataTypes:["string"],propertyName:i,compositeRule:!0},s),e.if((0,Nl.not)(s),()=>{t.error(!0),a.allErrors||e.break()})}),t.ok(s)}};yp.default=wT});var xp=I(Fp=>{"use strict";Object.defineProperty(Fp,"__esModule",{value:!0});var Di=be(),Se=A(),IT=Ue(),Ni=z(),jT={message:"must NOT have additional properties",params:({params:t})=>(0,Se._)`{additionalProperty: ${t.additionalProperty}}`},kT={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:jT,code(t){let{gen:e,schema:r,parentSchema:n,data:a,errsCount:s,it:i}=t;if(!s)throw new Error("ajv implementation error");let{allErrors:o,opts:p}=i;if(i.props=!0,p.removeAdditional!=="all"&&(0,Ni.alwaysValidSchema)(i,r))return;let m=(0,Di.allSchemaProperties)(n.properties),c=(0,Di.allSchemaProperties)(n.patternProperties);h(),t.ok((0,Se._)`${s} === ${IT.default.errors}`);function h(){e.forIn("key",a,T=>{!m.length&&!c.length?g(T):e.if(y(T),()=>g(T))})}function y(T){let $;if(m.length>8){let D=(0,Ni.schemaRefOrVal)(i,n.properties,"properties");$=(0,Di.isOwnProperty)(e,D,T)}else m.length?$=(0,Se.or)(...m.map(D=>(0,Se._)`${T} === ${D}`)):$=Se.nil;return c.length&&($=(0,Se.or)($,...c.map(D=>(0,Se._)`${(0,Di.usePattern)(t,D)}.test(${T})`))),(0,Se.not)($)}function F(T){e.code((0,Se._)`delete ${a}[${T}]`)}function g(T){if(p.removeAdditional==="all"||p.removeAdditional&&r===!1){F(T);return}if(r===!1){t.setParams({additionalProperty:T}),t.error(),o||e.break();return}if(typeof r=="object"&&!(0,Ni.alwaysValidSchema)(i,r)){let $=e.name("valid");p.removeAdditional==="failing"?(x(T,$,!1),e.if((0,Se.not)($),()=>{t.reset(),F(T)})):(x(T,$),o||e.if((0,Se.not)($),()=>e.break()))}}function x(T,$,D){let N={keyword:"additionalProperties",dataProp:T,dataPropType:Ni.Type.Str};D===!1&&Object.assign(N,{compositeRule:!0,createErrors:!1,allErrors:!1}),t.subschema(N,$)}}};Fp.default=kT});var Bl=I(Op=>{"use strict";Object.defineProperty(Op,"__esModule",{value:!0});var ST=Xt(),Ul=be(),bp=z(),ql=xp(),vT={keyword:"properties",type:"object",schemaType:"object",code(t){let{gen:e,schema:r,parentSchema:n,data:a,it:s}=t;s.opts.removeAdditional==="all"&&n.additionalProperties===void 0&&ql.default.code(new ST.KeywordCxt(s,ql.default,"additionalProperties"));let i=(0,Ul.allSchemaProperties)(r);for(let h of i)s.definedProperties.add(h);s.opts.unevaluated&&i.length&&s.props!==!0&&(s.props=bp.mergeEvaluated.props(e,(0,bp.toHash)(i),s.props));let o=i.filter(h=>!(0,bp.alwaysValidSchema)(s,r[h]));if(o.length===0)return;let p=e.name("valid");for(let h of o)m(h)?c(h):(e.if((0,Ul.propertyInData)(e,a,h,s.opts.ownProperties)),c(h),s.allErrors||e.else().var(p,!0),e.endIf()),t.it.definedProperties.add(h),t.ok(p);function m(h){return s.opts.useDefaults&&!s.compositeRule&&r[h].default!==void 0}function c(h){t.subschema({keyword:"properties",schemaProp:h,dataProp:h},p)}}};Op.default=vT});var zl=I($p=>{"use strict";Object.defineProperty($p,"__esModule",{value:!0});var Ll=be(),Ai=A(),Hl=z(),Vl=z(),ET={keyword:"patternProperties",type:"object",schemaType:"object",code(t){let{gen:e,schema:r,data:n,parentSchema:a,it:s}=t,{opts:i}=s,o=(0,Ll.allSchemaProperties)(r),p=o.filter(x=>(0,Hl.alwaysValidSchema)(s,r[x]));if(o.length===0||p.length===o.length&&(!s.opts.unevaluated||s.props===!0))return;let m=i.strictSchema&&!i.allowMatchingProperties&&a.properties,c=e.name("valid");s.props!==!0&&!(s.props instanceof Ai.Name)&&(s.props=(0,Vl.evaluatedPropsToName)(e,s.props));let{props:h}=s;y();function y(){for(let x of o)m&&F(x),s.allErrors?g(x):(e.var(c,!0),g(x),e.if(c))}function F(x){for(let T in m)new RegExp(x).test(T)&&(0,Hl.checkStrictMode)(s,`property ${T} matches pattern ${x} (use allowMatchingProperties)`)}function g(x){e.forIn("key",n,T=>{e.if((0,Ai._)`${(0,Ll.usePattern)(t,x)}.test(${T})`,()=>{let $=p.includes(x);$||t.subschema({keyword:"patternProperties",schemaProp:x,dataProp:T,dataPropType:Vl.Type.Str},c),s.opts.unevaluated&&h!==!0?e.assign((0,Ai._)`${h}[${T}]`,!0):!$&&!s.allErrors&&e.if((0,Ai.not)(c),()=>e.break())})})}}};$p.default=ET});var Jl=I(wp=>{"use strict";Object.defineProperty(wp,"__esModule",{value:!0});var GT=z(),CT={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(t){let{gen:e,schema:r,it:n}=t;if((0,GT.alwaysValidSchema)(n,r)){t.fail();return}let a=e.name("valid");t.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},a),t.failResult(a,()=>t.reset(),()=>t.error())},error:{message:"must NOT be valid"}};wp.default=CT});var Ql=I(Ip=>{"use strict";Object.defineProperty(Ip,"__esModule",{value:!0});var RT=be(),MT={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:RT.validateUnion,error:{message:"must match a schema in anyOf"}};Ip.default=MT});var Kl=I(jp=>{"use strict";Object.defineProperty(jp,"__esModule",{value:!0});var Ui=A(),PT=z(),WT={message:"must match exactly one schema in oneOf",params:({params:t})=>(0,Ui._)`{passingSchemas: ${t.passing}}`},DT={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:WT,code(t){let{gen:e,schema:r,parentSchema:n,it:a}=t;if(!Array.isArray(r))throw new Error("ajv implementation error");if(a.opts.discriminator&&n.discriminator)return;let s=r,i=e.let("valid",!1),o=e.let("passing",null),p=e.name("_valid");t.setParams({passing:o}),e.block(m),t.result(i,()=>t.reset(),()=>t.error(!0));function m(){s.forEach((c,h)=>{let y;(0,PT.alwaysValidSchema)(a,c)?e.var(p,!0):y=t.subschema({keyword:"oneOf",schemaProp:h,compositeRule:!0},p),h>0&&e.if((0,Ui._)`${p} && ${i}`).assign(i,!1).assign(o,(0,Ui._)`[${o}, ${h}]`).else(),e.if(p,()=>{e.assign(i,!0),e.assign(o,h),y&&t.mergeEvaluated(y,Ui.Name)})})}}};jp.default=DT});var Yl=I(kp=>{"use strict";Object.defineProperty(kp,"__esModule",{value:!0});var NT=z(),AT={keyword:"allOf",schemaType:"array",code(t){let{gen:e,schema:r,it:n}=t;if(!Array.isArray(r))throw new Error("ajv implementation error");let a=e.name("valid");r.forEach((s,i)=>{if((0,NT.alwaysValidSchema)(n,s))return;let o=t.subschema({keyword:"allOf",schemaProp:i},a);t.ok(a),t.mergeEvaluated(o)})}};kp.default=AT});var ec=I(Sp=>{"use strict";Object.defineProperty(Sp,"__esModule",{value:!0});var qi=A(),Zl=z(),UT={message:({params:t})=>(0,qi.str)`must match "${t.ifClause}" schema`,params:({params:t})=>(0,qi._)`{failingKeyword: ${t.ifClause}}`},qT={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:UT,code(t){let{gen:e,parentSchema:r,it:n}=t;r.then===void 0&&r.else===void 0&&(0,Zl.checkStrictMode)(n,'"if" without "then" and "else" is ignored');let a=Xl(n,"then"),s=Xl(n,"else");if(!a&&!s)return;let i=e.let("valid",!0),o=e.name("_valid");if(p(),t.reset(),a&&s){let c=e.let("ifClause");t.setParams({ifClause:c}),e.if(o,m("then",c),m("else",c))}else a?e.if(o,m("then")):e.if((0,qi.not)(o),m("else"));t.pass(i,()=>t.error(!0));function p(){let c=t.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},o);t.mergeEvaluated(c)}function m(c,h){return()=>{let y=t.subschema({keyword:c},o);e.assign(i,o),t.mergeValidEvaluated(y,i),h?e.assign(h,(0,qi._)`${c}`):t.setParams({ifClause:c})}}}};function Xl(t,e){let r=t.schema[e];return r!==void 0&&!(0,Zl.alwaysValidSchema)(t,r)}Sp.default=qT});var tc=I(vp=>{"use strict";Object.defineProperty(vp,"__esModule",{value:!0});var BT=z(),LT={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:t,parentSchema:e,it:r}){e.if===void 0&&(0,BT.checkStrictMode)(r,`"${t}" without "if" is ignored`)}};vp.default=LT});var rc=I(Ep=>{"use strict";Object.defineProperty(Ep,"__esModule",{value:!0});var HT=cp(),VT=Gl(),zT=mp(),JT=Rl(),QT=Ml(),KT=Dl(),YT=Al(),XT=xp(),ZT=Bl(),ey=zl(),ty=Jl(),ry=Ql(),ny=Kl(),ay=Yl(),sy=ec(),iy=tc();function oy(t=!1){let e=[ty.default,ry.default,ny.default,ay.default,sy.default,iy.default,YT.default,XT.default,KT.default,ZT.default,ey.default];return t?e.push(VT.default,JT.default):e.push(HT.default,zT.default),e.push(QT.default),e}Ep.default=oy});var nc=I(Gp=>{"use strict";Object.defineProperty(Gp,"__esModule",{value:!0});var re=A(),py={message:({schemaCode:t})=>(0,re.str)`must match format "${t}"`,params:({schemaCode:t})=>(0,re._)`{format: ${t}}`},dy={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:py,code(t,e){let{gen:r,data:n,$data:a,schema:s,schemaCode:i,it:o}=t,{opts:p,errSchemaPath:m,schemaEnv:c,self:h}=o;if(!p.validateFormats)return;a?y():F();function y(){let g=r.scopeValue("formats",{ref:h.formats,code:p.code.formats}),x=r.const("fDef",(0,re._)`${g}[${i}]`),T=r.let("fType"),$=r.let("format");r.if((0,re._)`typeof ${x} == "object" && !(${x} instanceof RegExp)`,()=>r.assign(T,(0,re._)`${x}.type || "string"`).assign($,(0,re._)`${x}.validate`),()=>r.assign(T,(0,re._)`"string"`).assign($,x)),t.fail$data((0,re.or)(D(),N()));function D(){return p.strictSchema===!1?re.nil:(0,re._)`${i} && !${$}`}function N(){let K=c.$async?(0,re._)`(${x}.async ? await ${$}(${n}) : ${$}(${n}))`:(0,re._)`${$}(${n})`,G=(0,re._)`(typeof ${$} == "function" ? ${K} : ${$}.test(${n}))`;return(0,re._)`${$} && ${$} !== true && ${T} === ${e} && !${G}`}}function F(){let g=h.formats[s];if(!g){D();return}if(g===!0)return;let[x,T,$]=N(g);x===e&&t.pass(K());function D(){if(p.strictSchema===!1){h.logger.warn(G());return}throw new Error(G());function G(){return`unknown format "${s}" ignored in schema at path "${m}"`}}function N(G){let ve=G instanceof RegExp?(0,re.regexpCode)(G):p.code.formats?(0,re._)`${p.code.formats}${(0,re.getProperty)(s)}`:void 0,Pe=r.scopeValue("formats",{key:s,ref:G,code:ve});return typeof G=="object"&&!(G instanceof RegExp)?[G.type||"string",G.validate,(0,re._)`${Pe}.validate`]:["string",G,Pe]}function K(){if(typeof g=="object"&&!(g instanceof RegExp)&&g.async){if(!c.$async)throw new Error("async format in sync schema");return(0,re._)`await ${$}(${n})`}return typeof T=="function"?(0,re._)`${$}(${n})`:(0,re._)`${$}.test(${n})`}}}};Gp.default=dy});var ac=I(Cp=>{"use strict";Object.defineProperty(Cp,"__esModule",{value:!0});var fy=nc(),uy=[fy.default];Cp.default=uy});var sc=I(wt=>{"use strict";Object.defineProperty(wt,"__esModule",{value:!0});wt.contentVocabulary=wt.metadataVocabulary=void 0;wt.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];wt.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]});var oc=I(Rp=>{"use strict";Object.defineProperty(Rp,"__esModule",{value:!0});var ly=ml(),cy=kl(),my=rc(),hy=ac(),ic=sc(),_y=[ly.default,cy.default,(0,my.default)(),hy.default,ic.metadataVocabulary,ic.contentVocabulary];Rp.default=_y});var dc=I(Bi=>{"use strict";Object.defineProperty(Bi,"__esModule",{value:!0});Bi.DiscrError=void 0;var pc;(function(t){t.Tag="tag",t.Mapping="mapping"})(pc||(Bi.DiscrError=pc={}))});var uc=I(Pp=>{"use strict";Object.defineProperty(Pp,"__esModule",{value:!0});var It=A(),Mp=dc(),fc=wi(),gy=Zt(),Ty=z(),yy={message:({params:{discrError:t,tagName:e}})=>t===Mp.DiscrError.Tag?`tag "${e}" must be string`:`value of tag "${e}" must be in oneOf`,params:({params:{discrError:t,tag:e,tagName:r}})=>(0,It._)`{error: ${t}, tag: ${r}, tagValue: ${e}}`},Fy={keyword:"discriminator",type:"object",schemaType:"object",error:yy,code(t){let{gen:e,data:r,schema:n,parentSchema:a,it:s}=t,{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 p=e.let("valid",!1),m=e.const("tag",(0,It._)`${r}${(0,It.getProperty)(o)}`);e.if((0,It._)`typeof ${m} == "string"`,()=>c(),()=>t.error(!1,{discrError:Mp.DiscrError.Tag,tag:m,tagName:o})),t.ok(p);function c(){let F=y();e.if(!1);for(let g in F)e.elseIf((0,It._)`${m} === ${g}`),e.assign(p,h(F[g]));e.else(),t.error(!1,{discrError:Mp.DiscrError.Mapping,tag:m,tagName:o}),e.endIf()}function h(F){let g=e.name("valid"),x=t.subschema({keyword:"oneOf",schemaProp:F},g);return t.mergeEvaluated(x,It.Name),g}function y(){var F;let g={},x=$(a),T=!0;for(let K=0;K<i.length;K++){let G=i[K];if(G!=null&&G.$ref&&!(0,Ty.schemaHasRulesButRef)(G,s.self.RULES)){let Pe=G.$ref;if(G=fc.resolveRef.call(s.self,s.schemaEnv.root,s.baseId,Pe),G instanceof fc.SchemaEnv&&(G=G.schema),G===void 0)throw new gy.default(s.opts.uriResolver,s.baseId,Pe)}let ve=(F=G==null?void 0:G.properties)===null||F===void 0?void 0:F[o];if(typeof ve!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${o}"`);T=T&&(x||$(G)),D(ve,K)}if(!T)throw new Error(`discriminator: "${o}" must be required`);return g;function $({required:K}){return Array.isArray(K)&&K.includes(o)}function D(K,G){if(K.const)N(K.const,G);else if(K.enum)for(let ve of K.enum)N(ve,G);else throw new Error(`discriminator: "properties/${o}" must have "const" or "enum"`)}function N(K,G){if(typeof K!="string"||K in g)throw new Error(`discriminator: "${o}" values must be unique strings`);g[K]=G}}}};Pp.default=Fy});var lc=I((wj,xy)=>{xy.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 mc=I((X,Wp)=>{"use strict";Object.defineProperty(X,"__esModule",{value:!0});X.MissingRefError=X.ValidationError=X.CodeGen=X.Name=X.nil=X.stringify=X.str=X._=X.KeywordCxt=X.Ajv=void 0;var by=pl(),Oy=oc(),$y=uc(),cc=lc(),wy=["/properties"],Li="http://json-schema.org/draft-07/schema",jt=class extends by.default{_addVocabularies(){super._addVocabularies(),Oy.default.forEach(e=>this.addVocabulary(e)),this.opts.discriminator&&this.addKeyword($y.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;let e=this.opts.$data?this.$dataMetaSchema(cc,wy):cc;this.addMetaSchema(e,Li,!1),this.refs["http://json-schema.org/schema"]=Li}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(Li)?Li:void 0)}};X.Ajv=jt;Wp.exports=X=jt;Wp.exports.Ajv=jt;Object.defineProperty(X,"__esModule",{value:!0});X.default=jt;var Iy=Xt();Object.defineProperty(X,"KeywordCxt",{enumerable:!0,get:function(){return Iy.KeywordCxt}});var kt=A();Object.defineProperty(X,"_",{enumerable:!0,get:function(){return kt._}});Object.defineProperty(X,"str",{enumerable:!0,get:function(){return kt.str}});Object.defineProperty(X,"stringify",{enumerable:!0,get:function(){return kt.stringify}});Object.defineProperty(X,"nil",{enumerable:!0,get:function(){return kt.nil}});Object.defineProperty(X,"Name",{enumerable:!0,get:function(){return kt.Name}});Object.defineProperty(X,"CodeGen",{enumerable:!0,get:function(){return kt.CodeGen}});var jy=Oi();Object.defineProperty(X,"ValidationError",{enumerable:!0,get:function(){return jy.default}});var ky=Zt();Object.defineProperty(X,"MissingRefError",{enumerable:!0,get:function(){return ky.default}})});var kw={};Lc(kw,{APIFunctions:()=>Yp,APIValidators:()=>Kp,AggregateTransferManyTxInputSchema:()=>pa,AggregateTransferManyTxOutputSchema:()=>da,AggregateTransfersFnInputSchema:()=>Sr,AggregateTransfersFnOutputSchema:()=>vr,AuthError:()=>We,AuthenticationCheckTxInputSchema:()=>fa,AuthenticationCheckTxOutputSchema:()=>ua,AuthenticationError:()=>Xe,AuthorizationError:()=>ai,Client:()=>Ct,ClientFunctions:()=>j,ClientFunctionsEnum:()=>vc,ClientQueryBuilderFunctionsEnum:()=>Ec,ClientValidators:()=>Ow,ConfigError:()=>ce,ConstraintError:()=>Pt,ConstsSchema:()=>ut,CreateAccessTokenFnInputSchema:()=>Er,CreateAccessTokenFnOutputSchema:()=>Gr,CreateAccessTokenTxInputSchema:()=>la,CreateAccessTokenTxOutputSchema:()=>ca,CreateContractFnInputSchema:()=>Cr,CreateContractFnOutputSchema:()=>Rr,CreateContractTxInputSchema:()=>ma,CreateContractTxOutputSchema:()=>ha,CreateDepositFnInputSchema:()=>Mr,CreateDepositFnOutputSchema:()=>Pr,CreateDepositTxInputSchema:()=>_a,CreateDepositTxOutputSchema:()=>ga,CreateDistributionTxInputSchema:()=>Ta,CreateDistributionTxOutputSchema:()=>ya,CreateExchangeFnInputSchema:()=>Wr,CreateExchangeFnOutputSchema:()=>Dr,CreateTokenFnInputSchema:()=>Nr,CreateTokenFnOutputSchema:()=>Ar,CreateTokenTxInputSchema:()=>Fa,CreateTokenTxOutputSchema:()=>xa,CreateTransferFnInputSchema:()=>Ur,CreateTransferFnOutputSchema:()=>qr,CreateTransferGroupFnInputSchema:()=>Br,CreateTransferGroupFnOutputSchema:()=>Lr,CreateTransferGroupTxInputSchema:()=>$a,CreateTransferGroupTxOutputSchema:()=>wa,CreateTransferManyTxInputSchema:()=>Ia,CreateTransferManyTxOutputSchema:()=>ja,CreateTransferTxInputSchema:()=>ba,CreateTransferTxOutputSchema:()=>Oa,CreateTransfersFnInputSchema:()=>Hr,CreateTransfersFnOutputSchema:()=>Vr,CreateWalletFnInputSchema:()=>zr,CreateWalletFnOutputSchema:()=>Jr,CreateWalletTxInputSchema:()=>ka,CreateWalletTxOutputSchema:()=>Sa,CreateWithdrawalFnInputSchema:()=>Qr,CreateWithdrawalFnOutputSchema:()=>Kr,CreateWithdrawalTxInputSchema:()=>va,CreateWithdrawalTxOutputSchema:()=>Ea,DbFilterFunctionBasicEnum:()=>ld,DbFilterFunctionInEnum:()=>cd,DbFilterFunctionMetadataBasicEnum:()=>ud,DbFilterFunctionMetadataInEnum:()=>md,DbFilterFunctionMetadataNullEnum:()=>hd,DbFilterFunctionNullEnum:()=>_d,DbFilterOperatorEnum:()=>gd,DbFilterOperatorExtendedEnum:()=>yd,DbFilterOperatorStringEnum:()=>Td,DbModelNameEnum:()=>vd,ErrorDescription:()=>wf,ErrorMessage:()=>$f,ErrorType:()=>si,Errors:()=>ye,ExportBalanceHistoryFnInputSchema:()=>Yr,ExportBalanceHistoryFnOutputSchema:()=>Xr,ExportBalanceHistoryTxInputSchema:()=>Ga,ExportBalanceHistoryTxOutputSchema:()=>Ca,ExportTokenManyTxInputSchema:()=>Ra,ExportTokenManyTxOutputSchema:()=>Ma,ExportTokensFnInputSchema:()=>Zr,ExportTokensFnOutputSchema:()=>en,ExportTransferGroupManyTxInputSchema:()=>Pa,ExportTransferGroupManyTxOutputSchema:()=>Wa,ExportTransferGroupsFnInputSchema:()=>tn,ExportTransferGroupsFnOutputSchema:()=>rn,ExportTransferManyTxInputSchema:()=>Da,ExportTransferManyTxOutputSchema:()=>Na,ExportTransfersFnInputSchema:()=>nn,ExportTransfersFnOutputSchema:()=>an,ExportWalletManyTxInputSchema:()=>Aa,ExportWalletManyTxOutputSchema:()=>Ua,ExportWalletsFnInputSchema:()=>sn,ExportWalletsFnOutputSchema:()=>on,FindBalanceManyTxInputSchema:()=>qa,FindBalanceManyTxOutputSchema:()=>Ba,FindBalancesFnInputSchema:()=>pn,FindBalancesFnOutputSchema:()=>dn,FindTokenManyTxInputSchema:()=>La,FindTokenManyTxOutputSchema:()=>Ha,FindTokensFnInputSchema:()=>fn,FindTokensFnOutputSchema:()=>un,FindTransferGroupManyTxInputSchema:()=>Va,FindTransferGroupManyTxOutputSchema:()=>za,FindTransferGroupsFnInputSchema:()=>ln,FindTransferGroupsFnOutputSchema:()=>cn,FindTransferManyTxInputSchema:()=>Ja,FindTransferManyTxOutputSchema:()=>Qa,FindTransfersFnInputSchema:()=>mn,FindTransfersFnOutputSchema:()=>hn,FindWalletManyTxInputSchema:()=>Ka,FindWalletManyTxOutputSchema:()=>Ya,FindWalletsFnInputSchema:()=>_n,FindWalletsFnOutputSchema:()=>gn,FinishTransactionTxInputSchema:()=>Xa,FinishTransactionTxOutputSchema:()=>Za,FnConstsSchema:()=>Tn,GetBalanceFnInputSchema:()=>yn,GetBalanceFnOutputSchema:()=>Fn,GetBalanceHistoryFnInputSchema:()=>xn,GetBalanceHistoryFnOutputSchema:()=>bn,GetBalanceHistoryTxInputSchema:()=>rs,GetBalanceHistoryTxOutputSchema:()=>ns,GetBalanceTxInputSchema:()=>es,GetBalanceTxOutputSchema:()=>ts,GetExportFnInputSchema:()=>On,GetExportFnOutputSchema:()=>$n,GetExportTxInputSchema:()=>as,GetExportTxOutputSchema:()=>ss,GetFlagsFnInputSchema:()=>wn,GetFlagsFnOutputSchema:()=>In,GetFlagsTxInputSchema:()=>is,GetFlagsTxOutputSchema:()=>os,GetStatisticsFnInputSchema:()=>jn,GetStatisticsFnOutputSchema:()=>kn,GetStatisticsTxInputSchema:()=>ps,GetStatisticsTxOutputSchema:()=>ds,GetTokenFnInputSchema:()=>Sn,GetTokenFnOutputSchema:()=>vn,GetTokenManyTxInputSchema:()=>ls,GetTokenManyTxOutputSchema:()=>cs,GetTokenTxInputSchema:()=>fs,GetTokenTxOutputSchema:()=>us,GetTransferFnInputSchema:()=>En,GetTransferFnOutputSchema:()=>Gn,GetTransferGroupFnInputSchema:()=>Cn,GetTransferGroupFnOutputSchema:()=>Rn,GetTransferGroupTxInputSchema:()=>_s,GetTransferGroupTxOutputSchema:()=>gs,GetTransferTxInputSchema:()=>ms,GetTransferTxOutputSchema:()=>hs,GetWalletFnInputSchema:()=>Mn,GetWalletFnOutputSchema:()=>Pn,GetWalletManyTxInputSchema:()=>Fs,GetWalletManyTxOutputSchema:()=>xs,GetWalletTxInputSchema:()=>Ts,GetWalletTxOutputSchema:()=>ys,HealthcheckFnInputSchema:()=>Wn,HealthcheckFnOutputSchema:()=>Dn,HealthcheckTxInputSchema:()=>bs,HealthcheckTxOutputSchema:()=>Os,ImportActionsTxInputSchema:()=>ct,ImportActionsTxOutputSchema:()=>$s,ImportDataFnInputSchema:()=>lt,ImportDataFnOutputSchema:()=>Nn,InputError:()=>L,JSONRPCError:()=>Ye,ListExportManyTxInputSchema:()=>ws,ListExportManyTxOutputSchema:()=>Is,ListExportsFnInputSchema:()=>An,ListExportsFnOutputSchema:()=>Un,QueryBuilder:()=>te,QueryLogsTxInputSchema:()=>js,QueryLogsTxOutputSchema:()=>ks,ResetDatabaseTxInputSchema:()=>Ss,ResetDatabaseTxOutputSchema:()=>vs,ReverseTransferFnInputSchema:()=>qn,ReverseTransferFnOutputSchema:()=>Bn,ReverseTransferGroupFnInputSchema:()=>Ln,ReverseTransferGroupFnOutputSchema:()=>Hn,ReverseTransferGroupManyTxInputSchema:()=>Ms,ReverseTransferGroupManyTxOutputSchema:()=>Ps,ReverseTransferGroupTxInputSchema:()=>Cs,ReverseTransferGroupTxOutputSchema:()=>Rs,ReverseTransferManyTxInputSchema:()=>Ws,ReverseTransferManyTxOutputSchema:()=>Ds,ReverseTransferTxInputSchema:()=>Es,ReverseTransferTxOutputSchema:()=>Gs,ReverseTransfersFnInputSchema:()=>Vn,ReverseTransfersFnOutputSchema:()=>zn,SetFlagsFnInputSchema:()=>Jn,SetFlagsFnOutputSchema:()=>Qn,SetFlagsTxInputSchema:()=>Ns,SetFlagsTxOutputSchema:()=>As,StartTransactionTxInputSchema:()=>Us,StartTransactionTxOutputSchema:()=>qs,StreamError:()=>Fe,StreamPromise:()=>De,TokenStatusEnum:()=>xd,TokenTableInputSchema:()=>cr,TokenTableSchema:()=>mr,TokenTypeEnum:()=>Fd,TransferGroupStatusEnum:()=>bd,TransferGroupTableInputSchema:()=>gr,TransferGroupTableSchema:()=>Tr,TransferGroupTypeEnum:()=>wd,TransferLogTableInputSchema:()=>yr,TransferLogTableSchema:()=>Fr,TransferStatusEnum:()=>Od,TransferStatusInputEnum:()=>$d,TransferTableInputSchema:()=>hr,TransferTableSchema:()=>_r,TransferTypeEnum:()=>Id,TxConstsSchema:()=>Bs,UpdateTokenFnInputSchema:()=>Kn,UpdateTokenFnOutputSchema:()=>Yn,UpdateTokenTxInputSchema:()=>Ls,UpdateTokenTxOutputSchema:()=>Hs,UpdateTransferFnInputSchema:()=>Xn,UpdateTransferFnOutputSchema:()=>Zn,UpdateTransferGroupFnInputSchema:()=>ea,UpdateTransferGroupFnOutputSchema:()=>ta,UpdateTransferGroupManyTxInputSchema:()=>Ks,UpdateTransferGroupManyTxOutputSchema:()=>Ys,UpdateTransferGroupTxInputSchema:()=>Js,UpdateTransferGroupTxOutputSchema:()=>Qs,UpdateTransferGroupsFnInputSchema:()=>ra,UpdateTransferGroupsFnOutputSchema:()=>na,UpdateTransferManyTxInputSchema:()=>Xs,UpdateTransferManyTxOutputSchema:()=>Zs,UpdateTransferTxInputSchema:()=>Vs,UpdateTransferTxOutputSchema:()=>zs,UpdateTransfersFnInputSchema:()=>aa,UpdateTransfersFnOutputSchema:()=>sa,UpdateWalletFnInputSchema:()=>ia,UpdateWalletFnOutputSchema:()=>oa,UpdateWalletTxInputSchema:()=>ei,UpdateWalletTxOutputSchema:()=>ti,ValidationError:()=>Te,Validator:()=>ri,WAPIError:()=>we,WalletStatusEnum:()=>kd,WalletTableInputSchema:()=>xr,WalletTableSchema:()=>br,WalletTokenSettingTableInputSchema:()=>Or,WalletTokenSettingTableSchema:()=>$r,WalletTypeEnum:()=>jd,WapiClientType:()=>Mc,WapiSettingTableInputSchema:()=>wr,WapiSettingTableSchema:()=>Ir,WapiSettingTypeEnum:()=>Sd,WapiStatisticTableInputSchema:()=>jr,WapiStatisticTableSchema:()=>kr,aggregateTransfers:()=>od,create:()=>Iw,createAccessToken:()=>pd,createContract:()=>dd,createDeposit:()=>fd,createExchange:()=>Ed,createToken:()=>Gd,createTransfer:()=>Cd,createTransferGroup:()=>Rd,createTransfers:()=>Md,createWallet:()=>Pd,createWithdrawal:()=>Wd,exportBalanceHistory:()=>Dd,exportTokens:()=>Nd,exportTransferGroups:()=>Ad,exportTransfers:()=>Ud,exportWallets:()=>qd,findBalances:()=>Bd,findTokens:()=>Ld,findTransferGroups:()=>Hd,findTransfers:()=>Vd,findWallets:()=>zd,getBalance:()=>Jd,getBalanceHistory:()=>Qd,getExport:()=>Kd,getFlags:()=>Yd,getStatistics:()=>Xd,getToken:()=>Zd,getTransfer:()=>ef,getTransferGroup:()=>tf,getWallet:()=>rf,healthcheck:()=>nf,importData:()=>af,listExports:()=>sf,reverseTransfer:()=>of,reverseTransferGroup:()=>pf,reverseTransfers:()=>df,setFlags:()=>ff,updateToken:()=>uf,updateTransfer:()=>lf,updateTransferGroup:()=>cf,updateTransferGroups:()=>mf,updateTransfers:()=>hf,updateWallet:()=>_f,utils:()=>jw});var Of=WebSocket;function M(...t){window.WAPI_DEBUG&&console.log(...t.map(e=>e&&typeof e=="object"?JSON.stringify(e):e))}var Z={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 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."},TR_UNIQUE_IDENTIFIER:{code:-19115,message:"TR_UNIQUE_IDENTIFIER",description:"The identifier for Transfer object must be unique"},TR_DIFFERENT_WALLETS:{code:-19116,message:"TR_DIFFERENT_WALLETS",description:"To and from wallets have to be different"},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"},TRG_UNIQUE_IDENTIFIER:{code:-19204,message:"TRG_UNIQUE_IDENTIFIER",description:"The identifier for TransferGroup object must be unique"},TOKEN_UNIQUE_FOREIGN:{code:-19300,message:"TOKEN_UNIQUE_FOREIGN",description:"The foreign for Token object must be unique"},WALLET_UNIQUE_FOREIGN:{code:-19400,message:"WALLET_UNIQUE_FOREIGN",description:"The foreign for Wallet object must be unique"},UNIQUE_CONSTRAINT:{code:-19500,message:"UNIQUE_CONSTRAINT",description:"Insert violates unique constraint"}}},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"},CONNECTION_TIMEOUT:{code:-15004,message:"CONNECTION_TIMEOUT",description:"Unable to get initial response in specified time"},SENDING_TIMEOUT:{code:-15005,message:"SENDING_TIMEOUT",description:"Unable to get ack from server in specified time"},CONFIG_INVALID:{code:-15100,message:"CONFIG_INVALID",description:"Provided configuration is invalid"}}}},ye=b(b(b(b(b(b({},Z.JSONRPC.ERRORS),Z.AUTH.ERRORS),Z.CONFIG.ERRORS),Z.STREAM.ERRORS),Z.INPUT.ERRORS),Z.CONSTRAINT.ERRORS);function Ze(t){return Object.fromEntries(Object.keys(t).map(e=>[e,e]))}var si=Ze(ye),we=class extends Error{constructor({type:e,code:r,message:n,data:a}){var i;super(n);let s=(i=ye[e])!=null?i:ye.INTERNAL_SERVER_ERROR;this.type=e!=null?e:si.INTERNAL_SERVER_ERROR,this.code=r!=null?r:s.code,this.message=n!=null?n:s.message,this.data=b({description:s.description},a&&typeof a=="object"?a:{error:a})}toJSON(){return{code:this.code,message:this.message,data:this.data}}},Ye=class extends we{constructor(e,r,n,a){super({type:e,message:n,data:r,code:a})}static get group(){return Z.JSONRPC.ERRORS}static get types(){return Ze(Z.JSONRPC.ERRORS)}},Fe=class extends we{constructor(e,r,n,a){super({type:e,message:n,data:r,code:a})}static get group(){return Z.STREAM.ERRORS}static get types(){return Ze(Z.STREAM.ERRORS)}},L=class extends we{constructor(e,r,n,a){super({type:e,message:n,data:r,code:a})}static get group(){return Z.INPUT.ERRORS}static get types(){return Ze(Z.INPUT.ERRORS)}},ce=class extends we{constructor(e,r,n,a){super({type:e,message:n,data:r,code:a})}static get group(){return Z.CONFIG.ERRORS}static get types(){return Ze(Z.CONFIG.ERRORS)}},We=class extends we{constructor(e,r,n,a){super({type:e,message:n,data:r,code:a})}static get group(){return Z.AUTH.ERRORS}static get types(){return Ze(Z.AUTH.ERRORS)}},Pt=class extends we{constructor(e,r,n,a){super({type:e,message:n,data:r,code:a})}static get group(){return Z.CONSTRAINT.ERRORS}static get types(){return Ze(Z.CONSTRAINT.ERRORS)}},Te=class extends Ye{constructor(e,r){super(Ye.types.INVALID_PARAMS,e,r)}},Xe=class extends We{constructor(e){super(We.types.AUTHENTICATION_ERROR,e)}},ai=class extends We{constructor(e){super(We.types.AUTHORIZATION_ERROR,e)}};var zc=Object.fromEntries(Object.keys(ye).map(t=>[ye[t].code,t]));function Jc(t){let e=zc[t];if(!e){let n=Object.entries(Z).find(([,a])=>t>=a.min&&t<=a.max);return{group:n==null?void 0:n[0],type:void 0}}let r=Object.keys(Z).find(n=>e in Z[n].ERRORS);return r?{group:r,type:e}:(console.error("ERRORS and ERROR_GROUPS are out of sync",e),{group:void 0,type:e})}function Ki({code:t,message:e,data:r}){let n=Jc(t),a=n.type,s=n.group;e=e&&e!==a?e:ye[a].description;let i;switch(s&&s!=="JSONRPC"&&a===void 0&&(M("Novel error from server",t,e,r),a=e,i=t,e=typeof r=="object"&&"description"in r&&typeof r.description=="string"?r.description:e),s){case"JSONRPC":return new Ye(a,r,e);case"AUTH":return new We(a,r,e,i);case"CONFIG":return new ce(a,r,e,i);case"CONSTRAINT":return new Pt(a,r,e,i);case"INPUT":return new L(a,r,e,i);case"STREAM":return new Fe(a,r,e,i);default:return new we({code:t,message:e,data:r,type:a!=null?a:si.INTERNAL_SERVER_ERROR})}}var $f=Object.fromEntries(Object.keys(ye).map(t=>[t,ye[t].message])),wf=Object.fromEntries(Object.keys(ye).map(t=>[t,ye[t].description]));var ii,Qc=new Uint8Array(16);function Yi(){if(!ii&&(ii=typeof crypto!="undefined"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!ii))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return ii(Qc)}var ae=[];for(let t=0;t<256;++t)ae.push((t+256).toString(16).slice(1));function If(t,e=0){return ae[t[e+0]]+ae[t[e+1]]+ae[t[e+2]]+ae[t[e+3]]+"-"+ae[t[e+4]]+ae[t[e+5]]+"-"+ae[t[e+6]]+ae[t[e+7]]+"-"+ae[t[e+8]]+ae[t[e+9]]+"-"+ae[t[e+10]]+ae[t[e+11]]+ae[t[e+12]]+ae[t[e+13]]+ae[t[e+14]]+ae[t[e+15]]}var Kc=typeof crypto!="undefined"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Xi={randomUUID:Kc};function Yc(t,e,r){if(Xi.randomUUID&&!e&&!t)return Xi.randomUUID();t=t||{};let n=t.random||(t.rng||Yi)();if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,e){r=r||0;for(let a=0;a<16;++a)e[r+a]=n[a];return e}return If(n)}var mt=Yc;function et(t=8){return mt().split("-").pop().substr(0,t)}var Zi={timeouts:{},values:{},set(t,e){this.timeouts[t]=setTimeout(()=>this.clear(t),3e4),this.values[t]=e},get(t){return this.values[t]},getKey(t){let e=JSON.parse(JSON.stringify(t)),r="";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]),r+=n+":"+a}),r},clear(t){this.timeouts[t]&&clearTimeout(this.timeouts[t]),delete this.timeouts[t],delete this.values[t]},clearAll(){Object.keys(this.timeouts).forEach(t=>{clearTimeout(this.timeouts[t])}),this.timeouts={},this.values={}}};function fe(t){if(!t)return mt();let e=Zi.getKey(t);if(Zi.get(e))throw new L("INPUT_NEEDS_IDENTIFIER",{object:t});let r=mt();return Zi.set(e,r),r}function kf(t){return new Promise(e=>setTimeout(e,t))}function Sf(){return fe()}function pi(t){return JSON.parse(JSON.stringify(t))}function Ee(t,e,r){if(e in t){if(t[e]===void 0)throw new Te({input:t},`undefined provided for ${e}`);return t}if(!r)throw new Te({input:t},`${e} is required if no default set`);let n=pi(t);return n[e]=r,n}function O(t){let e=vf(t);if(e!=null)return{foreign:e}}function R(t){let e=vf(t);if(e!=null)return{identifier:e}}function w({input:t,options:e,validate:r}){var a;let n=pi(t);return(a=n.options)!=null||(n.options=e!=null?e:{}),r(n)}function vf(t){return t==null?t:t+""}function Xc(t){return Object.keys(t).filter(e=>t[e]!==void 0).map(e=>`${encodeURIComponent(e)}=${encodeURIComponent(t[e])}`).join("&")}function jf(t){return t.host.replace(/^https:/,"wss:")+"?"+Xc({apikey:t.apikey,apisecret:t.apisecret,db:t.database,clientVersion:t.clientVersion,connectionName:t.connectionName})}function Ef(t){return typeof window=="undefined"?[jf(t),{rejectUnauthorized:t.rejectUnauthorized}]:[jf(t)]}function di(t,e){let r={};return Object.keys(t).forEach(n=>{e[n]?typeof e[n]=="string"?r[e[n]]=t[n]:r[n]=e[n](t[n]):r[n]=t[n]}),r}function ne(t){return t.split(",").map(e=>e.split(" ")).map(e=>{let[r,n]=e;return{field:r,direction:n==="desc"?"desc":"asc"}})}function Gf(t){if(!t)return;if(!t.order_by)return t;let e=t.order_by;return delete t.order_by,t.order||(t.order=ne(e)),t}function Cf(t){if(t!=null)return t+""}function Rf(t){return new Date(t).setHours(0,0,0,0)>new Date().setHours(0,0,0,0)}function Zc(t){return t%4===0&&(t%100!==0||t%400===0)}var em=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,tm=[0,31,28,31,30,31,30,31,31,30,31,30,31];function oi(t){let e=em.exec(t);if(!e)return!1;let r=+e[1],n=+e[2],a=+e[3];return n>=1&&n<=12&&a>=1&&a<=(n===2&&Zc(r)?29:tm[n])}var rm=/^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i;function nm(t,e){let r=rm.exec(t);if(!r)return!1;let n=+r[1],a=+r[2],s=+r[3],i=r[5];return(n<=23&&a<=59&&s<=59||n===23&&a===59&&s===60)&&(!e||i!=="")}var am=/t|\s/i;function Mf(t){let e=t.split(am);return e.length===1?oi(e[0]):e.length===2&&oi(e[0])&&nm(e[1])}var Wt=class{constructor(e){this._data=[];this._error=[];this._end=[];this._finished=!1;this._options=e}on(e,r){switch(e){case"data":return this._data.push(r),this;case"end":return this._end.push(r),this;case"error":return this._error.push(r),this}}push(e){if(this._finished)throw new Error("Stream is closed");return e===null?this.end():(this._data.forEach(r=>r(e)),this)}error(e){if(this._finished)throw new Error("Stream is closed");return this._error.forEach(r=>r(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}},fi=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 De=class{constructor(e){this.streamObject=new Wt({objectMode:!0});this.outStreamObject=new Wt({objectMode:!0});this.started=!1;this.makeRequest=e}start(e){if(M("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 r=[];if(this.mode==="stream"){this.streamObject.on("data",n=>{if(M("stream data",n),n||this.outStreamObject.push(n),n.error){let a=Ki(n.error);return this.outStreamObject.destroy(a),this.streamObject.destroy(a)}if(!n.prop){r.push(n);return}if(n.dataArr){let a=b({},n);delete a.dataArr,n.dataArr.forEach(s=>{this.outStreamObject.push(q(b({},a),{data:s}))});return}this.outStreamObject.push(n)}).on("end",()=>{M("stream ended");let n=r.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=>{M("stream error",n),this.outStreamObject.destroy(n)});return}if(this.mode==="promise"){let n=new Map;this.streamObject.on("data",a=>{var i;if(M("streamPromise data",a),a===void 0)return;if(a.error){let o=Ki(a.error);return this.streamObject.destroy(o)}if(!a.prop){r.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",()=>{M("streamPromise end");let a=r.pop();if(!a)return;let s=a.result;if(!n.size)return this.resolve(s);let i=!1;n.forEach((o,p)=>{Array.isArray(s[p])?(o.push(...s[p]),s[p]=o):o.length===1?s[p]=o:(this.streamObject.destroy(new Fe("INVALID_RESPONSE_STREAM_CHUNK",{property:p,value:o})),i=!0)}),i||this.resolve(s)}).on("error",a=>(M("streamPromise error",a),this.reject(a)))}}then(e,r){return this.start("promise"),this.promise.then(e,r)}catch(e){return this.start("promise"),this.promise.catch(e)}stream(){return this.start("stream"),this.outStreamObject}};var Dt=class extends De{constructor(e,r){super(e),this.inputStream=r}input(e){return e?typeof e=="function"?(e(this.inputStream),this):(console.warn("currently disabled"),this):this.inputStream}};var _c=Hc(mc(),1);var Dp={$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 Np={$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 Ap={$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 ut={$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 filter for custom properties",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","WapiStatistic"]}}};var cr={$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 mr={$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 Up={$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 hr={$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 _r={$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 qp={$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 gr={$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 Tr={$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 Bp={$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 yr={$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 Fr={$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 Lp={$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 xr={$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 br={$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 Hp={$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 Or={$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 $r={$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 Vp={$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 wr={$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 Ir={$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 zp={$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 jr={$schema:"http://json-schema.org/draft-07/schema",$id:"WapiStatisticTableInput",title:"WapiStatisticTableInput",description:"Database statistics",type:"object",properties:{model:{description:"Model name this statistic applies to",$ref:"/db/consts.schema.json#/definitions/DbModelName"},type:{description:"Type of the statistic",type:"string",maxLength:32,minLength:1},result:{description:"result of statistic calulation",type:"number"},max_id:{description:"Maximum id at the time of calculation",type:"number"}},additionalProperties:!1,required:["model","type","result","max_id"]};var kr={$schema:"http://json-schema.org/draft-07/schema",$id:"WapiStatisticTable",title:"WapiStatisticTable",description:"Database statistics",type:"object",properties:{id:{description:"System defined primary key",type:"integer"},model:{description:"Model name this statistic applies to",$ref:"/db/consts.schema.json#/definitions/DbModelName"},type:{description:"Type of the statistic",type:"string",maxLength:32,minLength:1},result:{description:"result of statistic calulation",type:"number"},max_id:{description:"Maximum id at the time of calculation",type:"number"},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:{WapiStatisticTableAccessibleFields:{$id:"WapiStatisticTableAccessibleFields",type:"string",enum:["id","model","type","result","max_id"]},WapiStatisticTableFields:{$id:"WapiStatisticTableFields",type:"string",enum:["id","model","type","result","max_id","created_at","updated_at"]},WapiStatisticTableStringFields:{$id:"WapiStatisticTableStringFields",type:"string",enum:["model","type","created_at","updated_at"]},WapiStatisticTableNumberFields:{$id:"WapiStatisticTableNumberFields",type:"string",enum:["id","result","max_id"]}},required:["id","model","type","result","max_id","created_at","updated_at"]};var Jp={$schema:"http://json-schema.org/draft-07/schema",$id:"WapiStatisticTableOptional",title:"WapiStatisticTableOptional",description:"Database statistics Only require id, other fields are optional",type:"object",properties:{id:{description:"System defined primary key",type:"integer"},model:{description:"Model name this statistic applies to",$ref:"/db/consts.schema.json#/definitions/DbModelName"},type:{description:"Type of the statistic",type:"string",maxLength:32,minLength:1},result:{description:"result of statistic calulation",type:"number"},max_id:{description:"Maximum id at the time of calculation",type:"number"},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 Sr={$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 vr={$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 Er={$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","exportBalanceHistory","exportTokens","exportTransferGroups","exportTransfers","exportWallets","findBalances","findTokens","findTransferGroups","findTransfers","findWallets","aggregateTransferMany","exportTokenMany","exportTransferGroupMany","exportTransferMany","exportWalletMany","findBalanceMany","findTokenMany","findTransferGroupMany","findTransferMany","findWalletMany","getBalance","getBalanceHistory","getExport","getStatistics","getToken","getTokenMany","getTransfer","getTransferGroup","getWallet","getWalletMany","healthcheck","listExportMany","listExports"]}},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 Gr={$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 Cr={$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 Rr={$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 Mr={$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 Pr={$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 Wr={$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 Dr={$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 Nr={$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 Ar={$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 Ur={$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 qr={$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 Br={$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 Lr={$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 Hr={$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 Vr={$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 zr={$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 Jr={$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 Qr={$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 Kr={$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 Yr={$schema:"http://json-schema.org/draft-07/schema",$id:"ExportBalanceHistoryFnInput",title:"ExportBalanceHistoryFnInput",description:"Input for exportBalanceHistory",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/export_balance_history_fn_options"}},definitions:{export_balance_history_fn_options:{description:"Optional flags for input",type:"object",allOf:[{$ref:"/txs/export-balance-history/export-balance-history.schema.input.json#/definitions/export_balance_history_tx_options"}]}},required:["wallet"],additionalProperties:!1};var Xr={$schema:"http://json-schema.org/draft-07/schema",$id:"ExportBalanceHistoryFnOutput",title:"ExportBalanceHistoryFnOutput",description:"Output of exportBalanceHistory",type:"object",$ref:"/txs/export-balance-history/export-balance-history.schema.output.json"};var Zr={$schema:"http://json-schema.org/draft-07/schema",$id:"ExportTokensFnInput",title:"ExportTokensFnInput",description:"Input for exportTokens",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/export_tokens_fn_options"}},definitions:{export_tokens_fn_options:{description:"Optional flags for input",type:"object",allOf:[{$ref:"/txs/export-token-many/export-token-many.schema.input.json#/definitions/export_token_many_tx_options"},{$ref:"/fns/fn-consts.schema.json#/definitions/i_fn_find_options_extra"}]}},$queryBuilder:!0,additionalProperties:!1};var en={$schema:"http://json-schema.org/draft-07/schema",$id:"ExportTokensFnOutput",title:"ExportTokensFnOutput",description:"Output of exportTokens",type:"object",$ref:"/txs/export-token-many/export-token-many.schema.output.json"};var tn={$schema:"http://json-schema.org/draft-07/schema",$id:"ExportTransferGroupsFnInput",title:"ExportTransferGroupsFnInput",description:"Input for exportTransferGroups",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/export_transfer_groups_fn_options"}},definitions:{export_transfer_groups_fn_options:{description:"Optional flags for input",type:"object",allOf:[{$ref:"/fns/find-transfer-groups/find-transfer-groups.schema.input.json#/definitions/find_transfer_groups_fn_options"}]}},$queryBuilder:!0,additionalProperties:!1};var rn={$schema:"http://json-schema.org/draft-07/schema",$id:"ExportTransferGroupsFnOutput",title:"ExportTransferGroupsFnOutput",description:"Output of exportTransferGroups",type:"object",$ref:"/txs/export-transfer-group-many/export-transfer-group-many.schema.output.json"};var nn={$schema:"http://json-schema.org/draft-07/schema",$id:"ExportTransfersFnInput",title:"ExportTransfersFnInput",description:"Input for exportTransfers",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/export_transfers_fn_options"}},definitions:{export_transfers_fn_options:{description:"exportTransfers 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:"/fns/find-transfers/find-transfers.schema.input.json#/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"}]}},$queryBuilder:!0,additionalProperties:!1};var an={$schema:"http://json-schema.org/draft-07/schema",$id:"ExportTransfersFnOutput",title:"ExportTransfersFnOutput",description:"Output of exportTransfers",type:"object",$ref:"/txs/export-transfer-many/export-transfer-many.schema.output.json"};var sn={$schema:"http://json-schema.org/draft-07/schema",$id:"ExportWalletsFnInput",title:"ExportWalletsFnInput",description:"Input for exportWallets",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/export_wallets_fn_options"}},definitions:{export_wallets_fn_extra_options:{allOf:[{$ref:"/fns/find-wallets/find-wallets.schema.input.json#/definitions/find_wallets_fn_extra_options"}]},export_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/export_wallets_fn_extra_options"}]}},$queryBuilder:!0,additionalProperties:!1};var on={$schema:"http://json-schema.org/draft-07/schema",$id:"ExportWalletsFnOutput",title:"ExportWalletsFnOutput",description:"Output of exportWallets",type:"object",$ref:"/txs/export-wallet-many/export-wallet-many.schema.output.json"};var pn={$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 dn={$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 fn={$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/find-token-many/find-token-many.schema.input.json#/definitions/find_token_many_tx_options"}]}},$queryBuilder:!0,additionalProperties:!1};var un={$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 ln={$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/find-transfer-group-many/find-transfer-group-many.schema.input.json#/definitions/find_transfer_group_many_tx_options"}]}},$queryBuilder:!0,additionalProperties:!1};var cn={$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 mn={$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 hn={$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 _n={$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 gn={$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 Tn={$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 yn={$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 Fn={$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 xn={$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"]},datetime:{description:"Select entries that are older than",type:["string"],format:"date-time"},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 bn={$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 On={$schema:"http://json-schema.org/draft-07/schema",$id:"GetExportFnInput",title:"GetExportFnInput",description:"Input for GetExport",type:"object",properties:{identifier:{description:"File name of the export to get",type:["string"]},options:{$ref:"#/definitions/get_export_fn_options"}},definitions:{get_export_fn_options:{allOf:[{$ref:"/txs/get-export/get-export.schema.input.json#/definitions/get_export_tx_options"}]}},required:["identifier"],additionalProperties:!1};var $n={$schema:"http://json-schema.org/draft-07/schema",$id:"GetExportFnOutput",title:"GetExportFnOutput",description:"Output of getExport",type:"object",$ref:"/txs/get-export/get-export.schema.output.json"};var wn={$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 In={$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 jn={$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 kn={$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 Sn={$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 vn={$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 En={$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 Gn={$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 Cn={$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 Rn={$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 Mn={$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 Pn={$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 Wn={$schema:"http://json-schema.org/draft-07/schema",$id:"HealthcheckFnInput",title:"HealthcheckFnInput",description:"Input for healthcheck",type:"object",properties:{options:{$ref:"#/definitions/healthcheck_fn_options"}},definitions:{healthcheck_fn_options:{description:"Optional flags for input",type:"object",allOf:[{$ref:"/txs/healthcheck/healthcheck.schema.input.json#/definitions/healthcheck_tx_options"}]}},required:[],additionalProperties:!1};var Dn={$schema:"http://json-schema.org/draft-07/schema",$id:"HealthcheckFnOutput",title:"HealthcheckFnOutput",description:"Output of healthcheck",type:"object",$ref:"/txs/healthcheck/healthcheck.schema.output.json"};var lt={$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 Nn={$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 An={$schema:"http://json-schema.org/draft-07/schema",$id:"ListExportsFnInput",title:"ListExportsFnInput",description:"Input for listExports",type:"object",properties:{type:{description:"Type of the export",$ref:"/txs/get-export/get-export.schema.output.json#/definitions/export_type"},date:{description:"Date of the export",type:"string",format:"date"},options:{$ref:"#/definitions/list_exports_fn_options"}},definitions:{list_exports_fn_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_limiting_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"/txs/list-export-many/list-export-many.schema.input.json#/definitions/list_export_many_ordering_options"},{$ref:"/fns/fn-consts.schema.json#/definitions/i_fn_find_options_extra"}]}},additionalProperties:!1};var Un={$schema:"http://json-schema.org/draft-07/schema",$id:"ListExportsFnOutput",title:"ListExportsFnOutput",description:"Output of listExports",type:"object",$ref:"/txs/list-export-many/list-export-many.schema.output.json"};var qn={$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 Bn={$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 Ln={$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 Hn={$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 Vn={$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 zn={$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 Jn={$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 Qn={$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 Kn={$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 Yn={$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 Xn={$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"},extend_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 Zn={$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 ta={$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 ra={$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 na={$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 sa={$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 ia={$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 oa={$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 pa={$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}'}},required:["aggregators"],additionalProperties:!1};var da={$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 fa={$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 ua={$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","exportBalanceHistory","exportTokenMany","exportTransferGroupMany","exportTransferMany","exportWalletMany","findBalanceMany","findTokenMany","findTransferGroupMany","findTransferMany","findWalletMany","getBalance","getBalanceHistory","getExport","getStatistics","getToken","getTokenMany","getTransfer","getTransferGroup","getWallet","getWalletMany","healthcheck","listExportMany"]}},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}},required:["token"],additionalProperties:!1};var ca={$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 ma={$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 ha={$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 _a={$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 ga={$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 Ta={$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 ya={$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 Fa={$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 xa={$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 ba={$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 Oa={$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 $a={$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}'}},additionalProperties:!1};var wa={$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 Ia={$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 ja={$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 ka={$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 Sa={$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 va={$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 Ea={$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 Ga={$schema:"http://json-schema.org/draft-07/schema",$id:"ExportBalanceHistoryTxInput",title:"ExportBalanceHistoryTxInput",description:"Input for exportBalanceHistory",type:"object",properties:{balance:{$ref:"/txs/get-balance/get-balance.schema.input.json#/definitions/unique_balance_filter"},options:{$ref:"#/definitions/export_balance_history_tx_options"}},definitions:{export_balance_history_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_limiting_options"},{$ref:"/txs/get-balance-history/get-balance-history.schema.input.json#/definitions/get_balance_history_ordering_options"},{$ref:"/txs/get-balance-history/get-balance-history.schema.input.json#/definitions/balance_history_select_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_metadata_options"}]}},required:["balance"],additionalProperties:!1};var Ca={$schema:"http://json-schema.org/draft-07/schema",$id:"ExportBalanceHistoryTxOutput",title:"ExportBalanceHistoryTxOutput",description:"Output of exportBalanceHistory",type:"object",properties:{export:{$ref:"/txs/get-export/get-export.schema.output.json#/definitions/export"}},required:["export"],additionalProperties:!1};var Ra={$schema:"http://json-schema.org/draft-07/schema",$id:"ExportTokenManyTxInput",title:"ExportTokenManyTxInput",description:"Input for exportTokenMany",type:"object",properties:{token:{$ref:"/txs/find-token-many/find-token-many.schema.input.json#/definitions/find_token_many_filter"},options:{$ref:"#/definitions/export_token_many_tx_options"}},definitions:{export_token_many_tx_options:{$ref:"/txs/find-token-many/find-token-many.schema.input.json#/definitions/find_token_many_tx_options"}},additionalProperties:!1};var Ma={$schema:"http://json-schema.org/draft-07/schema",$id:"ExportTokenManyTxOutput",title:"ExportTokenManyTxOutput",description:"Output of exportTokenMany",type:"object",properties:{export:{$ref:"/txs/get-export/get-export.schema.output.json#/definitions/export"}},required:["export"],additionalProperties:!1};var Pa={$schema:"http://json-schema.org/draft-07/schema",$id:"ExportTransferGroupManyTxInput",title:"ExportTransferGroupManyTxInput",description:"Input for exportTransferGroupMany",type:"object",properties:{transfer_group:{$ref:"/txs/find-transfer-group-many/find-transfer-group-many.schema.input.json#/definitions/find_transfer_group_many_filter"},options:{$ref:"#/definitions/export_transfer_group_many_tx_options"}},definitions:{export_transfer_group_many_tx_options:{$ref:"/txs/find-transfer-group-many/find-transfer-group-many.schema.input.json#/definitions/find_transfer_group_many_tx_options"}},additionalProperties:!1};var Wa={$schema:"http://json-schema.org/draft-07/schema",$id:"ExportTransferGroupManyTxOutput",title:"ExportTransferGroupManyTxOutput",description:"Output of exportTransferGroupMany",type:"object",properties:{export:{$ref:"/txs/get-export/get-export.schema.output.json#/definitions/export"}},required:["export"],additionalProperties:!1};var Da={$schema:"http://json-schema.org/draft-07/schema",$id:"ExportTransferManyTxInput",title:"ExportTransferManyTxInput",description:"Input for ExportTransferMany",type:"object",properties:{transfer:{$ref:"/txs/find-transfer-many/find-transfer-many.schema.input.json#/definitions/find_transfer_many_filter"},options:{$ref:"#/definitions/export_transfer_many_tx_options"}},definitions:{export_transfer_many_tx_options:{allOf:[{$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:"/txs/find-transfer-many/find-transfer-many.schema.input.json#/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"}]}},additionalProperties:!1};var Na={$schema:"http://json-schema.org/draft-07/schema",$id:"ExportTransferManyTxOutput",title:"ExportTransferManyTxOutput",description:"Output of ExportTransferMany",type:"object",properties:{export:{$ref:"/txs/get-export/get-export.schema.output.json#/definitions/export"}},required:["export"],additionalProperties:!1};var Aa={$schema:"http://json-schema.org/draft-07/schema",$id:"ExportWalletManyTxInput",title:"ExportWalletManyTxInput",description:"Input for exportWalletMany",type:"object",properties:{wallet:{$ref:"/txs/find-wallet-many/find-wallet-many.schema.input.json#/definitions/find_wallet_many_filter"},options:{$ref:"#/definitions/export_wallet_many_tx_options"}},definitions:{export_wallet_many_tx_options:{$ref:"/txs/find-wallet-many/find-wallet-many.schema.input.json#/definitions/find_wallet_many_tx_options"}},additionalProperties:!1};var Ua={$schema:"http://json-schema.org/draft-07/schema",$id:"ExportWalletManyTxOutput",title:"ExportWalletManyTxOutput",description:"Output of exportWalletMany",type:"object",properties:{export:{$ref:"/txs/get-export/get-export.schema.output.json#/definitions/export"}},required:["export"],additionalProperties:!1};var qa={$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 Ba={$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 La={$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:{},properties:{include_balance:{description:"Return the total system balance of token",type:"boolean"}},$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 Ha={$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:{anyOf:[{$ref:"/txs/get-token/get-token.schema.output.json#/definitions/token"},{$ref:"/txs/get-token/get-token.schema.output.json#/definitions/token_with_balance"}]}},metadata:{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_find_metadata"}},required:["tokens","metadata"],additionalProperties:!1};var Va={$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_count:{description:"Return number of transfers in the transfer_group",type:"boolean",default:!1}}},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"}]}},additionalProperties:!1};var za={$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:"#/definitions/transfer_group_with_transfers_count"}},metadata:{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_find_metadata"}},definitions:{transfer_group_transfers_count:{type:"object",properties:{transfers_count:{description:"Number of transfers in the group",type:"number"}},$typescript:'{"additionalProperties": false}'},transfer_group_with_transfers_count:{allOf:[{$ref:"/txs/get-transfer-group/get-transfer-group.schema.output.json#/definitions/transfer_group"},{$ref:"#/definitions/transfer_group_transfers_count"}]}},required:["transfer_groups","metadata"],additionalProperties:!1};var Ja={$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"}]}},additionalProperties:!1};var Qa={$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 Ka={$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 Ya={$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 Xa={$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 Za={$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 es={$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 ts={$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 rs={$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"}}}}},required:["balance"],additionalProperties:!1};var ns={$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"},status:{description:"The status of the change to balance",type:["string"],enum:["pending","finished"]},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","available_balance"]}},additionalProperties:!1};var as={$schema:"http://json-schema.org/draft-07/schema",$id:"GetExportTxInput",title:"GetExportTxInput",description:"Input for getExport",type:"object",properties:{export:{$ref:"#/definitions/unique_export_filter"},options:{$ref:"#/definitions/get_export_tx_options"}},definitions:{get_export_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/get_export_additional_options"}]},get_export_additional_options:{description:"Optional flags for input",type:"object",properties:{return_signed_url:{description:"Return signed url for downloading the export file, will only be returned if status === 'completed'",type:"boolean",default:!1}},default:{},$typescript:'{"additionalProperties": false}'},unique_export_filter:{description:"UNIQUE filtering options for export",type:"object",properties:{identifier:{description:"The name of the exported file",type:"string"}},required:["identifier"]}},required:["export"],additionalProperties:!1};var ss={$schema:"http://json-schema.org/draft-07/schema",$id:"GetExportTxOutput",title:"GetExportTxOutput",description:"Output of getExport",type:"object",properties:{export:{description:"requested export",anyOf:[{$ref:"#/definitions/export"}]}},definitions:{export_type:{description:"The type of the export",type:"string",enum:["transfers","transfer_groups","tokens","wallets","balance_history","unknown"]},export:{properties:{identifier:{description:"Unique identifier of the export",type:"string"},status:{description:"Status of the export",type:"string",enum:["started","completed","error"]},type:{$ref:"#/definitions/export_type"},created_at:{description:"Timestamp when export was initiated",type:"string"},completed_at:{description:"Timestamp when export was finished",type:"string"},fields:{description:"The fields selected for this export",type:"array",items:{type:"string"}},count:{description:"The number of entities exported in this file",type:"number"},signed_url:{description:"Signed URL for downloading the export file",type:"string"},size:{description:"Size of the exported file",type:"string"},message:{description:"Extra information about the state of the file",type:"string"}},required:["identifier"],$typescript:'{"additionalProperties": false}'}},additionalProperties:!1};var is={$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 os={$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 ps={$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 ds={$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 fs={$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:{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},include_balance:{type:"boolean",description:"Return the total system balance of token",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 us={$schema:"http://json-schema.org/draft-07/schema",$id:"GetTokenTxOutput",title:"GetTokenTxOutput",description:"Output of getToken",type:"object",properties:{token:{description:"requested token",anyOf:[{$ref:"#/definitions/token"},{$ref:"#/definitions/token_with_balance"}]}},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"},status:{$ref:"/db/token/token.schema.json#/properties/status"},belongs_to_foreign:{description:"Foreign of the belongs_to wallet if exists",type:["string","null"]}},required:["id"],$typescript:'{"additionalProperties": false}'},token_with_balance:{type:"object",allOf:[{$ref:"#/definitions/token"},{$ref:"#/definitions/token_balance"}]},token_balance:{type:"object",properties:{balance_transfer_id:{description:"Latest transfer id",$ref:"/db/transfer-log/transfer-log.schema.json#/properties/transfer_id"},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"}},$typescript:'{"additionalProperties": false}'}},additionalProperties:!1};var ls={$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},include_balance:{type:"boolean",description:"Return the total system balance of token",default:!1}},default:{},$typescript:'{"additionalProperties": false}'}},required:["tokens"],additionalProperties:!1};var cs={$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"},{$ref:"/txs/get-token/get-token.schema.output.json#/definitions/token_with_balance"},{type:"null"}]}},required:["tokens"],additionalProperties:!1};var ms={$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 hs={$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 _s={$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 gs={$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 Ts={$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 ys={$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 Fs={$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}'}},required:["wallets"],additionalProperties:!1};var xs={$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 bs={$schema:"http://json-schema.org/draft-07/schema",$id:"HealthcheckTxInput",title:"HealthcheckTxInput",description:"Input for healthcheck",type:"object",properties:{options:{$ref:"#/definitions/healthcheck_tx_options"}},definitions:{healthcheck_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options_without_tx"}]}},additionalProperties:!1};var Os={$schema:"http://json-schema.org/draft-07/schema",$id:"HealthcheckTxOutput",title:"HealthcheckTxOutput",description:"Output of healthcheck",type:"object",properties:{status:{description:"Status of the service",type:"string",enum:["green","yellow","red"]},message:{description:"Error message if some error occurred",type:"string"},database_size:{description:"Size of the database in MB",type:"string"},indexes_size:{description:"Size of all indexes of database in MB",type:"string"},connection_count:{description:"Number of external connections to this database",type:"number"}},required:["status"],additionalProperties:!1};var ct={$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 $s={$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 ws={$schema:"http://json-schema.org/draft-07/schema",$id:"ListExportManyTxInput",title:"ListExportManyTxInput",description:"Input for ListExportMany",type:"object",properties:{export:{type:"object",properties:{date:{description:"Date the file was created on",type:"string",format:"date"},type:{description:"Entity that was exported",type:"string",$ref:"/txs/get-export/get-export.schema.output.json#/definitions/export_type"}}},options:{$ref:"#/definitions/list_export_many_tx_options"}},definitions:{list_export_many_tx_options:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_limiting_options"},{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_general_options"},{$ref:"#/definitions/list_export_many_ordering_options"}]},list_export_many_ordering_options:{$typescript:'{"additionalProperties":false}',description:"Optional flags for input ordering",type:"object",properties:{order:{description:"Ordering options",type:"array",items:{$ref:"#/definitions/list_export_many_ordering_input"}}}},list_export_many_ordering_input:{allOf:[{$ref:"/txs/tx-consts.schema.json#/definitions/i_tx_ordering_input"},{$ref:"#/definitions/list_export_many_ordering_input_field"}]},list_export_many_ordering_input_field:{type:"object",properties:{field:{type:"string",enum:["identifier","completed_at","created_at"]}},$typescript:'{"additionalProperties": false}'}},additionalProperties:!1};var Is={$schema:"http://json-schema.org/draft-07/schema",$id:"ListExportManyTxOutput",title:"ListExportManyTxOutput",description:"Output of ListExportMany",type:"object",properties:{exports:{description:"The exports matching the query",type:"array",items:{$ref:"/txs/get-export/get-export.schema.output.json#/definitions/export"}}},required:["exports"],additionalProperties:!1};var js={$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 ks={$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 Ss={$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 vs={$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 Es={$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 Gs={$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 Cs={$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}},required:["transfer_group"],additionalProperties:!1};var Rs={$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 Ms={$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 Ps={$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 Ws={$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 Ds={$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 Ns={$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 As={$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 Us={$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 qs={$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 Bs={$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 Ls={$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","update"],additionalProperties:!1};var Hs={$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 Vs={$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",$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"}},additionalProperties:!1}},required:["transfer","update"],additionalProperties:!1};var zs={$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 Js={$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","update"],additionalProperties:!1};var Qs={$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 Ks={$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","update"],additionalProperties:!1};var Ys={$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 Xs={$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 Zs={$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 ei={$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","update"],additionalProperties:!1};var ti={$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 d=new _c.default({removeAdditional:!0,useDefaults:!0,coerceTypes:!0,formats:{validkey:/^(?!.*\.\.)[a-zA-Z_][a-zA-Z0-9_.-]*[a-zA-Z0-9_-]$/},strict:!1});d.addFormat("date-time",{validate:Mf});d.addFormat("date",{validate:oi});function Qp(t,e){if(e!==void 0)return new Te({errors:t},e)}function hc(t){return function(e){if(t===void 0)return{isValid:!1,inputCopy:e,error:Qp([new Error("Undefined validator")],"Undefined validator")};try{let r=pi(e),n=t(r),a=n?void 0:t.errors,s=n?void 0:d.errorsText(a),i=Qp(a,s);return{isValid:n,inputCopy:r,error:i}}catch(r){return{isValid:!1,inputCopy:e,error:Qp([r],r.message)}}}}function l(t,e){let r=JSON.parse(JSON.stringify(t));return gc(r,e)}function gc(t,e){return typeof t!="object"||Object.keys(t).forEach(r=>{r==="$ref"&&t.$ref.startsWith("#")?t.$ref=e+t.$ref:t[r]=gc(t[r],e)}),t}function Tc(t,e){let r=l(t,e),n=r.properties.options;return b({$id:r.$id.replace("Input","Options"),definitions:r.definitions},n)}function yc(t,e){let r=l(t,e),n=r.definitions[t.$allowStreamInput];return b({$id:r.$id.replace("Input","StreamChunk"),definitions:r.definitions},n)}var f={};d.addSchema(l(Dp,"/api/jsonrpc/jsonrpc.request.schema.json"),"/api/jsonrpc/jsonrpc.request.schema.json");f.JSONRPCRequest=Dp;d.addSchema(l(Np,"/api/jsonrpc/jsonrpc.response.schema.json"),"/api/jsonrpc/jsonrpc.response.schema.json");f.JSONRPCResponse=Np;d.addSchema(l(Ap,"/client-options.schema.json"),"/client-options.schema.json");f.ClientOptions=Ap;d.addSchema(l(ut,"/db/consts.schema.json"),"/db/consts.schema.json");f.Consts=ut;d.addSchema(l(cr,"/db/token/token.schema.input.json"),"/db/token/token.schema.input.json");f.TokenTableInput=cr;d.addSchema(l(mr,"/db/token/token.schema.json"),"/db/token/token.schema.json");f.TokenTable=mr;d.addSchema(l(Up,"/db/token/token.schema.optional.json"),"/db/token/token.schema.optional.json");f.TokenTableOptional=Up;d.addSchema(l(hr,"/db/transfer/transfer.schema.input.json"),"/db/transfer/transfer.schema.input.json");f.TransferTableInput=hr;d.addSchema(l(_r,"/db/transfer/transfer.schema.json"),"/db/transfer/transfer.schema.json");f.TransferTable=_r;d.addSchema(l(qp,"/db/transfer/transfer.schema.optional.json"),"/db/transfer/transfer.schema.optional.json");f.TransferTableOptional=qp;d.addSchema(l(gr,"/db/transfer-group/transfer-group.schema.input.json"),"/db/transfer-group/transfer-group.schema.input.json");f.TransferGroupTableInput=gr;d.addSchema(l(Tr,"/db/transfer-group/transfer-group.schema.json"),"/db/transfer-group/transfer-group.schema.json");f.TransferGroupTable=Tr;d.addSchema(l(Bp,"/db/transfer-group/transfer-group.schema.optional.json"),"/db/transfer-group/transfer-group.schema.optional.json");f.TransferGroupTableOptional=Bp;d.addSchema(l(yr,"/db/transfer-log/transfer-log.schema.input.json"),"/db/transfer-log/transfer-log.schema.input.json");f.TransferLogTableInput=yr;d.addSchema(l(Fr,"/db/transfer-log/transfer-log.schema.json"),"/db/transfer-log/transfer-log.schema.json");f.TransferLogTable=Fr;d.addSchema(l(Lp,"/db/transfer-log/transfer-log.schema.optional.json"),"/db/transfer-log/transfer-log.schema.optional.json");f.TransferLogTableOptional=Lp;d.addSchema(l(xr,"/db/wallet/wallet.schema.input.json"),"/db/wallet/wallet.schema.input.json");f.WalletTableInput=xr;d.addSchema(l(br,"/db/wallet/wallet.schema.json"),"/db/wallet/wallet.schema.json");f.WalletTable=br;d.addSchema(l(Hp,"/db/wallet/wallet.schema.optional.json"),"/db/wallet/wallet.schema.optional.json");f.WalletTableOptional=Hp;d.addSchema(l(Or,"/db/wallet-token-setting/wallet-token-setting.schema.input.json"),"/db/wallet-token-setting/wallet-token-setting.schema.input.json");f.WalletTokenSettingTableInput=Or;d.addSchema(l($r,"/db/wallet-token-setting/wallet-token-setting.schema.json"),"/db/wallet-token-setting/wallet-token-setting.schema.json");f.WalletTokenSettingTable=$r;d.addSchema(l(Vp,"/db/wallet-token-setting/wallet-token-setting.schema.optional.json"),"/db/wallet-token-setting/wallet-token-setting.schema.optional.json");f.WalletTokenSettingTableOptional=Vp;d.addSchema(l(wr,"/db/wapi-setting/wapi-setting.schema.input.json"),"/db/wapi-setting/wapi-setting.schema.input.json");f.WapiSettingTableInput=wr;d.addSchema(l(Ir,"/db/wapi-setting/wapi-setting.schema.json"),"/db/wapi-setting/wapi-setting.schema.json");f.WapiSettingTable=Ir;d.addSchema(l(zp,"/db/wapi-setting/wapi-setting.schema.optional.json"),"/db/wapi-setting/wapi-setting.schema.optional.json");f.WapiSettingTableOptional=zp;d.addSchema(l(jr,"/db/wapi-statistic/wapi-statistic.schema.input.json"),"/db/wapi-statistic/wapi-statistic.schema.input.json");f.WapiStatisticTableInput=jr;d.addSchema(l(kr,"/db/wapi-statistic/wapi-statistic.schema.json"),"/db/wapi-statistic/wapi-statistic.schema.json");f.WapiStatisticTable=kr;d.addSchema(l(Jp,"/db/wapi-statistic/wapi-statistic.schema.optional.json"),"/db/wapi-statistic/wapi-statistic.schema.optional.json");f.WapiStatisticTableOptional=Jp;d.addSchema(l(Sr,"/fns/aggregate-transfers/aggregate-transfers.schema.input.json"),"/fns/aggregate-transfers/aggregate-transfers.schema.input.json");f.AggregateTransfersFnInput=Sr;d.addSchema(l(vr,"/fns/aggregate-transfers/aggregate-transfers.schema.output.json"),"/fns/aggregate-transfers/aggregate-transfers.schema.output.json");f.AggregateTransfersFnOutput=vr;d.addSchema(l(Er,"/fns/create-access-token/create-access-token.schema.input.json"),"/fns/create-access-token/create-access-token.schema.input.json");f.CreateAccessTokenFnInput=Er;d.addSchema(l(Gr,"/fns/create-access-token/create-access-token.schema.output.json"),"/fns/create-access-token/create-access-token.schema.output.json");f.CreateAccessTokenFnOutput=Gr;d.addSchema(l(Cr,"/fns/create-contract/create-contract.schema.input.json"),"/fns/create-contract/create-contract.schema.input.json");f.CreateContractFnInput=Cr;d.addSchema(l(Rr,"/fns/create-contract/create-contract.schema.output.json"),"/fns/create-contract/create-contract.schema.output.json");f.CreateContractFnOutput=Rr;d.addSchema(l(Mr,"/fns/create-deposit/create-deposit.schema.input.json"),"/fns/create-deposit/create-deposit.schema.input.json");f.CreateDepositFnInput=Mr;d.addSchema(l(Pr,"/fns/create-deposit/create-deposit.schema.output.json"),"/fns/create-deposit/create-deposit.schema.output.json");f.CreateDepositFnOutput=Pr;d.addSchema(l(Wr,"/fns/create-exchange/create-exchange.schema.input.json"),"/fns/create-exchange/create-exchange.schema.input.json");f.CreateExchangeFnInput=Wr;d.addSchema(l(Dr,"/fns/create-exchange/create-exchange.schema.output.json"),"/fns/create-exchange/create-exchange.schema.output.json");f.CreateExchangeFnOutput=Dr;d.addSchema(l(Nr,"/fns/create-token/create-token.schema.input.json"),"/fns/create-token/create-token.schema.input.json");f.CreateTokenFnInput=Nr;d.addSchema(l(Ar,"/fns/create-token/create-token.schema.output.json"),"/fns/create-token/create-token.schema.output.json");f.CreateTokenFnOutput=Ar;d.addSchema(l(Ur,"/fns/create-transfer/create-transfer.schema.input.json"),"/fns/create-transfer/create-transfer.schema.input.json");f.CreateTransferFnInput=Ur;d.addSchema(l(qr,"/fns/create-transfer/create-transfer.schema.output.json"),"/fns/create-transfer/create-transfer.schema.output.json");f.CreateTransferFnOutput=qr;d.addSchema(l(Br,"/fns/create-transfer-group/create-transfer-group.schema.input.json"),"/fns/create-transfer-group/create-transfer-group.schema.input.json");f.CreateTransferGroupFnInput=Br;d.addSchema(l(Lr,"/fns/create-transfer-group/create-transfer-group.schema.output.json"),"/fns/create-transfer-group/create-transfer-group.schema.output.json");f.CreateTransferGroupFnOutput=Lr;d.addSchema(l(Hr,"/fns/create-transfers/create-transfers.schema.input.json"),"/fns/create-transfers/create-transfers.schema.input.json");f.CreateTransfersFnInput=Hr;d.addSchema(l(Vr,"/fns/create-transfers/create-transfers.schema.output.json"),"/fns/create-transfers/create-transfers.schema.output.json");f.CreateTransfersFnOutput=Vr;d.addSchema(l(zr,"/fns/create-wallet/create-wallet.schema.input.json"),"/fns/create-wallet/create-wallet.schema.input.json");f.CreateWalletFnInput=zr;d.addSchema(l(Jr,"/fns/create-wallet/create-wallet.schema.output.json"),"/fns/create-wallet/create-wallet.schema.output.json");f.CreateWalletFnOutput=Jr;d.addSchema(l(Qr,"/fns/create-withdrawal/create-withdrawal.schema.input.json"),"/fns/create-withdrawal/create-withdrawal.schema.input.json");f.CreateWithdrawalFnInput=Qr;d.addSchema(l(Kr,"/fns/create-withdrawal/create-withdrawal.schema.output.json"),"/fns/create-withdrawal/create-withdrawal.schema.output.json");f.CreateWithdrawalFnOutput=Kr;d.addSchema(l(Yr,"/fns/export-balance-history/export-balance-history.schema.input.json"),"/fns/export-balance-history/export-balance-history.schema.input.json");f.ExportBalanceHistoryFnInput=Yr;d.addSchema(l(Xr,"/fns/export-balance-history/export-balance-history.schema.output.json"),"/fns/export-balance-history/export-balance-history.schema.output.json");f.ExportBalanceHistoryFnOutput=Xr;d.addSchema(l(Zr,"/fns/export-tokens/export-tokens.schema.input.json"),"/fns/export-tokens/export-tokens.schema.input.json");f.ExportTokensFnInput=Zr;d.addSchema(l(en,"/fns/export-tokens/export-tokens.schema.output.json"),"/fns/export-tokens/export-tokens.schema.output.json");f.ExportTokensFnOutput=en;d.addSchema(l(tn,"/fns/export-transfer-groups/export-transfer-groups.schema.input.json"),"/fns/export-transfer-groups/export-transfer-groups.schema.input.json");f.ExportTransferGroupsFnInput=tn;d.addSchema(l(rn,"/fns/export-transfer-groups/export-transfer-groups.schema.output.json"),"/fns/export-transfer-groups/export-transfer-groups.schema.output.json");f.ExportTransferGroupsFnOutput=rn;d.addSchema(l(nn,"/fns/export-transfers/export-transfers.schema.input.json"),"/fns/export-transfers/export-transfers.schema.input.json");f.ExportTransfersFnInput=nn;d.addSchema(l(an,"/fns/export-transfers/export-transfers.schema.output.json"),"/fns/export-transfers/export-transfers.schema.output.json");f.ExportTransfersFnOutput=an;d.addSchema(l(sn,"/fns/export-wallets/export-wallets.schema.input.json"),"/fns/export-wallets/export-wallets.schema.input.json");f.ExportWalletsFnInput=sn;d.addSchema(l(on,"/fns/export-wallets/export-wallets.schema.output.json"),"/fns/export-wallets/export-wallets.schema.output.json");f.ExportWalletsFnOutput=on;d.addSchema(l(pn,"/fns/find-balances/find-balances.schema.input.json"),"/fns/find-balances/find-balances.schema.input.json");f.FindBalancesFnInput=pn;d.addSchema(l(dn,"/fns/find-balances/find-balances.schema.output.json"),"/fns/find-balances/find-balances.schema.output.json");f.FindBalancesFnOutput=dn;d.addSchema(l(fn,"/fns/find-tokens/find-tokens.schema.input.json"),"/fns/find-tokens/find-tokens.schema.input.json");f.FindTokensFnInput=fn;d.addSchema(l(un,"/fns/find-tokens/find-tokens.schema.output.json"),"/fns/find-tokens/find-tokens.schema.output.json");f.FindTokensFnOutput=un;d.addSchema(l(ln,"/fns/find-transfer-groups/find-transfer-groups.schema.input.json"),"/fns/find-transfer-groups/find-transfer-groups.schema.input.json");f.FindTransferGroupsFnInput=ln;d.addSchema(l(cn,"/fns/find-transfer-groups/find-transfer-groups.schema.output.json"),"/fns/find-transfer-groups/find-transfer-groups.schema.output.json");f.FindTransferGroupsFnOutput=cn;d.addSchema(l(mn,"/fns/find-transfers/find-transfers.schema.input.json"),"/fns/find-transfers/find-transfers.schema.input.json");f.FindTransfersFnInput=mn;d.addSchema(l(hn,"/fns/find-transfers/find-transfers.schema.output.json"),"/fns/find-transfers/find-transfers.schema.output.json");f.FindTransfersFnOutput=hn;d.addSchema(l(_n,"/fns/find-wallets/find-wallets.schema.input.json"),"/fns/find-wallets/find-wallets.schema.input.json");f.FindWalletsFnInput=_n;d.addSchema(l(gn,"/fns/find-wallets/find-wallets.schema.output.json"),"/fns/find-wallets/find-wallets.schema.output.json");f.FindWalletsFnOutput=gn;d.addSchema(l(Tn,"/fns/fn-consts.schema.json"),"/fns/fn-consts.schema.json");f.FnConsts=Tn;d.addSchema(l(yn,"/fns/get-balance/get-balance.schema.input.json"),"/fns/get-balance/get-balance.schema.input.json");f.GetBalanceFnInput=yn;d.addSchema(l(Fn,"/fns/get-balance/get-balance.schema.output.json"),"/fns/get-balance/get-balance.schema.output.json");f.GetBalanceFnOutput=Fn;d.addSchema(l(xn,"/fns/get-balance-history/get-balance-history.schema.input.json"),"/fns/get-balance-history/get-balance-history.schema.input.json");f.GetBalanceHistoryFnInput=xn;d.addSchema(l(bn,"/fns/get-balance-history/get-balance-history.schema.output.json"),"/fns/get-balance-history/get-balance-history.schema.output.json");f.GetBalanceHistoryFnOutput=bn;d.addSchema(l(On,"/fns/get-export/get-export.schema.input.json"),"/fns/get-export/get-export.schema.input.json");f.GetExportFnInput=On;d.addSchema(l($n,"/fns/get-export/get-export.schema.output.json"),"/fns/get-export/get-export.schema.output.json");f.GetExportFnOutput=$n;d.addSchema(l(wn,"/fns/get-flags/get-flags.schema.input.json"),"/fns/get-flags/get-flags.schema.input.json");f.GetFlagsFnInput=wn;d.addSchema(l(In,"/fns/get-flags/get-flags.schema.output.json"),"/fns/get-flags/get-flags.schema.output.json");f.GetFlagsFnOutput=In;d.addSchema(l(jn,"/fns/get-statistics/get-statistics.schema.input.json"),"/fns/get-statistics/get-statistics.schema.input.json");f.GetStatisticsFnInput=jn;d.addSchema(l(kn,"/fns/get-statistics/get-statistics.schema.output.json"),"/fns/get-statistics/get-statistics.schema.output.json");f.GetStatisticsFnOutput=kn;d.addSchema(l(Sn,"/fns/get-token/get-token.schema.input.json"),"/fns/get-token/get-token.schema.input.json");f.GetTokenFnInput=Sn;d.addSchema(l(vn,"/fns/get-token/get-token.schema.output.json"),"/fns/get-token/get-token.schema.output.json");f.GetTokenFnOutput=vn;d.addSchema(l(En,"/fns/get-transfer/get-transfer.schema.input.json"),"/fns/get-transfer/get-transfer.schema.input.json");f.GetTransferFnInput=En;d.addSchema(l(Gn,"/fns/get-transfer/get-transfer.schema.output.json"),"/fns/get-transfer/get-transfer.schema.output.json");f.GetTransferFnOutput=Gn;d.addSchema(l(Cn,"/fns/get-transfer-group/get-transfer-group.schema.input.json"),"/fns/get-transfer-group/get-transfer-group.schema.input.json");f.GetTransferGroupFnInput=Cn;d.addSchema(l(Rn,"/fns/get-transfer-group/get-transfer-group.schema.output.json"),"/fns/get-transfer-group/get-transfer-group.schema.output.json");f.GetTransferGroupFnOutput=Rn;d.addSchema(l(Mn,"/fns/get-wallet/get-wallet.schema.input.json"),"/fns/get-wallet/get-wallet.schema.input.json");f.GetWalletFnInput=Mn;d.addSchema(l(Pn,"/fns/get-wallet/get-wallet.schema.output.json"),"/fns/get-wallet/get-wallet.schema.output.json");f.GetWalletFnOutput=Pn;d.addSchema(l(Wn,"/fns/healthcheck/healthcheck.schema.input.json"),"/fns/healthcheck/healthcheck.schema.input.json");f.HealthcheckFnInput=Wn;d.addSchema(l(Dn,"/fns/healthcheck/healthcheck.schema.output.json"),"/fns/healthcheck/healthcheck.schema.output.json");f.HealthcheckFnOutput=Dn;d.addSchema(l(lt,"/fns/import-data/import-data.schema.input.json"),"/fns/import-data/import-data.schema.input.json");f.ImportDataFnInput=lt;var Fc=Tc(lt,"/fns/import-data/import-data.schema.input.json");d.addSchema(Fc,"/fns/import-data/import-data.schema.options.json");f.ImportDataFnOptions=Fc;var xc=yc(lt,"/fns/import-data/import-data.schema.input.json");d.addSchema(xc,"/fns/import-data/import-data.schema.chunk.json");f.ImportDataFnStreamChunk=xc;d.addSchema(l(Nn,"/fns/import-data/import-data.schema.output.json"),"/fns/import-data/import-data.schema.output.json");f.ImportDataFnOutput=Nn;d.addSchema(l(An,"/fns/list-exports/list-exports.schema.input.json"),"/fns/list-exports/list-exports.schema.input.json");f.ListExportsFnInput=An;d.addSchema(l(Un,"/fns/list-exports/list-exports.schema.output.json"),"/fns/list-exports/list-exports.schema.output.json");f.ListExportsFnOutput=Un;d.addSchema(l(qn,"/fns/reverse-transfer/reverse-transfer.schema.input.json"),"/fns/reverse-transfer/reverse-transfer.schema.input.json");f.ReverseTransferFnInput=qn;d.addSchema(l(Bn,"/fns/reverse-transfer/reverse-transfer.schema.output.json"),"/fns/reverse-transfer/reverse-transfer.schema.output.json");f.ReverseTransferFnOutput=Bn;d.addSchema(l(Ln,"/fns/reverse-transfer-group/reverse-transfer-group.schema.input.json"),"/fns/reverse-transfer-group/reverse-transfer-group.schema.input.json");f.ReverseTransferGroupFnInput=Ln;d.addSchema(l(Hn,"/fns/reverse-transfer-group/reverse-transfer-group.schema.output.json"),"/fns/reverse-transfer-group/reverse-transfer-group.schema.output.json");f.ReverseTransferGroupFnOutput=Hn;d.addSchema(l(Vn,"/fns/reverse-transfers/reverse-transfers.schema.input.json"),"/fns/reverse-transfers/reverse-transfers.schema.input.json");f.ReverseTransfersFnInput=Vn;d.addSchema(l(zn,"/fns/reverse-transfers/reverse-transfers.schema.output.json"),"/fns/reverse-transfers/reverse-transfers.schema.output.json");f.ReverseTransfersFnOutput=zn;d.addSchema(l(Jn,"/fns/set-flags/set-flags.schema.input.json"),"/fns/set-flags/set-flags.schema.input.json");f.SetFlagsFnInput=Jn;d.addSchema(l(Qn,"/fns/set-flags/set-flags.schema.output.json"),"/fns/set-flags/set-flags.schema.output.json");f.SetFlagsFnOutput=Qn;d.addSchema(l(Kn,"/fns/update-token/update-token.schema.input.json"),"/fns/update-token/update-token.schema.input.json");f.UpdateTokenFnInput=Kn;d.addSchema(l(Yn,"/fns/update-token/update-token.schema.output.json"),"/fns/update-token/update-token.schema.output.json");f.UpdateTokenFnOutput=Yn;d.addSchema(l(Xn,"/fns/update-transfer/update-transfer.schema.input.json"),"/fns/update-transfer/update-transfer.schema.input.json");f.UpdateTransferFnInput=Xn;d.addSchema(l(Zn,"/fns/update-transfer/update-transfer.schema.output.json"),"/fns/update-transfer/update-transfer.schema.output.json");f.UpdateTransferFnOutput=Zn;d.addSchema(l(ea,"/fns/update-transfer-group/update-transfer-group.schema.input.json"),"/fns/update-transfer-group/update-transfer-group.schema.input.json");f.UpdateTransferGroupFnInput=ea;d.addSchema(l(ta,"/fns/update-transfer-group/update-transfer-group.schema.output.json"),"/fns/update-transfer-group/update-transfer-group.schema.output.json");f.UpdateTransferGroupFnOutput=ta;d.addSchema(l(ra,"/fns/update-transfer-groups/update-transfer-groups.schema.input.json"),"/fns/update-transfer-groups/update-transfer-groups.schema.input.json");f.UpdateTransferGroupsFnInput=ra;d.addSchema(l(na,"/fns/update-transfer-groups/update-transfer-groups.schema.output.json"),"/fns/update-transfer-groups/update-transfer-groups.schema.output.json");f.UpdateTransferGroupsFnOutput=na;d.addSchema(l(aa,"/fns/update-transfers/update-transfers.schema.input.json"),"/fns/update-transfers/update-transfers.schema.input.json");f.UpdateTransfersFnInput=aa;d.addSchema(l(sa,"/fns/update-transfers/update-transfers.schema.output.json"),"/fns/update-transfers/update-transfers.schema.output.json");f.UpdateTransfersFnOutput=sa;d.addSchema(l(ia,"/fns/update-wallet/update-wallet.schema.input.json"),"/fns/update-wallet/update-wallet.schema.input.json");f.UpdateWalletFnInput=ia;d.addSchema(l(oa,"/fns/update-wallet/update-wallet.schema.output.json"),"/fns/update-wallet/update-wallet.schema.output.json");f.UpdateWalletFnOutput=oa;d.addSchema(l(pa,"/txs/aggregate-transfer-many/aggregate-transfer-many.schema.input.json"),"/txs/aggregate-transfer-many/aggregate-transfer-many.schema.input.json");f.AggregateTransferManyTxInput=pa;d.addSchema(l(da,"/txs/aggregate-transfer-many/aggregate-transfer-many.schema.output.json"),"/txs/aggregate-transfer-many/aggregate-transfer-many.schema.output.json");f.AggregateTransferManyTxOutput=da;d.addSchema(l(fa,"/txs/authentication-check/authentication-check.schema.input.json"),"/txs/authentication-check/authentication-check.schema.input.json");f.AuthenticationCheckTxInput=fa;d.addSchema(l(ua,"/txs/authentication-check/authentication-check.schema.output.json"),"/txs/authentication-check/authentication-check.schema.output.json");f.AuthenticationCheckTxOutput=ua;d.addSchema(l(la,"/txs/create-access-token/create-access-token.schema.input.json"),"/txs/create-access-token/create-access-token.schema.input.json");f.CreateAccessTokenTxInput=la;d.addSchema(l(ca,"/txs/create-access-token/create-access-token.schema.output.json"),"/txs/create-access-token/create-access-token.schema.output.json");f.CreateAccessTokenTxOutput=ca;d.addSchema(l(ma,"/txs/create-contract/create-contract.schema.input.json"),"/txs/create-contract/create-contract.schema.input.json");f.CreateContractTxInput=ma;d.addSchema(l(ha,"/txs/create-contract/create-contract.schema.output.json"),"/txs/create-contract/create-contract.schema.output.json");f.CreateContractTxOutput=ha;d.addSchema(l(_a,"/txs/create-deposit/create-deposit.schema.input.json"),"/txs/create-deposit/create-deposit.schema.input.json");f.CreateDepositTxInput=_a;d.addSchema(l(ga,"/txs/create-deposit/create-deposit.schema.output.json"),"/txs/create-deposit/create-deposit.schema.output.json");f.CreateDepositTxOutput=ga;d.addSchema(l(Ta,"/txs/create-distribution/create-distribution.schema.input.json"),"/txs/create-distribution/create-distribution.schema.input.json");f.CreateDistributionTxInput=Ta;d.addSchema(l(ya,"/txs/create-distribution/create-distribution.schema.output.json"),"/txs/create-distribution/create-distribution.schema.output.json");f.CreateDistributionTxOutput=ya;d.addSchema(l(Fa,"/txs/create-token/create-token.schema.input.json"),"/txs/create-token/create-token.schema.input.json");f.CreateTokenTxInput=Fa;d.addSchema(l(xa,"/txs/create-token/create-token.schema.output.json"),"/txs/create-token/create-token.schema.output.json");f.CreateTokenTxOutput=xa;d.addSchema(l(ba,"/txs/create-transfer/create-transfer.schema.input.json"),"/txs/create-transfer/create-transfer.schema.input.json");f.CreateTransferTxInput=ba;d.addSchema(l(Oa,"/txs/create-transfer/create-transfer.schema.output.json"),"/txs/create-transfer/create-transfer.schema.output.json");f.CreateTransferTxOutput=Oa;d.addSchema(l($a,"/txs/create-transfer-group/create-transfer-group.schema.input.json"),"/txs/create-transfer-group/create-transfer-group.schema.input.json");f.CreateTransferGroupTxInput=$a;d.addSchema(l(wa,"/txs/create-transfer-group/create-transfer-group.schema.output.json"),"/txs/create-transfer-group/create-transfer-group.schema.output.json");f.CreateTransferGroupTxOutput=wa;d.addSchema(l(Ia,"/txs/create-transfer-many/create-transfer-many.schema.input.json"),"/txs/create-transfer-many/create-transfer-many.schema.input.json");f.CreateTransferManyTxInput=Ia;d.addSchema(l(ja,"/txs/create-transfer-many/create-transfer-many.schema.output.json"),"/txs/create-transfer-many/create-transfer-many.schema.output.json");f.CreateTransferManyTxOutput=ja;d.addSchema(l(ka,"/txs/create-wallet/create-wallet.schema.input.json"),"/txs/create-wallet/create-wallet.schema.input.json");f.CreateWalletTxInput=ka;d.addSchema(l(Sa,"/txs/create-wallet/create-wallet.schema.output.json"),"/txs/create-wallet/create-wallet.schema.output.json");f.CreateWalletTxOutput=Sa;d.addSchema(l(va,"/txs/create-withdrawal/create-withdrawal.schema.input.json"),"/txs/create-withdrawal/create-withdrawal.schema.input.json");f.CreateWithdrawalTxInput=va;d.addSchema(l(Ea,"/txs/create-withdrawal/create-withdrawal.schema.output.json"),"/txs/create-withdrawal/create-withdrawal.schema.output.json");f.CreateWithdrawalTxOutput=Ea;d.addSchema(l(Ga,"/txs/export-balance-history/export-balance-history.schema.input.json"),"/txs/export-balance-history/export-balance-history.schema.input.json");f.ExportBalanceHistoryTxInput=Ga;d.addSchema(l(Ca,"/txs/export-balance-history/export-balance-history.schema.output.json"),"/txs/export-balance-history/export-balance-history.schema.output.json");f.ExportBalanceHistoryTxOutput=Ca;d.addSchema(l(Ra,"/txs/export-token-many/export-token-many.schema.input.json"),"/txs/export-token-many/export-token-many.schema.input.json");f.ExportTokenManyTxInput=Ra;d.addSchema(l(Ma,"/txs/export-token-many/export-token-many.schema.output.json"),"/txs/export-token-many/export-token-many.schema.output.json");f.ExportTokenManyTxOutput=Ma;d.addSchema(l(Pa,"/txs/export-transfer-group-many/export-transfer-group-many.schema.input.json"),"/txs/export-transfer-group-many/export-transfer-group-many.schema.input.json");f.ExportTransferGroupManyTxInput=Pa;d.addSchema(l(Wa,"/txs/export-transfer-group-many/export-transfer-group-many.schema.output.json"),"/txs/export-transfer-group-many/export-transfer-group-many.schema.output.json");f.ExportTransferGroupManyTxOutput=Wa;d.addSchema(l(Da,"/txs/export-transfer-many/export-transfer-many.schema.input.json"),"/txs/export-transfer-many/export-transfer-many.schema.input.json");f.ExportTransferManyTxInput=Da;d.addSchema(l(Na,"/txs/export-transfer-many/export-transfer-many.schema.output.json"),"/txs/export-transfer-many/export-transfer-many.schema.output.json");f.ExportTransferManyTxOutput=Na;d.addSchema(l(Aa,"/txs/export-wallet-many/export-wallet-many.schema.input.json"),"/txs/export-wallet-many/export-wallet-many.schema.input.json");f.ExportWalletManyTxInput=Aa;d.addSchema(l(Ua,"/txs/export-wallet-many/export-wallet-many.schema.output.json"),"/txs/export-wallet-many/export-wallet-many.schema.output.json");f.ExportWalletManyTxOutput=Ua;d.addSchema(l(qa,"/txs/find-balance-many/find-balance-many.schema.input.json"),"/txs/find-balance-many/find-balance-many.schema.input.json");f.FindBalanceManyTxInput=qa;d.addSchema(l(Ba,"/txs/find-balance-many/find-balance-many.schema.output.json"),"/txs/find-balance-many/find-balance-many.schema.output.json");f.FindBalanceManyTxOutput=Ba;d.addSchema(l(La,"/txs/find-token-many/find-token-many.schema.input.json"),"/txs/find-token-many/find-token-many.schema.input.json");f.FindTokenManyTxInput=La;d.addSchema(l(Ha,"/txs/find-token-many/find-token-many.schema.output.json"),"/txs/find-token-many/find-token-many.schema.output.json");f.FindTokenManyTxOutput=Ha;d.addSchema(l(Va,"/txs/find-transfer-group-many/find-transfer-group-many.schema.input.json"),"/txs/find-transfer-group-many/find-transfer-group-many.schema.input.json");f.FindTransferGroupManyTxInput=Va;d.addSchema(l(za,"/txs/find-transfer-group-many/find-transfer-group-many.schema.output.json"),"/txs/find-transfer-group-many/find-transfer-group-many.schema.output.json");f.FindTransferGroupManyTxOutput=za;d.addSchema(l(Ja,"/txs/find-transfer-many/find-transfer-many.schema.input.json"),"/txs/find-transfer-many/find-transfer-many.schema.input.json");f.FindTransferManyTxInput=Ja;d.addSchema(l(Qa,"/txs/find-transfer-many/find-transfer-many.schema.output.json"),"/txs/find-transfer-many/find-transfer-many.schema.output.json");f.FindTransferManyTxOutput=Qa;d.addSchema(l(Ka,"/txs/find-wallet-many/find-wallet-many.schema.input.json"),"/txs/find-wallet-many/find-wallet-many.schema.input.json");f.FindWalletManyTxInput=Ka;d.addSchema(l(Ya,"/txs/find-wallet-many/find-wallet-many.schema.output.json"),"/txs/find-wallet-many/find-wallet-many.schema.output.json");f.FindWalletManyTxOutput=Ya;d.addSchema(l(Xa,"/txs/finish-transaction/finish-transaction.schema.input.json"),"/txs/finish-transaction/finish-transaction.schema.input.json");f.FinishTransactionTxInput=Xa;d.addSchema(l(Za,"/txs/finish-transaction/finish-transaction.schema.output.json"),"/txs/finish-transaction/finish-transaction.schema.output.json");f.FinishTransactionTxOutput=Za;d.addSchema(l(es,"/txs/get-balance/get-balance.schema.input.json"),"/txs/get-balance/get-balance.schema.input.json");f.GetBalanceTxInput=es;d.addSchema(l(ts,"/txs/get-balance/get-balance.schema.output.json"),"/txs/get-balance/get-balance.schema.output.json");f.GetBalanceTxOutput=ts;d.addSchema(l(rs,"/txs/get-balance-history/get-balance-history.schema.input.json"),"/txs/get-balance-history/get-balance-history.schema.input.json");f.GetBalanceHistoryTxInput=rs;d.addSchema(l(ns,"/txs/get-balance-history/get-balance-history.schema.output.json"),"/txs/get-balance-history/get-balance-history.schema.output.json");f.GetBalanceHistoryTxOutput=ns;d.addSchema(l(as,"/txs/get-export/get-export.schema.input.json"),"/txs/get-export/get-export.schema.input.json");f.GetExportTxInput=as;d.addSchema(l(ss,"/txs/get-export/get-export.schema.output.json"),"/txs/get-export/get-export.schema.output.json");f.GetExportTxOutput=ss;d.addSchema(l(is,"/txs/get-flags/get-flags.schema.input.json"),"/txs/get-flags/get-flags.schema.input.json");f.GetFlagsTxInput=is;d.addSchema(l(os,"/txs/get-flags/get-flags.schema.output.json"),"/txs/get-flags/get-flags.schema.output.json");f.GetFlagsTxOutput=os;d.addSchema(l(ps,"/txs/get-statistics/get-statistics.schema.input.json"),"/txs/get-statistics/get-statistics.schema.input.json");f.GetStatisticsTxInput=ps;d.addSchema(l(ds,"/txs/get-statistics/get-statistics.schema.output.json"),"/txs/get-statistics/get-statistics.schema.output.json");f.GetStatisticsTxOutput=ds;d.addSchema(l(fs,"/txs/get-token/get-token.schema.input.json"),"/txs/get-token/get-token.schema.input.json");f.GetTokenTxInput=fs;d.addSchema(l(us,"/txs/get-token/get-token.schema.output.json"),"/txs/get-token/get-token.schema.output.json");f.GetTokenTxOutput=us;d.addSchema(l(ls,"/txs/get-token-many/get-token-many.schema.input.json"),"/txs/get-token-many/get-token-many.schema.input.json");f.GetTokenManyTxInput=ls;d.addSchema(l(cs,"/txs/get-token-many/get-token-many.schema.output.json"),"/txs/get-token-many/get-token-many.schema.output.json");f.GetTokenManyTxOutput=cs;d.addSchema(l(ms,"/txs/get-transfer/get-transfer.schema.input.json"),"/txs/get-transfer/get-transfer.schema.input.json");f.GetTransferTxInput=ms;d.addSchema(l(hs,"/txs/get-transfer/get-transfer.schema.output.json"),"/txs/get-transfer/get-transfer.schema.output.json");f.GetTransferTxOutput=hs;d.addSchema(l(_s,"/txs/get-transfer-group/get-transfer-group.schema.input.json"),"/txs/get-transfer-group/get-transfer-group.schema.input.json");f.GetTransferGroupTxInput=_s;d.addSchema(l(gs,"/txs/get-transfer-group/get-transfer-group.schema.output.json"),"/txs/get-transfer-group/get-transfer-group.schema.output.json");f.GetTransferGroupTxOutput=gs;d.addSchema(l(Ts,"/txs/get-wallet/get-wallet.schema.input.json"),"/txs/get-wallet/get-wallet.schema.input.json");f.GetWalletTxInput=Ts;d.addSchema(l(ys,"/txs/get-wallet/get-wallet.schema.output.json"),"/txs/get-wallet/get-wallet.schema.output.json");f.GetWalletTxOutput=ys;d.addSchema(l(Fs,"/txs/get-wallet-many/get-wallet-many.schema.input.json"),"/txs/get-wallet-many/get-wallet-many.schema.input.json");f.GetWalletManyTxInput=Fs;d.addSchema(l(xs,"/txs/get-wallet-many/get-wallet-many.schema.output.json"),"/txs/get-wallet-many/get-wallet-many.schema.output.json");f.GetWalletManyTxOutput=xs;d.addSchema(l(bs,"/txs/healthcheck/healthcheck.schema.input.json"),"/txs/healthcheck/healthcheck.schema.input.json");f.HealthcheckTxInput=bs;d.addSchema(l(Os,"/txs/healthcheck/healthcheck.schema.output.json"),"/txs/healthcheck/healthcheck.schema.output.json");f.HealthcheckTxOutput=Os;d.addSchema(l(ct,"/txs/import-actions/import-actions.schema.input.json"),"/txs/import-actions/import-actions.schema.input.json");f.ImportActionsTxInput=ct;var bc=Tc(ct,"/txs/import-actions/import-actions.schema.input.json");d.addSchema(bc,"/txs/import-actions/import-actions.schema.options.json");f.ImportActionsTxOptions=bc;var Oc=yc(ct,"/txs/import-actions/import-actions.schema.input.json");d.addSchema(Oc,"/txs/import-actions/import-actions.schema.chunk.json");f.ImportActionsTxStreamChunk=Oc;d.addSchema(l($s,"/txs/import-actions/import-actions.schema.output.json"),"/txs/import-actions/import-actions.schema.output.json");f.ImportActionsTxOutput=$s;d.addSchema(l(ws,"/txs/list-export-many/list-export-many.schema.input.json"),"/txs/list-export-many/list-export-many.schema.input.json");f.ListExportManyTxInput=ws;d.addSchema(l(Is,"/txs/list-export-many/list-export-many.schema.output.json"),"/txs/list-export-many/list-export-many.schema.output.json");f.ListExportManyTxOutput=Is;d.addSchema(l(js,"/txs/query-logs/query-logs.schema.input.json"),"/txs/query-logs/query-logs.schema.input.json");f.QueryLogsTxInput=js;d.addSchema(l(ks,"/txs/query-logs/query-logs.schema.output.json"),"/txs/query-logs/query-logs.schema.output.json");f.QueryLogsTxOutput=ks;d.addSchema(l(Ss,"/txs/reset-database/reset-database.schema.input.json"),"/txs/reset-database/reset-database.schema.input.json");f.ResetDatabaseTxInput=Ss;d.addSchema(l(vs,"/txs/reset-database/reset-database.schema.output.json"),"/txs/reset-database/reset-database.schema.output.json");f.ResetDatabaseTxOutput=vs;d.addSchema(l(Es,"/txs/reverse-transfer/reverse-transfer.schema.input.json"),"/txs/reverse-transfer/reverse-transfer.schema.input.json");f.ReverseTransferTxInput=Es;d.addSchema(l(Gs,"/txs/reverse-transfer/reverse-transfer.schema.output.json"),"/txs/reverse-transfer/reverse-transfer.schema.output.json");f.ReverseTransferTxOutput=Gs;d.addSchema(l(Cs,"/txs/reverse-transfer-group/reverse-transfer-group.schema.input.json"),"/txs/reverse-transfer-group/reverse-transfer-group.schema.input.json");f.ReverseTransferGroupTxInput=Cs;d.addSchema(l(Rs,"/txs/reverse-transfer-group/reverse-transfer-group.schema.output.json"),"/txs/reverse-transfer-group/reverse-transfer-group.schema.output.json");f.ReverseTransferGroupTxOutput=Rs;d.addSchema(l(Ms,"/txs/reverse-transfer-group-many/reverse-transfer-group-many.schema.input.json"),"/txs/reverse-transfer-group-many/reverse-transfer-group-many.schema.input.json");f.ReverseTransferGroupManyTxInput=Ms;d.addSchema(l(Ps,"/txs/reverse-transfer-group-many/reverse-transfer-group-many.schema.output.json"),"/txs/reverse-transfer-group-many/reverse-transfer-group-many.schema.output.json");f.ReverseTransferGroupManyTxOutput=Ps;d.addSchema(l(Ws,"/txs/reverse-transfer-many/reverse-transfer-many.schema.input.json"),"/txs/reverse-transfer-many/reverse-transfer-many.schema.input.json");f.ReverseTransferManyTxInput=Ws;d.addSchema(l(Ds,"/txs/reverse-transfer-many/reverse-transfer-many.schema.output.json"),"/txs/reverse-transfer-many/reverse-transfer-many.schema.output.json");f.ReverseTransferManyTxOutput=Ds;d.addSchema(l(Ns,"/txs/set-flags/set-flags.schema.input.json"),"/txs/set-flags/set-flags.schema.input.json");f.SetFlagsTxInput=Ns;d.addSchema(l(As,"/txs/set-flags/set-flags.schema.output.json"),"/txs/set-flags/set-flags.schema.output.json");f.SetFlagsTxOutput=As;d.addSchema(l(Us,"/txs/start-transaction/start-transaction.schema.input.json"),"/txs/start-transaction/start-transaction.schema.input.json");f.StartTransactionTxInput=Us;d.addSchema(l(qs,"/txs/start-transaction/start-transaction.schema.output.json"),"/txs/start-transaction/start-transaction.schema.output.json");f.StartTransactionTxOutput=qs;d.addSchema(l(Bs,"/txs/tx-consts.schema.json"),"/txs/tx-consts.schema.json");f.TxConsts=Bs;d.addSchema(l(Ls,"/txs/update-token/update-token.schema.input.json"),"/txs/update-token/update-token.schema.input.json");f.UpdateTokenTxInput=Ls;d.addSchema(l(Hs,"/txs/update-token/update-token.schema.output.json"),"/txs/update-token/update-token.schema.output.json");f.UpdateTokenTxOutput=Hs;d.addSchema(l(Vs,"/txs/update-transfer/update-transfer.schema.input.json"),"/txs/update-transfer/update-transfer.schema.input.json");f.UpdateTransferTxInput=Vs;d.addSchema(l(zs,"/txs/update-transfer/update-transfer.schema.output.json"),"/txs/update-transfer/update-transfer.schema.output.json");f.UpdateTransferTxOutput=zs;d.addSchema(l(Js,"/txs/update-transfer-group/update-transfer-group.schema.input.json"),"/txs/update-transfer-group/update-transfer-group.schema.input.json");f.UpdateTransferGroupTxInput=Js;d.addSchema(l(Qs,"/txs/update-transfer-group/update-transfer-group.schema.output.json"),"/txs/update-transfer-group/update-transfer-group.schema.output.json");f.UpdateTransferGroupTxOutput=Qs;d.addSchema(l(Ks,"/txs/update-transfer-group-many/update-transfer-group-many.schema.input.json"),"/txs/update-transfer-group-many/update-transfer-group-many.schema.input.json");f.UpdateTransferGroupManyTxInput=Ks;d.addSchema(l(Ys,"/txs/update-transfer-group-many/update-transfer-group-many.schema.output.json"),"/txs/update-transfer-group-many/update-transfer-group-many.schema.output.json");f.UpdateTransferGroupManyTxOutput=Ys;d.addSchema(l(Xs,"/txs/update-transfer-many/update-transfer-many.schema.input.json"),"/txs/update-transfer-many/update-transfer-many.schema.input.json");f.UpdateTransferManyTxInput=Xs;d.addSchema(l(Zs,"/txs/update-transfer-many/update-transfer-many.schema.output.json"),"/txs/update-transfer-many/update-transfer-many.schema.output.json");f.UpdateTransferManyTxOutput=Zs;d.addSchema(l(ei,"/txs/update-wallet/update-wallet.schema.input.json"),"/txs/update-wallet/update-wallet.schema.input.json");f.UpdateWalletTxInput=ei;d.addSchema(l(ti,"/txs/update-wallet/update-wallet.schema.output.json"),"/txs/update-wallet/update-wallet.schema.output.json");f.UpdateWalletTxOutput=ti;var v=(u=>(u.JSONRPCRequest="JSONRPCRequest",u.JSONRPCResponse="JSONRPCResponse",u.ClientOptions="ClientOptions",u.Consts="Consts",u.TokenTableInput="TokenTableInput",u.TokenTable="TokenTable",u.TokenTableOptional="TokenTableOptional",u.TransferTableInput="TransferTableInput",u.TransferTable="TransferTable",u.TransferTableOptional="TransferTableOptional",u.TransferGroupTableInput="TransferGroupTableInput",u.TransferGroupTable="TransferGroupTable",u.TransferGroupTableOptional="TransferGroupTableOptional",u.TransferLogTableInput="TransferLogTableInput",u.TransferLogTable="TransferLogTable",u.TransferLogTableOptional="TransferLogTableOptional",u.WalletTableInput="WalletTableInput",u.WalletTable="WalletTable",u.WalletTableOptional="WalletTableOptional",u.WalletTokenSettingTableInput="WalletTokenSettingTableInput",u.WalletTokenSettingTable="WalletTokenSettingTable",u.WalletTokenSettingTableOptional="WalletTokenSettingTableOptional",u.WapiSettingTableInput="WapiSettingTableInput",u.WapiSettingTable="WapiSettingTable",u.WapiSettingTableOptional="WapiSettingTableOptional",u.WapiStatisticTableInput="WapiStatisticTableInput",u.WapiStatisticTable="WapiStatisticTable",u.WapiStatisticTableOptional="WapiStatisticTableOptional",u.AggregateTransfersFnInput="AggregateTransfersFnInput",u.AggregateTransfersFnOutput="AggregateTransfersFnOutput",u.CreateAccessTokenFnInput="CreateAccessTokenFnInput",u.CreateAccessTokenFnOutput="CreateAccessTokenFnOutput",u.CreateContractFnInput="CreateContractFnInput",u.CreateContractFnOutput="CreateContractFnOutput",u.CreateDepositFnInput="CreateDepositFnInput",u.CreateDepositFnOutput="CreateDepositFnOutput",u.CreateExchangeFnInput="CreateExchangeFnInput",u.CreateExchangeFnOutput="CreateExchangeFnOutput",u.CreateTokenFnInput="CreateTokenFnInput",u.CreateTokenFnOutput="CreateTokenFnOutput",u.CreateTransferFnInput="CreateTransferFnInput",u.CreateTransferFnOutput="CreateTransferFnOutput",u.CreateTransferGroupFnInput="CreateTransferGroupFnInput",u.CreateTransferGroupFnOutput="CreateTransferGroupFnOutput",u.CreateTransfersFnInput="CreateTransfersFnInput",u.CreateTransfersFnOutput="CreateTransfersFnOutput",u.CreateWalletFnInput="CreateWalletFnInput",u.CreateWalletFnOutput="CreateWalletFnOutput",u.CreateWithdrawalFnInput="CreateWithdrawalFnInput",u.CreateWithdrawalFnOutput="CreateWithdrawalFnOutput",u.ExportBalanceHistoryFnInput="ExportBalanceHistoryFnInput",u.ExportBalanceHistoryFnOutput="ExportBalanceHistoryFnOutput",u.ExportTokensFnInput="ExportTokensFnInput",u.ExportTokensFnOutput="ExportTokensFnOutput",u.ExportTransferGroupsFnInput="ExportTransferGroupsFnInput",u.ExportTransferGroupsFnOutput="ExportTransferGroupsFnOutput",u.ExportTransfersFnInput="ExportTransfersFnInput",u.ExportTransfersFnOutput="ExportTransfersFnOutput",u.ExportWalletsFnInput="ExportWalletsFnInput",u.ExportWalletsFnOutput="ExportWalletsFnOutput",u.FindBalancesFnInput="FindBalancesFnInput",u.FindBalancesFnOutput="FindBalancesFnOutput",u.FindTokensFnInput="FindTokensFnInput",u.FindTokensFnOutput="FindTokensFnOutput",u.FindTransferGroupsFnInput="FindTransferGroupsFnInput",u.FindTransferGroupsFnOutput="FindTransferGroupsFnOutput",u.FindTransfersFnInput="FindTransfersFnInput",u.FindTransfersFnOutput="FindTransfersFnOutput",u.FindWalletsFnInput="FindWalletsFnInput",u.FindWalletsFnOutput="FindWalletsFnOutput",u.FnConsts="FnConsts",u.GetBalanceFnInput="GetBalanceFnInput",u.GetBalanceFnOutput="GetBalanceFnOutput",u.GetBalanceHistoryFnInput="GetBalanceHistoryFnInput",u.GetBalanceHistoryFnOutput="GetBalanceHistoryFnOutput",u.GetExportFnInput="GetExportFnInput",u.GetExportFnOutput="GetExportFnOutput",u.GetFlagsFnInput="GetFlagsFnInput",u.GetFlagsFnOutput="GetFlagsFnOutput",u.GetStatisticsFnInput="GetStatisticsFnInput",u.GetStatisticsFnOutput="GetStatisticsFnOutput",u.GetTokenFnInput="GetTokenFnInput",u.GetTokenFnOutput="GetTokenFnOutput",u.GetTransferFnInput="GetTransferFnInput",u.GetTransferFnOutput="GetTransferFnOutput",u.GetTransferGroupFnInput="GetTransferGroupFnInput",u.GetTransferGroupFnOutput="GetTransferGroupFnOutput",u.GetWalletFnInput="GetWalletFnInput",u.GetWalletFnOutput="GetWalletFnOutput",u.HealthcheckFnInput="HealthcheckFnInput",u.HealthcheckFnOutput="HealthcheckFnOutput",u.ImportDataFnInput="ImportDataFnInput",u.ImportDataFnOptions="ImportDataFnOptions",u.ImportDataFnStreamChunk="ImportDataFnStreamChunk",u.ImportDataFnOutput="ImportDataFnOutput",u.ListExportsFnInput="ListExportsFnInput",u.ListExportsFnOutput="ListExportsFnOutput",u.ReverseTransferFnInput="ReverseTransferFnInput",u.ReverseTransferFnOutput="ReverseTransferFnOutput",u.ReverseTransferGroupFnInput="ReverseTransferGroupFnInput",u.ReverseTransferGroupFnOutput="ReverseTransferGroupFnOutput",u.ReverseTransfersFnInput="ReverseTransfersFnInput",u.ReverseTransfersFnOutput="ReverseTransfersFnOutput",u.SetFlagsFnInput="SetFlagsFnInput",u.SetFlagsFnOutput="SetFlagsFnOutput",u.UpdateTokenFnInput="UpdateTokenFnInput",u.UpdateTokenFnOutput="UpdateTokenFnOutput",u.UpdateTransferFnInput="UpdateTransferFnInput",u.UpdateTransferFnOutput="UpdateTransferFnOutput",u.UpdateTransferGroupFnInput="UpdateTransferGroupFnInput",u.UpdateTransferGroupFnOutput="UpdateTransferGroupFnOutput",u.UpdateTransferGroupsFnInput="UpdateTransferGroupsFnInput",u.UpdateTransferGroupsFnOutput="UpdateTransferGroupsFnOutput",u.UpdateTransfersFnInput="UpdateTransfersFnInput",u.UpdateTransfersFnOutput="UpdateTransfersFnOutput",u.UpdateWalletFnInput="UpdateWalletFnInput",u.UpdateWalletFnOutput="UpdateWalletFnOutput",u.AggregateTransferManyTxInput="AggregateTransferManyTxInput",u.AggregateTransferManyTxOutput="AggregateTransferManyTxOutput",u.AuthenticationCheckTxInput="AuthenticationCheckTxInput",u.AuthenticationCheckTxOutput="AuthenticationCheckTxOutput",u.CreateAccessTokenTxInput="CreateAccessTokenTxInput",u.CreateAccessTokenTxOutput="CreateAccessTokenTxOutput",u.CreateContractTxInput="CreateContractTxInput",u.CreateContractTxOutput="CreateContractTxOutput",u.CreateDepositTxInput="CreateDepositTxInput",u.CreateDepositTxOutput="CreateDepositTxOutput",u.CreateDistributionTxInput="CreateDistributionTxInput",u.CreateDistributionTxOutput="CreateDistributionTxOutput",u.CreateTokenTxInput="CreateTokenTxInput",u.CreateTokenTxOutput="CreateTokenTxOutput",u.CreateTransferTxInput="CreateTransferTxInput",u.CreateTransferTxOutput="CreateTransferTxOutput",u.CreateTransferGroupTxInput="CreateTransferGroupTxInput",u.CreateTransferGroupTxOutput="CreateTransferGroupTxOutput",u.CreateTransferManyTxInput="CreateTransferManyTxInput",u.CreateTransferManyTxOutput="CreateTransferManyTxOutput",u.CreateWalletTxInput="CreateWalletTxInput",u.CreateWalletTxOutput="CreateWalletTxOutput",u.CreateWithdrawalTxInput="CreateWithdrawalTxInput",u.CreateWithdrawalTxOutput="CreateWithdrawalTxOutput",u.ExportBalanceHistoryTxInput="ExportBalanceHistoryTxInput",u.ExportBalanceHistoryTxOutput="ExportBalanceHistoryTxOutput",u.ExportTokenManyTxInput="ExportTokenManyTxInput",u.ExportTokenManyTxOutput="ExportTokenManyTxOutput",u.ExportTransferGroupManyTxInput="ExportTransferGroupManyTxInput",u.ExportTransferGroupManyTxOutput="ExportTransferGroupManyTxOutput",u.ExportTransferManyTxInput="ExportTransferManyTxInput",u.ExportTransferManyTxOutput="ExportTransferManyTxOutput",u.ExportWalletManyTxInput="ExportWalletManyTxInput",u.ExportWalletManyTxOutput="ExportWalletManyTxOutput",u.FindBalanceManyTxInput="FindBalanceManyTxInput",u.FindBalanceManyTxOutput="FindBalanceManyTxOutput",u.FindTokenManyTxInput="FindTokenManyTxInput",u.FindTokenManyTxOutput="FindTokenManyTxOutput",u.FindTransferGroupManyTxInput="FindTransferGroupManyTxInput",u.FindTransferGroupManyTxOutput="FindTransferGroupManyTxOutput",u.FindTransferManyTxInput="FindTransferManyTxInput",u.FindTransferManyTxOutput="FindTransferManyTxOutput",u.FindWalletManyTxInput="FindWalletManyTxInput",u.FindWalletManyTxOutput="FindWalletManyTxOutput",u.FinishTransactionTxInput="FinishTransactionTxInput",u.FinishTransactionTxOutput="FinishTransactionTxOutput",u.GetBalanceTxInput="GetBalanceTxInput",u.GetBalanceTxOutput="GetBalanceTxOutput",u.GetBalanceHistoryTxInput="GetBalanceHistoryTxInput",u.GetBalanceHistoryTxOutput="GetBalanceHistoryTxOutput",u.GetExportTxInput="GetExportTxInput",u.GetExportTxOutput="GetExportTxOutput",u.GetFlagsTxInput="GetFlagsTxInput",u.GetFlagsTxOutput="GetFlagsTxOutput",u.GetStatisticsTxInput="GetStatisticsTxInput",u.GetStatisticsTxOutput="GetStatisticsTxOutput",u.GetTokenTxInput="GetTokenTxInput",u.GetTokenTxOutput="GetTokenTxOutput",u.GetTokenManyTxInput="GetTokenManyTxInput",u.GetTokenManyTxOutput="GetTokenManyTxOutput",u.GetTransferTxInput="GetTransferTxInput",u.GetTransferTxOutput="GetTransferTxOutput",u.GetTransferGroupTxInput="GetTransferGroupTxInput",u.GetTransferGroupTxOutput="GetTransferGroupTxOutput",u.GetWalletTxInput="GetWalletTxInput",u.GetWalletTxOutput="GetWalletTxOutput",u.GetWalletManyTxInput="GetWalletManyTxInput",u.GetWalletManyTxOutput="GetWalletManyTxOutput",u.HealthcheckTxInput="HealthcheckTxInput",u.HealthcheckTxOutput="HealthcheckTxOutput",u.ImportActionsTxInput="ImportActionsTxInput",u.ImportActionsTxOptions="ImportActionsTxOptions",u.ImportActionsTxStreamChunk="ImportActionsTxStreamChunk",u.ImportActionsTxOutput="ImportActionsTxOutput",u.ListExportManyTxInput="ListExportManyTxInput",u.ListExportManyTxOutput="ListExportManyTxOutput",u.QueryLogsTxInput="QueryLogsTxInput",u.QueryLogsTxOutput="QueryLogsTxOutput",u.ResetDatabaseTxInput="ResetDatabaseTxInput",u.ResetDatabaseTxOutput="ResetDatabaseTxOutput",u.ReverseTransferTxInput="ReverseTransferTxInput",u.ReverseTransferTxOutput="ReverseTransferTxOutput",u.ReverseTransferGroupTxInput="ReverseTransferGroupTxInput",u.ReverseTransferGroupTxOutput="ReverseTransferGroupTxOutput",u.ReverseTransferGroupManyTxInput="ReverseTransferGroupManyTxInput",u.ReverseTransferGroupManyTxOutput="ReverseTransferGroupManyTxOutput",u.ReverseTransferManyTxInput="ReverseTransferManyTxInput",u.ReverseTransferManyTxOutput="ReverseTransferManyTxOutput",u.SetFlagsTxInput="SetFlagsTxInput",u.SetFlagsTxOutput="SetFlagsTxOutput",u.StartTransactionTxInput="StartTransactionTxInput",u.StartTransactionTxOutput="StartTransactionTxOutput",u.TxConsts="TxConsts",u.UpdateTokenTxInput="UpdateTokenTxInput",u.UpdateTokenTxOutput="UpdateTokenTxOutput",u.UpdateTransferTxInput="UpdateTransferTxInput",u.UpdateTransferTxOutput="UpdateTransferTxOutput",u.UpdateTransferGroupTxInput="UpdateTransferGroupTxInput",u.UpdateTransferGroupTxOutput="UpdateTransferGroupTxOutput",u.UpdateTransferGroupManyTxInput="UpdateTransferGroupManyTxInput",u.UpdateTransferGroupManyTxOutput="UpdateTransferGroupManyTxOutput",u.UpdateTransferManyTxInput="UpdateTransferManyTxInput",u.UpdateTransferManyTxOutput="UpdateTransferManyTxOutput",u.UpdateWalletTxInput="UpdateWalletTxInput",u.UpdateWalletTxOutput="UpdateWalletTxOutput",u))(v||{}),ri={ajv:d,createValidator(t){let e=d.compile(t);return hc(e)},getValidator(t){let e=d.getSchema(t);return hc(e)},getSchema(t){return f[t]},Schemas:f,SchemaNames:v},RM=ri.createValidator,_=ri.getValidator;var EO=_("AggregateTransferManyTxInput");var GO=_("AuthenticationCheckTxInput");var CO=_("CreateAccessTokenTxInput");var RO=_("CreateContractTxInput");var MO=_("CreateDepositTxInput");var PO=_("CreateDistributionTxInput");var WO=_("CreateTokenTxInput");var DO=_("CreateTransferTxInput");var NO=_("CreateTransferGroupTxInput");var AO=_("CreateTransferManyTxInput");var UO=_("CreateWalletTxInput");var qO=_("CreateWithdrawalTxInput");var BO=_("ExportBalanceHistoryTxInput");var LO=_("ExportTokenManyTxInput");var HO=_("ExportTransferGroupManyTxInput");var VO=_("ExportTransferManyTxInput");var zO=_("ExportWalletManyTxInput");var JO=_("FindBalanceManyTxInput");var QO=_("FindTokenManyTxInput");var KO=_("FindTransferGroupManyTxInput");var YO=_("FindTransferManyTxInput");var XO=_("FindWalletManyTxInput");var ZO=_("FinishTransactionTxInput");var e$=_("GetBalanceTxInput");var t$=_("GetBalanceHistoryTxInput");var r$=_("GetExportTxInput");var n$=_("GetFlagsTxInput");var a$=_("GetStatisticsTxInput");var s$=_("GetTokenTxInput");var i$=_("GetTokenManyTxInput");var o$=_("GetTransferTxInput");var p$=_("GetTransferGroupTxInput");var d$=_("GetWalletTxInput");var f$=_("GetWalletManyTxInput");var u$=_("HealthcheckTxInput");var l$=_("ImportActionsTxInput");var c$=_("ListExportManyTxInput");var m$=_("QueryLogsTxInput");var h$=_("ResetDatabaseTxInput");var _$=_("ReverseTransferTxInput");var g$=_("ReverseTransferGroupTxInput");var T$=_("ReverseTransferGroupManyTxInput");var y$=_("ReverseTransferManyTxInput");var F$=_("SetFlagsTxInput");var x$=_("StartTransactionTxInput");var b$=_("UpdateTokenTxInput");var O$=_("UpdateTransferTxInput");var $$=_("UpdateTransferGroupTxInput");var w$=_("UpdateTransferGroupManyTxInput");var I$=_("UpdateTransferManyTxInput");var j$=_("UpdateWalletTxInput"),Kp={aggregateTransferMany:EO,authenticationCheck:GO,createAccessToken:CO,createContract:RO,createDeposit:MO,createDistribution:PO,createToken:WO,createTransfer:DO,createTransferGroup:NO,createTransferMany:AO,createWallet:UO,createWithdrawal:qO,exportBalanceHistory:BO,exportTokenMany:LO,exportTransferGroupMany:HO,exportTransferMany:VO,exportWalletMany:zO,findBalanceMany:JO,findTokenMany:QO,findTransferGroupMany:KO,findTransferMany:YO,findWalletMany:XO,finishTransaction:ZO,getBalance:e$,getBalanceHistory:t$,getExport:r$,getFlags:n$,getStatistics:a$,getToken:s$,getTokenMany:i$,getTransfer:o$,getTransferGroup:p$,getWallet:d$,getWalletMany:f$,healthcheck:u$,importActions:l$,listExportMany:c$,queryLogs:m$,resetDatabase:h$,reverseTransfer:_$,reverseTransferGroup:g$,reverseTransferGroupMany:T$,reverseTransferMany:y$,setFlags:F$,startTransaction:x$,updateToken:b$,updateTransfer:O$,updateTransferGroup:$$,updateTransferGroupMany:w$,updateTransferMany:I$,updateWallet:j$},Yp=(S=>(S.aggregateTransferMany="aggregateTransferMany",S.authenticationCheck="authenticationCheck",S.createAccessToken="createAccessToken",S.createContract="createContract",S.createDeposit="createDeposit",S.createDistribution="createDistribution",S.createToken="createToken",S.createTransfer="createTransfer",S.createTransferGroup="createTransferGroup",S.createTransferMany="createTransferMany",S.createWallet="createWallet",S.createWithdrawal="createWithdrawal",S.exportBalanceHistory="exportBalanceHistory",S.exportTokenMany="exportTokenMany",S.exportTransferGroupMany="exportTransferGroupMany",S.exportTransferMany="exportTransferMany",S.exportWalletMany="exportWalletMany",S.findBalanceMany="findBalanceMany",S.findTokenMany="findTokenMany",S.findTransferGroupMany="findTransferGroupMany",S.findTransferMany="findTransferMany",S.findWalletMany="findWalletMany",S.finishTransaction="finishTransaction",S.getBalance="getBalance",S.getBalanceHistory="getBalanceHistory",S.getExport="getExport",S.getFlags="getFlags",S.getStatistics="getStatistics",S.getToken="getToken",S.getTokenMany="getTokenMany",S.getTransfer="getTransfer",S.getTransferGroup="getTransferGroup",S.getWallet="getWallet",S.getWalletMany="getWalletMany",S.healthcheck="healthcheck",S.importActions="importActions",S.listExportMany="listExportMany",S.queryLogs="queryLogs",S.resetDatabase="resetDatabase",S.reverseTransfer="reverseTransfer",S.reverseTransferGroup="reverseTransferGroup",S.reverseTransferGroupMany="reverseTransferGroupMany",S.reverseTransferMany="reverseTransferMany",S.setFlags="setFlags",S.startTransaction="startTransaction",S.updateToken="updateToken",S.updateTransfer="updateTransfer",S.updateTransferGroup="updateTransferGroup",S.updateTransferGroupMany="updateTransferGroupMany",S.updateTransferMany="updateTransferMany",S.updateWallet="updateWallet",S))(Yp||{});var k$=_("ImportActionsTxInput");function $c(t){let{error:e}=k$(t);return e===void 0}var MW=_("ImportActionsTxOutput");var PW=_("ImportActionsTxStreamChunk");var S$=_("ImportActionsTxOptions");function wc(t){let{error:e}=S$(t);return e===void 0}var St=class{constructor(e,r,n){this.isConnected=!1;this.hooks=new Proxy({},{set(e,r,n){if(typeof n!="function")throw new TypeError("Hooks can only be functions");return e[r]=n,!0}});this._requests=new Map;this._error=!1;this._sending=new Map;this.type=r,this._connection=e,this.connectionType=r,this.$connect=n}_setConnected(e){this.$connect=void 0,e&&this._error!==!1&&(this._error=!1),!this.isConnected&&e&&this.hooks.connected&&this.hooks.connected(this.socId),this.isConnected&&!e&&this.hooks.disconnected&&this.hooks.disconnected(),this.isConnected=e}_setErrored(e){this._error=e,this._setConnected(!1)}_clearError(){this._error=void 0}_send(e){throw new Error("This method must be implemented by child class")}_reconnect(e){throw new Error("This method must be implemented by child class")}close(){return ee(this,null,function*(){throw new Error("This method must be implemented by child class")})}_connectionLost(){this._requests.forEach((e,r)=>{"stream"in e&&e.stream.destroy(new Fe("CONNECTION_LOST",{method:"connectionLost"})),this._requests.delete(r)}),this.socId=void 0}_handleMessage(e){var o,p,m,c;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}M("Unexpected JSONRPCRequest",e);return}let r=e;if(this.hooks.message&&this.hooks.message(r),r.id===null){M("Unexpected JSONRPCResponse",e);return}if(r.result==="ack"){clearTimeout((o=this._sending.get(r.id))==null?void 0:o.timeout),this._sending.delete(r.id);return}let n=this._requests.get(r.id);if(!n){M("No Request found for incoming",e);return}if("handle"in n){n.handle(r),delete n.handle;return}r.error&&"error"in n&&n.error(r.error);let a=r;if(((p=a.result)==null?void 0:p.type)==="streamPause"&&"pause"in n){n.pause();return}if(((m=a.result)==null?void 0:m.type)==="streamResume"&&"resume"in n){n.resume();return}let{stream:s,start:i}=n;if(((c=a.result)==null?void 0:c.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,r){let{isValid:n,inputCopy:a,error:s}=Kp[e](r);if(!n)throw s;return this._sendRaw(e,a)}_setSending(e,r){this._sending.set(e.id,b({},this.sendingTimeout&&{timeout:setTimeout(()=>{this._sending.delete(e.id),r.push({error:new ce("SENDING_TIMEOUT",{timeout:this.sendingTimeout}).toJSON()}),this._requests.delete(e.id)},this.sendingTimeout)}))}_sendRaw(e,r){let n={jsonrpc:"2.0",method:e,params:r,id:et()};return this.hooks.preflight&&this.hooks.preflight(n)===!1?new De:new De(a=>ee(this,null,function*(){if(this._error&&this._reconnect(5),this.isConnected||(yield this.$connect),this._error)throw this._error;this._requests.set(n.id,{stream:a,start:Date.now()}),this._setSending(n,a),this._send(n)}))}_streamTransaction(e,r,n,a){let s=Date.now(),i=et(),o,p=({stream:F,method:g,params:x})=>{if(o)return;let T={jsonrpc:"2.0",method:g,params:b({streamId:i},x),id:et()};this._setSending(T,F),this._send(T)},m=(F,g)=>{o||(p({stream:F,method:"streamError",params:{error:g}}),o=g,F.push({error:g}))},c=new fi,h=a?c.pipe(a):c,y={jsonrpc:"2.0",method:"streamStart",params:{method:e,options:n},id:i};return this.hooks.preflight&&this.hooks.preflight(y)===!1?new Dt:new Dt(F=>ee(this,null,function*(){if(this._error&&this._reconnect(5),this.isConnected||(yield this.$connect),this._error)throw this._error;let g=setTimeout(()=>{F.push({error:new Fe("INPUT_STREAM_TIMEOUT",{streamId:i})})},3e4);this._requests.set(y.id,{stream:F,start:s,error(x){o=x,M("stream:error()>",x)},pause(){c.pause()},resume(){c.resume()},handle(x){if(x.error){F.push(x);return}h.on("data",T=>{if(!o){if(g&&(clearTimeout(g),g=null),!r(T)){m(F,new Fe("INVALID_INPUT_STREAM_CHUNK",{streamId:i,chunk:T}));return}p({stream:F,method:"streamData",params:{data:T}})}}).on("error",T=>{o||(g&&(clearTimeout(g),g=null),p({stream:F,method:"streamError",params:{error:T}}),F.push({error:new Fe("INPUT_STREAM_ERROR",{streamId:i,error:T})}))}).on("end",()=>{g&&(clearTimeout(g),g=null),p({stream:F,method:"streamEnd",params:{}})})}}),this._setSending(y,F),this._send(y)}),c)}aggregateTransferMany(e){return this._sendTransaction("aggregateTransferMany",e)}authenticationCheck(e){return this._sendTransaction("authenticationCheck",e!=null?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!=null?e:{})}createTransferMany(e){return this._sendTransaction("createTransferMany",e)}createWallet(e){return this._sendTransaction("createWallet",e)}createWithdrawal(e){return this._sendTransaction("createWithdrawal",e)}exportBalanceHistory(e){return this._sendTransaction("exportBalanceHistory",e)}exportTokenMany(e){return this._sendTransaction("exportTokenMany",e!=null?e:{})}exportTransferGroupMany(e){return this._sendTransaction("exportTransferGroupMany",e!=null?e:{})}exportTransferMany(e){return this._sendTransaction("exportTransferMany",e!=null?e:{})}exportWalletMany(e){return this._sendTransaction("exportWalletMany",e!=null?e:{})}findBalanceMany(e){return this._sendTransaction("findBalanceMany",e!=null?e:{})}findTokenMany(e){return this._sendTransaction("findTokenMany",e!=null?e:{})}findTransferGroupMany(e){return this._sendTransaction("findTransferGroupMany",e!=null?e:{})}findTransferMany(e){return this._sendTransaction("findTransferMany",e!=null?e:{})}findWalletMany(e){return this._sendTransaction("findWalletMany",e!=null?e:{})}finishTransaction(e){return this._sendTransaction("finishTransaction",e)}getBalance(e){return this._sendTransaction("getBalance",e)}getBalanceHistory(e){return this._sendTransaction("getBalanceHistory",e)}getExport(e){return this._sendTransaction("getExport",e)}getFlags(e){return this._sendTransaction("getFlags",e!=null?e:{})}getStatistics(e){return this._sendTransaction("getStatistics",e!=null?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)}healthcheck(e){return this._sendTransaction("healthcheck",e!=null?e:{})}importActions(e){return this._sendTransaction("importActions",e)}importActionsStream(e,r){if(e!==void 0&&!wc(e))throw new Te({input:e});return this._streamTransaction("importActions",$c,e,r)}listExportMany(e){return this._sendTransaction("listExportMany",e!=null?e:{})}queryLogs(e){return this._sendTransaction("queryLogs",e!=null?e:{})}resetDatabase(e){return this._sendTransaction("resetDatabase",e!=null?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!=null?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 Ic,v$=(Ic=window.WAPI_VERSION)!=null?Ic:"";function Zp(t,e){let r=jc(t,{timeout:e==null?void 0:e.connectingTimeout});return new Xp(r,t,e)}function jc(t,e){var x;let r=b({rejectUnauthorized:(x=t.rejectUnauthorized)!=null?x:!0,connectionName:e.connectionName,clientVersion:v$},t),n=Ef(r),a=new Of(...n),s,i,o=!1,p;a.onclose=m,a.onerror=c,a.onmessage=h;function m(T){if(M(`createConnection>close(reason:${T.reason},code:${T.code},wasClean:${T.wasClean})`),T.code===4030)return F(new Xe);F(new Error("WS closed"))}function c(T){M(`createConnection>error(message:${T.message},error:${T.error},type:${T.type})`),F(T.error)}function h(T){M(`createConnection>message(type:${T.type},data:${T.data})`);let{data:$}=T,D;try{D=JSON.parse($.toString())}catch(N){return M("Invalid JSON response",N),F(new Error("Invalid JSON response"))}if(D.result!=="ready")return M("Invalid first message"),F(new Error("Invalid first message - "+JSON.stringify(D)));F()}M(`createConnection>(message:setting up ws connection${e!=null&&e.timeout?" with timeout "+e.timeout:""})`);let y=e!=null&&e.timeout?setTimeout(()=>{F(new ce("CONNECTION_TIMEOUT",{timeout:e.timeout}))},e.timeout):void 0;function F(T){o||(clearTimeout(y),delete a.onmessage,delete a.onerror,delete a.onclose,T?(i(T),a.close()):s(p),o=!0)}let g=new Promise((T,$)=>{s=T,i=$});return{ws:a,$connect:g}}var Xp=class extends St{constructor(r,n,a){super(r.ws,"ws",r.$connect);this._tryToReconnect=!0;this._opts=n,this._connectionConfig=a,this.host=n.host,this.$connect.then(s=>(this.socId=s,this._ready())).catch(s=>{this.socId||this._setErrored(s)})}_setErrored(r){super._setErrored(r),(r instanceof Xe||"code"in r&&r.code===Z.AUTH.ERRORS.AUTHENTICATION_ERROR.code)&&(this._tryToReconnect=!1)}_ready(){this._setConnected(!0),this._connection.onmessage=r=>{let{data:n,type:a}=r;if(M(`message(type:${a},data:$0)`,n),a==="message"){let s=JSON.parse(n.toString());this._handleMessage(s),this._heartbeat()}},this._connection.onerror=r=>{let{message:n,error:a,type:s}=r;M(`error(message:$0,error:$1,type:${s})`,n,a)},this._connection.onclose=r=>{let{reason:n,code:a,wasClean:s}=r;M(`close(reason:$0,code:${a},wasClean:${s})`,n),this._setConnected(!1),clearTimeout(this._pingTimeout),this._connectionLost(),this._reconnect()},this._heartbeat()}_reconnect(r){if(M("reconnect(),tryToReconnect:",this._tryToReconnect),!this._tryToReconnect)return;if(this.hooks.reconnect&&this.hooks.reconnect()===!1){M("reconnect hook returned false");return}if(this.$connect){M("already connecting");return}super._clearError(),r!=null||(r=window.WAPI_RECONNECT_ATTEMPTS&&parseInt(window.WAPI_RECONNECT_ATTEMPTS)||10);let n=window.WAPI_MAX_RECONNECT_WAIT&&parseInt(window.WAPI_MAX_RECONNECT_WAIT)||1e4;this.$connect=ee(this,null,function*(){var s,i,o;let a;for(let p=0;p<r+1;p++)try{M("Trying to connect, attempt:",p);let{ws:m,$connect:c}=jc(this._opts,{timeout:(s=this._connectionConfig)==null?void 0:s.reconnectingTimeout});a=yield c,this.socId=a,this._connection=m,this._ready();break}catch(m){let c=m.code===Z.AUTH.ERRORS.AUTHENTICATION_ERROR.code,h=p>r-1;if(c||h){this._setErrored(m),(o=(i=this.hooks).reconnectError)==null||o.call(i,m);break}yield kf(Math.min(Math.pow(1.5,p)*1e3,n))}return a})}_heartbeat(){M("heartbeat"),clearTimeout(this._pingTimeout),this._pingTimeout=setTimeout(()=>{if(this._sending.size)return M("pingTimeout reached, but sending.size:",this._sending.size),this._heartbeat();M("timeout"),this._connection.close(),this._setConnected(!1),this._reconnect()},31e3)}_send(r){M("send()",r),this._connection.send(JSON.stringify(r))}close(){return ee(this,null,function*(){return M("close()"),this._tryToReconnect=!1,clearTimeout(this._pingTimeout),this._setConnected(!1),this._connection.close()})}};var ed=typeof globalThis!="undefined"&&globalThis||typeof self!="undefined"&&self||typeof ed!="undefined"&&ed,td=ed.fetch;function nd(t,e){let r=E$(t,{timeout:e==null?void 0:e.connectingTimeout,skipInit:e==null?void 0:e.httpSkipInitialAuthConnection,connectionName:e==null?void 0:e.connectionName});return new rd(r,t)}function E$(t,e){let r=t.host.replace(/^wss:/,"https:"),n="x-wapi-req-id",a="x-wapi-conn-name";function s(m){return ee(this,null,function*(){M("http_createConnection>message(body:$0)",m)})}function i(m,c){return ee(this,null,function*(){let h=JSON.parse(m),F=yield(yield td(`${r}/api`,{keepalive:!0,method:"POST",headers:b({Authorization:`Bearer ${c}`,"content-type":"application/json",[n]:h==null?void 0:h.id},e!=null&&e.connectionName?{[a]:e==null?void 0:e.connectionName}:{}),body:m})).json();this.onmessage(q(b({},F),{id:h.id}))})}let o=et(),p=new Promise((m,c)=>{if(e!=null&&e.skipInit)return m(void 0);let h=new AbortController;M(`createConnection(sending http auth request${e!=null&&e.timeout?" with timeout "+e.timeout:""})`);let y=e!=null&&e.timeout?setTimeout(()=>{h.abort(),c(new ce("CONNECTION_TIMEOUT",{timeout:e.timeout}))},e.timeout):void 0;td(`${r}/api`,{method:"POST",headers:b({Authorization:`Bearer ${t.jwt}`,"content-type":"application/json",[n]:o},e!=null&&e.connectionName?{[a]:e==null?void 0:e.connectionName}:{}),body:JSON.stringify({jsonrpc:"2.0",method:"authenticationCheck",params:{},id:o}),signal:h.signal}).then(F=>F.json()).then(F=>{if(clearTimeout(y),F.error)throw new Error(F.error.message);m(void 0)}).catch(c)});return{send:i,onmessage:s,$connect:p}}var rd=class extends St{constructor(e,r){super(e,"https",e.$connect),this.host=r.host,this.jwt=r.jwt,this.$connect.then(()=>{this._ready()}).catch(n=>{this._setErrored(n)})}_send(e){M("send()",e),this._connection.send(JSON.stringify(e),this.jwt)}_ready(){this._setConnected(!0),this._connection.onmessage=e=>ee(this,null,function*(){M("http_message($0)>",e),this._handleMessage(e)})}close(){return ee(this,null,function*(){M("close()"),this._setConnected(!1)})}_reconnect(){return ee(this,null,function*(){M("reconnect()")})}};var ad=(i=>(i.year="year",i.month="month",i.week="week",i.day="day",i.hour="hour",i.minute="minute",i))(ad||{});var id=class t{constructor(e){this.filter=[];this.modifierFn=e}add(e){return this.filter.push(e),this}addWhere(e,r,n,a){if(typeof r=="object"){let s={};for(let[i,o]of Object.entries(r))s[i]=this.modifierFn?this.modifierFn(i,o):o;return this.add({function:e,value:s})}if(typeof r=="function"){let s=new t(this.modifierFn);return r.call(s,s),this.add({function:e,inner:s.toJSON().filter})}if(a!==void 0)return this.add({function:e,field:r,operator:n,value:a});if(typeof n=="object")return this.add({function:e,value:{[r]:n}});if(n!==void 0){let s=this.modifierFn?this.modifierFn(r,n):n;return this.add({function:e,field:r,value:s})}throw TypeError("Invalid input")}where(e,r,n){return this.addWhere("where",e,r,n)}orWhere(e,r,n){return this.addWhere("orWhere",e,r,n)}whereIn(e,r){return this.add({function:"whereIn",field:e,value:r})}orWhereIn(e,r){return this.add({function:"orWhereIn",field:e,value:r})}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,r,n){return n===void 0?this.add({function:"whereMetadata",field:e,operator:"=",value:r}):this.add({function:"whereMetadata",field:e,operator:r,value:n})}orWhereMetadata(e,r,n){return n===void 0?this.add({function:"orWhereMetadata",field:e,operator:"=",value:r}):this.add({function:"orWhereMetadata",field:e,operator:r,value:n})}whereMetadataIn(e,r){return this.add({function:"whereMetadataIn",field:e,value:r})}orWhereMetadataIn(e,r){return this.add({function:"orWhereMetadataIn",field:e,value:r})}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 sd(t){return t.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 Et=class extends id{constructor({start:r,modifiers:n,optionsModifiers:a}){super(n);this.optionsObject={};this.execFn=r,this.optionsModifiers=a}start(){return this.execFn(this.toJSON())}toJSON(){return q(b({},super.toJSON()),{options:b({},this.optionsObject)})}options(r){if(this.optionsModifiers===void 0)return this.optionsObject=b(b({},this.optionsObject),r),this;this.optionsObject=b({},this.optionsObject);for(let[n,a]of Object.entries(r))this.optionsObject[n]=this.optionsModifiers(n,a);return this}then(r,n){return this.start().then(r,n)}catch(r){return this.start().catch(r)}stream(){return this.start().stream()}},te=class extends Et{constructor({start:e,modifiers:r,optionsModifiers:n}){super({start:a=>e(a),modifiers:r,optionsModifiers:n})}limit(e){return this.optionsObject.limit=e,this}offset(e){return this.optionsObject.offset=e,this}orderBy(e,r,n){if(!Array.isArray(e)&&typeof e!="string")throw new TypeError("invalid input");if(Array.isArray(e))return this.optionsObject.order=sd(e),this;if(!e.includes(" "))return this.optionsObject.order=sd([{column:e,order:r||"asc",nulls:n}]),this;let[a,s,i,o]=e.split(" ");if(s!=="asc"&&s!=="desc")throw new TypeError("invalid order");let p={column:a,order:s};if(i==="nulls"){if(!["first","last"].includes(o))throw new TypeError("invalid nulls order");p.nulls=o}return this.optionsObject.order=sd([e]),this}select(...e){return this.optionsObject.select=e,this}deselect(...e){return this.optionsObject.deselect=e,this}};function vt(t,e){if(!e)return{function:t,alias:t};if(!e.includes(" "))return{function:t,field:e,alias:t};if(!e.includes(" as "))throw new L("UNCLEAR_AGGREGATOR",{input:e});let[r,n]=e.split(" as ");return{function:t,field:r,alias:n||r}}var Hi=class extends Et{constructor({start:r,modifiers:n,optionsModifiers:a}){super({start:s=>r(s),modifiers:n,optionsModifiers:a});this.aggregatorObject={aggregators:[]};this.timezoneString=""}toJSON(){return q(b({},super.toJSON()),{aggregators:JSON.parse(JSON.stringify(this.aggregatorObject.aggregators)),groups:JSON.parse(JSON.stringify(this.aggregatorObject.groups||[]))})}timezone(r){return this.timezoneString=r,this.aggregatorObject.groups&&Array.isArray(this.aggregatorObject.groups)&&this.aggregatorObject.groups.forEach(n=>{n.type==="period"&&(n.field={period:n.field,timezone:r})}),this}groupBy(r,...n){let a={};if(typeof r!="string")throw new TypeError("expected string as input, got"+typeof r);let[s,i]=r.split(" as ");if(ad.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(r){return this.aggregatorObject.aggregators.push(vt("count",r)),this}distinct(r){return this.aggregatorObject.aggregators.push(vt("countDistinct",r)),this}avg(r){return this.aggregatorObject.aggregators.push(vt("average",r)),this}min(r){return this.aggregatorObject.aggregators.push(vt("min",r)),this}max(r){return this.aggregatorObject.aggregators.push(vt("max",r)),this}sum(r){return this.aggregatorObject.aggregators.push(vt("sum",r)),this}},Gt=class extends Et{constructor({start:r,modifiers:n,optionsModifiers:a}){super({start:r,modifiers:n,optionsModifiers:a});this.updateObject={}}toJSON(){return q(b({},super.toJSON()),{update:JSON.parse(JSON.stringify(this.updateObject))})}update(r){return this.updateObject=Object.assign(this.updateObject,r),this}},Vi=class extends Et{constructor({start:r,modifiers:n,optionsModifiers:a}){super({start:r,modifiers:n,optionsModifiers:a});this.reverseModifications={}}toJSON(){return q(b({},super.toJSON()),{reverse:JSON.parse(JSON.stringify(this.reverseModifications))})}reverse(r){return this.reverseModifications=Object.assign(this.reverseModifications,r),this}};var G$=_("AggregateTransfersFnInput");function od(t,e,r){let{client:n}=t;if(e===void 0)return new Hi({start(g){return n.api.aggregateTransferMany({transfer:g.filter,options:g.options,groups:g.groups,aggregators:g.aggregators})},modifiers(g,x){return["token","wallet","from_wallet","to_wallet"].includes(g)?O(x):g==="transfer_group"?R(x):x}});let{inputCopy:a,error:s}=w({input:e,options:r,validate:G$});if(s)throw s;let{token:i,wallet:o,from_wallet:p,to_wallet:m,transfer_group:c,status:h,metadata:y}=a,F={token:O(i),wallet:O(o),from_wallet:O(p),to_wallet:O(m),transfer_group:R(c),status:h,metadata:y};return n.api.aggregateTransferMany({transfer:F,groups:a.groups,aggregators:a.aggregators})}var C$=new Map(Object.entries({aggregateTransfers:"aggregateTransferMany",exportTokens:"exportTokenMany",exportTransferGroups:"exportTransferGroupMany",exportTransfers:"exportTransferMany",exportWallets:"exportWalletMany",findBalances:"findBalanceMany",findTokens:"findTokenMany",findTransferGroups:"findTransferGroupMany",findTransfers:"findTransferMany",findWallets:"findWalletMany",listExports:"listExportMany"})),R$=_("CreateAccessTokenFnInput");function pd(t,e,r){var i;let{client:n}=t,{inputCopy:a,error:s}=w({input:e,options:r,validate:R$});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 p;return(p=C$.get(o))!=null?p:o})))),n.api.createAccessToken({token:a.token,options:r})}var M$=_("CreateContractFnInput");function dd(t,e,r){let{client:n}=t,{inputCopy:a,error:s}=w({input:e,options:r,validate:M$});if(s)throw s;let i={token:{foreign:a.foreign+"",metadata:a.metadata,owner:O(a.owner),deposits:[{token:O(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:O(a.buyer.wallet),amount:a.buyer.amount||a.value_amount,from_token:O(a.buyer.token||a.value_token),metadata:a.buyer.metadata}),n.api.createContract(i)}var P$=_("CreateDepositFnInput");function fd(t,e,r){let{client:n}=t,a=Ee(e,"token",n.getConfig("token")),{inputCopy:s,error:i}=w({input:a,options:r,validate:P$});if(i)throw i;let o=s.token||n.getConfig("token");if(o===void 0)throw new L("INPUT_NEEDS_TOKEN",{input:e});let p=s.options;delete s.options;let m=q(b({},s),{identifier:s.identifier,transfer_group:R(s.transfer_group),token:O(o),to_wallet:O(s.wallet),type:"deposit"});return m.identifier||(m.identifier=fe(m)),n.api.createTransfer({transfer:m,options:di(p,{return_balance:"return_to_balance",create_wallet_if_not_exists:"create_to_wallet_if_not_exists"})})}var ud=(r=>(r.whereMetadata="whereMetadata",r.orWhereMetadata="orWhereMetadata",r))(ud||{}),ld=(r=>(r.where="where",r.orWhere="orWhere",r))(ld||{}),cd=(r=>(r.whereIn="whereIn",r.orWhereIn="orWhereIn",r))(cd||{}),md=(r=>(r.whereMetadataIn="whereMetadataIn",r.orWhereMetadataIn="orWhereMetadataIn",r))(md||{}),hd=(a=>(a.whereMetadataNull="whereMetadataNull",a.orWhereMetadataNull="orWhereMetadataNull",a.whereMetadataNotNull="whereMetadataNotNull",a.orWhereMetadataNotNull="orWhereMetadataNotNull",a))(hd||{}),_d=(a=>(a.whereNull="whereNull",a.orWhereNull="orWhereNull",a.whereNotNull="whereNotNull",a.orWhereNotNull="orWhereNotNull",a))(_d||{}),gd=(t=>(t["="]="=",t[">="]=">=",t["<="]="<=",t["<"]="<",t[">"]=">",t))(gd||{}),Td=(r=>(r.like="like",r.ilike="ilike",r))(Td||{}),yd=(r=>(r["="]="=",r[">="]=">=",r["<="]="<=",r["<"]="<",r[">"]=">",r.like="like",r.ilike="ilike",r))(yd||{}),Fd=(a=>(a.value="value",a.share="share",a.group="group",a.contract="contract",a))(Fd||{}),xd=(r=>(r.active="active",r["dw-only"]="dw-only",r.disabled="disabled",r))(xd||{}),bd=(r=>(r.open="open",r.closed="closed",r))(bd||{}),Od=(n=>(n.pending="pending",n.finished="finished",n.cancelled="cancelled",n))(Od||{}),$d=(r=>(r.pending="pending",r.finished="finished",r))($d||{}),wd=(n=>(n.regular="regular",n.exchange="exchange",n.distribution="distribution",n))(wd||{}),Id=(n=>(n.transfer="transfer",n.deposit="deposit",n.withdrawal="withdrawal",n))(Id||{}),jd=(n=>(n.token="token",n.house="house",n.regular="regular",n))(jd||{}),kd=(r=>(r.active="active",r.disabled="disabled",r))(kd||{}),Sd=(r=>(r.flag="flag",r.setting="setting",r))(Sd||{}),vd=(o=>(o.Token="Token",o.TransferGroup="TransferGroup",o.TransferLog="TransferLog",o.Transfer="Transfer",o.WalletTokenSetting="WalletTokenSetting",o.Wallet="Wallet",o.WapiSetting="WapiSetting",o))(vd||{});var W$=_("CreateExchangeFnInput");function Ed(t,e,r){var o,p,m,c,h;let{client:n}=t,{inputCopy:a,error:s}=w({input:e,options:r,validate:W$});if(s)throw s;let i=a.options;return delete a.options,(o=a.identifier)!=null||(a.identifier=fe(a)),n.api.createTransferGroup({transfer_group:{identifier:a.identifier,status:"closed",transfer_status:(p=a.status)!=null?p:"pending",metadata:a.metadata,children:[{identifier:(m=a.from_identifier)!=null?m:fe(),from_wallet:O(a.from_wallet),to_wallet:O(a.to_wallet),token:O(a.from_token),type:a.from_wallet?"transfer":"deposit",amount:a.from_amount,metadata:a.metadata,force:a.force},{identifier:(c=a.to_identifier)!=null?c:fe(),from_wallet:O(a.to_wallet),to_wallet:O(a.from_wallet),token:O(a.to_token),type:a.to_wallet?"transfer":"deposit",amount:(h=a.to_amount)!=null?h:a.from_amount,metadata:a.metadata,force:a.force}]},options:i})}var D$=_("CreateTokenFnInput");function Gd(t,e,r){let{client:n}=t,{inputCopy:a,error:s}=w({input:e,options:r,validate:D$});if(s)throw s;let i=a.options;return delete a.options,n.api.createToken({token:q(b({},a),{belongs_to:O(a.belongs_to)}),options:i})}var N$=_("CreateTransferFnInput");function Cd(t,e,r){let{client:n}=t,a=Ee(e,"token",n.getConfig("token")),{inputCopy:s,error:i}=w({input:a,options:r,validate:N$});if(i)throw i;let o=ni(s,n.getConfig("token"));return o.identifier||(o.identifier=fe(o)),n.api.createTransfer({transfer:o,options:s.options})}function ni(t,e){t.type=t.type||"transfer";let r={identifier:t.identifier,token:O(t.token||e),amount:t.amount,metadata:t.metadata,status:t.status,type:t.type,transfer_group:R(t.transfer_group),created_at:t.created_at};if(t.type==="transfer")return t.latest_control_hash&&console.warn("deprecated: latest_control_hash is deprecated"),q(b({},r),{from_wallet:O(t.from_wallet),to_wallet:O(t.to_wallet)});if(t.type==="withdrawal")return t.latest_control_hash&&console.warn("deprecated: latest_control_hash is deprecated"),q(b({},r),{from_wallet:O(t.wallet)});if(t.type==="deposit")return q(b({},r),{to_wallet:O(t.wallet)})}var A$=_("CreateTransferGroupFnInput");function Rd(t,e,r){let{client:n}=t,{inputCopy:a,error:s}=w({input:e,options:r,validate:A$});if(s)throw s;let i=JSON.parse(JSON.stringify(a));return delete i.options,i.children&&(i.children=i.children.map(o=>ni(o,n.getConfig("token")))),i.identifier||(i.identifier=fe(i)),n.api.createTransferGroup({transfer_group:i,options:a.options})}var U$=_("CreateTransfersFnInput");function Md(t,e,r){let{client:n}=t,{inputCopy:a,error:s}=w({input:e,options:r,validate:U$});if(s)throw s;let i=a.transfers.map(o=>ni(o,n.getConfig("token")));for(let o of i)o.identifier||(o.identifier=fe(o));return n.api.createTransferMany({transfers:i,options:a.options})}var q$=_("CreateWalletFnInput");function Pd(t,e,r){let{client:n}=t,{inputCopy:a,error:s}=w({input:e,options:r,validate:q$});if(s)throw s;let i=a.options;return delete a.options,n.api.createWallet({wallet:b({},a),options:i})}var B$=_("CreateWithdrawalFnInput");function Wd(t,e,r){let{client:n}=t,a=Ee(e,"token",n.getConfig("token")),{inputCopy:s,error:i}=w({input:a,options:r,validate:B$});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 p=s.token||n.getConfig("token");if(p===void 0)throw new L("INPUT_NEEDS_TOKEN",{input:e});let m=q(b({},s),{identifier:s.identifier,transfer_group:R(s.transfer_group),token:O(p),from_wallet:O(s.wallet),type:"withdrawal"});return m.identifier||(m.identifier=fe(m)),n.api.createTransfer({transfer:m,options:di(o,{return_balance:"return_from_balance"})})}var L$=_("ExportBalanceHistoryFnInput");function Dd(t,e,r){let{client:n}=t,{inputCopy:a,error:s}=w({input:e,options:r,validate:L$});if(s)throw s;let i=a.token||n.getConfig("token");if(i===void 0)throw new L("INPUT_NEEDS_TOKEN",{input:e});return n.api.exportBalanceHistory({balance:{wallet:O(a.wallet),token:O(i)},options:r})}var H$=_("ExportTokensFnInput");function Nd(t,e,r){var m,c;let{client:n}=t;if(e===void 0)return new te({start(h){return n.api.exportTokenMany({token:h.filter,options:h.options})},modifiers(h,y){return["belongs_to"].includes(h)?O(y):y}});let{inputCopy:a,error:s}=w({input:e,options:r,validate:H$});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=O(a.belongs_to));let o=(m=a.options)==null?void 0:m.order_by;(c=a.options)==null||delete c.order_by;let p=b({},a.options);return!p.order&&o&&(p.order=ne(o)),n.api.exportTokenMany({token:i,options:p})}var V$=_("ExportTransferGroupsFnInput");function Ad(t,e,r){var g,x;let{client:n}=t;if(e===void 0)return new te({start(T){return n.api.exportTransferGroupMany({transfer_group:T.filter,options:T.options})},modifiers(T,$){return["transfer_group","reverses"].includes(T)?R($):$}});let{inputCopy:a,error:s}=w({input:e,options:r,validate:V$});if(s)throw s;let{identifier:i,transfer_status:o,status:p,metadata:m,type:c}=a,h={identifier:i,transfer_status:o,status:p,metadata:m,type:c};a.reverses&&(h.reverses=R(a.reverses));let y=(g=a.options)==null?void 0:g.order_by;(x=a.options)==null||delete x.order_by;let F=b({},a.options);return!F.order&&y&&(F.order=ne(y)),n.api.exportTransferGroupMany({transfer_group:h,options:F})}var z$=_("ExportTransfersFnInput");function Ud(t,e,r){var x;let{client:n}=t;if(e===void 0)return new te({start(T){return n.api.exportTransferMany({transfer:T.filter,options:T.options})},modifiers(T,$){return["token","wallet","from_wallet","to_wallet"].includes(T)?O($):T==="transfer_group"?R($):$}});let{inputCopy:a,error:s}=w({input:e,options:r,validate:z$});if(s)throw s;let{token:i,wallet:o,from_wallet:p,to_wallet:m}=a,c={token:O(i),wallet:O(o),from_wallet:O(p),to_wallet:O(m)};a.transfer_group&&(c.transfer_group=R(a.transfer_group)),a.status&&(c.status=a.status),a.metadata&&(c.metadata=a.metadata),(x=a.options)!=null||(a.options={});let h=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 L("CONFLICTING_OPTIONS_FOR_BALANCE",{options:a.options});if(!c.wallet)throw new L("RUNNING_BALANCE_WITHOUT_WALLET",{input:a});a.options.return_running_balance_for_wallet=a.wallet}let y=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 L("CONFLICTING_OPTIONS_FOR_SIGNED_AMOUNT",{options:a.options});if(!c.wallet)throw new L("SIGNED_AMOUNT_WITHOUT_WALLET",{input:a});a.options.return_signed_amount_for_wallet=a.wallet}let F=a.options.return_signed_amount_for_wallet;delete a.options.return_signed_amount_for_wallet;let g=b({},a.options);return!g.order&&h&&(g.order=ne(h)),y&&(g.return_running_balance_for_wallet=O(y)),F&&(g.return_signed_amount_for_wallet=O(F)),n.api.exportTransferMany({transfer:c,options:g})}var J$=_("ExportWalletsFnInput");function qd(t,e,r){var c;let{client:n}=t;if(e===void 0)return new te({start(h){return n.api.exportWalletMany({wallet:h.filter,options:h.options})},optionsModifiers(h,y){return h==="include_balance_for_token"&&typeof y!="object"?O(y):y}});let{inputCopy:a,error:s}=w({input:e,options:r,validate:J$});if(s)throw s;let i=(c=a.options)!=null?c:{};delete a.options;let o=b({},a),p=i.order_by;delete i.order_by;let m=b({},i);return!m.order&&p&&(m.order=ne(p)),n.api.exportWalletMany({wallet:o,options:m})}var Q$=_("FindBalancesFnInput");function Bd(t,e,r){var m,c;let{client:n}=t;if(e===void 0)return new te({start(h){return n.api.findBalanceMany({balance:h.filter,options:h.options})},modifiers(h,y){return["wallet","token"].includes(h)?O(y):y}});let{inputCopy:a,error:s}=w({input:e,options:r,validate:Q$});if(s)throw s;let i={};a.wallet&&(i.wallet=O(a.wallet)),a.token&&(i.token=O(a.token));let o=(m=a.options)==null?void 0:m.order_by;(c=a.options)==null||delete c.order_by;let p=b({},a.options);return!p.order&&o&&(p.order=ne(o)),n.api.findBalanceMany({balance:i,options:p})}var K$=_("FindTokensFnInput");function Ld(t,e,r){var m,c;let{client:n}=t;if(e===void 0)return new te({start(h){return n.api.findTokenMany({token:h.filter,options:h.options})},modifiers(h,y){return["belongs_to"].includes(h)?O(y):y}});let{inputCopy:a,error:s}=w({input:e,options:r,validate:K$});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=O(a.belongs_to));let o=(m=a.options)==null?void 0:m.order_by;(c=a.options)==null||delete c.order_by;let p=b({},a.options);return!p.order&&o&&(p.order=ne(o)),n.api.findTokenMany({token:i,options:p})}var Y$=_("FindTransferGroupsFnInput");function Hd(t,e,r){var g,x;let{client:n}=t;if(e===void 0)return new te({start(T){return n.api.findTransferGroupMany({transfer_group:T.filter,options:T.options})},modifiers(T,$){return["transfer_group","reverses"].includes(T)?R($):$}});let{inputCopy:a,error:s}=w({input:e,options:r,validate:Y$});if(s)throw s;let{identifier:i,transfer_status:o,status:p,metadata:m,type:c}=a,h={identifier:i,transfer_status:o,status:p,metadata:m,type:c};a.reverses&&(h.reverses=R(a.reverses));let y=(g=a.options)==null?void 0:g.order_by;(x=a.options)==null||delete x.order_by;let F=b({},a.options);return!F.order&&y&&(F.order=ne(y)),n.api.findTransferGroupMany({transfer_group:h,options:F})}var X$=_("FindTransfersFnInput");function Vd(t,e,r){var x;let{client:n}=t;if(e===void 0)return new te({start(T){return n.api.findTransferMany({transfer:T.filter,options:T.options})},modifiers(T,$){return["token","wallet","from_wallet","to_wallet"].includes(T)?O($):T==="transfer_group"?R($):$}});let{inputCopy:a,error:s}=w({input:e,options:r,validate:X$});if(s)throw s;let{token:i,wallet:o,from_wallet:p,to_wallet:m}=a,c={token:O(i),wallet:O(o),from_wallet:O(p),to_wallet:O(m)};a.transfer_group&&(c.transfer_group=R(a.transfer_group)),a.status&&(c.status=a.status),a.metadata&&(c.metadata=a.metadata),(x=a.options)!=null||(a.options={});let h=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 L("CONFLICTING_OPTIONS_FOR_BALANCE",{options:a.options});if(!c.wallet)throw new L("RUNNING_BALANCE_WITHOUT_WALLET",{input:a});a.options.return_running_balance_for_wallet=a.wallet}let y=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 L("CONFLICTING_OPTIONS_FOR_SIGNED_AMOUNT",{options:a.options});if(!c.wallet)throw new L("SIGNED_AMOUNT_WITHOUT_WALLET",{input:a});a.options.return_signed_amount_for_wallet=a.wallet}let F=a.options.return_signed_amount_for_wallet;delete a.options.return_signed_amount_for_wallet;let g=b({},a.options);return!g.order&&h&&(g.order=ne(h)),y&&(g.return_running_balance_for_wallet=O(y)),F&&(g.return_signed_amount_for_wallet=O(F)),n.api.findTransferMany({transfer:c,options:g})}var Z$=_("FindWalletsFnInput");function zd(t,e,r){var c;let{client:n}=t;if(e===void 0)return new te({start(h){return n.api.findWalletMany({wallet:h.filter,options:h.options})},optionsModifiers(h,y){return h==="include_balance_for_token"&&typeof y!="object"?O(y):y}});let{inputCopy:a,error:s}=w({input:e,options:r,validate:Z$});if(s)throw s;let i=(c=a.options)!=null?c:{};delete a.options;let o=b({},a),p=i.order_by;delete i.order_by;let m=b({},i);return!m.order&&p&&(m.order=ne(p)),n.api.findWalletMany({wallet:o,options:m})}var ew=_("GetBalanceFnInput");function Jd(t,e,r){let{client:n}=t,a=Ee(e,"token",n.getConfig("token")),{inputCopy:s,error:i}=w({input:a,options:r,validate:ew});if(i)throw i;if(s.datetime&&Rf(s.datetime))throw new L("BAL_FUTURE_DATETIME",{input:s});let o=s.token||n.getConfig("token");if(o===void 0)throw new L("INPUT_NEEDS_TOKEN",{input:s});return n.api.getBalance({balance:{wallet:O(s.wallet),token:O(o),datetime:s.datetime},options:s.options})}var tw=_("GetBalanceHistoryFnInput");function Qd(t,e,r){let{client:n}=t,{inputCopy:a,error:s}=w({input:e,options:r,validate:tw});if(s)throw s;let i=a.token||n.getConfig("token");if(i===void 0)throw new L("INPUT_NEEDS_TOKEN",{input:e});return n.api.getBalanceHistory({balance:{wallet:O(a.wallet),token:O(i),datetime:a.datetime},options:a.options})}var rw=_("GetExportFnInput");function Kd(t,e,r){let{client:n}=t,{inputCopy:a,error:s}=w({input:e,options:r,validate:rw});if(s)throw s;return n.api.getExport({export:{identifier:a.identifier},options:a.options})}var nw=_("GetFlagsFnInput");function Yd(t,e,r){let{client:n}=t,{error:a,inputCopy:s}=w({input:e||{},options:r,validate:nw});if(a)throw a;return n.api.getFlags({options:s.options})}var aw=_("GetStatisticsFnInput");function Xd(t,e,r){let{client:n}=t,{inputCopy:a,error:s}=w({input:e||{},options:r,validate:aw});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 sw=_("GetTokenFnInput");function Zd(t,e={},r){let{client:n}=t,a=Ee(e,"foreign",n.getConfig("token")),{inputCopy:s,error:i}=w({input:a,options:r,validate:sw});if(i)throw i;let o=s.foreign||n.getConfig("token");if(o===void 0)throw new L("INPUT_NEEDS_TOKEN",{input:e});return n.api.getToken({token:O(o),options:s.options})}var iw=_("GetTransferFnInput");function ef(t,e,r){let{client:n}=t,{inputCopy:a,error:s}=w({input:e,options:r,validate:iw});if(s)throw s;return n.api.getTransfer({transfer:R(a.transfer),options:a.options})}var ow=_("GetTransferGroupFnInput");function tf(t,e,r){let{client:n}=t,{inputCopy:a,error:s}=w({input:e,options:r,validate:ow});if(s)throw s;return n.api.getTransferGroup({transfer_group:R(a.transfer_group),options:a.options})}var pw=_("GetWalletFnInput");function rf(t,e,r){let{client:n}=t,{inputCopy:a,error:s}=w({input:e,options:r,validate:pw});if(s)throw s;return n.api.getWallet({wallet:O(a.wallet),options:a.options})}var dw=_("HealthcheckFnInput");function nf(t,e,r){let{client:n}=t,{inputCopy:a,error:s}=w({input:e,options:r,validate:dw});if(s)throw s;return n.api.healthcheck({options:b(b({},a.options),r)})}var fw=_("ImportDataFnInput");function kc(t){let{error:e}=fw(t);return e===void 0}var XN=_("ImportDataFnOutput");var ZN=_("ImportDataFnStreamChunk");var uw=_("ImportDataFnOptions");function Sc(t){let{error:e}=uw(t);return e===void 0}function af(){throw new Error("import-data available only in node client")}var lw=_("ListExportsFnInput");function sf(t,e,r){let{client:n}=t,{inputCopy:a,error:s}=w({input:e,options:r,validate:lw});if(s)throw s;let i=Cf(a==null?void 0:a.date);return r=Gf(r),n.api.listExportMany({export:{date:i,type:a.type},options:r})}var cw=_("ReverseTransferFnInput");function of(t,e,r){let{client:n}=t,{inputCopy:a,error:s}=w({input:e,options:r,validate:cw});if(s)throw s;return a.extend_metadata&&console.warn("deprecated: extend_metadata is deprecated. Use metadata_action instead"),n.api.reverseTransfer({transfer:R(a.transfer),reverse:{force:a.force,metadata:a.metadata,extend_metadata:a.extend_metadata,identifier:a.identifier,status:a.status},options:a.options})}var mw=_("ReverseTransferGroupFnInput");function pf(t,e,r){let{client:n}=t,{inputCopy:a,error:s}=w({input:e,options:r,validate:mw});if(s)throw s;return a.extend_metadata&&console.warn("deprecated: extend_metadata is deprecated. Use metadata_action instead"),n.api.reverseTransferGroup({transfer_group:R(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 hw=_("ReverseTransfersFnInput");function df(t,e,r){let{client:n}=t;if(e===void 0)return new Vi({start(h){return n.api.reverseTransferMany({transfer:h.filter,reverse:h.reverse,options:h.options})},modifiers(h,y){return["token","wallet","from_wallet","to_wallet"].includes(h)?O(y):h==="transfer_group"?R(y):y}});let{inputCopy:a,error:s}=w({input:e,options:r,validate:hw});if(s)throw s;let{token:i,wallet:o,from_wallet:p,to_wallet:m}=a,c={token:O(i),wallet:O(o),from_wallet:O(p),to_wallet:O(m)};return a.transfer_group&&(c.transfer_group=R(a.transfer_group)),a.status&&(c.status=a.status),a.metadata&&(c.metadata=a.metadata),n.api.reverseTransferMany({transfer:c,reverse:a.reverse,options:a.options})}var _w=_("SetFlagsFnInput");function ff(t,e,r){let{client:n}=t,{inputCopy:a,error:s}=w({input:e,options:r,validate:_w});if(s)throw s;let i=Object.keys(ut.definitions.Flags.properties),o={};if(i.forEach(p=>{p in a&&(o[p]=a[p])}),Object.keys(o).length<1)throw new L("REQUIRED_INPUT_MISSING",{requiredOneOf:i,input:e});return n.api.setFlags({flags:o,options:a.options})}var gw=_("UpdateTokenFnInput");function uf(t,e,r){let{client:n}=t,{inputCopy:a,error:s}=w({input:e,options:r,validate:gw});if(s)throw s;return n.api.updateToken({token:O(a.token),update:{public:a.public,metadata:a.metadata,status:a.status},options:a.options})}var Tw=_("UpdateTransferFnInput");function lf(t,e,r){let{client:n}=t,{inputCopy:a,error:s}=w({input:e,options:r,validate:Tw});if(s)throw s;return n.api.updateTransfer({transfer:R(a.transfer),update:{status:a.status,metadata:a.metadata,extend_metadata:a.extend_metadata},options:a.options})}var yw=_("UpdateTransferGroupFnInput");function cf(t,e,r){let{client:n}=t,{inputCopy:a,error:s}=w({input:e,options:r,validate:yw});if(s)throw s;return n.api.updateTransferGroup({transfer_group:R(a.transfer_group),update:{transfer_status:a.transfer_status,status:a.status,metadata:a.metadata},options:a.options})}var Fw=_("UpdateTransferGroupsFnInput");function mf(t,e,r){let{client:n}=t;if(e===void 0)return new Gt({start(y){return n.api.updateTransferGroupMany({transfer_group:y.filter,update:y.update,options:y.options})},modifiers(y,F){return["transfer_group","reverses"].includes(y)?R(F):F}});let{inputCopy:a,error:s}=w({input:e,options:r,validate:Fw});if(s)throw s;let{transfer_status:i,status:o,metadata:p,type:m,update:c}=a,h={transfer_status:i,status:o,metadata:p,type:m};return a.reverses&&(h.reverses=R(a.reverses)),n.api.updateTransferGroupMany({transfer_group:h,update:c,options:a.options})}var xw=_("UpdateTransfersFnInput");function hf(t,e,r){let{client:n}=t;if(e===void 0)return new Gt({start(h){return n.api.updateTransferMany({transfer:h.filter,update:h.update,options:h.options})},modifiers(h,y){return["token","wallet","from_wallet","to_wallet"].includes(h)?O(y):h==="transfer_group"?R(y):y}});let{inputCopy:a,error:s}=w({input:e,options:r,validate:xw});if(s)throw s;let{token:i,wallet:o,from_wallet:p,to_wallet:m}=a,c={token:O(i),wallet:O(o),from_wallet:O(p),to_wallet:O(m)};return a.transfer_group&&(c.transfer_group=R(a.transfer_group)),a.status&&(c.status=a.status),a.metadata&&(c.metadata=a.metadata),n.api.updateTransferMany({transfer:c,update:a.update,options:a.options})}var bw=_("UpdateWalletFnInput");function _f(t,e,r){let{client:n}=t,{inputCopy:a,error:s}=w({input:e,options:r,validate:bw});if(s)throw s;return n.api.updateWallet({wallet:O(a.wallet),update:{metadata:a.metadata,status:a.status,name:a.name},options:a.options})}var Ow={aggregateTransfers:_("AggregateTransfersFnInput"),createAccessToken:_("CreateAccessTokenFnInput"),createContract:_("CreateContractFnInput"),createDeposit:_("CreateDepositFnInput"),createExchange:_("CreateExchangeFnInput"),createToken:_("CreateTokenFnInput"),createTransfer:_("CreateTransferFnInput"),createTransferGroup:_("CreateTransferGroupFnInput"),createTransfers:_("CreateTransfersFnInput"),createWallet:_("CreateWalletFnInput"),createWithdrawal:_("CreateWithdrawalFnInput"),exportBalanceHistory:_("ExportBalanceHistoryFnInput"),exportTokens:_("ExportTokensFnInput"),exportTransferGroups:_("ExportTransferGroupsFnInput"),exportTransfers:_("ExportTransfersFnInput"),exportWallets:_("ExportWalletsFnInput"),findBalances:_("FindBalancesFnInput"),findTokens:_("FindTokensFnInput"),findTransferGroups:_("FindTransferGroupsFnInput"),findTransfers:_("FindTransfersFnInput"),findWallets:_("FindWalletsFnInput"),getBalance:_("GetBalanceFnInput"),getBalanceHistory:_("GetBalanceHistoryFnInput"),getExport:_("GetExportFnInput"),getFlags:_("GetFlagsFnInput"),getStatistics:_("GetStatisticsFnInput"),getToken:_("GetTokenFnInput"),getTransfer:_("GetTransferFnInput"),getTransferGroup:_("GetTransferGroupFnInput"),getWallet:_("GetWalletFnInput"),healthcheck:_("HealthcheckFnInput"),importData:_("ImportDataFnInput"),listExports:_("ListExportsFnInput"),reverseTransfer:_("ReverseTransferFnInput"),reverseTransferGroup:_("ReverseTransferGroupFnInput"),reverseTransfers:_("ReverseTransfersFnInput"),setFlags:_("SetFlagsFnInput"),updateToken:_("UpdateTokenFnInput"),updateTransfer:_("UpdateTransferFnInput"),updateTransferGroup:_("UpdateTransferGroupFnInput"),updateTransferGroups:_("UpdateTransferGroupsFnInput"),updateTransfers:_("UpdateTransfersFnInput"),updateWallet:_("UpdateWalletFnInput")},j={aggregateTransfers:od,createAccessToken:pd,createContract:dd,createDeposit:fd,createExchange:Ed,createToken:Gd,createTransfer:Cd,createTransferGroup:Rd,createTransfers:Md,createWallet:Pd,createWithdrawal:Wd,exportBalanceHistory:Dd,exportTokens:Nd,exportTransferGroups:Ad,exportTransfers:Ud,exportWallets:qd,findBalances:Bd,findTokens:Ld,findTransferGroups:Hd,findTransfers:Vd,findWallets:zd,getBalance:Jd,getBalanceHistory:Qd,getExport:Kd,getFlags:Yd,getStatistics:Xd,getToken:Zd,getTransfer:ef,getTransferGroup:tf,getWallet:rf,healthcheck:nf,importData:af,listExports:sf,reverseTransfer:of,reverseTransferGroup:pf,reverseTransfers:df,setFlags:ff,updateToken:uf,updateTransfer:lf,updateTransferGroup:cf,updateTransferGroups:mf,updateTransfers:hf,updateWallet:_f},vc=(C=>(C.aggregateTransfers="aggregateTransfers",C.createAccessToken="createAccessToken",C.createContract="createContract",C.createDeposit="createDeposit",C.createExchange="createExchange",C.createToken="createToken",C.createTransfer="createTransfer",C.createTransferGroup="createTransferGroup",C.createTransfers="createTransfers",C.createWallet="createWallet",C.createWithdrawal="createWithdrawal",C.exportBalanceHistory="exportBalanceHistory",C.exportTokens="exportTokens",C.exportTransferGroups="exportTransferGroups",C.exportTransfers="exportTransfers",C.exportWallets="exportWallets",C.findBalances="findBalances",C.findTokens="findTokens",C.findTransferGroups="findTransferGroups",C.findTransfers="findTransfers",C.findWallets="findWallets",C.getBalance="getBalance",C.getBalanceHistory="getBalanceHistory",C.getExport="getExport",C.getFlags="getFlags",C.getStatistics="getStatistics",C.getToken="getToken",C.getTransfer="getTransfer",C.getTransferGroup="getTransferGroup",C.getWallet="getWallet",C.healthcheck="healthcheck",C.importData="importData",C.listExports="listExports",C.reverseTransfer="reverseTransfer",C.reverseTransferGroup="reverseTransferGroup",C.reverseTransfers="reverseTransfers",C.setFlags="setFlags",C.updateToken="updateToken",C.updateTransfer="updateTransfer",C.updateTransferGroup="updateTransferGroup",C.updateTransferGroups="updateTransferGroups",C.updateTransfers="updateTransfers",C.updateWallet="updateWallet",C))(vc||{}),Ec=(a=>(a.findTokens="findTokens",a.findTransferGroups="findTransferGroups",a.findTransfers="findTransfers",a.findWallets="findWallets",a))(Ec||{});var Gc,$w=(Gc=window.WAPI_VERSION)!=null?Gc:"",Ct=class{constructor(e,r){this.config={};this.api=e,this.$connect=e.$connect,r&&this.configure(b(b(b(b(b(b(b({},r.token&&{token:r.token}),r.sendingTimeout&&{sendingTimeout:r.sendingTimeout}),r.connectingTimeout&&{connectingTimeout:r.connectingTimeout}),r.reconnectingTimeout&&{reconnectingTimeout:r.reconnectingTimeout}),r.hooks&&{hooks:r.hooks}),r.connectionName&&{connectionName:r.connectionName}),r.httpSkipInitialAuthConnection&&{httpSkipInitialAuthConnection:r.httpSkipInitialAuthConnection}))}close(){return ee(this,null,function*(){return this.api.close()})}version(){return $w}setHook(e,r){if(typeof r!="function")throw new TypeError("Hooks can only be functions");return this.api.hooks[e]=r,this}configure(e){if(e.token&&typeof e.token!="string"&&typeof e.token!="number")throw new ce("CONFIG_INVALID",{field:"token",error:`Must be a string|number, '${e.token}' provided`});["sendingTimeout","connectingTimeout","reconnectingTimeout"].forEach(n=>{if(e[n]&&typeof e[n]!="number")throw new ce("CONFIG_INVALID",{field:n,error:`Must be a number, '${e[n]}' provided`})});let r=e.hooks;if(delete e.hooks,this.config=b(b({},this.config),e),this.config.sendingTimeout&&(this.api.sendingTimeout=this.config.sendingTimeout),r)for(let[n,a]of Object.entries(r))this.setHook(n,a);return this}getConfig(e){return this.config[e]}aggregateTransfers(e,r){return e===void 0?j.aggregateTransfers({client:this}):j.aggregateTransfers({client:this},e,r)}createAccessToken(e,r){return j.createAccessToken({client:this},e!=null?e:{},r)}createContract(e,r){return j.createContract({client:this},e,r)}createDeposit(e,r){return j.createDeposit({client:this},e,r)}createExchange(e,r){return j.createExchange({client:this},e,r)}createToken(e,r){return j.createToken({client:this},e,r)}createTransfer(e,r){return j.createTransfer({client:this},e,r)}createTransferGroup(e,r){return j.createTransferGroup({client:this},e,r)}createTransfers(e,r){return j.createTransfers({client:this},e,r)}createWallet(e,r){return j.createWallet({client:this},e,r)}createWithdrawal(e,r){return j.createWithdrawal({client:this},e,r)}exportBalanceHistory(e,r){return j.exportBalanceHistory({client:this},e,r)}exportTokens(e,r){return e===void 0?j.exportTokens({client:this}):j.exportTokens({client:this},e,r)}exportTransferGroups(e,r){return e===void 0?j.exportTransferGroups({client:this}):j.exportTransferGroups({client:this},e,r)}exportTransfers(e,r){return e===void 0?j.exportTransfers({client:this}):j.exportTransfers({client:this},e,r)}exportWallets(e,r){return e===void 0?j.exportWallets({client:this}):j.exportWallets({client:this},e,r)}findBalances(e,r){return e===void 0?j.findBalances({client:this}):j.findBalances({client:this},e,r)}findTokens(e,r){return e===void 0?j.findTokens({client:this}):j.findTokens({client:this},e,r)}findTransferGroups(e,r){return e===void 0?j.findTransferGroups({client:this}):j.findTransferGroups({client:this},e,r)}findTransfers(e,r){return e===void 0?j.findTransfers({client:this}):j.findTransfers({client:this},e,r)}findWallets(e,r){return e===void 0?j.findWallets({client:this}):j.findWallets({client:this},e,r)}getBalance(e,r){return j.getBalance({client:this},e,r)}getBalanceHistory(e,r){return j.getBalanceHistory({client:this},e,r)}getExport(e,r){return j.getExport({client:this},e,r)}getFlags(e,r){return j.getFlags({client:this},e!=null?e:{},r)}getStatistics(e,r){return j.getStatistics({client:this},e!=null?e:{},r)}getToken(e,r){return j.getToken({client:this},e!=null?e:{},r)}getTransfer(e,r){return j.getTransfer({client:this},e,r)}getTransferGroup(e,r){return j.getTransferGroup({client:this},e,r)}getWallet(e,r){return j.getWallet({client:this},e,r)}healthcheck(e,r){return j.healthcheck({client:this},e!=null?e:{},r)}importData(e,r){if(e===void 0&&r===void 0)return j.importData({client:this});if(r===void 0&&Sc(e))return j.importData({client:this},e);if(kc(e))return j.importData({client:this},e,r);throw new Te({input:e,options:r})}listExports(e,r){return j.listExports({client:this},e!=null?e:{},r)}reverseTransfer(e,r){return j.reverseTransfer({client:this},e,r)}reverseTransferGroup(e,r){return j.reverseTransferGroup({client:this},e,r)}reverseTransfers(e,r){return e===void 0?j.reverseTransfers({client:this}):j.reverseTransfers({client:this},e,r)}setFlags(e,r){return j.setFlags({client:this},e,r)}updateToken(e,r){return j.updateToken({client:this},e,r)}updateTransfer(e,r){return j.updateTransfer({client:this},e,r)}updateTransferGroup(e,r){return j.updateTransferGroup({client:this},e,r)}updateTransferGroups(e,r){return e===void 0?j.updateTransferGroups({client:this}):j.updateTransferGroups({client:this},e,r)}updateTransfers(e,r){return e===void 0?j.updateTransfers({client:this}):j.updateTransfers({client:this},e,r)}updateWallet(e,r){return j.updateWallet({client:this},e,r)}};function Cc(t,e){let r=Zp(t,{connectingTimeout:e==null?void 0:e.connectingTimeout,reconnectingTimeout:e==null?void 0:e.reconnectingTimeout});return new Ct(r,e)}function Rc(t,e){let r=nd(t,{connectingTimeout:e==null?void 0:e.connectingTimeout,reconnectingTimeout:e==null?void 0:e.reconnectingTimeout,httpSkipInitialAuthConnection:e==null?void 0:e.httpSkipInitialAuthConnection,connectionName:e==null?void 0:e.connectionName});return new Ct(r,e)}var ww=ri.getValidator("ClientOptions"),Mc=(r=>(r.ws="ws",r.https="https",r))(Mc||{});function Iw(t){var a;let e=t.config;delete t.config,(a=t.client)!=null||(t.client="ws");let{inputCopy:r,error:n}=ww(t);if(n)throw n;if(r.client==="ws")return Cc(r.connection,e);if(r.client==="https")return Rc(r.connection,e);throw new TypeError("Invalid client type")}var jw={getIdentifier:Sf};return Vc(kw);})();
|