@psalomo/jsonrpc-client 0.4.0 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/__tests__/test-utils.d.ts +5 -0
- package/dist/__tests__/test-utils.d.ts.map +1 -0
- package/dist/browser-standalone-mini.js +1245 -0
- package/dist/browser-standalone-mini.min.js +1 -0
- package/dist/browser-standalone.js +5754 -13420
- package/dist/browser-standalone.min.js +1 -0
- package/dist/client.d.ts +57 -0
- package/dist/client.d.ts.map +1 -0
- package/dist/client.mini.d.ts +58 -0
- package/dist/client.mini.d.ts.map +1 -0
- package/dist/convenience.mini.d.ts +21 -0
- package/dist/convenience.mini.d.ts.map +1 -0
- package/dist/generated-functions.mini.d.ts +3 -0
- package/dist/generated-functions.mini.d.ts.map +1 -0
- package/dist/generated-types.d.ts +55 -0
- package/dist/generated-types.d.ts.map +1 -0
- package/dist/generated-types.mini.d.ts +84 -0
- package/dist/generated-types.mini.d.ts.map +1 -0
- package/dist/index.d.mts +2 -3
- package/dist/index.d.ts +7 -137
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +4 -5
- package/dist/index.mini.cjs +421 -0
- package/dist/index.mini.d.mts +198 -0
- package/dist/index.mini.d.ts +10 -0
- package/dist/index.mini.d.ts.map +1 -0
- package/dist/index.mini.mjs +361 -0
- package/dist/index.mjs +4 -5
- package/dist/types.d.ts +23 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/validation.mini.d.ts +12 -0
- package/dist/validation.mini.d.ts.map +1 -0
- package/package.json +15 -6
@@ -0,0 +1 @@
|
|
1
|
+
function e(e,t,n){function o(n,o){var i;Object.defineProperty(n,"_zod",{value:n._zod??{},enumerable:!1}),(i=n._zod).traits??(i.traits=new Set),n._zod.traits.add(e),t(n,o);for(const e in a.prototype)e in n||Object.defineProperty(n,e,{value:a.prototype[e].bind(n)});n._zod.constr=a,n._zod.def=o}const i=n?.Parent??Object;class r extends i{}function a(e){var t;const i=n?.Parent?new r:this;o(i,e),(t=i._zod).deferred??(t.deferred=[]);for(const e of i._zod.deferred)e();return i}return Object.defineProperty(r,"name",{value:e}),Object.defineProperty(a,"init",{value:o}),Object.defineProperty(a,Symbol.hasInstance,{value:t=>!!(n?.Parent&&t instanceof n.Parent)||t?._zod?.traits?.has(e)}),Object.defineProperty(a,"name",{value:e}),a}class t extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}const n={};function o(e){return n}function i(e,t){return"bigint"==typeof t?t.toString():t}function r(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function a(e){return null==e}function s(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}function c(e,t,n){Object.defineProperty(e,t,{get(){{const o=n();return e[t]=o,o}},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function u(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function l(e){return JSON.stringify(e)}const d=Error.captureStackTrace?Error.captureStackTrace:(...e)=>{};function p(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}const h=r(()=>{if("undefined"!=typeof navigator&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{return new Function(""),!0}catch(e){return!1}});function m(e){if(!1===p(e))return!1;const t=e.constructor;if(void 0===t)return!0;const n=t.prototype;return!1!==p(n)&&!1!==Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")}const f=new Set(["string","number","symbol"]);function g(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function y(e,t,n){const o=new e._zod.constr(t??e._zod.def);return t&&!n?.parent||(o._zod.parent=e),o}function _(e){const t=e;if(!t)return{};if("string"==typeof t)return{error:()=>t};if(void 0!==t?.message){if(void 0!==t?.error)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,"string"==typeof t.error?{...t,error:()=>t.error}:t}const v={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function k(e,t=0){for(let n=t;n<e.issues.length;n++)if(!0!==e.issues[n]?.continue)return!0;return!1}function I(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function b(e){return"string"==typeof e?e:e?.message}function E(e,t,n){const o={...e,path:e.path??[]};if(!e.message){const i=b(e.inst?._zod.def?.error?.(e))??b(t?.error?.(e))??b(n.customError?.(e))??b(n.localeError?.(e))??"Invalid input";o.message=i}return delete o.inst,delete o.continue,t?.reportInput||delete o.input,o}function w(e){return Array.isArray(e)?"array":"string"==typeof e?"string":"unknown"}function z(...e){const[t,n,o]=e;return"string"==typeof t?{message:t,code:"custom",input:n,inst:o}:{...t}}const T=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),Object.defineProperty(e,"message",{get:()=>JSON.stringify(t,i,2),enumerable:!0}),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},P=e("$ZodError",T),x=e("$ZodError",T,{Parent:Error});const S=e=>(n,i,r,a)=>{const s=r?Object.assign(r,{async:!1}):{async:!1},c=n._zod.run({value:i,issues:[]},s);if(c instanceof Promise)throw new t;if(c.issues.length){const t=new(a?.Err??e)(c.issues.map(e=>E(e,s,o())));throw d(t,a?.callee),t}return c.value},A=e=>async(t,n,i,r)=>{const a=i?Object.assign(i,{async:!0}):{async:!0};let s=t._zod.run({value:n,issues:[]},a);if(s instanceof Promise&&(s=await s),s.issues.length){const t=new(r?.Err??e)(s.issues.map(e=>E(e,a,o())));throw d(t,r?.callee),t}return s.value},C=e=>(n,i,r)=>{const a=r?{...r,async:!1}:{async:!1},s=n._zod.run({value:i,issues:[]},a);if(s instanceof Promise)throw new t;return s.issues.length?{success:!1,error:new(e??P)(s.issues.map(e=>E(e,a,o())))}:{success:!0,data:s.value}},R=C(x),N=e=>async(t,n,i)=>{const r=i?Object.assign(i,{async:!0}):{async:!0};let a=t._zod.run({value:n,issues:[]},r);return a instanceof Promise&&(a=await a),a.issues.length?{success:!1,error:new e(a.issues.map(e=>E(e,r,o())))}:{success:!0,data:a.value}},B=N(x),$=/^[cC][^\s-]{8,}$/,M=/^[0-9a-z]+$/,Z=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,L=/^[0-9a-vA-V]{20}$/,O=/^[A-Za-z0-9]{27}$/,D=/^[a-zA-Z0-9_-]{21}$/,j=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,F=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,V=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$/,H=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/;const K=/^(?:(?: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=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})$/,G=/^((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])\/([0-9]|[1-2][0-9]|3[0-2])$/,q=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,X=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,W=/^[A-Za-z0-9_-]*$/,J=/^([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+$/,Y=/^\+(?:[0-9]){6,14}[0-9]$/,Q="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",ee=new RegExp(`^${Q}$`);function te(e){const t="(?:[01]\\d|2[0-3]):[0-5]\\d";return"number"==typeof e.precision?-1===e.precision?`${t}`:0===e.precision?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}const ne=/^\d+$/,oe=/^-?\d+(?:\.\d+)?/i,ie=/true|false/i,re=/^[^A-Z]*$/,ae=/^[^a-z]*$/,se=e("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),ce={number:"number",bigint:"bigint",object:"date"},ue=e("$ZodCheckLessThan",(e,t)=>{se.init(e,t);const n=ce[typeof t.value];e._zod.onattach.push(e=>{const n=e._zod.bag,o=(t.inclusive?n.maximum:n.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<o&&(t.inclusive?n.maximum=t.value:n.exclusiveMaximum=t.value)}),e._zod.check=o=>{(t.inclusive?o.value<=t.value:o.value<t.value)||o.issues.push({origin:n,code:"too_big",maximum:t.value,input:o.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),le=e("$ZodCheckGreaterThan",(e,t)=>{se.init(e,t);const n=ce[typeof t.value];e._zod.onattach.push(e=>{const n=e._zod.bag,o=(t.inclusive?n.minimum:n.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>o&&(t.inclusive?n.minimum=t.value:n.exclusiveMinimum=t.value)}),e._zod.check=o=>{(t.inclusive?o.value>=t.value:o.value>t.value)||o.issues.push({origin:n,code:"too_small",minimum:t.value,input:o.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),de=e("$ZodCheckMultipleOf",(e,t)=>{se.init(e,t),e._zod.onattach.push(e=>{var n;(n=e._zod.bag).multipleOf??(n.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");("bigint"==typeof n.value?n.value%t.value===BigInt(0):0===function(e,t){const n=(e.toString().split(".")[1]||"").length,o=(t.toString().split(".")[1]||"").length,i=n>o?n:o;return Number.parseInt(e.toFixed(i).replace(".",""))%Number.parseInt(t.toFixed(i).replace(".",""))/10**i}(n.value,t.value))||n.issues.push({origin:typeof n.value,code:"not_multiple_of",divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),pe=e("$ZodCheckNumberFormat",(e,t)=>{se.init(e,t),t.format=t.format||"float64";const n=t.format?.includes("int"),o=n?"int":"number",[i,r]=v[t.format];e._zod.onattach.push(e=>{const o=e._zod.bag;o.format=t.format,o.minimum=i,o.maximum=r,n&&(o.pattern=ne)}),e._zod.check=a=>{const s=a.value;if(n){if(!Number.isInteger(s))return void a.issues.push({expected:o,format:t.format,code:"invalid_type",input:s,inst:e});if(!Number.isSafeInteger(s))return void(s>0?a.issues.push({input:s,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:o,continue:!t.abort}):a.issues.push({input:s,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:o,continue:!t.abort}))}s<i&&a.issues.push({origin:"number",input:s,code:"too_small",minimum:i,inclusive:!0,inst:e,continue:!t.abort}),s>r&&a.issues.push({origin:"number",input:s,code:"too_big",maximum:r,inst:e})}}),he=e("$ZodCheckMaxLength",(e,t)=>{var n;se.init(e,t),(n=e._zod.def).when??(n.when=e=>{const t=e.value;return!a(t)&&void 0!==t.length}),e._zod.onattach.push(e=>{const n=e._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<n&&(e._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{const o=n.value;if(o.length<=t.maximum)return;const i=w(o);n.issues.push({origin:i,code:"too_big",maximum:t.maximum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),me=e("$ZodCheckMinLength",(e,t)=>{var n;se.init(e,t),(n=e._zod.def).when??(n.when=e=>{const t=e.value;return!a(t)&&void 0!==t.length}),e._zod.onattach.push(e=>{const n=e._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>n&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{const o=n.value;if(o.length>=t.minimum)return;const i=w(o);n.issues.push({origin:i,code:"too_small",minimum:t.minimum,inclusive:!0,input:o,inst:e,continue:!t.abort})}}),fe=e("$ZodCheckLengthEquals",(e,t)=>{var n;se.init(e,t),(n=e._zod.def).when??(n.when=e=>{const t=e.value;return!a(t)&&void 0!==t.length}),e._zod.onattach.push(e=>{const n=e._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length}),e._zod.check=n=>{const o=n.value,i=o.length;if(i===t.length)return;const r=w(o),a=i>t.length;n.issues.push({origin:r,...a?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),ge=e("$ZodCheckStringFormat",(e,t)=>{var n,o;se.init(e,t),e._zod.onattach.push(e=>{const n=e._zod.bag;n.format=t.format,t.pattern&&(n.patterns??(n.patterns=new Set),n.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=n=>{t.pattern.lastIndex=0,t.pattern.test(n.value)||n.issues.push({origin:"string",code:"invalid_format",format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(o=e._zod).check??(o.check=()=>{})}),ye=e("$ZodCheckRegex",(e,t)=>{ge.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,t.pattern.test(n.value)||n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),_e=e("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=re),ge.init(e,t)}),ve=e("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=ae),ge.init(e,t)}),ke=e("$ZodCheckIncludes",(e,t)=>{se.init(e,t);const n=g(t.includes),o=new RegExp("number"==typeof t.position?`^.{${t.position}}${n}`:n);t.pattern=o,e._zod.onattach.push(e=>{const t=e._zod.bag;t.patterns??(t.patterns=new Set),t.patterns.add(o)}),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),Ie=e("$ZodCheckStartsWith",(e,t)=>{se.init(e,t);const n=new RegExp(`^${g(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.onattach.push(e=>{const t=e._zod.bag;t.patterns??(t.patterns=new Set),t.patterns.add(n)}),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),be=e("$ZodCheckEndsWith",(e,t)=>{se.init(e,t);const n=new RegExp(`.*${g(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.onattach.push(e=>{const t=e._zod.bag;t.patterns??(t.patterns=new Set),t.patterns.add(n)}),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}}),Ee=e("$ZodCheckOverwrite",(e,t)=>{se.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}});class we{constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),this.indent-=1}write(e){if("function"==typeof e)return e(this,{execution:"sync"}),void e(this,{execution:"async"});const t=e.split("\n").filter(e=>e),n=Math.min(...t.map(e=>e.length-e.trimStart().length)),o=t.map(e=>e.slice(n)).map(e=>" ".repeat(2*this.indent)+e);for(const e of o)this.content.push(e)}compile(){const e=Function,t=this?.args;return new e(...t,[...(this?.content??[""]).map(e=>` ${e}`)].join("\n"))}}const ze={major:4,minor:0,patch:5},Te=e("$ZodType",(e,n)=>{var o;e??(e={}),e._zod.def=n,e._zod.bag=e._zod.bag||{},e._zod.version=ze;const i=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&i.unshift(e);for(const t of i)for(const n of t._zod.onattach)n(e);if(0===i.length)(o=e._zod).deferred??(o.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{const n=(e,n,o)=>{let i,r=k(e);for(const a of n){if(a._zod.def.when){if(!a._zod.def.when(e))continue}else if(r)continue;const n=e.issues.length,s=a._zod.check(e);if(s instanceof Promise&&!1===o?.async)throw new t;if(i||s instanceof Promise)i=(i??Promise.resolve()).then(async()=>{await s;e.issues.length!==n&&(r||(r=k(e,n)))});else{if(e.issues.length===n)continue;r||(r=k(e,n))}}return i?i.then(()=>e):e};e._zod.run=(o,r)=>{const a=e._zod.parse(o,r);if(a instanceof Promise){if(!1===r.async)throw new t;return a.then(e=>n(e,i,r))}return n(a,i,r)}}e["~standard"]={validate:t=>{try{const n=R(e,t);return n.success?{value:n.data}:{issues:n.error?.issues}}catch(n){return B(e,t).then(e=>e.success?{value:e.data}:{issues:e.error?.issues})}},vendor:"zod",version:1}}),Pe=e("$ZodString",(e,t)=>{var n;Te.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??(n=e._zod.bag,new RegExp(`^${n?`[\\s\\S]{${n?.minimum??0},${n?.maximum??""}}`:"[\\s\\S]*"}$`)),e._zod.parse=(n,o)=>{if(t.coerce)try{n.value=String(n.value)}catch(o){}return"string"==typeof n.value||n.issues.push({expected:"string",code:"invalid_type",input:n.value,inst:e}),n}}),xe=e("$ZodStringFormat",(e,t)=>{ge.init(e,t),Pe.init(e,t)}),Se=e("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=F),xe.init(e,t)}),Ae=e("$ZodUUID",(e,t)=>{if(t.version){const e={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(void 0===e)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=V(e))}else t.pattern??(t.pattern=V());xe.init(e,t)}),Ce=e("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=H),xe.init(e,t)}),Re=e("$ZodURL",(e,t)=>{xe.init(e,t),e._zod.check=n=>{try{const o=n.value,i=new URL(o),r=i.href;return t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(i.hostname)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:J.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(i.protocol.endsWith(":")?i.protocol.slice(0,-1):i.protocol)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),void(!o.endsWith("/")&&r.endsWith("/")?n.value=r.slice(0,-1):n.value=r)}catch(o){n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort})}}}),Ne=e("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=new RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),xe.init(e,t)}),Be=e("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=D),xe.init(e,t)}),$e=e("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=$),xe.init(e,t)}),Me=e("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=M),xe.init(e,t)}),Ze=e("$ZodULID",(e,t)=>{t.pattern??(t.pattern=Z),xe.init(e,t)}),Le=e("$ZodXID",(e,t)=>{t.pattern??(t.pattern=L),xe.init(e,t)}),Oe=e("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=O),xe.init(e,t)}),De=e("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=function(e){const t=te({precision:e.precision}),n=["Z"];e.local&&n.push(""),e.offset&&n.push("([+-]\\d{2}:\\d{2})");const o=`${t}(?:${n.join("|")})`;return new RegExp(`^${Q}T(?:${o})$`)}(t)),xe.init(e,t)}),je=e("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=ee),xe.init(e,t)}),Fe=e("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=new RegExp(`^${te(t)}$`)),xe.init(e,t)}),Ve=e("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=j),xe.init(e,t)}),He=e("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=K),xe.init(e,t),e._zod.onattach.push(e=>{e._zod.bag.format="ipv4"})}),Ke=e("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=U),xe.init(e,t),e._zod.onattach.push(e=>{e._zod.bag.format="ipv6"}),e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:e,continue:!t.abort})}}}),Ue=e("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=G),xe.init(e,t)}),Ge=e("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=q),xe.init(e,t),e._zod.check=n=>{const[o,i]=n.value.split("/");try{if(!i)throw new Error;const e=Number(i);if(`${e}`!==i)throw new Error;if(e<0||e>128)throw new Error;new URL(`http://[${o}]`)}catch{n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:e,continue:!t.abort})}}});function qe(e){if(""===e)return!0;if(e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}const Xe=e("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=X),xe.init(e,t),e._zod.onattach.push(e=>{e._zod.bag.contentEncoding="base64"}),e._zod.check=n=>{qe(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}});const We=e("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=W),xe.init(e,t),e._zod.onattach.push(e=>{e._zod.bag.contentEncoding="base64url"}),e._zod.check=n=>{(function(e){if(!W.test(e))return!1;const t=e.replace(/[-_]/g,e=>"-"===e?"+":"/");return qe(t.padEnd(4*Math.ceil(t.length/4),"="))})(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}}),Je=e("$ZodE164",(e,t)=>{t.pattern??(t.pattern=Y),xe.init(e,t)});const Ye=e("$ZodJWT",(e,t)=>{xe.init(e,t),e._zod.check=n=>{(function(e,t=null){try{const n=e.split(".");if(3!==n.length)return!1;const[o]=n;if(!o)return!1;const i=JSON.parse(atob(o));return!("typ"in i&&"JWT"!==i?.typ||!i.alg||t&&(!("alg"in i)||i.alg!==t))}catch{return!1}})(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}}),Qe=e("$ZodNumber",(e,t)=>{Te.init(e,t),e._zod.pattern=e._zod.bag.pattern??oe,e._zod.parse=(n,o)=>{if(t.coerce)try{n.value=Number(n.value)}catch(e){}const i=n.value;if("number"==typeof i&&!Number.isNaN(i)&&Number.isFinite(i))return n;const r="number"==typeof i?Number.isNaN(i)?"NaN":Number.isFinite(i)?void 0:"Infinity":void 0;return n.issues.push({expected:"number",code:"invalid_type",input:i,inst:e,...r?{received:r}:{}}),n}}),et=e("$ZodNumber",(e,t)=>{pe.init(e,t),Qe.init(e,t)}),tt=e("$ZodBoolean",(e,t)=>{Te.init(e,t),e._zod.pattern=ie,e._zod.parse=(n,o)=>{if(t.coerce)try{n.value=Boolean(n.value)}catch(e){}const i=n.value;return"boolean"==typeof i||n.issues.push({expected:"boolean",code:"invalid_type",input:i,inst:e}),n}}),nt=e("$ZodUnknown",(e,t)=>{Te.init(e,t),e._zod.parse=e=>e}),ot=e("$ZodNever",(e,t)=>{Te.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:"never",code:"invalid_type",input:t.value,inst:e}),t)});function it(e,t,n){e.issues.length&&t.issues.push(...I(n,e.issues)),t.value[n]=e.value}const rt=e("$ZodArray",(e,t)=>{Te.init(e,t),e._zod.parse=(n,o)=>{const i=n.value;if(!Array.isArray(i))return n.issues.push({expected:"array",code:"invalid_type",input:i,inst:e}),n;n.value=Array(i.length);const r=[];for(let e=0;e<i.length;e++){const a=i[e],s=t.element._zod.run({value:a,issues:[]},o);s instanceof Promise?r.push(s.then(t=>it(t,n,e))):it(s,n,e)}return r.length?Promise.all(r).then(()=>n):n}});function at(e,t,n){e.issues.length&&t.issues.push(...I(n,e.issues)),t.value[n]=e.value}function st(e,t,n,o){e.issues.length?void 0===o[n]?t.value[n]=n in o?void 0:e.value:t.issues.push(...I(n,e.issues)):void 0===e.value?n in o&&(t.value[n]=void 0):t.value[n]=e.value}const ct=e("$ZodObject",(e,t)=>{Te.init(e,t);const o=r(()=>{const e=Object.keys(t.shape);for(const n of e)if(!(t.shape[n]instanceof Te))throw new Error(`Invalid element at key "${n}": expected a Zod schema`);const n=(o=t.shape,Object.keys(o).filter(e=>"optional"===o[e]._zod.optin&&"optional"===o[e]._zod.optout));var o;return{shape:t.shape,keys:e,keySet:new Set(e),numKeys:e.length,optionalKeys:new Set(n)}});c(e._zod,"propValues",()=>{const e=t.shape,n={};for(const t in e){const o=e[t]._zod;if(o.values){n[t]??(n[t]=new Set);for(const e of o.values)n[t].add(e)}}return n});let i;const a=p,s=!n.jitless,u=s&&h.value,d=t.catchall;let m;e._zod.parse=(n,r)=>{m??(m=o.value);const c=n.value;if(!a(c))return n.issues.push({expected:"object",code:"invalid_type",input:c,inst:e}),n;const p=[];if(s&&u&&!1===r?.async&&!0!==r.jitless)i||(i=(e=>{const t=new we(["shape","payload","ctx"]),n=o.value,i=e=>{const t=l(e);return`shape[${t}]._zod.run({ value: input[${t}], issues: [] }, ctx)`};t.write("const input = payload.value;");const r=Object.create(null);let a=0;for(const e of n.keys)r[e]="key_"+a++;t.write("const newResult = {}");for(const e of n.keys)if(n.optionalKeys.has(e)){const n=r[e];t.write(`const ${n} = ${i(e)};`);const o=l(e);t.write(`\n if (${n}.issues.length) {\n if (input[${o}] === undefined) {\n if (${o} in input) {\n newResult[${o}] = undefined;\n }\n } else {\n payload.issues = payload.issues.concat(\n ${n}.issues.map((iss) => ({\n ...iss,\n path: iss.path ? [${o}, ...iss.path] : [${o}],\n }))\n );\n }\n } else if (${n}.value === undefined) {\n if (${o} in input) newResult[${o}] = undefined;\n } else {\n newResult[${o}] = ${n}.value;\n }\n `)}else{const n=r[e];t.write(`const ${n} = ${i(e)};`),t.write(`\n if (${n}.issues.length) payload.issues = payload.issues.concat(${n}.issues.map(iss => ({\n ...iss,\n path: iss.path ? [${l(e)}, ...iss.path] : [${l(e)}]\n })));`),t.write(`newResult[${l(e)}] = ${n}.value`)}t.write("payload.value = newResult;"),t.write("return payload;");const s=t.compile();return(t,n)=>s(e,t,n)})(t.shape)),n=i(n,r);else{n.value={};const e=m.shape;for(const t of m.keys){const o=e[t],i=o._zod.run({value:c[t],issues:[]},r),a="optional"===o._zod.optin&&"optional"===o._zod.optout;i instanceof Promise?p.push(i.then(e=>a?st(e,n,t,c):at(e,n,t))):a?st(i,n,t,c):at(i,n,t)}}if(!d)return p.length?Promise.all(p).then(()=>n):n;const h=[],f=m.keySet,g=d._zod,y=g.def.type;for(const e of Object.keys(c)){if(f.has(e))continue;if("never"===y){h.push(e);continue}const t=g.run({value:c[e],issues:[]},r);t instanceof Promise?p.push(t.then(t=>at(t,n,e))):at(t,n,e)}return h.length&&n.issues.push({code:"unrecognized_keys",keys:h,input:c,inst:e}),p.length?Promise.all(p).then(()=>n):n}});function ut(e,t,n,i){for(const n of e)if(0===n.issues.length)return t.value=n.value,t;return t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(e=>e.issues.map(e=>E(e,i,o())))}),t}const lt=e("$ZodUnion",(e,t)=>{Te.init(e,t),c(e._zod,"optin",()=>t.options.some(e=>"optional"===e._zod.optin)?"optional":void 0),c(e._zod,"optout",()=>t.options.some(e=>"optional"===e._zod.optout)?"optional":void 0),c(e._zod,"values",()=>{if(t.options.every(e=>e._zod.values))return new Set(t.options.flatMap(e=>Array.from(e._zod.values)))}),c(e._zod,"pattern",()=>{if(t.options.every(e=>e._zod.pattern)){const e=t.options.map(e=>e._zod.pattern);return new RegExp(`^(${e.map(e=>s(e.source)).join("|")})$`)}}),e._zod.parse=(n,o)=>{let i=!1;const r=[];for(const e of t.options){const t=e._zod.run({value:n.value,issues:[]},o);if(t instanceof Promise)r.push(t),i=!0;else{if(0===t.issues.length)return t;r.push(t)}}return i?Promise.all(r).then(t=>ut(t,n,e,o)):ut(r,n,e,o)}}),dt=e("$ZodIntersection",(e,t)=>{Te.init(e,t),e._zod.parse=(e,n)=>{const o=e.value,i=t.left._zod.run({value:o,issues:[]},n),r=t.right._zod.run({value:o,issues:[]},n);return i instanceof Promise||r instanceof Promise?Promise.all([i,r]).then(([t,n])=>ht(e,t,n)):ht(e,i,r)}});function pt(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e===+t)return{valid:!0,data:e};if(m(e)&&m(t)){const n=Object.keys(t),o=Object.keys(e).filter(e=>-1!==n.indexOf(e)),i={...e,...t};for(const n of o){const o=pt(e[n],t[n]);if(!o.valid)return{valid:!1,mergeErrorPath:[n,...o.mergeErrorPath]};i[n]=o.data}return{valid:!0,data:i}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const n=[];for(let o=0;o<e.length;o++){const i=pt(e[o],t[o]);if(!i.valid)return{valid:!1,mergeErrorPath:[o,...i.mergeErrorPath]};n.push(i.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function ht(e,t,n){if(t.issues.length&&e.issues.push(...t.issues),n.issues.length&&e.issues.push(...n.issues),k(e))return e;const o=pt(t.value,n.value);if(!o.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(o.mergeErrorPath)}`);return e.value=o.data,e}const mt=e("$ZodRecord",(e,t)=>{Te.init(e,t),e._zod.parse=(n,i)=>{const r=n.value;if(!m(r))return n.issues.push({expected:"record",code:"invalid_type",input:r,inst:e}),n;const a=[];if(t.keyType._zod.values){const o=t.keyType._zod.values;n.value={};for(const e of o)if("string"==typeof e||"number"==typeof e||"symbol"==typeof e){const o=t.valueType._zod.run({value:r[e],issues:[]},i);o instanceof Promise?a.push(o.then(t=>{t.issues.length&&n.issues.push(...I(e,t.issues)),n.value[e]=t.value})):(o.issues.length&&n.issues.push(...I(e,o.issues)),n.value[e]=o.value)}let s;for(const e in r)o.has(e)||(s=s??[],s.push(e));s&&s.length>0&&n.issues.push({code:"unrecognized_keys",input:r,inst:e,keys:s})}else{n.value={};for(const s of Reflect.ownKeys(r)){if("__proto__"===s)continue;const c=t.keyType._zod.run({value:s,issues:[]},i);if(c instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(c.issues.length){n.issues.push({origin:"record",code:"invalid_key",issues:c.issues.map(e=>E(e,i,o())),input:s,path:[s],inst:e}),n.value[c.value]=c.value;continue}const u=t.valueType._zod.run({value:r[s],issues:[]},i);u instanceof Promise?a.push(u.then(e=>{e.issues.length&&n.issues.push(...I(s,e.issues)),n.value[c.value]=e.value})):(u.issues.length&&n.issues.push(...I(s,u.issues)),n.value[c.value]=u.value)}}return a.length?Promise.all(a).then(()=>n):n}}),ft=e("$ZodEnum",(e,t)=>{Te.init(e,t);const n=function(e){const t=Object.values(e).filter(e=>"number"==typeof e);return Object.entries(e).filter(([e,n])=>-1===t.indexOf(+e)).map(([e,t])=>t)}(t.entries);e._zod.values=new Set(n),e._zod.pattern=new RegExp(`^(${n.filter(e=>f.has(typeof e)).map(e=>"string"==typeof e?g(e):e.toString()).join("|")})$`),e._zod.parse=(t,o)=>{const i=t.value;return e._zod.values.has(i)||t.issues.push({code:"invalid_value",values:n,input:i,inst:e}),t}}),gt=e("$ZodLiteral",(e,t)=>{Te.init(e,t),e._zod.values=new Set(t.values),e._zod.pattern=new RegExp(`^(${t.values.map(e=>"string"==typeof e?g(e):e?e.toString():String(e)).join("|")})$`),e._zod.parse=(n,o)=>{const i=n.value;return e._zod.values.has(i)||n.issues.push({code:"invalid_value",values:t.values,input:i,inst:e}),n}}),yt=e("$ZodTransform",(e,n)=>{Te.init(e,n),e._zod.parse=(e,o)=>{const i=n.transform(e.value,e);if(o.async){return(i instanceof Promise?i:Promise.resolve(i)).then(t=>(e.value=t,e))}if(i instanceof Promise)throw new t;return e.value=i,e}}),_t=e("$ZodOptional",(e,t)=>{Te.init(e,t),e._zod.optin="optional",e._zod.optout="optional",c(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),c(e._zod,"pattern",()=>{const e=t.innerType._zod.pattern;return e?new RegExp(`^(${s(e.source)})?$`):void 0}),e._zod.parse=(e,n)=>"optional"===t.innerType._zod.optin?t.innerType._zod.run(e,n):void 0===e.value?e:t.innerType._zod.run(e,n)}),vt=e("$ZodNullable",(e,t)=>{Te.init(e,t),c(e._zod,"optin",()=>t.innerType._zod.optin),c(e._zod,"optout",()=>t.innerType._zod.optout),c(e._zod,"pattern",()=>{const e=t.innerType._zod.pattern;return e?new RegExp(`^(${s(e.source)}|null)$`):void 0}),c(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(e,n)=>null===e.value?e:t.innerType._zod.run(e,n)}),kt=e("$ZodDefault",(e,t)=>{Te.init(e,t),e._zod.optin="optional",c(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{if(void 0===e.value)return e.value=t.defaultValue,e;const o=t.innerType._zod.run(e,n);return o instanceof Promise?o.then(e=>It(e,t)):It(o,t)}});function It(e,t){return void 0===e.value&&(e.value=t.defaultValue),e}const bt=e("$ZodPrefault",(e,t)=>{Te.init(e,t),e._zod.optin="optional",c(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(e,n)=>(void 0===e.value&&(e.value=t.defaultValue),t.innerType._zod.run(e,n))}),Et=e("$ZodNonOptional",(e,t)=>{Te.init(e,t),c(e._zod,"values",()=>{const e=t.innerType._zod.values;return e?new Set([...e].filter(e=>void 0!==e)):void 0}),e._zod.parse=(n,o)=>{const i=t.innerType._zod.run(n,o);return i instanceof Promise?i.then(t=>wt(t,e)):wt(i,e)}});function wt(e,t){return e.issues.length||void 0!==e.value||e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}const zt=e("$ZodCatch",(e,t)=>{Te.init(e,t),e._zod.optin="optional",c(e._zod,"optout",()=>t.innerType._zod.optout),c(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(e,n)=>{const i=t.innerType._zod.run(e,n);return i instanceof Promise?i.then(i=>(e.value=i.value,i.issues.length&&(e.value=t.catchValue({...e,error:{issues:i.issues.map(e=>E(e,n,o()))},input:e.value}),e.issues=[]),e)):(e.value=i.value,i.issues.length&&(e.value=t.catchValue({...e,error:{issues:i.issues.map(e=>E(e,n,o()))},input:e.value}),e.issues=[]),e)}}),Tt=e("$ZodPipe",(e,t)=>{Te.init(e,t),c(e._zod,"values",()=>t.in._zod.values),c(e._zod,"optin",()=>t.in._zod.optin),c(e._zod,"optout",()=>t.out._zod.optout),c(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(e,n)=>{const o=t.in._zod.run(e,n);return o instanceof Promise?o.then(e=>Pt(e,t,n)):Pt(o,t,n)}});function Pt(e,t,n){return k(e)?e:t.out._zod.run({value:e.value,issues:e.issues},n)}const xt=e("$ZodReadonly",(e,t)=>{Te.init(e,t),c(e._zod,"propValues",()=>t.innerType._zod.propValues),c(e._zod,"values",()=>t.innerType._zod.values),c(e._zod,"optin",()=>t.innerType._zod.optin),c(e._zod,"optout",()=>t.innerType._zod.optout),e._zod.parse=(e,n)=>{const o=t.innerType._zod.run(e,n);return o instanceof Promise?o.then(St):St(o)}});function St(e){return e.value=Object.freeze(e.value),e}const At=e("$ZodLazy",(e,t)=>{Te.init(e,t),c(e._zod,"innerType",()=>t.getter()),c(e._zod,"pattern",()=>e._zod.innerType._zod.pattern),c(e._zod,"propValues",()=>e._zod.innerType._zod.propValues),c(e._zod,"optin",()=>e._zod.innerType._zod.optin),c(e._zod,"optout",()=>e._zod.innerType._zod.optout),e._zod.parse=(t,n)=>e._zod.innerType._zod.run(t,n)}),Ct=e("$ZodCustom",(e,t)=>{se.init(e,t),Te.init(e,t),e._zod.parse=(e,t)=>e,e._zod.check=n=>{const o=n.value,i=t.fn(o);if(i instanceof Promise)return i.then(t=>Rt(t,n,o,e));Rt(i,n,o,e)}});function Rt(e,t,n,o){if(!e){const e={code:"custom",input:n,inst:o,path:[...o._zod.def.path??[]],continue:!o._zod.def.abort};o._zod.def.params&&(e.params=o._zod.def.params),t.issues.push(z(e))}}class Nt{constructor(){this._map=new Map,this._idmap=new Map}add(e,...t){const n=t[0];if(this._map.set(e,n),n&&"object"==typeof n&&"id"in n){if(this._idmap.has(n.id))throw new Error(`ID ${n.id} already exists in the registry`);this._idmap.set(n.id,e)}return this}clear(){return this._map=new Map,this._idmap=new Map,this}remove(e){const t=this._map.get(e);return t&&"object"==typeof t&&"id"in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){const t=e._zod.parent;if(t){const n={...this.get(t)??{}};return delete n.id,{...n,...this._map.get(e)}}return this._map.get(e)}has(e){return this._map.has(e)}}function Bt(){return new Nt}const $t=Bt();function Mt(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,..._(t)})}function Zt(e,t){return new ue({check:"less_than",..._(t),value:e,inclusive:!1})}function Lt(e,t){return new ue({check:"less_than",..._(t),value:e,inclusive:!0})}function Ot(e,t){return new le({check:"greater_than",..._(t),value:e,inclusive:!1})}function Dt(e,t){return new le({check:"greater_than",..._(t),value:e,inclusive:!0})}function jt(e,t){return new de({check:"multiple_of",..._(t),value:e})}function Ft(e,t){return new he({check:"max_length",..._(t),maximum:e})}function Vt(e,t){return new me({check:"min_length",..._(t),minimum:e})}function Ht(e,t){return new fe({check:"length_equals",..._(t),length:e})}function Kt(e){return new Ee({check:"overwrite",tx:e})}const Ut=e("ZodISODateTime",(e,t)=>{De.init(e,t),ln.init(e,t)});function Gt(e){return function(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,..._(t)})}(Ut,e)}const qt=e("ZodISODate",(e,t)=>{je.init(e,t),ln.init(e,t)});function Xt(e){return function(e,t){return new e({type:"string",format:"date",check:"string_format",..._(t)})}(qt,e)}const Wt=e("ZodISOTime",(e,t)=>{Fe.init(e,t),ln.init(e,t)});function Jt(e){return function(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,..._(t)})}(Wt,e)}const Yt=e("ZodISODuration",(e,t)=>{Ve.init(e,t),ln.init(e,t)});function Qt(e){return function(e,t){return new e({type:"string",format:"duration",check:"string_format",..._(t)})}(Yt,e)}const en=e("ZodError",(e,t)=>{P.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:t=>function(e,t){const n=t||function(e){return e.message},o={_errors:[]},i=e=>{for(const t of e.issues)if("invalid_union"===t.code&&t.errors.length)t.errors.map(e=>i({issues:e}));else if("invalid_key"===t.code)i({issues:t.issues});else if("invalid_element"===t.code)i({issues:t.issues});else if(0===t.path.length)o._errors.push(n(t));else{let e=o,i=0;for(;i<t.path.length;){const o=t.path[i];i===t.path.length-1?(e[o]=e[o]||{_errors:[]},e[o]._errors.push(n(t))):e[o]=e[o]||{_errors:[]},e=e[o],i++}}};return i(e),o}(e,t)},flatten:{value:t=>function(e,t=e=>e.message){const n={},o=[];for(const i of e.issues)i.path.length>0?(n[i.path[0]]=n[i.path[0]]||[],n[i.path[0]].push(t(i))):o.push(t(i));return{formErrors:o,fieldErrors:n}}(e,t)},addIssue:{value:t=>e.issues.push(t)},addIssues:{value:t=>e.issues.push(...t)},isEmpty:{get:()=>0===e.issues.length}})},{Parent:Error}),tn=S(en),nn=A(en),on=C(en),rn=N(en),an=e("ZodType",(e,t)=>(Te.init(e,t),e.def=t,Object.defineProperty(e,"_def",{value:t}),e.check=(...n)=>e.clone({...t,checks:[...t.checks??[],...n.map(e=>"function"==typeof e?{_zod:{check:e,def:{check:"custom"},onattach:[]}}:e)]}),e.clone=(t,n)=>y(e,t,n),e.brand=()=>e,e.register=(t,n)=>(t.add(e,n),e),e.parse=(t,n)=>tn(e,t,n,{callee:e.parse}),e.safeParse=(t,n)=>on(e,t,n),e.parseAsync=async(t,n)=>nn(e,t,n,{callee:e.parseAsync}),e.safeParseAsync=async(t,n)=>rn(e,t,n),e.spa=e.safeParseAsync,e.refine=(t,n)=>e.check(function(e,t={}){return function(e,t,n){return new e({type:"custom",check:"custom",fn:t,..._(n)})}(fo,e,t)}(t,n)),e.superRefine=t=>e.check(function(e){const t=function(e){const t=new se({check:"custom"});return t._zod.check=e,t}(n=>(n.addIssue=e=>{if("string"==typeof e)n.issues.push(z(e,n.value,t._zod.def));else{const o=e;o.fatal&&(o.continue=!1),o.code??(o.code="custom"),o.input??(o.input=n.value),o.inst??(o.inst=t),o.continue??(o.continue=!t._zod.def.abort),n.issues.push(z(o))}},e(n.value,n)));return t}(t)),e.overwrite=t=>e.check(Kt(t)),e.optional=()=>no(e),e.nullable=()=>io(e),e.nullish=()=>no(io(e)),e.nonoptional=t=>function(e,t){return new so({type:"nonoptional",innerType:e,..._(t)})}(e,t),e.array=()=>jn(e),e.or=t=>Kn([e,t]),e.and=t=>Gn(e,t),e.transform=t=>lo(e,new eo({type:"transform",transform:t})),e.default=t=>{return n=t,new ro({type:"default",innerType:e,get defaultValue(){return"function"==typeof n?n():n}});var n},e.prefault=t=>{return n=t,new ao({type:"prefault",innerType:e,get defaultValue(){return"function"==typeof n?n():n}});var n},e.catch=t=>{return new co({type:"catch",innerType:e,catchValue:"function"==typeof(n=t)?n:()=>n});var n},e.pipe=t=>lo(e,t),e.readonly=()=>new po({type:"readonly",innerType:e}),e.describe=t=>{const n=e.clone();return $t.add(n,{description:t}),n},Object.defineProperty(e,"description",{get:()=>$t.get(e)?.description,configurable:!0}),e.meta=(...t)=>{if(0===t.length)return $t.get(e);const n=e.clone();return $t.add(n,t[0]),n},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e)),sn=e("_ZodString",(e,t)=>{Pe.init(e,t),an.init(e,t);const n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,e.regex=(...t)=>e.check(function(e,t){return new ye({check:"string_format",format:"regex",..._(t),pattern:e})}(...t)),e.includes=(...t)=>e.check(function(e,t){return new ke({check:"string_format",format:"includes",..._(t),includes:e})}(...t)),e.startsWith=(...t)=>e.check(function(e,t){return new Ie({check:"string_format",format:"starts_with",..._(t),prefix:e})}(...t)),e.endsWith=(...t)=>e.check(function(e,t){return new be({check:"string_format",format:"ends_with",..._(t),suffix:e})}(...t)),e.min=(...t)=>e.check(Vt(...t)),e.max=(...t)=>e.check(Ft(...t)),e.length=(...t)=>e.check(Ht(...t)),e.nonempty=(...t)=>e.check(Vt(1,...t)),e.lowercase=t=>e.check(function(e){return new _e({check:"string_format",format:"lowercase",..._(e)})}(t)),e.uppercase=t=>e.check(function(e){return new ve({check:"string_format",format:"uppercase",..._(e)})}(t)),e.trim=()=>e.check(Kt(e=>e.trim())),e.normalize=(...t)=>e.check(function(e){return Kt(t=>t.normalize(e))}(...t)),e.toLowerCase=()=>e.check(Kt(e=>e.toLowerCase())),e.toUpperCase=()=>e.check(Kt(e=>e.toUpperCase()))}),cn=e("ZodString",(e,t)=>{Pe.init(e,t),sn.init(e,t),e.email=t=>e.check(function(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,..._(t)})}(dn,t)),e.url=t=>e.check(function(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,..._(t)})}(mn,t)),e.jwt=t=>e.check(function(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,..._(t)})}(Sn,t)),e.emoji=t=>e.check(function(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,..._(t)})}(fn,t)),e.guid=t=>e.check(Mt(pn,t)),e.uuid=t=>e.check(function(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,..._(t)})}(hn,t)),e.uuidv4=t=>e.check(function(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",..._(t)})}(hn,t)),e.uuidv6=t=>e.check(function(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",..._(t)})}(hn,t)),e.uuidv7=t=>e.check(function(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",..._(t)})}(hn,t)),e.nanoid=t=>e.check(function(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,..._(t)})}(gn,t)),e.guid=t=>e.check(Mt(pn,t)),e.cuid=t=>e.check(function(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,..._(t)})}(yn,t)),e.cuid2=t=>e.check(function(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,..._(t)})}(_n,t)),e.ulid=t=>e.check(function(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,..._(t)})}(vn,t)),e.base64=t=>e.check(function(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,..._(t)})}(Tn,t)),e.base64url=t=>e.check(function(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,..._(t)})}(Pn,t)),e.xid=t=>e.check(function(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,..._(t)})}(kn,t)),e.ksuid=t=>e.check(function(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,..._(t)})}(In,t)),e.ipv4=t=>e.check(function(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,..._(t)})}(bn,t)),e.ipv6=t=>e.check(function(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,..._(t)})}(En,t)),e.cidrv4=t=>e.check(function(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,..._(t)})}(wn,t)),e.cidrv6=t=>e.check(function(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,..._(t)})}(zn,t)),e.e164=t=>e.check(function(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,..._(t)})}(xn,t)),e.datetime=t=>e.check(Gt(t)),e.date=t=>e.check(Xt(t)),e.time=t=>e.check(Jt(t)),e.duration=t=>e.check(Qt(t))});function un(e){return function(e,t){return new e({type:"string",..._(t)})}(cn,e)}const ln=e("ZodStringFormat",(e,t)=>{xe.init(e,t),sn.init(e,t)}),dn=e("ZodEmail",(e,t)=>{Ce.init(e,t),ln.init(e,t)}),pn=e("ZodGUID",(e,t)=>{Se.init(e,t),ln.init(e,t)}),hn=e("ZodUUID",(e,t)=>{Ae.init(e,t),ln.init(e,t)}),mn=e("ZodURL",(e,t)=>{Re.init(e,t),ln.init(e,t)}),fn=e("ZodEmoji",(e,t)=>{Ne.init(e,t),ln.init(e,t)}),gn=e("ZodNanoID",(e,t)=>{Be.init(e,t),ln.init(e,t)}),yn=e("ZodCUID",(e,t)=>{$e.init(e,t),ln.init(e,t)}),_n=e("ZodCUID2",(e,t)=>{Me.init(e,t),ln.init(e,t)}),vn=e("ZodULID",(e,t)=>{Ze.init(e,t),ln.init(e,t)}),kn=e("ZodXID",(e,t)=>{Le.init(e,t),ln.init(e,t)}),In=e("ZodKSUID",(e,t)=>{Oe.init(e,t),ln.init(e,t)}),bn=e("ZodIPv4",(e,t)=>{He.init(e,t),ln.init(e,t)}),En=e("ZodIPv6",(e,t)=>{Ke.init(e,t),ln.init(e,t)}),wn=e("ZodCIDRv4",(e,t)=>{Ue.init(e,t),ln.init(e,t)}),zn=e("ZodCIDRv6",(e,t)=>{Ge.init(e,t),ln.init(e,t)}),Tn=e("ZodBase64",(e,t)=>{Xe.init(e,t),ln.init(e,t)}),Pn=e("ZodBase64URL",(e,t)=>{We.init(e,t),ln.init(e,t)}),xn=e("ZodE164",(e,t)=>{Je.init(e,t),ln.init(e,t)}),Sn=e("ZodJWT",(e,t)=>{Ye.init(e,t),ln.init(e,t)}),An=e("ZodNumber",(e,t)=>{Qe.init(e,t),an.init(e,t),e.gt=(t,n)=>e.check(Ot(t,n)),e.gte=(t,n)=>e.check(Dt(t,n)),e.min=(t,n)=>e.check(Dt(t,n)),e.lt=(t,n)=>e.check(Zt(t,n)),e.lte=(t,n)=>e.check(Lt(t,n)),e.max=(t,n)=>e.check(Lt(t,n)),e.int=t=>e.check(Nn(t)),e.safe=t=>e.check(Nn(t)),e.positive=t=>e.check(Ot(0,t)),e.nonnegative=t=>e.check(Dt(0,t)),e.negative=t=>e.check(Zt(0,t)),e.nonpositive=t=>e.check(Lt(0,t)),e.multipleOf=(t,n)=>e.check(jt(t,n)),e.step=(t,n)=>e.check(jt(t,n)),e.finite=()=>e;const n=e._zod.bag;e.minValue=Math.max(n.minimum??Number.NEGATIVE_INFINITY,n.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(n.maximum??Number.POSITIVE_INFINITY,n.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(n.format??"").includes("int")||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null});function Cn(e){return function(e,t){return new e({type:"number",checks:[],..._(t)})}(An,e)}const Rn=e("ZodNumberFormat",(e,t)=>{et.init(e,t),An.init(e,t)});function Nn(e){return function(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",..._(t)})}(Rn,e)}const Bn=e("ZodBoolean",(e,t)=>{tt.init(e,t),an.init(e,t)});function $n(e){return function(e,t){return new e({type:"boolean",..._(t)})}(Bn,e)}const Mn=e("ZodUnknown",(e,t)=>{nt.init(e,t),an.init(e,t)});function Zn(){return new Mn({type:"unknown"})}const Ln=e("ZodNever",(e,t)=>{ot.init(e,t),an.init(e,t)});function On(e){return function(e,t){return new e({type:"never",..._(t)})}(Ln,e)}const Dn=e("ZodArray",(e,t)=>{rt.init(e,t),an.init(e,t),e.element=t.element,e.min=(t,n)=>e.check(Vt(t,n)),e.nonempty=t=>e.check(Vt(1,t)),e.max=(t,n)=>e.check(Ft(t,n)),e.length=(t,n)=>e.check(Ht(t,n)),e.unwrap=()=>e.element});function jn(e,t){return function(e,t,n){return new e({type:"array",element:t,..._(n)})}(Dn,e,t)}const Fn=e("ZodObject",(e,t)=>{ct.init(e,t),an.init(e,t),c(e,"shape",()=>t.shape),e.keyof=()=>Jn(Object.keys(e._zod.def.shape)),e.catchall=t=>e.clone({...e._zod.def,catchall:t}),e.passthrough=()=>e.clone({...e._zod.def,catchall:Zn()}),e.loose=()=>e.clone({...e._zod.def,catchall:Zn()}),e.strict=()=>e.clone({...e._zod.def,catchall:On()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=t=>function(e,t){if(!m(t))throw new Error("Invalid input to extend: expected a plain object");const n={...e._zod.def,get shape(){const n={...e._zod.def.shape,...t};return u(this,"shape",n),n},checks:[]};return y(e,n)}(e,t),e.merge=t=>{return o=t,y(n=e,{...n._zod.def,get shape(){const e={...n._zod.def.shape,...o._zod.def.shape};return u(this,"shape",e),e},catchall:o._zod.def.catchall,checks:[]});var n,o},e.pick=t=>function(e,t){const n={},o=e._zod.def;for(const e in t){if(!(e in o.shape))throw new Error(`Unrecognized key: "${e}"`);t[e]&&(n[e]=o.shape[e])}return y(e,{...e._zod.def,shape:n,checks:[]})}(e,t),e.omit=t=>function(e,t){const n={...e._zod.def.shape},o=e._zod.def;for(const e in t){if(!(e in o.shape))throw new Error(`Unrecognized key: "${e}"`);t[e]&&delete n[e]}return y(e,{...e._zod.def,shape:n,checks:[]})}(e,t),e.partial=(...t)=>function(e,t,n){const o=t._zod.def.shape,i={...o};if(n)for(const t in n){if(!(t in o))throw new Error(`Unrecognized key: "${t}"`);n[t]&&(i[t]=e?new e({type:"optional",innerType:o[t]}):o[t])}else for(const t in o)i[t]=e?new e({type:"optional",innerType:o[t]}):o[t];return y(t,{...t._zod.def,shape:i,checks:[]})}(to,e,t[0]),e.required=(...t)=>function(e,t,n){const o=t._zod.def.shape,i={...o};if(n)for(const t in n){if(!(t in i))throw new Error(`Unrecognized key: "${t}"`);n[t]&&(i[t]=new e({type:"nonoptional",innerType:o[t]}))}else for(const t in o)i[t]=new e({type:"nonoptional",innerType:o[t]});return y(t,{...t._zod.def,shape:i,checks:[]})}(so,e,t[0])});function Vn(e,t){const n={type:"object",get shape(){return u(this,"shape",{...e}),this.shape},..._(t)};return new Fn(n)}const Hn=e("ZodUnion",(e,t)=>{lt.init(e,t),an.init(e,t),e.options=t.options});function Kn(e,t){return new Hn({type:"union",options:e,..._(t)})}const Un=e("ZodIntersection",(e,t)=>{dt.init(e,t),an.init(e,t)});function Gn(e,t){return new Un({type:"intersection",left:e,right:t})}const qn=e("ZodRecord",(e,t)=>{mt.init(e,t),an.init(e,t),e.keyType=t.keyType,e.valueType=t.valueType});function Xn(e,t,n){return new qn({type:"record",keyType:e,valueType:t,..._(n)})}const Wn=e("ZodEnum",(e,t)=>{ft.init(e,t),an.init(e,t),e.enum=t.entries,e.options=Object.values(t.entries);const n=new Set(Object.keys(t.entries));e.extract=(e,o)=>{const i={};for(const o of e){if(!n.has(o))throw new Error(`Key ${o} not found in enum`);i[o]=t.entries[o]}return new Wn({...t,checks:[],..._(o),entries:i})},e.exclude=(e,o)=>{const i={...t.entries};for(const t of e){if(!n.has(t))throw new Error(`Key ${t} not found in enum`);delete i[t]}return new Wn({...t,checks:[],..._(o),entries:i})}});function Jn(e,t){const n=Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e;return new Wn({type:"enum",entries:n,..._(t)})}const Yn=e("ZodLiteral",(e,t)=>{gt.init(e,t),an.init(e,t),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function Qn(e,t){return new Yn({type:"literal",values:Array.isArray(e)?e:[e],..._(t)})}const eo=e("ZodTransform",(e,t)=>{yt.init(e,t),an.init(e,t),e._zod.parse=(n,o)=>{n.addIssue=o=>{if("string"==typeof o)n.issues.push(z(o,n.value,t));else{const t=o;t.fatal&&(t.continue=!1),t.code??(t.code="custom"),t.input??(t.input=n.value),t.inst??(t.inst=e),t.continue??(t.continue=!0),n.issues.push(z(t))}};const i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n)):(n.value=i,n)}});const to=e("ZodOptional",(e,t)=>{_t.init(e,t),an.init(e,t),e.unwrap=()=>e._zod.def.innerType});function no(e){return new to({type:"optional",innerType:e})}const oo=e("ZodNullable",(e,t)=>{vt.init(e,t),an.init(e,t),e.unwrap=()=>e._zod.def.innerType});function io(e){return new oo({type:"nullable",innerType:e})}const ro=e("ZodDefault",(e,t)=>{kt.init(e,t),an.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});const ao=e("ZodPrefault",(e,t)=>{bt.init(e,t),an.init(e,t),e.unwrap=()=>e._zod.def.innerType});const so=e("ZodNonOptional",(e,t)=>{Et.init(e,t),an.init(e,t),e.unwrap=()=>e._zod.def.innerType});const co=e("ZodCatch",(e,t)=>{zt.init(e,t),an.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});const uo=e("ZodPipe",(e,t)=>{Tt.init(e,t),an.init(e,t),e.in=t.in,e.out=t.out});function lo(e,t){return new uo({type:"pipe",in:e,out:t})}const po=e("ZodReadonly",(e,t)=>{xt.init(e,t),an.init(e,t)});const ho=e("ZodLazy",(e,t)=>{At.init(e,t),an.init(e,t),e.unwrap=()=>e._zod.def.getter()});function mo(e){return new ho({type:"lazy",getter:e})}const fo=e("ZodCustom",(e,t)=>{Ct.init(e,t),an.init(e,t)});var go=Vn({nonce:Cn(),permission:mo(()=>ko)}),yo=Vn({fullAccessCost:mo(()=>wi),functionCallCost:mo(()=>wi),functionCallCostPerByte:mo(()=>wi)}),_o=Vn({accessKey:mo(()=>bo),publicKey:mo(()=>ea)}),vo=Vn({keys:jn(mo(()=>_o))}),ko=Kn([Vn({FunctionCall:mo(()=>Ri)}),Jn(["FullAccess"])]),Io=Kn([Jn(["FullAccess"]),Vn({FunctionCall:Vn({allowance:un().optional(),methodNames:jn(un()),receiverId:un()})})]),bo=Vn({nonce:Cn(),permission:mo(()=>Io)}),Eo=Vn({minAllowedTopLevelAccountLength:Cn(),registrarAccountId:mo(()=>zo)}),wo=Vn({accountKey:mo(()=>ea),peerId:mo(()=>ea),proxies:jn(mo(()=>Es)),timestamp:un()}),zo=un(),To=Cn(),Po=Vn({accountId:mo(()=>zo),amount:un(),publicKey:mo(()=>ea)}),xo=Vn({amount:un(),codeHash:mo(()=>ni),globalContractAccountId:Kn([mo(()=>zo),Jn(["null"])]).optional(),globalContractHash:Kn([mo(()=>ni),Jn(["null"])]).optional(),locked:un(),storagePaidAt:Cn().optional(),storageUsage:Cn()}),So=Vn({accountId:mo(()=>zo),publicKey:mo(()=>ea)}),Ao=Kn([Vn({CreateAccount:mo(()=>ti)}),Vn({DeployContract:mo(()=>ui)}),Vn({FunctionCall:mo(()=>Ai)}),Vn({Transfer:mo(()=>zs)}),Vn({Stake:mo(()=>us)}),Vn({AddKey:mo(()=>Mo)}),Vn({DeleteKey:mo(()=>ci)}),Vn({DeleteAccount:mo(()=>si)}),Vn({Delegate:mo(()=>rs)}),Vn({DeployGlobalContract:mo(()=>li)}),Vn({UseGlobalContract:mo(()=>xs)})]),Co=Vn({addKeyCost:mo(()=>yo),createAccountCost:mo(()=>wi),delegateCost:mo(()=>wi),deleteAccountCost:mo(()=>wi),deleteKeyCost:mo(()=>wi),deployContractCost:mo(()=>wi),deployContractCostPerByte:mo(()=>wi),functionCallCost:mo(()=>wi),functionCallCostPerByte:mo(()=>wi),stakeCost:mo(()=>wi),transferCost:mo(()=>wi)}),Ro=Vn({index:Cn().optional(),kind:mo(()=>No)}),No=Kn([Vn({AccountAlreadyExists:Vn({accountId:mo(()=>zo)})}),Vn({AccountDoesNotExist:Vn({accountId:mo(()=>zo)})}),Vn({CreateAccountOnlyByRegistrar:Vn({accountId:mo(()=>zo),predecessorId:mo(()=>zo),registrarAccountId:mo(()=>zo)})}),Vn({CreateAccountNotAllowed:Vn({accountId:mo(()=>zo),predecessorId:mo(()=>zo)})}),Vn({ActorNoPermission:Vn({accountId:mo(()=>zo),actorId:mo(()=>zo)})}),Vn({DeleteKeyDoesNotExist:Vn({accountId:mo(()=>zo),publicKey:mo(()=>ea)})}),Vn({AddKeyAlreadyExists:Vn({accountId:mo(()=>zo),publicKey:mo(()=>ea)})}),Vn({DeleteAccountStaking:Vn({accountId:mo(()=>zo)})}),Vn({LackBalanceForState:Vn({accountId:mo(()=>zo),amount:un()})}),Vn({TriesToUnstake:Vn({accountId:mo(()=>zo)})}),Vn({TriesToStake:Vn({accountId:mo(()=>zo),balance:un(),locked:un(),stake:un()})}),Vn({InsufficientStake:Vn({accountId:mo(()=>zo),minimumStake:un(),stake:un()})}),Vn({FunctionCallError:mo(()=>Ci)}),Vn({NewReceiptValidationError:mo(()=>oa)}),Vn({OnlyImplicitAccountCreationAllowed:Vn({accountId:mo(()=>zo)})}),Vn({DeleteAccountWithLargeState:Vn({accountId:mo(()=>zo)})}),Jn(["DelegateActionInvalidSignature"]),Vn({DelegateActionSenderDoesNotMatchTxReceiver:Vn({receiverId:mo(()=>zo),senderId:mo(()=>zo)})}),Jn(["DelegateActionExpired"]),Vn({DelegateActionAccessKeyError:mo(()=>Di)}),Vn({DelegateActionInvalidNonce:Vn({akNonce:Cn(),delegateNonce:Cn()})}),Vn({DelegateActionNonceTooLarge:Vn({delegateNonce:Cn(),upperBound:Cn()})}),Vn({GlobalContractDoesNotExist:Vn({identifier:mo(()=>Li)})})]),Bo=Kn([Jn(["CreateAccount"]),Vn({DeployContract:Vn({code:un()})}),Vn({FunctionCall:Vn({args:mo(()=>Si),deposit:un(),gas:Cn(),methodName:un()})}),Vn({Transfer:Vn({deposit:un()})}),Vn({Stake:Vn({publicKey:mo(()=>ea),stake:un()})}),Vn({AddKey:Vn({accessKey:mo(()=>bo),publicKey:mo(()=>ea)})}),Vn({DeleteKey:Vn({publicKey:mo(()=>ea)})}),Vn({DeleteAccount:Vn({beneficiaryId:mo(()=>zo)})}),Vn({Delegate:Vn({delegateAction:mo(()=>ai),signature:mo(()=>is)})}),Vn({DeployGlobalContract:Vn({code:un()})}),Vn({DeployGlobalContractByAccountId:Vn({code:un()})}),Vn({UseGlobalContract:Vn({codeHash:mo(()=>ni)})}),Vn({UseGlobalContractByAccountId:Vn({accountId:mo(()=>zo)})})]),$o=Kn([Jn(["DeleteActionMustBeFinal"]),Vn({TotalPrepaidGasExceeded:Vn({limit:Cn(),totalPrepaidGas:Cn()})}),Vn({TotalNumberOfActionsExceeded:Vn({limit:Cn(),totalNumberOfActions:Cn()})}),Vn({AddKeyMethodNamesNumberOfBytesExceeded:Vn({limit:Cn(),totalNumberOfBytes:Cn()})}),Vn({AddKeyMethodNameLengthExceeded:Vn({length:Cn(),limit:Cn()})}),Jn(["IntegerOverflow"]),Vn({InvalidAccountId:Vn({accountId:un()})}),Vn({ContractSizeExceeded:Vn({limit:Cn(),size:Cn()})}),Vn({FunctionCallMethodNameLengthExceeded:Vn({length:Cn(),limit:Cn()})}),Vn({FunctionCallArgumentsLengthExceeded:Vn({length:Cn(),limit:Cn()})}),Vn({UnsuitableStakingKey:Vn({publicKey:mo(()=>ea)})}),Jn(["FunctionCallZeroAttachedGas"]),Jn(["DelegateActionMustBeOnlyOne"]),Vn({UnsupportedProtocolFeature:Vn({protocolFeature:un(),version:Cn()})})]),Mo=Vn({accessKey:mo(()=>go),publicKey:mo(()=>ea)}),Zo=Vn({requestedValuesBitmap:mo(()=>Lo),toShard:Cn()}),Lo=Vn({data:jn(Cn())}),Oo=Vn({V1:mo(()=>Do)}),Do=Vn({requests:jn(mo(()=>Zo))}),jo=Vn({blockMerkleRoot:mo(()=>ni),epochId:mo(()=>ni),height:Cn(),nextBpHash:mo(()=>ni),nextEpochId:mo(()=>ni),outcomeRoot:mo(()=>ni),prevStateRoot:mo(()=>ni),timestamp:Cn(),timestampNanosec:un()}),Fo=Vn({approvals:jn(Kn([mo(()=>is),Jn(["null"])])),blockBodyHash:Kn([mo(()=>ni),Jn(["null"])]).optional(),blockMerkleRoot:mo(()=>ni),blockOrdinal:Cn().optional(),challengesResult:jn(mo(()=>cs)),challengesRoot:mo(()=>ni),chunkEndorsements:jn(jn(Cn())).optional(),chunkHeadersRoot:mo(()=>ni),chunkMask:jn($n()),chunkReceiptsRoot:mo(()=>ni),chunkTxRoot:mo(()=>ni),chunksIncluded:Cn(),epochId:mo(()=>ni),epochSyncDataHash:Kn([mo(()=>ni),Jn(["null"])]).optional(),gasPrice:un(),hash:mo(()=>ni),height:Cn(),lastDsFinalBlock:mo(()=>ni),lastFinalBlock:mo(()=>ni),latestProtocolVersion:Cn(),nextBpHash:mo(()=>ni),nextEpochId:mo(()=>ni),outcomeRoot:mo(()=>ni),prevHash:mo(()=>ni),prevHeight:Cn().optional(),prevStateRoot:mo(()=>ni),randomValue:mo(()=>ni),rentPaid:un(),signature:mo(()=>is),timestamp:Cn(),timestampNanosec:un(),totalSupply:un(),validatorProposals:jn(mo(()=>Bs)),validatorReward:un()}),Vo=Kn([Cn(),mo(()=>ni)]),Ho=Vn({hash:mo(()=>ni),height:Cn()}),Ko=Vn({logs:jn(un()),result:jn(Cn())}),Uo=Vn({blocksToCatchup:jn(mo(()=>Ho)),shardSyncStatus:Xn(un(),Zn()),syncBlockHash:mo(()=>ni),syncBlockHeight:Cn()}),Go=Vn({enabled:$n(),uris:mo(()=>qo)}),qo=Vn({get:un(),set:un()}),Xo=Vn({balanceBurnt:un(),bandwidthRequests:Kn([mo(()=>Oo),Jn(["null"])]).optional(),chunkHash:mo(()=>ni),congestionInfo:Kn([mo(()=>Yo),Jn(["null"])]).optional(),encodedLength:Cn(),encodedMerkleRoot:mo(()=>ni),gasLimit:Cn(),gasUsed:Cn(),heightCreated:Cn(),heightIncluded:Cn(),outcomeRoot:mo(()=>ni),outgoingReceiptsRoot:mo(()=>ni),prevBlockHash:mo(()=>ni),prevStateRoot:mo(()=>ni),rentPaid:un(),shardId:mo(()=>Ya),signature:mo(()=>is),txRoot:mo(()=>ni),validatorProposals:jn(mo(()=>Bs)),validatorReward:un()}),Wo=Kn([Vn({CodeDoesNotExist:Vn({accountId:mo(()=>zo)})}),Vn({PrepareError:mo(()=>Qr)}),Vn({WasmerCompileError:Vn({msg:un()})})]),Jo=Vn({allowedShardOutgoingGas:Cn(),maxCongestionIncomingGas:Cn(),maxCongestionMemoryConsumption:Cn(),maxCongestionMissedChunks:Cn(),maxCongestionOutgoingGas:Cn(),maxOutgoingGas:Cn(),maxTxGas:Cn(),minOutgoingGas:Cn(),minTxGas:Cn(),outgoingReceiptsBigSizeLimit:Cn(),outgoingReceiptsUsualSizeLimit:Cn(),rejectTxCongestionThreshold:Cn()}),Yo=Vn({allowedShard:Cn(),bufferedReceiptsGas:un(),delayedReceiptsGas:un(),receiptBytes:Cn()}),Qo=Vn({codeBase64:un(),hash:mo(()=>ni)}),ei=Vn({cost:un(),costCategory:un(),gasUsed:un()}),ti=Xn(un(),Zn()),ni=un(),oi=Vn({accountId:mo(()=>zo),isSlashed:$n(),numExpectedBlocks:Cn(),numExpectedChunks:Cn().optional(),numExpectedChunksPerShard:jn(Cn()).optional(),numExpectedEndorsements:Cn().optional(),numExpectedEndorsementsPerShard:jn(Cn()).optional(),numProducedBlocks:Cn(),numProducedChunks:Cn().optional(),numProducedChunksPerShard:jn(Cn()).optional(),numProducedEndorsements:Cn().optional(),numProducedEndorsementsPerShard:jn(Cn()).optional(),publicKey:mo(()=>ea),shards:jn(mo(()=>Ya)),shardsEndorsed:jn(mo(()=>Ya)).optional(),stake:un()}),ii=Vn({baseCost:mo(()=>wi),costPerByte:mo(()=>wi)}),ri=Vn({dataId:mo(()=>ni),receiverId:mo(()=>zo)}),ai=Vn({actions:jn(mo(()=>Wr)),maxBlockHeight:Cn(),nonce:Cn(),publicKey:mo(()=>ea),receiverId:mo(()=>zo),senderId:mo(()=>zo)}),si=Vn({beneficiaryId:mo(()=>zo)}),ci=Vn({publicKey:mo(()=>ea)}),ui=Vn({code:un()}),li=Vn({code:un(),deployMode:mo(()=>Zi)}),di=Vn({blockProductionDelayMillis:Cn(),catchupStatus:jn(mo(()=>Uo)),currentHeadStatus:mo(()=>Ho),currentHeaderHeadStatus:mo(()=>Ho),networkInfo:mo(()=>qr),syncStatus:un()}),pi=Jn(["Left","Right"]),hi=Vn({credentialsFile:un().optional(),iterationDelay:Kn([mo(()=>mi),Jn(["null"])]).optional(),location:mo(()=>Ei),restartDumpForShards:jn(mo(()=>Ya)).optional()}),mi=Vn({nanos:Cn(),secs:Cn()}),fi=mo(()=>ni),gi=Vn({disableEpochSyncForBootstrapping:$n().optional(),epochSyncHorizon:Cn(),ignoreEpochSyncNetworkRequests:$n().optional(),timeoutForEpochSync:mo(()=>mi)}),yi=Vn({gasProfile:jn(mo(()=>ei)).optional(),version:Cn()}),_i=Vn({executorId:mo(()=>zo),gasBurnt:Cn(),logs:jn(un()),metadata:mo(()=>yi).optional(),receiptIds:jn(mo(()=>ni)),status:mo(()=>ki),tokensBurnt:un()}),vi=Vn({blockHash:mo(()=>ni),id:mo(()=>ni),outcome:mo(()=>_i),proof:jn(mo(()=>Vr))}),ki=Kn([Jn(["Unknown"]),Vn({Failure:mo(()=>Ts)}),Vn({SuccessValue:un()}),Vn({SuccessReceiptId:mo(()=>ni)})]),Ii=Vn({altBn128G1MultiexpBase:Cn(),altBn128G1MultiexpElement:Cn(),altBn128G1SumBase:Cn(),altBn128G1SumElement:Cn(),altBn128PairingCheckBase:Cn(),altBn128PairingCheckElement:Cn(),base:Cn(),bls12381G1MultiexpBase:Cn(),bls12381G1MultiexpElement:Cn(),bls12381G2MultiexpBase:Cn(),bls12381G2MultiexpElement:Cn(),bls12381MapFp2ToG2Base:Cn(),bls12381MapFp2ToG2Element:Cn(),bls12381MapFpToG1Base:Cn(),bls12381MapFpToG1Element:Cn(),bls12381P1DecompressBase:Cn(),bls12381P1DecompressElement:Cn(),bls12381P1SumBase:Cn(),bls12381P1SumElement:Cn(),bls12381P2DecompressBase:Cn(),bls12381P2DecompressElement:Cn(),bls12381P2SumBase:Cn(),bls12381P2SumElement:Cn(),bls12381PairingBase:Cn(),bls12381PairingElement:Cn(),contractCompileBase:Cn(),contractCompileBytes:Cn(),contractLoadingBase:Cn(),contractLoadingBytes:Cn(),ecrecoverBase:Cn(),ed25519VerifyBase:Cn(),ed25519VerifyByte:Cn(),keccak256Base:Cn(),keccak256Byte:Cn(),keccak512Base:Cn(),keccak512Byte:Cn(),logBase:Cn(),logByte:Cn(),promiseAndBase:Cn(),promiseAndPerPromise:Cn(),promiseReturn:Cn(),readCachedTrieNode:Cn(),readMemoryBase:Cn(),readMemoryByte:Cn(),readRegisterBase:Cn(),readRegisterByte:Cn(),ripemd160Base:Cn(),ripemd160Block:Cn(),sha256Base:Cn(),sha256Byte:Cn(),storageHasKeyBase:Cn(),storageHasKeyByte:Cn(),storageIterCreateFromByte:Cn(),storageIterCreatePrefixBase:Cn(),storageIterCreatePrefixByte:Cn(),storageIterCreateRangeBase:Cn(),storageIterCreateToByte:Cn(),storageIterNextBase:Cn(),storageIterNextKeyByte:Cn(),storageIterNextValueByte:Cn(),storageLargeReadOverheadBase:Cn(),storageLargeReadOverheadByte:Cn(),storageReadBase:Cn(),storageReadKeyByte:Cn(),storageReadValueByte:Cn(),storageRemoveBase:Cn(),storageRemoveKeyByte:Cn(),storageRemoveRetValueByte:Cn(),storageWriteBase:Cn(),storageWriteEvictedByte:Cn(),storageWriteKeyByte:Cn(),storageWriteValueByte:Cn(),touchingTrieNode:Cn(),utf16DecodingBase:Cn(),utf16DecodingByte:Cn(),utf8DecodingBase:Cn(),utf8DecodingByte:Cn(),validatorStakeBase:Cn(),validatorTotalStakeBase:Cn(),writeMemoryBase:Cn(),writeMemoryByte:Cn(),writeRegisterBase:Cn(),writeRegisterByte:Cn(),yieldCreateBase:Cn(),yieldCreateByte:Cn(),yieldResumeBase:Cn(),yieldResumeByte:Cn()}),bi=Vn({externalStorageFallbackThreshold:Cn().optional(),location:mo(()=>Ei),numConcurrentRequests:Cn().optional(),numConcurrentRequestsDuringCatchup:Cn().optional()}),Ei=Kn([Vn({S3:Vn({bucket:un(),region:un()})}),Vn({Filesystem:Vn({rootDir:un()})}),Vn({GCS:Vn({bucket:un()})})]),wi=Vn({execution:Cn(),sendNotSir:Cn(),sendSir:Cn()}),zi=Vn({receiptsOutcome:jn(mo(()=>vi)),status:mo(()=>Pi),transaction:mo(()=>ss),transactionOutcome:mo(()=>vi)}),Ti=Vn({receipts:jn(mo(()=>ia)),receiptsOutcome:jn(mo(()=>vi)),status:mo(()=>Pi),transaction:mo(()=>ss),transactionOutcome:mo(()=>vi)}),Pi=Kn([Jn(["NotStarted"]),Jn(["Started"]),Vn({Failure:mo(()=>Ts)}),Vn({SuccessValue:un()})]),xi=Jn(["optimistic","near-final","final"]),Si=un(),Ai=Vn({args:un(),deposit:un(),gas:Cn(),methodName:un()}),Ci=Kn([Jn(["WasmUnknownError","_EVMError"]),Vn({CompilationError:mo(()=>Wo)}),Vn({LinkError:Vn({msg:un()})}),Vn({MethodResolveError:mo(()=>Hr)}),Vn({WasmTrap:mo(()=>Ls)}),Vn({HostError:mo(()=>Oi)}),Vn({ExecutionError:un()})]),Ri=Vn({allowance:un().optional(),methodNames:jn(un()),receiverId:un()}),Ni=Vn({gcBlocksLimit:Cn().optional(),gcForkCleanStep:Cn().optional(),gcNumEpochsToKeep:Cn().optional(),gcStepPeriod:mo(()=>mi).optional()}),Bi=Vn({balance:Cn(),numNonces:Cn(),permission:mo(()=>Io)}),$i=Vn({avgHiddenValidatorSeatsPerShard:jn(Cn()),blockProducerKickoutThreshold:Cn(),chainId:un(),chunkProducerAssignmentChangesLimit:Cn().optional(),chunkProducerKickoutThreshold:Cn(),chunkValidatorOnlyKickoutThreshold:Cn().optional(),dynamicResharding:$n(),epochLength:Cn(),fishermenThreshold:un(),gasLimit:Cn(),gasPriceAdjustmentRate:jn(Cn()),genesisHeight:Cn(),genesisTime:un(),maxGasPrice:un(),maxInflationRate:jn(Cn()),maxKickoutStakePerc:Cn().optional(),minGasPrice:un(),minimumStakeDivisor:Cn().optional(),minimumStakeRatio:jn(Cn()).optional(),minimumValidatorsPerShard:Cn().optional(),numBlockProducerSeats:Cn(),numBlockProducerSeatsPerShard:jn(Cn()),numBlocksPerYear:Cn(),numChunkOnlyProducerSeats:Cn().optional(),numChunkProducerSeats:Cn().optional(),numChunkValidatorSeats:Cn().optional(),onlineMaxThreshold:jn(Cn()).optional(),onlineMinThreshold:jn(Cn()).optional(),protocolRewardRate:jn(Cn()),protocolTreasuryAccount:mo(()=>zo),protocolUpgradeStakeThreshold:jn(Cn()).optional(),protocolVersion:Cn(),shardLayout:mo(()=>Qa).optional(),shuffleShardAssignmentForChunkProducers:$n().optional(),targetValidatorMandatesPerShard:Cn().optional(),totalSupply:un(),transactionValidityPeriod:Cn(),useProductionConfig:$n().optional(),validators:jn(mo(()=>Po))}),Mi=Jn(["null"]),Zi=Kn([Jn(["CodeHash"]),Jn(["AccountId"])]),Li=Kn([Vn({CodeHash:mo(()=>ni)}),Vn({AccountId:mo(()=>zo)})]),Oi=Kn([Jn(["BadUTF16"]),Jn(["BadUTF8"]),Jn(["GasExceeded"]),Jn(["GasLimitExceeded"]),Jn(["BalanceExceeded"]),Jn(["EmptyMethodName"]),Vn({GuestPanic:Vn({panicMsg:un()})}),Jn(["IntegerOverflow"]),Vn({InvalidPromiseIndex:Vn({promiseIdx:Cn()})}),Jn(["CannotAppendActionToJointPromise"]),Jn(["CannotReturnJointPromise"]),Vn({InvalidPromiseResultIndex:Vn({resultIdx:Cn()})}),Vn({InvalidRegisterId:Vn({registerId:Cn()})}),Vn({IteratorWasInvalidated:Vn({iteratorIndex:Cn()})}),Jn(["MemoryAccessViolation"]),Vn({InvalidReceiptIndex:Vn({receiptIndex:Cn()})}),Vn({InvalidIteratorIndex:Vn({iteratorIndex:Cn()})}),Jn(["InvalidAccountId"]),Jn(["InvalidMethodName"]),Jn(["InvalidPublicKey"]),Vn({ProhibitedInView:Vn({methodName:un()})}),Vn({NumberOfLogsExceeded:Vn({limit:Cn()})}),Vn({KeyLengthExceeded:Vn({length:Cn(),limit:Cn()})}),Vn({ValueLengthExceeded:Vn({length:Cn(),limit:Cn()})}),Vn({TotalLogLengthExceeded:Vn({length:Cn(),limit:Cn()})}),Vn({NumberPromisesExceeded:Vn({limit:Cn(),numberOfPromises:Cn()})}),Vn({NumberInputDataDependenciesExceeded:Vn({limit:Cn(),numberOfInputDataDependencies:Cn()})}),Vn({ReturnedValueLengthExceeded:Vn({length:Cn(),limit:Cn()})}),Vn({ContractSizeExceeded:Vn({limit:Cn(),size:Cn()})}),Vn({Deprecated:Vn({methodName:un()})}),Vn({ECRecoverError:Vn({msg:un()})}),Vn({AltBn128InvalidInput:Vn({msg:un()})}),Vn({Ed25519VerifyInvalidInput:Vn({msg:un()})})]),Di=Kn([Vn({AccessKeyNotFound:Vn({accountId:mo(()=>zo),publicKey:mo(()=>ea)})}),Vn({ReceiverMismatch:Vn({akReceiver:un(),txReceiver:mo(()=>zo)})}),Vn({MethodNameMismatch:Vn({methodName:un()})}),Jn(["RequiresFullAccess"]),Vn({NotEnoughAllowance:Vn({accountId:mo(()=>zo),allowance:un(),cost:un(),publicKey:mo(()=>ea)})}),Jn(["DepositWithFunctionCall"])]),ji=Kn([Vn({InvalidAccessKeyError:mo(()=>Di)}),Vn({InvalidSignerId:Vn({signerId:un()})}),Vn({SignerDoesNotExist:Vn({signerId:mo(()=>zo)})}),Vn({InvalidNonce:Vn({akNonce:Cn(),txNonce:Cn()})}),Vn({NonceTooLarge:Vn({txNonce:Cn(),upperBound:Cn()})}),Vn({InvalidReceiverId:Vn({receiverId:un()})}),Jn(["InvalidSignature"]),Vn({NotEnoughBalance:Vn({balance:un(),cost:un(),signerId:mo(()=>zo)})}),Vn({LackBalanceForState:Vn({amount:un(),signerId:mo(()=>zo)})}),Jn(["CostOverflow"]),Jn(["InvalidChain"]),Jn(["Expired"]),Vn({ActionsValidation:mo(()=>$o)}),Vn({TransactionSizeExceeded:Vn({limit:Cn(),size:Cn()})}),Jn(["InvalidTransactionVersion"]),Vn({StorageError:mo(()=>fs)}),Vn({ShardCongested:Vn({congestionLevel:Cn(),shardId:Cn()})}),Vn({ShardStuck:Vn({missedChunks:Cn(),shardId:Cn()})})]),Fi=Vn({id:un(),jsonrpc:un(),method:Jn(["EXPERIMENTAL_changes"]),params:mo(()=>Oa)}),Vi=Vn({id:un(),jsonrpc:un(),method:Jn(["EXPERIMENTAL_changes_in_block"]),params:mo(()=>ja)}),Hi=Vn({id:un(),jsonrpc:un(),method:Jn(["EXPERIMENTAL_congestion_level"]),params:mo(()=>da)}),Ki=Vn({id:un(),jsonrpc:un(),method:Jn(["EXPERIMENTAL_genesis_config"]),params:mo(()=>Mi)}),Ui=Vn({id:un(),jsonrpc:un(),method:Jn(["EXPERIMENTAL_light_client_block_proof"]),params:mo(()=>va)}),Gi=Vn({id:un(),jsonrpc:un(),method:Jn(["EXPERIMENTAL_light_client_proof"]),params:mo(()=>Ia)}),qi=Vn({id:un(),jsonrpc:un(),method:Jn(["EXPERIMENTAL_maintenance_windows"]),params:mo(()=>za)}),Xi=Vn({id:un(),jsonrpc:un(),method:Jn(["EXPERIMENTAL_protocol_config"]),params:mo(()=>Sa)}),Wi=Vn({id:un(),jsonrpc:un(),method:Jn(["EXPERIMENTAL_receipt"]),params:mo(()=>Na)}),Ji=Vn({id:un(),jsonrpc:un(),method:Jn(["EXPERIMENTAL_split_storage_info"]),params:mo(()=>Za)}),Yi=Vn({id:un(),jsonrpc:un(),method:Jn(["EXPERIMENTAL_tx_status"]),params:mo(()=>Ua)}),Qi=Vn({id:un(),jsonrpc:un(),method:Jn(["EXPERIMENTAL_validators_ordered"]),params:mo(()=>Xa)}),er=Vn({id:un(),jsonrpc:un(),method:Jn(["block"]),params:mo(()=>ra)}),tr=Vn({id:un(),jsonrpc:un(),method:Jn(["broadcast_tx_async"]),params:mo(()=>Ma)}),nr=Vn({id:un(),jsonrpc:un(),method:Jn(["broadcast_tx_commit"]),params:mo(()=>Ma)}),or=Vn({id:un(),jsonrpc:un(),method:Jn(["changes"]),params:mo(()=>Oa)}),ir=Vn({id:un(),jsonrpc:un(),method:Jn(["chunk"]),params:mo(()=>sa)}),rr=Vn({id:un(),jsonrpc:un(),method:Jn(["client_config"]),params:mo(()=>ua)}),ar=Vn({id:un(),jsonrpc:un(),method:Jn(["gas_price"]),params:mo(()=>ma)}),sr=Vn({id:un(),jsonrpc:un(),method:Jn(["health"]),params:mo(()=>ga)}),cr=Vn({id:un(),jsonrpc:un(),method:Jn(["light_client_proof"]),params:mo(()=>Ia)}),ur=Vn({id:un(),jsonrpc:un(),method:Jn(["network_info"]),params:mo(()=>Ta)}),lr=Vn({id:un(),jsonrpc:un(),method:Jn(["next_light_client_block"]),params:mo(()=>Ea)}),dr=Vn({id:un(),jsonrpc:un(),method:Jn(["query"]),params:mo(()=>Ca)}),pr=Vn({id:un(),jsonrpc:un(),method:Jn(["send_tx"]),params:mo(()=>Ma)}),hr=Vn({id:un(),jsonrpc:un(),method:Jn(["status"]),params:mo(()=>Va)}),mr=Vn({id:un(),jsonrpc:un(),method:Jn(["tx"]),params:mo(()=>Ua)}),fr=Vn({id:un(),jsonrpc:un(),method:Jn(["validators"]),params:mo(()=>Ga)}),gr=Kn([Vn({result:jn(mo(()=>ta))}),Vn({error:mo(()=>ha)})]),yr=Kn([Vn({result:jn(mo(()=>Bs))}),Vn({error:mo(()=>ha)})]),_r=Kn([Vn({result:mo(()=>ni)}),Vn({error:mo(()=>ha)})]),vr=Kn([Vn({result:mo(()=>$i)}),Vn({error:mo(()=>ha)})]),kr=Kn([Vn({result:Kn([mo(()=>ya),Jn(["null"])])}),Vn({error:mo(()=>ha)})]),Ir=Kn([Vn({result:mo(()=>aa)}),Vn({error:mo(()=>ha)})]),br=Kn([Vn({result:mo(()=>ca)}),Vn({error:mo(()=>ha)})]),Er=Kn([Vn({result:mo(()=>la)}),Vn({error:mo(()=>ha)})]),wr=Kn([Vn({result:mo(()=>pa)}),Vn({error:mo(()=>ha)})]),zr=Kn([Vn({result:mo(()=>fa)}),Vn({error:mo(()=>ha)})]),Tr=Kn([Vn({result:mo(()=>ka)}),Vn({error:mo(()=>ha)})]),Pr=Kn([Vn({result:mo(()=>ba)}),Vn({error:mo(()=>ha)})]),xr=Kn([Vn({result:mo(()=>wa)}),Vn({error:mo(()=>ha)})]),Sr=Kn([Vn({result:mo(()=>Pa)}),Vn({error:mo(()=>ha)})]),Ar=Kn([Vn({result:mo(()=>Aa)}),Vn({error:mo(()=>ha)})]),Cr=Kn([Vn({result:mo(()=>Ra)}),Vn({error:mo(()=>ha)})]),Rr=Kn([Vn({result:mo(()=>Ba)}),Vn({error:mo(()=>ha)})]),Nr=Kn([Vn({result:mo(()=>La)}),Vn({error:mo(()=>ha)})]),Br=Kn([Vn({result:mo(()=>Da)}),Vn({error:mo(()=>ha)})]),$r=Kn([Vn({result:mo(()=>Fa)}),Vn({error:mo(()=>ha)})]),Mr=Kn([Vn({result:mo(()=>Ha)}),Vn({error:mo(()=>ha)})]),Zr=Kn([Vn({result:mo(()=>Ka)}),Vn({error:mo(()=>ha)})]),Lr=Kn([Vn({result:mo(()=>qa)}),Vn({error:mo(()=>ha)})]),Or=Vn({accountId:mo(()=>zo),nextHops:jn(mo(()=>ea)).optional(),peerId:mo(()=>ea)}),Dr=Vn({innerLite:mo(()=>jo),innerRestHash:mo(()=>ni),prevBlockHash:mo(()=>ni)}),jr=Vn({accountIdValidityRulesVersion:mo(()=>To).optional(),initialMemoryPages:Cn(),maxActionsPerReceipt:Cn(),maxArgumentsLength:Cn(),maxContractSize:Cn(),maxFunctionsNumberPerContract:Cn().optional(),maxGasBurnt:Cn(),maxLengthMethodName:Cn(),maxLengthReturnedData:Cn(),maxLengthStorageKey:Cn(),maxLengthStorageValue:Cn(),maxLocalsPerContract:Cn().optional(),maxMemoryPages:Cn(),maxNumberBytesMethodNames:Cn(),maxNumberInputDataDependencies:Cn(),maxNumberLogs:Cn(),maxNumberRegisters:Cn(),maxPromisesPerFunctionCallAction:Cn(),maxReceiptSize:Cn(),maxRegisterSize:Cn(),maxStackHeight:Cn(),maxTotalLogLength:Cn(),maxTotalPrepaidGas:Cn(),maxTransactionSize:Cn(),maxYieldPayloadSize:Cn(),perReceiptStorageProofSizeLimit:Cn(),registersMemoryLimit:Cn(),yieldTimeoutLengthInBlocks:Cn()}),Fr=Jn(["plain","colored"]),Vr=Vn({direction:mo(()=>pi),hash:mo(()=>ni)}),Hr=Jn(["MethodEmptyName","MethodNotFound","MethodInvalidSignature"]),Kr=Vn({context:mo(()=>Ur),hash:mo(()=>ni)}),Ur=Kn([Jn(["TrieIterator"]),Jn(["TriePrefetchingStorage"]),Jn(["TrieMemoryPartialStorage"]),Jn(["TrieStorage"])]),Gr=un(),qr=Vn({connectedPeers:jn(mo(()=>Yr)),knownProducers:jn(mo(()=>Or)),numConnectedPeers:Cn(),peerMaxCount:Cn(),tier1AccountsData:jn(mo(()=>wo)),tier1AccountsKeys:jn(mo(()=>ea)),tier1Connections:jn(mo(()=>Yr))}),Xr=Vn({accountId:mo(()=>zo),publicKey:mo(()=>ea),shards:jn(mo(()=>Ya)),stake:un()}),Wr=mo(()=>Ao),Jr=mo(()=>ea),Yr=Vn({accountId:Kn([mo(()=>zo),Jn(["null"])]).optional(),addr:un(),archival:$n(),blockHash:Kn([mo(()=>ni),Jn(["null"])]).optional(),connectionEstablishedTimeMillis:Cn(),height:Cn().optional(),isHighestBlockInvalid:$n(),isOutboundPeer:$n(),lastTimePeerRequestedMillis:Cn(),lastTimeReceivedMessageMillis:Cn(),nonce:Cn(),peerId:mo(()=>ea),receivedBytesPerSec:Cn(),sentBytesPerSec:Cn(),trackedShards:jn(mo(()=>Ya))}),Qr=Kn([Jn(["Serialization"]),Jn(["Deserialization"]),Jn(["InternalMemoryDeclared"]),Jn(["GasInstrumentation"]),Jn(["StackHeightInstrumentation"]),Jn(["Instantiate"]),Jn(["Memory"]),Jn(["TooManyFunctions"]),Jn(["TooManyLocals"])]),ea=un(),ta=Vn({end:Cn(),start:Cn()}),na=Kn([Vn({Action:Vn({actions:jn(mo(()=>Bo)),gasPrice:un(),inputDataIds:jn(mo(()=>ni)),isPromiseYield:$n().optional(),outputDataReceivers:jn(mo(()=>ri)),signerId:mo(()=>zo),signerPublicKey:mo(()=>ea)})}),Vn({Data:Vn({data:un().optional(),dataId:mo(()=>ni),isPromiseResume:$n().optional()})}),Vn({GlobalContractDistribution:Vn({alreadyDeliveredShards:jn(mo(()=>Ya)),code:un(),id:mo(()=>Li),targetShard:mo(()=>Ya)})})]),oa=Kn([Vn({InvalidPredecessorId:Vn({accountId:un()})}),Vn({InvalidReceiverId:Vn({accountId:un()})}),Vn({InvalidSignerId:Vn({accountId:un()})}),Vn({InvalidDataReceiverId:Vn({accountId:un()})}),Vn({ReturnedValueLengthExceeded:Vn({length:Cn(),limit:Cn()})}),Vn({NumberInputDataDependenciesExceeded:Vn({limit:Cn(),numberOfInputDataDependencies:Cn()})}),Vn({ActionsValidation:mo(()=>$o)}),Vn({ReceiptSizeExceeded:Vn({limit:Cn(),size:Cn()})})]),ia=Vn({predecessorId:mo(()=>zo),priority:Cn().optional(),receipt:mo(()=>na),receiptId:mo(()=>ni),receiverId:mo(()=>zo)}),ra=Kn([Vn({blockId:mo(()=>Vo)}),Vn({finality:mo(()=>xi)}),Vn({syncCheckpoint:mo(()=>ks)})]),aa=Vn({author:mo(()=>zo),chunks:jn(mo(()=>Xo)),header:mo(()=>Fo)}),sa=Kn([Vn({blockId:mo(()=>Vo),shardId:mo(()=>Ya)}),Vn({chunkId:mo(()=>ni)})]),ca=Vn({author:mo(()=>zo),header:mo(()=>Xo),receipts:jn(mo(()=>ia)),transactions:jn(mo(()=>ss))}),ua=Jn(["null"]),la=Vn({archive:$n(),blockFetchHorizon:Cn(),blockHeaderFetchHorizon:Cn(),blockProductionTrackingDelay:jn(Cn()),catchupStepPeriod:jn(Cn()),chainId:un(),chunkDistributionNetwork:Kn([mo(()=>Go),Jn(["null"])]).optional(),chunkRequestRetryPeriod:jn(Cn()),chunkWaitMult:jn(Cn()),clientBackgroundMigrationThreads:Cn(),doomslugStepPeriod:jn(Cn()),enableMultilineLogging:$n(),enableStatisticsExport:$n(),epochLength:Cn(),epochSync:mo(()=>gi),expectedShutdown:mo(()=>Gr),gc:mo(()=>Ni),headerSyncExpectedHeightPerSecond:Cn(),headerSyncInitialTimeout:jn(Cn()),headerSyncProgressTimeout:jn(Cn()),headerSyncStallBanTimeout:jn(Cn()),logSummaryPeriod:jn(Cn()),logSummaryStyle:mo(()=>Fr),maxBlockProductionDelay:jn(Cn()),maxBlockWaitDelay:jn(Cn()),maxGasBurntView:Cn().optional(),minBlockProductionDelay:jn(Cn()),minNumPeers:Cn(),numBlockProducerSeats:Cn(),orphanStateWitnessMaxSize:Cn(),orphanStateWitnessPoolSize:Cn(),produceChunkAddTransactionsTimeLimit:un(),produceEmptyBlocks:$n(),reshardingConfig:mo(()=>Gr),rpcAddr:un().optional(),saveInvalidWitnesses:$n(),saveLatestWitnesses:$n(),saveTrieChanges:$n(),saveTxOutcomes:$n(),skipSyncWait:$n(),stateSync:mo(()=>hs),stateSyncEnabled:$n(),stateSyncExternalBackoff:jn(Cn()),stateSyncExternalTimeout:jn(Cn()),stateSyncP2pTimeout:jn(Cn()),stateSyncRetryBackoff:jn(Cn()),syncCheckPeriod:jn(Cn()),syncHeightThreshold:Cn(),syncMaxBlockRequests:Cn(),syncStepPeriod:jn(Cn()),trackedShardsConfig:mo(()=>ws),transactionPoolSizeLimit:Cn().optional(),transactionRequestHandlerThreads:Cn(),trieViewerStateSizeLimit:Cn().optional(),ttlAccountIdRouter:jn(Cn()),txRoutingHeightHorizon:Cn(),version:mo(()=>Ms),viewClientNumStateRequestsPerThrottlePeriod:Cn(),viewClientThreads:Cn(),viewClientThrottlePeriod:jn(Cn())}),da=Kn([Vn({blockId:mo(()=>Vo),shardId:mo(()=>Ya)}),Vn({chunkId:mo(()=>ni)})]),pa=Vn({congestionLevel:Cn()}),ha=Kn([Vn({cause:mo(()=>$a),name:Jn(["REQUEST_VALIDATION_ERROR"])}),Vn({cause:Zn(),name:Jn(["HANDLER_ERROR"])}),Vn({cause:Zn(),name:Jn(["INTERNAL_ERROR"])})]),ma=Vn({blockId:Kn([mo(()=>Vo),Jn(["null"])]).optional()}),fa=Vn({gasPrice:un()}),ga=Jn(["null"]),ya=Jn(["null"]),_a=Vn({accountId:mo(()=>zo),addr:un().optional(),peerId:mo(()=>Jr)}),va=Vn({blockHash:mo(()=>ni),lightClientHead:mo(()=>ni)}),ka=Vn({blockHeaderLite:mo(()=>Dr),blockProof:jn(mo(()=>Vr))}),Ia=Kn([Vn({senderId:mo(()=>zo),transactionHash:mo(()=>ni),type:Jn(["transaction"])}),Vn({receiptId:mo(()=>ni),receiverId:mo(()=>zo),type:Jn(["receipt"])})]),ba=Vn({blockHeaderLite:mo(()=>Dr),blockProof:jn(mo(()=>Vr)),outcomeProof:mo(()=>vi),outcomeRootProof:jn(mo(()=>Vr))}),Ea=Vn({lastBlockHash:mo(()=>ni)}),wa=Vn({approvalsAfterNext:jn(Kn([mo(()=>is),Jn(["null"])])).optional(),innerLite:mo(()=>jo).optional(),innerRestHash:mo(()=>ni).optional(),nextBlockInnerHash:mo(()=>ni).optional(),nextBps:jn(mo(()=>Bs)).optional(),prevBlockHash:mo(()=>ni).optional()}),za=Vn({accountId:mo(()=>zo)}),Ta=Jn(["null"]),Pa=Vn({activePeers:jn(mo(()=>xa)),knownProducers:jn(mo(()=>_a)),numActivePeers:Cn(),peerMaxCount:Cn(),receivedBytesPerSec:Cn(),sentBytesPerSec:Cn()}),xa=Vn({accountId:Kn([mo(()=>zo),Jn(["null"])]).optional(),addr:un().optional(),id:mo(()=>Jr)}),Sa=Kn([Vn({blockId:mo(()=>Vo)}),Vn({finality:mo(()=>xi)}),Vn({syncCheckpoint:mo(()=>ks)})]),Aa=Vn({avgHiddenValidatorSeatsPerShard:jn(Cn()),blockProducerKickoutThreshold:Cn(),chainId:un(),chunkProducerKickoutThreshold:Cn(),chunkValidatorOnlyKickoutThreshold:Cn(),dynamicResharding:$n(),epochLength:Cn(),fishermenThreshold:un(),gasLimit:Cn(),gasPriceAdjustmentRate:jn(Cn()),genesisHeight:Cn(),genesisTime:un(),maxGasPrice:un(),maxInflationRate:jn(Cn()),maxKickoutStakePerc:Cn(),minGasPrice:un(),minimumStakeDivisor:Cn(),minimumStakeRatio:jn(Cn()),minimumValidatorsPerShard:Cn(),numBlockProducerSeats:Cn(),numBlockProducerSeatsPerShard:jn(Cn()),numBlocksPerYear:Cn(),onlineMaxThreshold:jn(Cn()),onlineMinThreshold:jn(Cn()),protocolRewardRate:jn(Cn()),protocolTreasuryAccount:mo(()=>zo),protocolUpgradeStakeThreshold:jn(Cn()),protocolVersion:Cn(),runtimeConfig:mo(()=>Wa),shardLayout:mo(()=>Qa),shuffleShardAssignmentForChunkProducers:$n(),targetValidatorMandatesPerShard:Cn(),transactionValidityPeriod:Cn()}),Ca=Kn([Gn(Vn({blockId:mo(()=>Vo)}),Vn({accountId:mo(()=>zo),requestType:Jn(["view_account"])})),Gn(Vn({blockId:mo(()=>Vo)}),Vn({accountId:mo(()=>zo),requestType:Jn(["view_code"])})),Gn(Vn({blockId:mo(()=>Vo)}),Vn({accountId:mo(()=>zo),includeProof:$n().optional(),prefixBase64:mo(()=>_s),requestType:Jn(["view_state"])})),Gn(Vn({blockId:mo(()=>Vo)}),Vn({accountId:mo(()=>zo),publicKey:mo(()=>ea),requestType:Jn(["view_access_key"])})),Gn(Vn({blockId:mo(()=>Vo)}),Vn({accountId:mo(()=>zo),requestType:Jn(["view_access_key_list"])})),Gn(Vn({blockId:mo(()=>Vo)}),Vn({accountId:mo(()=>zo),argsBase64:mo(()=>Si),methodName:un(),requestType:Jn(["call_function"])})),Gn(Vn({blockId:mo(()=>Vo)}),Vn({codeHash:mo(()=>ni),requestType:Jn(["view_global_contract_code"])})),Gn(Vn({blockId:mo(()=>Vo)}),Vn({accountId:mo(()=>zo),requestType:Jn(["view_global_contract_code_by_account_id"])})),Gn(Vn({finality:mo(()=>xi)}),Vn({accountId:mo(()=>zo),requestType:Jn(["view_account"])})),Gn(Vn({finality:mo(()=>xi)}),Vn({accountId:mo(()=>zo),requestType:Jn(["view_code"])})),Gn(Vn({finality:mo(()=>xi)}),Vn({accountId:mo(()=>zo),includeProof:$n().optional(),prefixBase64:mo(()=>_s),requestType:Jn(["view_state"])})),Gn(Vn({finality:mo(()=>xi)}),Vn({accountId:mo(()=>zo),publicKey:mo(()=>ea),requestType:Jn(["view_access_key"])})),Gn(Vn({finality:mo(()=>xi)}),Vn({accountId:mo(()=>zo),requestType:Jn(["view_access_key_list"])})),Gn(Vn({finality:mo(()=>xi)}),Vn({accountId:mo(()=>zo),argsBase64:mo(()=>Si),methodName:un(),requestType:Jn(["call_function"])})),Gn(Vn({finality:mo(()=>xi)}),Vn({codeHash:mo(()=>ni),requestType:Jn(["view_global_contract_code"])})),Gn(Vn({finality:mo(()=>xi)}),Vn({accountId:mo(()=>zo),requestType:Jn(["view_global_contract_code_by_account_id"])})),Gn(Vn({syncCheckpoint:mo(()=>ks)}),Vn({accountId:mo(()=>zo),requestType:Jn(["view_account"])})),Gn(Vn({syncCheckpoint:mo(()=>ks)}),Vn({accountId:mo(()=>zo),requestType:Jn(["view_code"])})),Gn(Vn({syncCheckpoint:mo(()=>ks)}),Vn({accountId:mo(()=>zo),includeProof:$n().optional(),prefixBase64:mo(()=>_s),requestType:Jn(["view_state"])})),Gn(Vn({syncCheckpoint:mo(()=>ks)}),Vn({accountId:mo(()=>zo),publicKey:mo(()=>ea),requestType:Jn(["view_access_key"])})),Gn(Vn({syncCheckpoint:mo(()=>ks)}),Vn({accountId:mo(()=>zo),requestType:Jn(["view_access_key_list"])})),Gn(Vn({syncCheckpoint:mo(()=>ks)}),Vn({accountId:mo(()=>zo),argsBase64:mo(()=>Si),methodName:un(),requestType:Jn(["call_function"])})),Gn(Vn({syncCheckpoint:mo(()=>ks)}),Vn({codeHash:mo(()=>ni),requestType:Jn(["view_global_contract_code"])})),Gn(Vn({syncCheckpoint:mo(()=>ks)}),Vn({accountId:mo(()=>zo),requestType:Jn(["view_global_contract_code_by_account_id"])}))]),Ra=Kn([mo(()=>xo),mo(()=>Qo),mo(()=>Zs),mo(()=>Ko),mo(()=>bo),mo(()=>vo)]),Na=Vn({receiptId:mo(()=>ni)}),Ba=Vn({predecessorId:mo(()=>zo),priority:Cn().optional(),receipt:mo(()=>na),receiptId:mo(()=>ni),receiverId:mo(()=>zo)}),$a=Kn([Vn({info:Vn({methodName:un()}),name:Jn(["METHOD_NOT_FOUND"])}),Vn({info:Vn({errorMessage:un()}),name:Jn(["PARSE_ERROR"])})]),Ma=Vn({signedTxBase64:mo(()=>as),waitUntil:mo(()=>Ps).optional()}),Za=Xn(un(),Zn()),La=Vn({coldHeadHeight:Cn().optional(),finalHeadHeight:Cn().optional(),headHeight:Cn().optional(),hotDbKind:un().optional()}),Oa=Kn([Gn(Vn({blockId:mo(()=>Vo)}),Vn({accountIds:jn(mo(()=>zo)),changesType:Jn(["account_changes"])})),Gn(Vn({blockId:mo(()=>Vo)}),Vn({changesType:Jn(["single_access_key_changes"]),keys:jn(mo(()=>So))})),Gn(Vn({blockId:mo(()=>Vo)}),Vn({changesType:Jn(["single_gas_key_changes"]),keys:jn(mo(()=>So))})),Gn(Vn({blockId:mo(()=>Vo)}),Vn({accountIds:jn(mo(()=>zo)),changesType:Jn(["all_access_key_changes"])})),Gn(Vn({blockId:mo(()=>Vo)}),Vn({accountIds:jn(mo(()=>zo)),changesType:Jn(["all_gas_key_changes"])})),Gn(Vn({blockId:mo(()=>Vo)}),Vn({accountIds:jn(mo(()=>zo)),changesType:Jn(["contract_code_changes"])})),Gn(Vn({blockId:mo(()=>Vo)}),Vn({accountIds:jn(mo(()=>zo)),changesType:Jn(["data_changes"]),keyPrefixBase64:mo(()=>_s)})),Gn(Vn({finality:mo(()=>xi)}),Vn({accountIds:jn(mo(()=>zo)),changesType:Jn(["account_changes"])})),Gn(Vn({finality:mo(()=>xi)}),Vn({changesType:Jn(["single_access_key_changes"]),keys:jn(mo(()=>So))})),Gn(Vn({finality:mo(()=>xi)}),Vn({changesType:Jn(["single_gas_key_changes"]),keys:jn(mo(()=>So))})),Gn(Vn({finality:mo(()=>xi)}),Vn({accountIds:jn(mo(()=>zo)),changesType:Jn(["all_access_key_changes"])})),Gn(Vn({finality:mo(()=>xi)}),Vn({accountIds:jn(mo(()=>zo)),changesType:Jn(["all_gas_key_changes"])})),Gn(Vn({finality:mo(()=>xi)}),Vn({accountIds:jn(mo(()=>zo)),changesType:Jn(["contract_code_changes"])})),Gn(Vn({finality:mo(()=>xi)}),Vn({accountIds:jn(mo(()=>zo)),changesType:Jn(["data_changes"]),keyPrefixBase64:mo(()=>_s)})),Gn(Vn({syncCheckpoint:mo(()=>ks)}),Vn({accountIds:jn(mo(()=>zo)),changesType:Jn(["account_changes"])})),Gn(Vn({syncCheckpoint:mo(()=>ks)}),Vn({changesType:Jn(["single_access_key_changes"]),keys:jn(mo(()=>So))})),Gn(Vn({syncCheckpoint:mo(()=>ks)}),Vn({changesType:Jn(["single_gas_key_changes"]),keys:jn(mo(()=>So))})),Gn(Vn({syncCheckpoint:mo(()=>ks)}),Vn({accountIds:jn(mo(()=>zo)),changesType:Jn(["all_access_key_changes"])})),Gn(Vn({syncCheckpoint:mo(()=>ks)}),Vn({accountIds:jn(mo(()=>zo)),changesType:Jn(["all_gas_key_changes"])})),Gn(Vn({syncCheckpoint:mo(()=>ks)}),Vn({accountIds:jn(mo(()=>zo)),changesType:Jn(["contract_code_changes"])})),Gn(Vn({syncCheckpoint:mo(()=>ks)}),Vn({accountIds:jn(mo(()=>zo)),changesType:Jn(["data_changes"]),keyPrefixBase64:mo(()=>_s)}))]),Da=Vn({blockHash:mo(()=>ni),changes:jn(mo(()=>ls))}),ja=Kn([Vn({blockId:mo(()=>Vo)}),Vn({finality:mo(()=>xi)}),Vn({syncCheckpoint:mo(()=>ks)})]),Fa=Vn({blockHash:mo(()=>ni),changes:jn(mo(()=>ds))}),Va=Jn(["null"]),Ha=Vn({chainId:un(),detailedDebugStatus:Kn([mo(()=>di),Jn(["null"])]).optional(),genesisHash:mo(()=>ni),latestProtocolVersion:Cn(),nodeKey:Kn([mo(()=>ea),Jn(["null"])]).optional(),nodePublicKey:mo(()=>ea),protocolVersion:Cn(),rpcAddr:un().optional(),syncInfo:mo(()=>ms),uptimeSec:Cn(),validatorAccountId:Kn([mo(()=>zo),Jn(["null"])]).optional(),validatorPublicKey:Kn([mo(()=>ea),Jn(["null"])]).optional(),validators:jn(mo(()=>Cs)),version:mo(()=>Ms)}),Ka=Kn([mo(()=>Ti),mo(()=>zi)]),Ua=Kn([Vn({signedTxBase64:mo(()=>as)}),Vn({senderAccountId:mo(()=>zo),txHash:mo(()=>ni)})]),Ga=Kn([Jn(["latest"]),Vn({epochId:mo(()=>fi)}),Vn({blockId:mo(()=>Vo)})]),qa=Vn({currentFishermen:jn(mo(()=>Bs)),currentProposals:jn(mo(()=>Bs)),currentValidators:jn(mo(()=>oi)),epochHeight:Cn(),epochStartHeight:Cn(),nextFishermen:jn(mo(()=>Bs)),nextValidators:jn(mo(()=>Xr)),prevEpochKickout:jn(mo(()=>Ns))}),Xa=Vn({blockId:Kn([mo(()=>Vo),Jn(["null"])]).optional()}),Wa=Vn({accountCreationConfig:mo(()=>Eo),congestionControlConfig:mo(()=>Jo),storageAmountPerByte:un(),transactionCosts:mo(()=>Ja),wasmConfig:mo(()=>Ss),witnessConfig:mo(()=>Os)}),Ja=Vn({actionCreationConfig:mo(()=>Co),actionReceiptCreationConfig:mo(()=>wi),burntGasReward:jn(Cn()),dataReceiptCreationConfig:mo(()=>ii),pessimisticGasPriceInflationRatio:jn(Cn()),storageUsageConfig:mo(()=>ys)}),Ya=Cn(),Qa=Kn([Vn({V0:mo(()=>es)}),Vn({V1:mo(()=>ts)}),Vn({V2:mo(()=>ns)})]),es=Vn({numShards:Cn(),version:Cn()}),ts=Vn({boundaryAccounts:jn(mo(()=>zo)),shardsSplitMap:jn(jn(mo(()=>Ya))).optional(),toParentShardMap:jn(mo(()=>Ya)).optional(),version:Cn()}),ns=Vn({boundaryAccounts:jn(mo(()=>zo)),idToIndexMap:Xn(un(),Cn()),indexToIdMap:Xn(un(),mo(()=>Ya)),shardIds:jn(mo(()=>Ya)),shardsParentMap:Xn(un(),mo(()=>Ya)).optional(),shardsSplitMap:Xn(un(),jn(mo(()=>Ya))).optional(),version:Cn()}),os=Vn({shardId:Cn(),version:Cn()}),is=un(),rs=Vn({delegateAction:mo(()=>ai),signature:mo(()=>is)}),as=un(),ss=Vn({actions:jn(mo(()=>Bo)),hash:mo(()=>ni),nonce:Cn(),priorityFee:Cn().optional(),publicKey:mo(()=>ea),receiverId:mo(()=>zo),signature:mo(()=>is),signerId:mo(()=>zo)}),cs=Vn({accountId:mo(()=>zo),isDoubleSign:$n()}),us=Vn({publicKey:mo(()=>ea),stake:un()});Kn([Vn({type:Jn(["not_writable_to_disk"])}),Vn({type:Jn(["initial_state"])}),Vn({txHash:mo(()=>ni),type:Jn(["transaction_processing"])}),Vn({receiptHash:mo(()=>ni),type:Jn(["action_receipt_processing_started"])}),Vn({receiptHash:mo(()=>ni),type:Jn(["action_receipt_gas_reward"])}),Vn({receiptHash:mo(()=>ni),type:Jn(["receipt_processing"])}),Vn({receiptHash:mo(()=>ni),type:Jn(["postponed_receipt"])}),Vn({type:Jn(["updated_delayed_receipts"])}),Vn({type:Jn(["validator_accounts_update"])}),Vn({type:Jn(["migration"])}),Vn({type:Jn(["bandwidth_scheduler_state_update"])})]);var ls=Kn([Vn({accountId:mo(()=>zo),type:Jn(["account_touched"])}),Vn({accountId:mo(()=>zo),type:Jn(["access_key_touched"])}),Vn({accountId:mo(()=>zo),type:Jn(["data_touched"])}),Vn({accountId:mo(()=>zo),type:Jn(["contract_code_touched"])})]),ds=Kn([Vn({change:Vn({accountId:mo(()=>zo),amount:un(),codeHash:mo(()=>ni),globalContractAccountId:Kn([mo(()=>zo),Jn(["null"])]).optional(),globalContractHash:Kn([mo(()=>ni),Jn(["null"])]).optional(),locked:un(),storagePaidAt:Cn().optional(),storageUsage:Cn()}),type:Jn(["account_update"])}),Vn({change:Vn({accountId:mo(()=>zo)}),type:Jn(["account_deletion"])}),Vn({change:Vn({accessKey:mo(()=>bo),accountId:mo(()=>zo),publicKey:mo(()=>ea)}),type:Jn(["access_key_update"])}),Vn({change:Vn({accountId:mo(()=>zo),publicKey:mo(()=>ea)}),type:Jn(["access_key_deletion"])}),Vn({change:Vn({accountId:mo(()=>zo),gasKey:mo(()=>Bi),publicKey:mo(()=>ea)}),type:Jn(["gas_key_update"])}),Vn({change:Vn({accountId:mo(()=>zo),index:Cn(),nonce:Cn(),publicKey:mo(()=>ea)}),type:Jn(["gas_key_nonce_update"])}),Vn({change:Vn({accountId:mo(()=>zo),publicKey:mo(()=>ea)}),type:Jn(["gas_key_deletion"])}),Vn({change:Vn({accountId:mo(()=>zo),keyBase64:mo(()=>_s),valueBase64:mo(()=>vs)}),type:Jn(["data_update"])}),Vn({change:Vn({accountId:mo(()=>zo),keyBase64:mo(()=>_s)}),type:Jn(["data_deletion"])}),Vn({change:Vn({accountId:mo(()=>zo),codeBase64:un()}),type:Jn(["contract_code_update"])}),Vn({change:Vn({accountId:mo(()=>zo)}),type:Jn(["contract_code_deletion"])})]),ps=Vn({key:mo(()=>_s),value:mo(()=>vs)}),hs=Vn({concurrency:mo(()=>Is).optional(),dump:Kn([mo(()=>hi),Jn(["null"])]).optional(),sync:mo(()=>bs).optional()}),ms=Vn({earliestBlockHash:Kn([mo(()=>ni),Jn(["null"])]).optional(),earliestBlockHeight:Cn().optional(),earliestBlockTime:un().optional(),epochId:Kn([mo(()=>fi),Jn(["null"])]).optional(),epochStartHeight:Cn().optional(),latestBlockHash:mo(()=>ni),latestBlockHeight:Cn(),latestBlockTime:un(),latestStateRoot:mo(()=>ni),syncing:$n()}),fs=Kn([Jn(["StorageInternalError"]),Vn({MissingTrieValue:mo(()=>Kr)}),Jn(["UnexpectedTrieValue"]),Vn({StorageInconsistentState:un()}),Vn({FlatStorageBlockNotSupported:un()}),Vn({MemTrieLoadingError:un()})]),gs=Jn(["FlatStorage","Trie"]),ys=Vn({numBytesAccount:Cn(),numExtraBytesRecord:Cn()}),_s=un(),vs=un(),ks=Jn(["genesis","earliest_available"]),Is=Vn({apply:Cn(),applyDuringCatchup:Cn(),peerDownloads:Cn(),perShard:Cn()}),bs=Kn([Jn(["Peers"]),Vn({ExternalStorage:mo(()=>bi)})]),Es=Vn({addr:un(),peerId:mo(()=>ea)}),ws=Kn([Jn(["NoShards"]),Vn({Shards:jn(mo(()=>os))}),Jn(["AllShards"]),Vn({ShadowValidator:mo(()=>zo)}),Vn({Schedule:jn(jn(mo(()=>Ya)))}),Vn({Accounts:jn(mo(()=>zo))})]),zs=Vn({deposit:un()}),Ts=Kn([Vn({ActionError:mo(()=>Ro)}),Vn({InvalidTxError:mo(()=>ji)})]),Ps=Kn([Jn(["NONE"]),Jn(["INCLUDED"]),Jn(["EXECUTED_OPTIMISTIC"]),Jn(["INCLUDED_FINAL"]),Jn(["EXECUTED"]),Jn(["FINAL"])]),xs=Vn({contractIdentifier:mo(()=>Li)}),Ss=Vn({discardCustomSections:$n(),ethImplicitAccounts:$n(),extCosts:mo(()=>Ii),fixContractLoadingCost:$n(),globalContractHostFns:$n(),growMemCost:Cn(),implicitAccountCreation:$n(),limitConfig:mo(()=>jr),reftypesBulkMemory:$n(),regularOpCost:Cn(),saturatingFloatToInt:$n(),storageGetMode:mo(()=>gs),vmKind:mo(()=>As)}),As=Kn([Jn(["Wasmer0"]),Jn(["Wasmtime"]),Jn(["Wasmer2"]),Jn(["NearVm"]),Jn(["NearVm2"])]),Cs=Vn({accountId:mo(()=>zo)}),Rs=Kn([Jn(["_UnusedSlashed"]),Vn({NotEnoughBlocks:Vn({expected:Cn(),produced:Cn()})}),Vn({NotEnoughChunks:Vn({expected:Cn(),produced:Cn()})}),Jn(["Unstaked"]),Vn({NotEnoughStake:Vn({stakeU128:un(),thresholdU128:un()})}),Jn(["DidNotGetASeat"]),Vn({NotEnoughChunkEndorsements:Vn({expected:Cn(),produced:Cn()})}),Vn({ProtocolVersionTooOld:Vn({networkVersion:Cn(),version:Cn()})})]),Ns=Vn({accountId:mo(()=>zo),reason:mo(()=>Rs)}),Bs=mo(()=>$s),$s=Vn({accountId:mo(()=>zo),publicKey:mo(()=>ea),stake:un()}),Ms=Vn({build:un(),commit:un(),rustcVersion:un().optional(),version:un()}),Zs=Vn({proof:jn(un()).optional(),values:jn(mo(()=>ps))}),Ls=Kn([Jn(["Unreachable"]),Jn(["IncorrectCallIndirectSignature"]),Jn(["MemoryOutOfBounds"]),Jn(["CallIndirectOOB"]),Jn(["IllegalArithmetic"]),Jn(["MisalignedAtomicAccess"]),Jn(["IndirectCallToNull"]),Jn(["StackOverflow"]),Jn(["GenericTrap"])]),Os=Vn({combinedTransactionsSizeLimit:Cn(),mainStorageProofSizeSoftLimit:Cn(),newTransactionsValidationStateSizeSoftLimit:Cn()});mo(()=>Fi),mo(()=>$r),mo(()=>Vi),mo(()=>Br),mo(()=>Hi),mo(()=>wr),mo(()=>Ki),mo(()=>vr),mo(()=>Ui),mo(()=>Tr),mo(()=>Gi),mo(()=>Pr),mo(()=>qi),mo(()=>gr),mo(()=>Xi),mo(()=>Ar),mo(()=>Wi),mo(()=>Rr),mo(()=>Ji),mo(()=>Nr),mo(()=>Yi),mo(()=>Zr),mo(()=>Qi),mo(()=>yr),mo(()=>er),mo(()=>Ir),mo(()=>tr),mo(()=>_r),mo(()=>nr),mo(()=>Zr),mo(()=>or),mo(()=>$r),mo(()=>ir),mo(()=>br),mo(()=>rr),mo(()=>Er),mo(()=>ar),mo(()=>zr),mo(()=>sr),mo(()=>kr),mo(()=>cr),mo(()=>Pr),mo(()=>ur),mo(()=>Sr),mo(()=>lr),mo(()=>xr),mo(()=>dr),mo(()=>Cr),mo(()=>pr),mo(()=>Zr),mo(()=>hr),mo(()=>Mr),mo(()=>mr),mo(()=>Zr),mo(()=>fr),mo(()=>Lr);var Ds=Vn({jsonrpc:Qn("2.0"),id:un(),method:un(),params:no(Zn())}),js=Vn({code:Cn(),message:un(),data:no(Zn())}),Fs=Vn({jsonrpc:Qn("2.0"),id:un(),result:no(Zn()),error:no(js)}),Vs={"/EXPERIMENTAL_changes":"EXPERIMENTAL_changes","/EXPERIMENTAL_changes_in_block":"EXPERIMENTAL_changes_in_block","/EXPERIMENTAL_congestion_level":"EXPERIMENTAL_congestion_level","/EXPERIMENTAL_genesis_config":"EXPERIMENTAL_genesis_config","/EXPERIMENTAL_light_client_block_proof":"EXPERIMENTAL_light_client_block_proof","/EXPERIMENTAL_light_client_proof":"EXPERIMENTAL_light_client_proof","/EXPERIMENTAL_maintenance_windows":"EXPERIMENTAL_maintenance_windows","/EXPERIMENTAL_protocol_config":"EXPERIMENTAL_protocol_config","/EXPERIMENTAL_receipt":"EXPERIMENTAL_receipt","/EXPERIMENTAL_split_storage_info":"EXPERIMENTAL_split_storage_info","/EXPERIMENTAL_tx_status":"EXPERIMENTAL_tx_status","/EXPERIMENTAL_validators_ordered":"EXPERIMENTAL_validators_ordered","/block":"block","/broadcast_tx_async":"broadcast_tx_async","/broadcast_tx_commit":"broadcast_tx_commit","/changes":"changes","/chunk":"chunk","/client_config":"client_config","/gas_price":"gas_price","/health":"health","/light_client_proof":"light_client_proof","/network_info":"network_info","/next_light_client_block":"next_light_client_block","/query":"query","/send_tx":"send_tx","/status":"status","/tx":"tx","/validators":"validators"};Object.entries(Vs).forEach(([e,t])=>{});var Hs=Object.values(Vs);class Ks extends Error{code;data;constructor(e,t,n){super(e),this.code=t,this.data=n,this.name="JsonRpcClientError"}}class Us extends Error{originalError;constructor(e,t){super(e),this.originalError=t,this.name="JsonRpcNetworkError"}}function Gs(e){return e.replace(/[A-Z]/g,e=>`_${e.toLowerCase()}`)}function qs(e){return e.replace(/_([a-z])/g,(e,t)=>t.toUpperCase())}function Xs(e){if(null===e||"object"!=typeof e)return e;if(Array.isArray(e))return e.map(Xs);const t={};for(const[n,o]of Object.entries(e)){t[Gs(n)]=Xs(o)}return t}function Ws(e){if(null===e||"object"!=typeof e)return e;if(Array.isArray(e))return e.map(Ws);const t={};for(const[n,o]of Object.entries(e)){t[qs(n)]=Ws(o)}return t}class Js{endpoint;headers;timeout;retries;validateResponses;constructor(e){"string"==typeof e?(this.endpoint=e,this.headers={"Content-Type":"application/json"},this.timeout=3e4,this.retries=3,this.validateResponses=!0):(this.endpoint=e.endpoint,this.headers={"Content-Type":"application/json",...e.headers},this.timeout=e.timeout||3e4,this.retries=e.retries||3,this.validateResponses=e.validateResponses??!0)}getRequestId(){return"dontcare"}async call(e,t){const n={jsonrpc:"2.0",id:this.getRequestId(),method:e,params:t?Xs(t):void 0};if(this.validateResponses)try{Ds.parse(n)}catch(e){throw new Us(`Invalid request format: ${e instanceof Error?e.message:"Unknown error"}`,e)}let o=null;for(let e=0;e<=this.retries;e++)try{const e=new AbortController,t=setTimeout(()=>e.abort(),this.timeout),o=await fetch(this.endpoint,{method:"POST",headers:this.headers,body:JSON.stringify(n),signal:e.signal});clearTimeout(t);const i=await o.json();if(this.validateResponses)try{Fs.parse(i)}catch(e){throw new Ks(`Invalid response format: ${e instanceof Error?e.message:"Unknown error"}`)}const r=i;if(r.error)throw new Ks(r.error.message,r.error.code,r.error.data);if(!o.ok)throw new Error(`HTTP ${o.status}: ${o.statusText}`);return r.result?Ws(r.result):r.result}catch(t){if(o=t,t instanceof Ks)throw t;if(e<this.retries){const t=Math.min(1e3*Math.pow(2,e),1e4);await new Promise(e=>setTimeout(e,t));continue}}throw new Us(`Failed to make RPC call after ${this.retries+1} attempts: ${o?.message}`,o)}}Hs.forEach(e=>{let t=e;t=t.startsWith("EXPERIMENTAL_")?"experimental"+t.substring(13).replace(/_([a-z])/g,(e,t)=>t.toUpperCase()).replace(/^([a-z])/,(e,t)=>t.toUpperCase()):t.replace(/_([a-z])/g,(e,t)=>t.toUpperCase()),Js.prototype[t]=function(t){return this.call(e,t)}}),Js.prototype.viewAccount=function(e){return this.query({requestType:"view_account",...e})},Js.prototype.viewFunction=function(e){return this.query({requestType:"call_function",...e})},Js.prototype.viewAccessKey=function(e){return this.query({requestType:"view_access_key",...e})};class Ys extends Error{code;data;constructor(e,t,n){super(t),this.code=e,this.data=n,this.name="NearRpcError"}}export{Ks as JsonRpcClientError,Us as JsonRpcNetworkError,Ds as JsonRpcRequestSchema,Fs as JsonRpcResponseSchema,Js as NearRpcClient,Ys as NearRpcError,Hs as RPC_METHODS,Js as default};
|
package/dist/client.d.ts
ADDED
@@ -0,0 +1,57 @@
|
|
1
|
+
import { RPC_METHODS } from '@near-js/jsonrpc-types';
|
2
|
+
type RpcMethod = (typeof RPC_METHODS)[number];
|
3
|
+
export interface ClientConfig {
|
4
|
+
endpoint: string;
|
5
|
+
headers?: Record<string, string>;
|
6
|
+
timeout?: number;
|
7
|
+
retries?: number;
|
8
|
+
validateResponses?: boolean;
|
9
|
+
}
|
10
|
+
export interface JsonRpcRequest<T = unknown> {
|
11
|
+
jsonrpc: '2.0';
|
12
|
+
id: string;
|
13
|
+
method: string;
|
14
|
+
params?: T;
|
15
|
+
}
|
16
|
+
export interface JsonRpcResponse<T = unknown> {
|
17
|
+
jsonrpc: '2.0';
|
18
|
+
id: string;
|
19
|
+
result?: T;
|
20
|
+
error?: JsonRpcError;
|
21
|
+
}
|
22
|
+
export interface JsonRpcError {
|
23
|
+
code: number;
|
24
|
+
message: string;
|
25
|
+
data?: unknown;
|
26
|
+
}
|
27
|
+
export declare class JsonRpcClientError extends Error {
|
28
|
+
code?: number | undefined;
|
29
|
+
data?: unknown | undefined;
|
30
|
+
constructor(message: string, code?: number | undefined, data?: unknown | undefined);
|
31
|
+
}
|
32
|
+
export declare class JsonRpcNetworkError extends Error {
|
33
|
+
originalError: Error;
|
34
|
+
constructor(message: string, originalError: Error);
|
35
|
+
}
|
36
|
+
export declare class NearRpcClient {
|
37
|
+
private endpoint;
|
38
|
+
private headers;
|
39
|
+
private timeout;
|
40
|
+
private retries;
|
41
|
+
private validateResponses;
|
42
|
+
constructor(config: string | ClientConfig);
|
43
|
+
/**
|
44
|
+
* Get request ID matching NEAR RPC documentation examples
|
45
|
+
*/
|
46
|
+
private getRequestId;
|
47
|
+
/**
|
48
|
+
* Make a raw JSON-RPC call
|
49
|
+
* This method is public to allow dynamic calls to any RPC method
|
50
|
+
*/
|
51
|
+
call<TParams = unknown, TResult = unknown>(method: RpcMethod, params?: TParams): Promise<TResult>;
|
52
|
+
}
|
53
|
+
import type { DynamicRpcMethods, ConvenienceMethods } from './generated-types';
|
54
|
+
export interface NearRpcClient extends DynamicRpcMethods, ConvenienceMethods {
|
55
|
+
}
|
56
|
+
export {};
|
57
|
+
//# sourceMappingURL=client.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AACA,OAAO,EAGL,WAAW,EACZ,MAAM,wBAAwB,CAAC;AAGhC,KAAK,SAAS,GAAG,CAAC,OAAO,WAAW,CAAC,CAAC,MAAM,CAAC,CAAC;AAG9C,MAAM,WAAW,YAAY;IAC3B,QAAQ,EAAE,MAAM,CAAC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,YAAY;IAIpB;;;OAGG;IACG,IAAI,CAAC,OAAO,GAAG,OAAO,EAAE,OAAO,GAAG,OAAO,EAC7C,MAAM,EAAE,SAAS,EACjB,MAAM,CAAC,EAAE,OAAO,GACf,OAAO,CAAC,OAAO,CAAC;CAoGpB;AAkED,OAAO,KAAK,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAG/E,MAAM,WAAW,aAAc,SAAQ,iBAAiB,EAAE,kBAAkB;CAAG"}
|
@@ -0,0 +1,58 @@
|
|
1
|
+
import type { ValidationResult } from './validation.mini.js';
|
2
|
+
export interface MiniClientConfig {
|
3
|
+
endpoint: string;
|
4
|
+
headers?: Record<string, string>;
|
5
|
+
timeout?: number;
|
6
|
+
retries?: number;
|
7
|
+
validation?: ValidationResult;
|
8
|
+
}
|
9
|
+
export interface JsonRpcRequest<T = unknown> {
|
10
|
+
jsonrpc: '2.0';
|
11
|
+
id: string;
|
12
|
+
method: string;
|
13
|
+
params?: T;
|
14
|
+
}
|
15
|
+
export interface JsonRpcResponse<T = unknown> {
|
16
|
+
jsonrpc: '2.0';
|
17
|
+
id: string;
|
18
|
+
result?: T;
|
19
|
+
error?: JsonRpcError;
|
20
|
+
}
|
21
|
+
export interface JsonRpcError {
|
22
|
+
code: number;
|
23
|
+
message: string;
|
24
|
+
data?: unknown;
|
25
|
+
}
|
26
|
+
export declare class JsonRpcClientError extends Error {
|
27
|
+
code?: number | undefined;
|
28
|
+
data?: unknown | undefined;
|
29
|
+
constructor(message: string, code?: number | undefined, data?: unknown | undefined);
|
30
|
+
}
|
31
|
+
export declare class JsonRpcNetworkError extends Error {
|
32
|
+
cause?: Error | undefined;
|
33
|
+
constructor(message: string, cause?: Error | undefined);
|
34
|
+
}
|
35
|
+
/**
|
36
|
+
* Simplified NEAR RPC Client for mini version
|
37
|
+
* This client only holds configuration and provides a makeRequest method
|
38
|
+
* Individual RPC methods are provided as standalone functions that take this client as a parameter
|
39
|
+
*/
|
40
|
+
export declare class NearRpcClient {
|
41
|
+
readonly endpoint: string;
|
42
|
+
readonly headers: Record<string, string>;
|
43
|
+
readonly timeout: number;
|
44
|
+
readonly retries: number;
|
45
|
+
private readonly validation?;
|
46
|
+
constructor(config: MiniClientConfig);
|
47
|
+
/**
|
48
|
+
* Make a raw JSON-RPC request
|
49
|
+
* This is used internally by the standalone RPC functions
|
50
|
+
*/
|
51
|
+
makeRequest<TParams = unknown, TResult = unknown>(method: string, params?: TParams): Promise<TResult>;
|
52
|
+
/**
|
53
|
+
* Create a new client with modified configuration
|
54
|
+
*/
|
55
|
+
withConfig(config: Partial<MiniClientConfig>): NearRpcClient;
|
56
|
+
}
|
57
|
+
export declare const defaultClient: NearRpcClient;
|
58
|
+
//# sourceMappingURL=client.mini.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"client.mini.d.ts","sourceRoot":"","sources":["../src/client.mini.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAiD7D,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACjC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,gBAAgB,CAAC;CAC/B;AAGD,MAAM,WAAW,cAAc,CAAC,CAAC,GAAG,OAAO;IACzC,OAAO,EAAE,KAAK,CAAC;IACf,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,CAAC,CAAC;CACZ;AAGD,MAAM,WAAW,eAAe,CAAC,CAAC,GAAG,OAAO;IAC1C,OAAO,EAAE,KAAK,CAAC;IACf,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,CAAC,EAAE,CAAC,CAAC;IACX,KAAK,CAAC,EAAE,YAAY,CAAC;CACtB;AAGD,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AAGD,qBAAa,kBAAmB,SAAQ,KAAK;IAGlC,IAAI,CAAC,EAAE,MAAM;IACb,IAAI,CAAC,EAAE,OAAO;gBAFrB,OAAO,EAAE,MAAM,EACR,IAAI,CAAC,EAAE,MAAM,YAAA,EACb,IAAI,CAAC,EAAE,OAAO,YAAA;CAKxB;AAED,qBAAa,mBAAoB,SAAQ,KAAK;IAGnC,KAAK,CAAC,EAAE,KAAK;gBADpB,OAAO,EAAE,MAAM,EACR,KAAK,CAAC,EAAE,KAAK,YAAA;CAKvB;AAED;;;;GAIG;AACH,qBAAa,aAAa;IACxB,SAAgB,QAAQ,EAAE,MAAM,CAAC;IACjC,SAAgB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAChD,SAAgB,OAAO,EAAE,MAAM,CAAC;IAChC,SAAgB,OAAO,EAAE,MAAM,CAAC;IAChC,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAmB;gBAEnC,MAAM,EAAE,gBAAgB;IAUpC;;;OAGG;IACG,WAAW,CAAC,OAAO,GAAG,OAAO,EAAE,OAAO,GAAG,OAAO,EACpD,MAAM,EAAE,MAAM,EACd,MAAM,CAAC,EAAE,OAAO,GACf,OAAO,CAAC,OAAO,CAAC;IAuFnB;;OAEG;IACH,UAAU,CAAC,MAAM,EAAE,OAAO,CAAC,gBAAgB,CAAC,GAAG,aAAa;CAa7D;AAGD,eAAO,MAAM,aAAa,eAExB,CAAC"}
|
@@ -0,0 +1,21 @@
|
|
1
|
+
import type { NearRpcClient } from './client.mini.js';
|
2
|
+
import type { AccountView, CallResult, AccessKeyView } from '@near-js/jsonrpc-types/mini';
|
3
|
+
export declare function viewAccount(client: NearRpcClient, params: {
|
4
|
+
accountId: string;
|
5
|
+
finality?: 'final' | 'near-final' | 'optimistic';
|
6
|
+
blockId?: string | number;
|
7
|
+
}): Promise<AccountView>;
|
8
|
+
export declare function viewFunction(client: NearRpcClient, params: {
|
9
|
+
accountId: string;
|
10
|
+
methodName: string;
|
11
|
+
argsBase64?: string;
|
12
|
+
finality?: 'final' | 'near-final' | 'optimistic';
|
13
|
+
blockId?: string | number;
|
14
|
+
}): Promise<CallResult>;
|
15
|
+
export declare function viewAccessKey(client: NearRpcClient, params: {
|
16
|
+
accountId: string;
|
17
|
+
publicKey: string;
|
18
|
+
finality?: 'final' | 'near-final' | 'optimistic';
|
19
|
+
blockId?: string | number;
|
20
|
+
}): Promise<AccessKeyView>;
|
21
|
+
//# sourceMappingURL=convenience.mini.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"convenience.mini.d.ts","sourceRoot":"","sources":["../src/convenience.mini.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEtD,OAAO,KAAK,EACV,WAAW,EACX,UAAU,EACV,aAAa,EACd,MAAM,6BAA6B,CAAC;AAErC,wBAAsB,WAAW,CAC/B,MAAM,EAAE,aAAa,EACrB,MAAM,EAAE;IACN,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,GAAG,YAAY,GAAG,YAAY,CAAC;IACjD,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CAC3B,GACA,OAAO,CAAC,WAAW,CAAC,CAetB;AAED,wBAAsB,YAAY,CAChC,MAAM,EAAE,aAAa,EACrB,MAAM,EAAE;IACN,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,GAAG,YAAY,GAAG,YAAY,CAAC;IACjD,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CAC3B,GACA,OAAO,CAAC,UAAU,CAAC,CAcrB;AAED,wBAAsB,aAAa,CACjC,MAAM,EAAE,aAAa,EACrB,MAAM,EAAE;IACN,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,GAAG,YAAY,GAAG,YAAY,CAAC;IACjD,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CAC3B,GACA,OAAO,CAAC,aAAa,CAAC,CAiBxB"}
|
@@ -0,0 +1,3 @@
|
|
1
|
+
export { experimentalChanges, experimentalChangesInBlock, experimentalCongestionLevel, experimentalGenesisConfig, experimentalLightClientBlockProof, experimentalLightClientProof, experimentalMaintenanceWindows, experimentalProtocolConfig, experimentalReceipt, experimentalSplitStorageInfo, experimentalTxStatus, experimentalValidatorsOrdered, block, broadcastTxAsync, broadcastTxCommit, changes, chunk, clientConfig, gasPrice, health, lightClientProof, networkInfo, nextLightClientBlock, query, sendTx, status, tx, validators, } from './generated-types.mini';
|
2
|
+
export { viewAccount, viewFunction, viewAccessKey } from './convenience.mini';
|
3
|
+
//# sourceMappingURL=generated-functions.mini.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"generated-functions.mini.d.ts","sourceRoot":"","sources":["../src/generated-functions.mini.ts"],"names":[],"mappings":"AAIA,OAAO,EACL,mBAAmB,EACnB,0BAA0B,EAC1B,2BAA2B,EAC3B,yBAAyB,EACzB,iCAAiC,EACjC,4BAA4B,EAC5B,8BAA8B,EAC9B,0BAA0B,EAC1B,mBAAmB,EACnB,4BAA4B,EAC5B,oBAAoB,EACpB,6BAA6B,EAC7B,KAAK,EACL,gBAAgB,EAChB,iBAAiB,EACjB,OAAO,EACP,KAAK,EACL,YAAY,EACZ,QAAQ,EACR,MAAM,EACN,gBAAgB,EAChB,WAAW,EACX,oBAAoB,EACpB,KAAK,EACL,MAAM,EACN,MAAM,EACN,EAAE,EACF,UAAU,GACX,MAAM,wBAAwB,CAAC;AAGhC,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC"}
|
@@ -0,0 +1,55 @@
|
|
1
|
+
import type { AccessKeyView, AccountView, CallResult, CryptoHash, EXPERIMENTALMaintenanceWindowsResponse, EXPERIMENTALValidatorsOrderedResponse, GenesisConfig, GenesisConfigRequest, RpcBlockRequest, RpcBlockResponse, RpcChunkRequest, RpcChunkResponse, RpcClientConfigRequest, RpcClientConfigResponse, RpcCongestionLevelRequest, RpcCongestionLevelResponse, RpcGasPriceRequest, RpcGasPriceResponse, RpcHealthRequest, RpcHealthResponse, RpcLightClientBlockProofRequest, RpcLightClientBlockProofResponse, RpcLightClientExecutionProofRequest, RpcLightClientExecutionProofResponse, RpcLightClientNextBlockRequest, RpcLightClientNextBlockResponse, RpcMaintenanceWindowsRequest, RpcNetworkInfoRequest, RpcNetworkInfoResponse, RpcProtocolConfigRequest, RpcProtocolConfigResponse, RpcQueryRequest, RpcQueryResponse, RpcReceiptRequest, RpcReceiptResponse, RpcSendTransactionRequest, RpcSplitStorageInfoRequest, RpcSplitStorageInfoResponse, RpcStateChangesInBlockByTypeRequest, RpcStateChangesInBlockByTypeResponse, RpcStateChangesInBlockRequest, RpcStateChangesInBlockResponse, RpcStatusRequest, RpcStatusResponse, RpcTransactionResponse, RpcTransactionStatusRequest, RpcValidatorRequest, RpcValidatorResponse, RpcValidatorsOrderedRequest } from '@near-js/jsonrpc-types';
|
2
|
+
export interface DynamicRpcMethods {
|
3
|
+
experimentalChanges(params?: RpcStateChangesInBlockByTypeRequest): Promise<RpcStateChangesInBlockResponse>;
|
4
|
+
experimentalChangesInBlock(params?: RpcStateChangesInBlockRequest): Promise<RpcStateChangesInBlockByTypeResponse>;
|
5
|
+
experimentalCongestionLevel(params?: RpcCongestionLevelRequest): Promise<RpcCongestionLevelResponse>;
|
6
|
+
experimentalGenesisConfig(params?: GenesisConfigRequest): Promise<GenesisConfig>;
|
7
|
+
experimentalLightClientBlockProof(params?: RpcLightClientBlockProofRequest): Promise<RpcLightClientBlockProofResponse>;
|
8
|
+
experimentalLightClientProof(params?: RpcLightClientExecutionProofRequest): Promise<RpcLightClientExecutionProofResponse>;
|
9
|
+
experimentalMaintenanceWindows(params?: RpcMaintenanceWindowsRequest): Promise<EXPERIMENTALMaintenanceWindowsResponse>;
|
10
|
+
experimentalProtocolConfig(params?: RpcProtocolConfigRequest): Promise<RpcProtocolConfigResponse>;
|
11
|
+
experimentalReceipt(params?: RpcReceiptRequest): Promise<RpcReceiptResponse>;
|
12
|
+
experimentalSplitStorageInfo(params?: RpcSplitStorageInfoRequest): Promise<RpcSplitStorageInfoResponse>;
|
13
|
+
experimentalTxStatus(params?: RpcTransactionStatusRequest): Promise<RpcTransactionResponse>;
|
14
|
+
experimentalValidatorsOrdered(params?: RpcValidatorsOrderedRequest): Promise<EXPERIMENTALValidatorsOrderedResponse>;
|
15
|
+
block(params?: RpcBlockRequest): Promise<RpcBlockResponse>;
|
16
|
+
broadcastTxAsync(params?: RpcSendTransactionRequest): Promise<CryptoHash>;
|
17
|
+
broadcastTxCommit(params?: RpcSendTransactionRequest): Promise<RpcTransactionResponse>;
|
18
|
+
changes(params?: RpcStateChangesInBlockByTypeRequest): Promise<RpcStateChangesInBlockResponse>;
|
19
|
+
chunk(params?: RpcChunkRequest): Promise<RpcChunkResponse>;
|
20
|
+
clientConfig(params?: RpcClientConfigRequest): Promise<RpcClientConfigResponse>;
|
21
|
+
gasPrice(params?: RpcGasPriceRequest): Promise<RpcGasPriceResponse>;
|
22
|
+
health(params?: RpcHealthRequest): Promise<RpcHealthResponse>;
|
23
|
+
lightClientProof(params?: RpcLightClientExecutionProofRequest): Promise<RpcLightClientExecutionProofResponse>;
|
24
|
+
networkInfo(params?: RpcNetworkInfoRequest): Promise<RpcNetworkInfoResponse>;
|
25
|
+
nextLightClientBlock(params?: RpcLightClientNextBlockRequest): Promise<RpcLightClientNextBlockResponse>;
|
26
|
+
query(params?: RpcQueryRequest): Promise<RpcQueryResponse>;
|
27
|
+
sendTx(params?: RpcSendTransactionRequest): Promise<RpcTransactionResponse>;
|
28
|
+
status(params?: RpcStatusRequest): Promise<RpcStatusResponse>;
|
29
|
+
tx(params?: RpcTransactionStatusRequest): Promise<RpcTransactionResponse>;
|
30
|
+
validators(params?: RpcValidatorRequest): Promise<RpcValidatorResponse>;
|
31
|
+
}
|
32
|
+
export interface ConvenienceMethods {
|
33
|
+
viewAccount(params: {
|
34
|
+
accountId: string;
|
35
|
+
finality?: 'final' | 'near-final' | 'optimistic';
|
36
|
+
blockId?: string | number;
|
37
|
+
}): Promise<AccountView>;
|
38
|
+
viewFunction(params: {
|
39
|
+
accountId: string;
|
40
|
+
methodName: string;
|
41
|
+
argsBase64?: string;
|
42
|
+
finality?: 'final' | 'near-final' | 'optimistic';
|
43
|
+
blockId?: string | number;
|
44
|
+
}): Promise<CallResult>;
|
45
|
+
viewAccessKey(params: {
|
46
|
+
accountId: string;
|
47
|
+
publicKey: string;
|
48
|
+
finality?: 'final' | 'near-final' | 'optimistic';
|
49
|
+
blockId?: string | number;
|
50
|
+
}): Promise<AccessKeyView>;
|
51
|
+
}
|
52
|
+
export interface CompleteClientInterface extends DynamicRpcMethods, ConvenienceMethods {
|
53
|
+
call<TParams = unknown, TResult = unknown>(method: string, params?: TParams): Promise<TResult>;
|
54
|
+
}
|
55
|
+
//# sourceMappingURL=generated-types.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"generated-types.d.ts","sourceRoot":"","sources":["../src/generated-types.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EACV,aAAa,EACb,WAAW,EACX,UAAU,EACV,UAAU,EACV,sCAAsC,EACtC,qCAAqC,EACrC,aAAa,EACb,oBAAoB,EACpB,eAAe,EACf,gBAAgB,EAChB,eAAe,EACf,gBAAgB,EAChB,sBAAsB,EACtB,uBAAuB,EACvB,yBAAyB,EACzB,0BAA0B,EAC1B,kBAAkB,EAClB,mBAAmB,EACnB,g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,EACvB,kBAAkB;IAEpB,IAAI,CAAC,OAAO,GAAG,OAAO,EAAE,OAAO,GAAG,OAAO,EACvC,MAAM,EAAE,MAAM,EACd,MAAM,CAAC,EAAE,OAAO,GACf,OAAO,CAAC,OAAO,CAAC,CAAC;CACrB"}
|
@@ -0,0 +1,84 @@
|
|
1
|
+
import type { AccessKeyView, AccountView, CallResult, CryptoHash, EXPERIMENTALMaintenanceWindowsResponse, EXPERIMENTALValidatorsOrderedResponse, GenesisConfig, GenesisConfigRequest, RpcBlockRequest, RpcBlockResponse, RpcChunkRequest, RpcChunkResponse, RpcClientConfigRequest, RpcClientConfigResponse, RpcCongestionLevelRequest, RpcCongestionLevelResponse, RpcGasPriceRequest, RpcGasPriceResponse, RpcHealthRequest, RpcHealthResponse, RpcLightClientBlockProofRequest, RpcLightClientBlockProofResponse, RpcLightClientExecutionProofRequest, RpcLightClientExecutionProofResponse, RpcLightClientNextBlockRequest, RpcLightClientNextBlockResponse, RpcMaintenanceWindowsRequest, RpcNetworkInfoRequest, RpcNetworkInfoResponse, RpcProtocolConfigRequest, RpcProtocolConfigResponse, RpcQueryRequest, RpcQueryResponse, RpcReceiptRequest, RpcReceiptResponse, RpcSendTransactionRequest, RpcSplitStorageInfoRequest, RpcSplitStorageInfoResponse, RpcStateChangesInBlockByTypeRequest, RpcStateChangesInBlockByTypeResponse, RpcStateChangesInBlockRequest, RpcStateChangesInBlockResponse, RpcStatusRequest, RpcStatusResponse, RpcTransactionResponse, RpcTransactionStatusRequest, RpcValidatorRequest, RpcValidatorResponse, RpcValidatorsOrderedRequest } from '@near-js/jsonrpc-types/mini';
|
2
|
+
import type { NearRpcClient } from './client.mini';
|
3
|
+
export interface DynamicRpcMethods {
|
4
|
+
experimentalChanges(params?: RpcStateChangesInBlockByTypeRequest): Promise<RpcStateChangesInBlockResponse>;
|
5
|
+
experimentalChangesInBlock(params?: RpcStateChangesInBlockRequest): Promise<RpcStateChangesInBlockByTypeResponse>;
|
6
|
+
experimentalCongestionLevel(params?: RpcCongestionLevelRequest): Promise<RpcCongestionLevelResponse>;
|
7
|
+
experimentalGenesisConfig(params?: GenesisConfigRequest): Promise<GenesisConfig>;
|
8
|
+
experimentalLightClientBlockProof(params?: RpcLightClientBlockProofRequest): Promise<RpcLightClientBlockProofResponse>;
|
9
|
+
experimentalLightClientProof(params?: RpcLightClientExecutionProofRequest): Promise<RpcLightClientExecutionProofResponse>;
|
10
|
+
experimentalMaintenanceWindows(params?: RpcMaintenanceWindowsRequest): Promise<EXPERIMENTALMaintenanceWindowsResponse>;
|
11
|
+
experimentalProtocolConfig(params?: RpcProtocolConfigRequest): Promise<RpcProtocolConfigResponse>;
|
12
|
+
experimentalReceipt(params?: RpcReceiptRequest): Promise<RpcReceiptResponse>;
|
13
|
+
experimentalSplitStorageInfo(params?: RpcSplitStorageInfoRequest): Promise<RpcSplitStorageInfoResponse>;
|
14
|
+
experimentalTxStatus(params?: RpcTransactionStatusRequest): Promise<RpcTransactionResponse>;
|
15
|
+
experimentalValidatorsOrdered(params?: RpcValidatorsOrderedRequest): Promise<EXPERIMENTALValidatorsOrderedResponse>;
|
16
|
+
block(params?: RpcBlockRequest): Promise<RpcBlockResponse>;
|
17
|
+
broadcastTxAsync(params?: RpcSendTransactionRequest): Promise<CryptoHash>;
|
18
|
+
broadcastTxCommit(params?: RpcSendTransactionRequest): Promise<RpcTransactionResponse>;
|
19
|
+
changes(params?: RpcStateChangesInBlockByTypeRequest): Promise<RpcStateChangesInBlockResponse>;
|
20
|
+
chunk(params?: RpcChunkRequest): Promise<RpcChunkResponse>;
|
21
|
+
clientConfig(params?: RpcClientConfigRequest): Promise<RpcClientConfigResponse>;
|
22
|
+
gasPrice(params?: RpcGasPriceRequest): Promise<RpcGasPriceResponse>;
|
23
|
+
health(params?: RpcHealthRequest): Promise<RpcHealthResponse>;
|
24
|
+
lightClientProof(params?: RpcLightClientExecutionProofRequest): Promise<RpcLightClientExecutionProofResponse>;
|
25
|
+
networkInfo(params?: RpcNetworkInfoRequest): Promise<RpcNetworkInfoResponse>;
|
26
|
+
nextLightClientBlock(params?: RpcLightClientNextBlockRequest): Promise<RpcLightClientNextBlockResponse>;
|
27
|
+
query(params?: RpcQueryRequest): Promise<RpcQueryResponse>;
|
28
|
+
sendTx(params?: RpcSendTransactionRequest): Promise<RpcTransactionResponse>;
|
29
|
+
status(params?: RpcStatusRequest): Promise<RpcStatusResponse>;
|
30
|
+
tx(params?: RpcTransactionStatusRequest): Promise<RpcTransactionResponse>;
|
31
|
+
validators(params?: RpcValidatorRequest): Promise<RpcValidatorResponse>;
|
32
|
+
}
|
33
|
+
export interface ConvenienceMethods {
|
34
|
+
viewAccount(params: {
|
35
|
+
accountId: string;
|
36
|
+
finality?: 'final' | 'near-final' | 'optimistic';
|
37
|
+
blockId?: string | number;
|
38
|
+
}): Promise<AccountView>;
|
39
|
+
viewFunction(params: {
|
40
|
+
accountId: string;
|
41
|
+
methodName: string;
|
42
|
+
argsBase64?: string;
|
43
|
+
finality?: 'final' | 'near-final' | 'optimistic';
|
44
|
+
blockId?: string | number;
|
45
|
+
}): Promise<CallResult>;
|
46
|
+
viewAccessKey(params: {
|
47
|
+
accountId: string;
|
48
|
+
publicKey: string;
|
49
|
+
finality?: 'final' | 'near-final' | 'optimistic';
|
50
|
+
blockId?: string | number;
|
51
|
+
}): Promise<AccessKeyView>;
|
52
|
+
}
|
53
|
+
export interface CompleteClientInterface extends DynamicRpcMethods, ConvenienceMethods {
|
54
|
+
call<TParams = unknown, TResult = unknown>(method: string, params?: TParams): Promise<TResult>;
|
55
|
+
}
|
56
|
+
export declare function experimentalChanges(client: NearRpcClient, params?: RpcStateChangesInBlockByTypeRequest): Promise<RpcStateChangesInBlockResponse>;
|
57
|
+
export declare function experimentalChangesInBlock(client: NearRpcClient, params?: RpcStateChangesInBlockRequest): Promise<RpcStateChangesInBlockByTypeResponse>;
|
58
|
+
export declare function experimentalCongestionLevel(client: NearRpcClient, params?: RpcCongestionLevelRequest): Promise<RpcCongestionLevelResponse>;
|
59
|
+
export declare function experimentalGenesisConfig(client: NearRpcClient, params?: GenesisConfigRequest): Promise<GenesisConfig>;
|
60
|
+
export declare function experimentalLightClientBlockProof(client: NearRpcClient, params?: RpcLightClientBlockProofRequest): Promise<RpcLightClientBlockProofResponse>;
|
61
|
+
export declare function experimentalLightClientProof(client: NearRpcClient, params?: RpcLightClientExecutionProofRequest): Promise<RpcLightClientExecutionProofResponse>;
|
62
|
+
export declare function experimentalMaintenanceWindows(client: NearRpcClient, params?: RpcMaintenanceWindowsRequest): Promise<EXPERIMENTALMaintenanceWindowsResponse>;
|
63
|
+
export declare function experimentalProtocolConfig(client: NearRpcClient, params?: RpcProtocolConfigRequest): Promise<RpcProtocolConfigResponse>;
|
64
|
+
export declare function experimentalReceipt(client: NearRpcClient, params?: RpcReceiptRequest): Promise<RpcReceiptResponse>;
|
65
|
+
export declare function experimentalSplitStorageInfo(client: NearRpcClient, params?: RpcSplitStorageInfoRequest): Promise<RpcSplitStorageInfoResponse>;
|
66
|
+
export declare function experimentalTxStatus(client: NearRpcClient, params?: RpcTransactionStatusRequest): Promise<RpcTransactionResponse>;
|
67
|
+
export declare function experimentalValidatorsOrdered(client: NearRpcClient, params?: RpcValidatorsOrderedRequest): Promise<EXPERIMENTALValidatorsOrderedResponse>;
|
68
|
+
export declare function block(client: NearRpcClient, params?: RpcBlockRequest): Promise<RpcBlockResponse>;
|
69
|
+
export declare function broadcastTxAsync(client: NearRpcClient, params?: RpcSendTransactionRequest): Promise<CryptoHash>;
|
70
|
+
export declare function broadcastTxCommit(client: NearRpcClient, params?: RpcSendTransactionRequest): Promise<RpcTransactionResponse>;
|
71
|
+
export declare function changes(client: NearRpcClient, params?: RpcStateChangesInBlockByTypeRequest): Promise<RpcStateChangesInBlockResponse>;
|
72
|
+
export declare function chunk(client: NearRpcClient, params?: RpcChunkRequest): Promise<RpcChunkResponse>;
|
73
|
+
export declare function clientConfig(client: NearRpcClient, params?: RpcClientConfigRequest): Promise<RpcClientConfigResponse>;
|
74
|
+
export declare function gasPrice(client: NearRpcClient, params?: RpcGasPriceRequest): Promise<RpcGasPriceResponse>;
|
75
|
+
export declare function health(client: NearRpcClient, params?: RpcHealthRequest): Promise<RpcHealthResponse>;
|
76
|
+
export declare function lightClientProof(client: NearRpcClient, params?: RpcLightClientExecutionProofRequest): Promise<RpcLightClientExecutionProofResponse>;
|
77
|
+
export declare function networkInfo(client: NearRpcClient, params?: RpcNetworkInfoRequest): Promise<RpcNetworkInfoResponse>;
|
78
|
+
export declare function nextLightClientBlock(client: NearRpcClient, params?: RpcLightClientNextBlockRequest): Promise<RpcLightClientNextBlockResponse>;
|
79
|
+
export declare function query(client: NearRpcClient, params?: RpcQueryRequest): Promise<RpcQueryResponse>;
|
80
|
+
export declare function sendTx(client: NearRpcClient, params?: RpcSendTransactionRequest): Promise<RpcTransactionResponse>;
|
81
|
+
export declare function status(client: NearRpcClient, params?: RpcStatusRequest): Promise<RpcStatusResponse>;
|
82
|
+
export declare function tx(client: NearRpcClient, params?: RpcTransactionStatusRequest): Promise<RpcTransactionResponse>;
|
83
|
+
export declare function validators(client: NearRpcClient, params?: RpcValidatorRequest): Promise<RpcValidatorResponse>;
|
84
|
+
//# sourceMappingURL=generated-types.mini.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"generated-types.mini.d.ts","sourceRoot":"","sources":["../src/generated-types.mini.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EACV,aAAa,EACb,WAAW,EACX,UAAU,EACV,UAAU,EACV,sCAAsC,EACtC,qCAAqC,EACrC,aAAa,EACb,oBAAoB,EACpB,eAAe,EACf,gBAAgB,EAChB,eAAe,EACf,gBAAgB,EAChB,sBAAsB,EACtB,uBAAuB,EACvB,yBAAyB,EACzB,0BAA0B,EAC1B,kBAAkB,EAClB,mBAAmB,EACnB,gBAAgB,EAChB,iBAAiB,EACjB,+BAA+B,EAC/B,gCAAgC,EAChC,mCAAmC,EACnC,oCAAoC,EACpC,8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gB,GACxB,OAAO,CAAC,iBAAiB,CAAC,CAE5B;AAGD,wBAAsB,gBAAgB,CACpC,MAAM,EAAE,aAAa,EACrB,MAAM,CAAC,EAAE,mCAAmC,GAC3C,OAAO,CAAC,oCAAoC,CAAC,CAE/C;AAGD,wBAAsB,WAAW,CAC/B,MAAM,EAAE,aAAa,EACrB,MAAM,CAAC,EAAE,qBAAqB,GAC7B,OAAO,CAAC,sBAAsB,CAAC,CAEjC;AAGD,wBAAsB,oBAAoB,CACxC,MAAM,EAAE,aAAa,EACrB,MAAM,CAAC,EAAE,8BAA8B,GACtC,OAAO,CAAC,+BAA+B,CAAC,CAE1C;AAGD,wBAAsB,KAAK,CACzB,MAAM,EAAE,aAAa,EACrB,MAAM,CAAC,EAAE,eAAe,GACvB,OAAO,CAAC,gBAAgB,CAAC,CAE3B;AAGD,wBAAsB,MAAM,CAC1B,MAAM,EAAE,aAAa,EACrB,MAAM,CAAC,EAAE,yBAAyB,GACjC,OAAO,CAAC,sBAAsB,CAAC,CAEjC;AAGD,wBAAsB,MAAM,CAC1B,MAAM,EAAE,aAAa,EACrB,MAAM,CAAC,EAAE,gBAAgB,GACxB,OAAO,CAAC,iBAAiB,CAAC,CAE5B;AAGD,wBAAsB,EAAE,CACtB,MAAM,EAAE,aAAa,EACrB,MAAM,CAAC,EAAE,2BAA2B,GACnC,OAAO,CAAC,sBAAsB,CAAC,CAEjC;AAGD,wBAAsB,UAAU,CAC9B,MAAM,EAAE,aAAa,EACrB,MAAM,CAAC,EAAE,mBAAmB,GAC3B,OAAO,CAAC,oBAAoB,CAAC,CAE/B"}
|
package/dist/index.d.mts
CHANGED
@@ -96,12 +96,11 @@ declare class NearRpcClient {
|
|
96
96
|
private timeout;
|
97
97
|
private retries;
|
98
98
|
private validateResponses;
|
99
|
-
private requestIdCounter;
|
100
99
|
constructor(config: string | ClientConfig);
|
101
100
|
/**
|
102
|
-
*
|
101
|
+
* Get request ID matching NEAR RPC documentation examples
|
103
102
|
*/
|
104
|
-
private
|
103
|
+
private getRequestId;
|
105
104
|
/**
|
106
105
|
* Make a raw JSON-RPC call
|
107
106
|
* This method is public to allow dynamic calls to any RPC method
|