diff --git a/docs/README.md b/docs/README.md index a68705fc2..a4ed43f8f 100644 --- a/docs/README.md +++ b/docs/README.md @@ -293,7 +293,7 @@ You can find all RPC methods on the [RPC doc](https://casper-ecosystem.github.io ```rust use casper_rust_wasm_sdk::types::{ - transaction::Transaction, transaction_hash::TransactionHash, + transaction::Transaction, hash::transaction_hash::TransactionHash, }; let transaction_hash = @@ -314,7 +314,7 @@ println!("{timestamp} {hash}"); #### Get deploy by deploy hash (legacy) ```rust -use casper_rust_wasm_sdk::types::deploy_hash::DeployHash; +use casper_rust_wasm_sdk::types::hash::deploy_hash::DeployHash; let deploy_hash = DeployHash::new("a8778b2e4bd1ad02c168329a1f6f3674513f4d350da1b5f078e058a3422ad0b9") @@ -633,7 +633,7 @@ console.log(transaction_hash); ```rust use casper_rust_wasm_sdk::types::{ addr::entity_addr::EntityAddr, - addressable_entity_hash::AddressableEntityHash, + hash::addressable_entity_hash::AddressableEntityHash, transaction_params::{ transaction_builder_params::TransactionBuilderParams, transaction_str_params::TransactionStrParams, @@ -712,7 +712,7 @@ let sdk = SDK::new( ); use casper_rust_wasm_sdk::types::{ - addressable_entity_hash::AddressableEntityHash, + hash::addressable_entity_hash::AddressableEntityHash, transaction_params::{ transaction_builder_params::TransactionBuilderParams, transaction_str_params::TransactionStrParams, @@ -798,7 +798,7 @@ Puts a [`Transaction`] to the network for execution. ```rust use casper_rust_wasm_sdk::types::{ - addressable_entity_hash::AddressableEntityHash, + hash::addressable_entity_hash::AddressableEntityHash, transaction_params::{ transaction_builder_params::TransactionBuilderParams, transaction_str_params::TransactionStrParams, @@ -1128,7 +1128,7 @@ console.log(results); use casper_rust_wasm_sdk::{ helpers::json_pretty_print, types::{ - transaction_hash::TransactionHash, + hash::transaction_hash::TransactionHash, transaction_params::transaction_str_params::TransactionStrParams, }, }; @@ -1290,7 +1290,7 @@ async function loadFile() { ```rust use casper_rust_wasm_sdk::types::{ - addressable_entity_hash::AddressableEntityHash, + hash::addressable_entity_hash::AddressableEntityHash, transaction_params::{ transaction_builder_params::TransactionBuilderParams, transaction_str_params::TransactionStrParams, @@ -2061,7 +2061,7 @@ console.log(results); use casper_rust_wasm_sdk::{ helpers::json_pretty_print, types::{ - deploy_hash::DeployHash, + hash::deploy_hash::DeployHash, deploy_params::{ deploy_str_params::DeployStrParams, payment_str_params::PaymentStrParams, session_str_params::SessionStrParams, @@ -2225,7 +2225,7 @@ async function loadFile() { ```rust use casper_rust_wasm_sdk::types::{ - deploy_hash::DeployHash, + hash::deploy_hash::DeployHash, deploy_params::{ deploy_str_params::DeployStrParams, payment_str_params::PaymentStrParams, session_str_params::SessionStrParams, diff --git a/examples/desktop/electron/release/Casper Webclient 2.0.0.exe b/examples/desktop/electron/release/Casper Webclient 2.0.0.exe index f2359c23f..100d6cdd9 100644 Binary files a/examples/desktop/electron/release/Casper Webclient 2.0.0.exe and b/examples/desktop/electron/release/Casper Webclient 2.0.0.exe differ diff --git a/examples/desktop/electron/release/Casper Webclient-2.0.0.AppImage b/examples/desktop/electron/release/Casper Webclient-2.0.0.AppImage index 202408504..e19c1dfd8 100755 Binary files a/examples/desktop/electron/release/Casper Webclient-2.0.0.AppImage and b/examples/desktop/electron/release/Casper Webclient-2.0.0.AppImage differ diff --git a/examples/desktop/electron/release/builder-debug.yml b/examples/desktop/electron/release/builder-debug.yml index 2fb9717bc..f4510de60 100644 --- a/examples/desktop/electron/release/builder-debug.yml +++ b/examples/desktop/electron/release/builder-debug.yml @@ -34,4 +34,4 @@ x64: - index.js - favicon.png nsis: - script: "!include \"/opt2/casper/rustSDK/examples/desktop/electron/node_modules/app-builder-lib/templates/nsis/include/StdUtils.nsh\"\n!addincludedir \"/opt2/casper/rustSDK/examples/desktop/electron/node_modules/app-builder-lib/templates/nsis/include\"\n!macro _isUpdated _a _b _t _f\n ${StdUtils.TestParameter} $R9 \"updated\"\n StrCmp \"$R9\" \"true\" `${_t}` `${_f}`\n!macroend\n!define isUpdated `\"\" isUpdated \"\"`\n\n!macro _isForceRun _a _b _t _f\n ${StdUtils.TestParameter} $R9 \"force-run\"\n StrCmp \"$R9\" \"true\" `${_t}` `${_f}`\n!macroend\n!define isForceRun `\"\" isForceRun \"\"`\n\n!macro _isKeepShortcuts _a _b _t _f\n ${StdUtils.TestParameter} $R9 \"keep-shortcuts\"\n StrCmp \"$R9\" \"true\" `${_t}` `${_f}`\n!macroend\n!define isKeepShortcuts `\"\" isKeepShortcuts \"\"`\n\n!macro _isNoDesktopShortcut _a _b _t _f\n ${StdUtils.TestParameter} $R9 \"no-desktop-shortcut\"\n StrCmp \"$R9\" \"true\" `${_t}` `${_f}`\n!macroend\n!define isNoDesktopShortcut `\"\" isNoDesktopShortcut \"\"`\n\n!macro _isDeleteAppData _a _b _t _f\n ${StdUtils.TestParameter} $R9 \"delete-app-data\"\n StrCmp \"$R9\" \"true\" `${_t}` `${_f}`\n!macroend\n!define isDeleteAppData `\"\" isDeleteAppData \"\"`\n\n!macro _isForAllUsers _a _b _t _f\n ${StdUtils.TestParameter} $R9 \"allusers\"\n StrCmp \"$R9\" \"true\" `${_t}` `${_f}`\n!macroend\n!define isForAllUsers `\"\" isForAllUsers \"\"`\n\n!macro _isForCurrentUser _a _b _t _f\n ${StdUtils.TestParameter} $R9 \"currentuser\"\n StrCmp \"$R9\" \"true\" `${_t}` `${_f}`\n!macroend\n!define isForCurrentUser `\"\" isForCurrentUser \"\"`\n\n!macro addLangs\n !insertmacro MUI_LANGUAGE \"English\"\n !insertmacro MUI_LANGUAGE \"German\"\n !insertmacro MUI_LANGUAGE \"French\"\n !insertmacro MUI_LANGUAGE \"SpanishInternational\"\n !insertmacro MUI_LANGUAGE \"SimpChinese\"\n !insertmacro MUI_LANGUAGE \"TradChinese\"\n !insertmacro MUI_LANGUAGE \"Japanese\"\n !insertmacro MUI_LANGUAGE \"Korean\"\n !insertmacro MUI_LANGUAGE \"Italian\"\n !insertmacro MUI_LANGUAGE \"Dutch\"\n !insertmacro MUI_LANGUAGE \"Danish\"\n !insertmacro MUI_LANGUAGE \"Swedish\"\n !insertmacro MUI_LANGUAGE \"Norwegian\"\n !insertmacro MUI_LANGUAGE \"Finnish\"\n !insertmacro MUI_LANGUAGE \"Russian\"\n !insertmacro MUI_LANGUAGE \"Portuguese\"\n !insertmacro MUI_LANGUAGE \"PortugueseBR\"\n !insertmacro MUI_LANGUAGE \"Polish\"\n !insertmacro MUI_LANGUAGE \"Ukrainian\"\n !insertmacro MUI_LANGUAGE \"Czech\"\n !insertmacro MUI_LANGUAGE \"Slovak\"\n !insertmacro MUI_LANGUAGE \"Hungarian\"\n !insertmacro MUI_LANGUAGE \"Arabic\"\n !insertmacro MUI_LANGUAGE \"Turkish\"\n !insertmacro MUI_LANGUAGE \"Thai\"\n !insertmacro MUI_LANGUAGE \"Vietnamese\"\n!macroend\n\n!addplugindir /x86-unicode \"/home/greg/.cache/electron-builder/nsis/nsis-resources-3.4.1/plugins/x86-unicode\"\n!include \"/tmp/t-iaROBk/0-messages.nsh\"\n\n!include \"common.nsh\"\n!include \"extractAppPackage.nsh\"\n\n# https://github.com/electron-userland/electron-builder/issues/3972#issuecomment-505171582\nCRCCheck off\nWindowIcon Off\nAutoCloseWindow True\nRequestExecutionLevel ${REQUEST_EXECUTION_LEVEL}\n\nFunction .onInit\n !ifndef SPLASH_IMAGE\n SetSilent silent\n !endif\n\n !insertmacro check64BitAndSetRegView\nFunctionEnd\n\nFunction .onGUIInit\n InitPluginsDir\n\n !ifdef SPLASH_IMAGE\n File /oname=$PLUGINSDIR\\splash.bmp \"${SPLASH_IMAGE}\"\n BgImage::SetBg $PLUGINSDIR\\splash.bmp\n BgImage::Redraw\n !endif\nFunctionEnd\n\nSection\n !ifdef SPLASH_IMAGE\n HideWindow\n !endif\n\n StrCpy $INSTDIR \"$PLUGINSDIR\\app\"\n !ifdef UNPACK_DIR_NAME\n StrCpy $INSTDIR \"$TEMP\\${UNPACK_DIR_NAME}\"\n !endif\n\n RMDir /r $INSTDIR\n SetOutPath $INSTDIR\n\n !ifdef APP_DIR_64\n !ifdef APP_DIR_ARM64\n !ifdef APP_DIR_32\n ${if} ${IsNativeARM64}\n File /r \"${APP_DIR_ARM64}\\*.*\"\n ${elseif} ${RunningX64}\n File /r \"${APP_DIR_64}\\*.*\"\n ${else}\n File /r \"${APP_DIR_32}\\*.*\"\n ${endIf}\n !else\n ${if} ${IsNativeARM64}\n File /r \"${APP_DIR_ARM64}\\*.*\"\n ${else}\n File /r \"${APP_DIR_64}\\*.*\"\n {endIf}\n !endif\n !else\n !ifdef APP_DIR_32\n ${if} ${RunningX64}\n File /r \"${APP_DIR_64}\\*.*\"\n ${else}\n File /r \"${APP_DIR_32}\\*.*\"\n ${endIf}\n !else\n File /r \"${APP_DIR_64}\\*.*\"\n !endif\n !endif\n !else\n !ifdef APP_DIR_32\n File /r \"${APP_DIR_32}\\*.*\"\n !else\n !insertmacro extractEmbeddedAppPackage\n !endif\n !endif\n\n System::Call 'Kernel32::SetEnvironmentVariable(t, t)i (\"PORTABLE_EXECUTABLE_DIR\", \"$EXEDIR\").r0'\n System::Call 'Kernel32::SetEnvironmentVariable(t, t)i (\"PORTABLE_EXECUTABLE_FILE\", \"$EXEPATH\").r0'\n System::Call 'Kernel32::SetEnvironmentVariable(t, t)i (\"PORTABLE_EXECUTABLE_APP_FILENAME\", \"${APP_FILENAME}\").r0'\n ${StdUtils.GetAllParameters} $R0 0\n\n !ifdef SPLASH_IMAGE\n BgImage::Destroy\n !endif\n\n\tExecWait \"$INSTDIR\\${APP_EXECUTABLE_FILENAME} $R0\" $0\n SetErrorLevel $0\n\n SetOutPath $EXEDIR\n\tRMDir /r $INSTDIR\nSectionEnd\n" + script: "!include \"/opt2/casper/rustSDK/examples/desktop/electron/node_modules/app-builder-lib/templates/nsis/include/StdUtils.nsh\"\n!addincludedir \"/opt2/casper/rustSDK/examples/desktop/electron/node_modules/app-builder-lib/templates/nsis/include\"\n!macro _isUpdated _a _b _t _f\n ${StdUtils.TestParameter} $R9 \"updated\"\n StrCmp \"$R9\" \"true\" `${_t}` `${_f}`\n!macroend\n!define isUpdated `\"\" isUpdated \"\"`\n\n!macro _isForceRun _a _b _t _f\n ${StdUtils.TestParameter} $R9 \"force-run\"\n StrCmp \"$R9\" \"true\" `${_t}` `${_f}`\n!macroend\n!define isForceRun `\"\" isForceRun \"\"`\n\n!macro _isKeepShortcuts _a _b _t _f\n ${StdUtils.TestParameter} $R9 \"keep-shortcuts\"\n StrCmp \"$R9\" \"true\" `${_t}` `${_f}`\n!macroend\n!define isKeepShortcuts `\"\" isKeepShortcuts \"\"`\n\n!macro _isNoDesktopShortcut _a _b _t _f\n ${StdUtils.TestParameter} $R9 \"no-desktop-shortcut\"\n StrCmp \"$R9\" \"true\" `${_t}` `${_f}`\n!macroend\n!define isNoDesktopShortcut `\"\" isNoDesktopShortcut \"\"`\n\n!macro _isDeleteAppData _a _b _t _f\n ${StdUtils.TestParameter} $R9 \"delete-app-data\"\n StrCmp \"$R9\" \"true\" `${_t}` `${_f}`\n!macroend\n!define isDeleteAppData `\"\" isDeleteAppData \"\"`\n\n!macro _isForAllUsers _a _b _t _f\n ${StdUtils.TestParameter} $R9 \"allusers\"\n StrCmp \"$R9\" \"true\" `${_t}` `${_f}`\n!macroend\n!define isForAllUsers `\"\" isForAllUsers \"\"`\n\n!macro _isForCurrentUser _a _b _t _f\n ${StdUtils.TestParameter} $R9 \"currentuser\"\n StrCmp \"$R9\" \"true\" `${_t}` `${_f}`\n!macroend\n!define isForCurrentUser `\"\" isForCurrentUser \"\"`\n\n!macro addLangs\n !insertmacro MUI_LANGUAGE \"English\"\n !insertmacro MUI_LANGUAGE \"German\"\n !insertmacro MUI_LANGUAGE \"French\"\n !insertmacro MUI_LANGUAGE \"SpanishInternational\"\n !insertmacro MUI_LANGUAGE \"SimpChinese\"\n !insertmacro MUI_LANGUAGE \"TradChinese\"\n !insertmacro MUI_LANGUAGE \"Japanese\"\n !insertmacro MUI_LANGUAGE \"Korean\"\n !insertmacro MUI_LANGUAGE \"Italian\"\n !insertmacro MUI_LANGUAGE \"Dutch\"\n !insertmacro MUI_LANGUAGE \"Danish\"\n !insertmacro MUI_LANGUAGE \"Swedish\"\n !insertmacro MUI_LANGUAGE \"Norwegian\"\n !insertmacro MUI_LANGUAGE \"Finnish\"\n !insertmacro MUI_LANGUAGE \"Russian\"\n !insertmacro MUI_LANGUAGE \"Portuguese\"\n !insertmacro MUI_LANGUAGE \"PortugueseBR\"\n !insertmacro MUI_LANGUAGE \"Polish\"\n !insertmacro MUI_LANGUAGE \"Ukrainian\"\n !insertmacro MUI_LANGUAGE \"Czech\"\n !insertmacro MUI_LANGUAGE \"Slovak\"\n !insertmacro MUI_LANGUAGE \"Hungarian\"\n !insertmacro MUI_LANGUAGE \"Arabic\"\n !insertmacro MUI_LANGUAGE \"Turkish\"\n !insertmacro MUI_LANGUAGE \"Thai\"\n !insertmacro MUI_LANGUAGE \"Vietnamese\"\n!macroend\n\n!addplugindir /x86-unicode \"/home/greg/.cache/electron-builder/nsis/nsis-resources-3.4.1/plugins/x86-unicode\"\n!include \"/tmp/t-6sl3sj/0-messages.nsh\"\n\n!include \"common.nsh\"\n!include \"extractAppPackage.nsh\"\n\n# https://github.com/electron-userland/electron-builder/issues/3972#issuecomment-505171582\nCRCCheck off\nWindowIcon Off\nAutoCloseWindow True\nRequestExecutionLevel ${REQUEST_EXECUTION_LEVEL}\n\nFunction .onInit\n !ifndef SPLASH_IMAGE\n SetSilent silent\n !endif\n\n !insertmacro check64BitAndSetRegView\nFunctionEnd\n\nFunction .onGUIInit\n InitPluginsDir\n\n !ifdef SPLASH_IMAGE\n File /oname=$PLUGINSDIR\\splash.bmp \"${SPLASH_IMAGE}\"\n BgImage::SetBg $PLUGINSDIR\\splash.bmp\n BgImage::Redraw\n !endif\nFunctionEnd\n\nSection\n !ifdef SPLASH_IMAGE\n HideWindow\n !endif\n\n StrCpy $INSTDIR \"$PLUGINSDIR\\app\"\n !ifdef UNPACK_DIR_NAME\n StrCpy $INSTDIR \"$TEMP\\${UNPACK_DIR_NAME}\"\n !endif\n\n RMDir /r $INSTDIR\n SetOutPath $INSTDIR\n\n !ifdef APP_DIR_64\n !ifdef APP_DIR_ARM64\n !ifdef APP_DIR_32\n ${if} ${IsNativeARM64}\n File /r \"${APP_DIR_ARM64}\\*.*\"\n ${elseif} ${RunningX64}\n File /r \"${APP_DIR_64}\\*.*\"\n ${else}\n File /r \"${APP_DIR_32}\\*.*\"\n ${endIf}\n !else\n ${if} ${IsNativeARM64}\n File /r \"${APP_DIR_ARM64}\\*.*\"\n ${else}\n File /r \"${APP_DIR_64}\\*.*\"\n {endIf}\n !endif\n !else\n !ifdef APP_DIR_32\n ${if} ${RunningX64}\n File /r \"${APP_DIR_64}\\*.*\"\n ${else}\n File /r \"${APP_DIR_32}\\*.*\"\n ${endIf}\n !else\n File /r \"${APP_DIR_64}\\*.*\"\n !endif\n !endif\n !else\n !ifdef APP_DIR_32\n File /r \"${APP_DIR_32}\\*.*\"\n !else\n !insertmacro extractEmbeddedAppPackage\n !endif\n !endif\n\n System::Call 'Kernel32::SetEnvironmentVariable(t, t)i (\"PORTABLE_EXECUTABLE_DIR\", \"$EXEDIR\").r0'\n System::Call 'Kernel32::SetEnvironmentVariable(t, t)i (\"PORTABLE_EXECUTABLE_FILE\", \"$EXEPATH\").r0'\n System::Call 'Kernel32::SetEnvironmentVariable(t, t)i (\"PORTABLE_EXECUTABLE_APP_FILENAME\", \"${APP_FILENAME}\").r0'\n ${StdUtils.GetAllParameters} $R0 0\n\n !ifdef SPLASH_IMAGE\n BgImage::Destroy\n !endif\n\n\tExecWait \"$INSTDIR\\${APP_EXECUTABLE_FILENAME} $R0\" $0\n SetErrorLevel $0\n\n SetOutPath $EXEDIR\n\tRMDir /r $INSTDIR\nSectionEnd\n" diff --git a/examples/desktop/electron/release/casper-webclient_2.0.0_amd64.snap b/examples/desktop/electron/release/casper-webclient_2.0.0_amd64.snap index 28e4b081f..c50a6eab0 100644 Binary files a/examples/desktop/electron/release/casper-webclient_2.0.0_amd64.snap and b/examples/desktop/electron/release/casper-webclient_2.0.0_amd64.snap differ diff --git a/examples/frontend/angular/dist/casper/assets/casper_rust_wasm_sdk_bg.wasm b/examples/frontend/angular/dist/casper/assets/casper_rust_wasm_sdk_bg.wasm index 9a60cac58..977092a20 100644 Binary files a/examples/frontend/angular/dist/casper/assets/casper_rust_wasm_sdk_bg.wasm and b/examples/frontend/angular/dist/casper/assets/casper_rust_wasm_sdk_bg.wasm differ diff --git a/examples/frontend/angular/dist/casper/index.html b/examples/frontend/angular/dist/casper/index.html index c8b2f62e8..2a1baf5d6 100644 --- a/examples/frontend/angular/dist/casper/index.html +++ b/examples/frontend/angular/dist/casper/index.html @@ -11,5 +11,5 @@ - + diff --git a/examples/frontend/angular/dist/casper/main.2c4c22f578b031b8.js b/examples/frontend/angular/dist/casper/main.a1d4c9457ad5d5df.js similarity index 92% rename from examples/frontend/angular/dist/casper/main.2c4c22f578b031b8.js rename to examples/frontend/angular/dist/casper/main.a1d4c9457ad5d5df.js index 42d907e00..4e9d22d49 100644 --- a/examples/frontend/angular/dist/casper/main.2c4c22f578b031b8.js +++ b/examples/frontend/angular/dist/casper/main.a1d4c9457ad5d5df.js @@ -1 +1 @@ -"use strict";(self.webpackChunkcasper=self.webpackChunkcasper||[]).push([[792],{3435:(f,s,a)=>{var u=a(467);function g(e,n){return Object.is(e,n)}let y=null,v=!1,S=1;const A=Symbol("SIGNAL");function M(e){const n=y;return y=e,n}const le={version:0,lastCleanEpoch:0,dirty:!1,producerNode:void 0,producerLastReadVersion:void 0,producerIndexOfThis:void 0,nextProducerIndex:0,liveConsumerNode:void 0,liveConsumerIndexOfThis:void 0,consumerAllowSignalWrites:!1,consumerIsAlwaysLive:!1,producerMustRecompute:()=>!1,producerRecomputeValue:()=>{},consumerMarkedDirty:()=>{},consumerOnSignalRead:()=>{}};function ue(e){if(v)throw new Error("");if(null===y)return;y.consumerOnSignalRead(e);const n=y.nextProducerIndex++;Nn(y),ne.nextProducerIndex;)e.producerNode.pop(),e.producerLastReadVersion.pop(),e.producerIndexOfThis.pop()}}function In(e){Nn(e);for(let n=0;n0}function Nn(e){e.producerNode??=[],e.producerIndexOfThis??=[],e.producerLastReadVersion??=[]}function dr(e){e.liveConsumerNode??=[],e.liveConsumerIndexOfThis??=[]}function fr(e){return void 0!==e.producerNode}const Pi=Symbol("UNSET"),Vi=Symbol("COMPUTING"),Ts=Symbol("ERRORED"),vu={...le,value:Pi,dirty:!0,error:null,equal:g,producerMustRecompute:e=>e.value===Pi||e.value===Vi,producerRecomputeValue(e){if(e.value===Vi)throw new Error("Detected cycle in computations.");const n=e.value;e.value=Vi;const t=Tn(e);let r;try{r=e.computation()}catch(i){r=Ts,e.error=i}finally{Gn(e,t)}n!==Pi&&n!==Ts&&r!==Ts&&e.equal(n,r)?e.value=n:(e.value=r,e.version++)}};let Ma=function Eu(){throw new Error};function Tg(){Ma()}let Na=null;function Ig(e,n){Ft()||Tg(),e.equal(e.value,n)||(e.value=n,function DT(e){e.version++,function ot(){S++}(),st(e),Na?.()}(e))}const CT={...le,equal:g,value:void 0};function Ve(e){return"function"==typeof e}function Ng(e){const t=e(r=>{Error.call(r),r.stack=(new Error).stack});return t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t}const Su=Ng(e=>function(t){e(this),this.message=t?`${t.length} errors occurred during unsubscription:\n${t.map((r,i)=>`${i+1}) ${r.toString()}`).join("\n ")}`:"",this.name="UnsubscriptionError",this.errors=t});function Cu(e,n){if(e){const t=e.indexOf(n);0<=t&&e.splice(t,1)}}class Qt{constructor(n){this.initialTeardown=n,this.closed=!1,this._parentage=null,this._finalizers=null}unsubscribe(){let n;if(!this.closed){this.closed=!0;const{_parentage:t}=this;if(t)if(this._parentage=null,Array.isArray(t))for(const o of t)o.remove(this);else t.remove(this);const{initialTeardown:r}=this;if(Ve(r))try{r()}catch(o){n=o instanceof Su?o.errors:[o]}const{_finalizers:i}=this;if(i){this._finalizers=null;for(const o of i)try{Fg(o)}catch(c){n=n??[],c instanceof Su?n=[...n,...c.errors]:n.push(c)}}if(n)throw new Su(n)}}add(n){var t;if(n&&n!==this)if(this.closed)Fg(n);else{if(n instanceof Qt){if(n.closed||n._hasParent(this))return;n._addParent(this)}(this._finalizers=null!==(t=this._finalizers)&&void 0!==t?t:[]).push(n)}}_hasParent(n){const{_parentage:t}=this;return t===n||Array.isArray(t)&&t.includes(n)}_addParent(n){const{_parentage:t}=this;this._parentage=Array.isArray(t)?(t.push(n),t):t?[t,n]:n}_removeParent(n){const{_parentage:t}=this;t===n?this._parentage=null:Array.isArray(t)&&Cu(t,n)}remove(n){const{_finalizers:t}=this;t&&Cu(t,n),n instanceof Qt&&n._removeParent(this)}}Qt.EMPTY=(()=>{const e=new Qt;return e.closed=!0,e})();const Ag=Qt.EMPTY;function kg(e){return e instanceof Qt||e&&"closed"in e&&Ve(e.remove)&&Ve(e.add)&&Ve(e.unsubscribe)}function Fg(e){Ve(e)?e():e.unsubscribe()}const Pr={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},Aa={setTimeout(e,n,...t){const{delegate:r}=Aa;return r?.setTimeout?r.setTimeout(e,n,...t):setTimeout(e,n,...t)},clearTimeout(e){const{delegate:n}=Aa;return(n?.clearTimeout||clearTimeout)(e)},delegate:void 0};function Rg(e){Aa.setTimeout(()=>{const{onUnhandledError:n}=Pr;if(!n)throw e;n(e)})}function Og(){}const IT=Du("C",void 0,void 0);function Du(e,n,t){return{kind:e,value:n,error:t}}let Vr=null;function ka(e){if(Pr.useDeprecatedSynchronousErrorHandling){const n=!Vr;if(n&&(Vr={errorThrown:!1,error:null}),e(),n){const{errorThrown:t,error:r}=Vr;if(Vr=null,t)throw r}}else e()}class Tu extends Qt{constructor(n){super(),this.isStopped=!1,n?(this.destination=n,kg(n)&&n.add(this)):this.destination=OT}static create(n,t,r){return new Mu(n,t,r)}next(n){this.isStopped?Nu(function NT(e){return Du("N",e,void 0)}(n),this):this._next(n)}error(n){this.isStopped?Nu(function MT(e){return Du("E",void 0,e)}(n),this):(this.isStopped=!0,this._error(n))}complete(){this.isStopped?Nu(IT,this):(this.isStopped=!0,this._complete())}unsubscribe(){this.closed||(this.isStopped=!0,super.unsubscribe(),this.destination=null)}_next(n){this.destination.next(n)}_error(n){try{this.destination.error(n)}finally{this.unsubscribe()}}_complete(){try{this.destination.complete()}finally{this.unsubscribe()}}}const kT=Function.prototype.bind;function Iu(e,n){return kT.call(e,n)}class FT{constructor(n){this.partialObserver=n}next(n){const{partialObserver:t}=this;if(t.next)try{t.next(n)}catch(r){Fa(r)}}error(n){const{partialObserver:t}=this;if(t.error)try{t.error(n)}catch(r){Fa(r)}else Fa(n)}complete(){const{partialObserver:n}=this;if(n.complete)try{n.complete()}catch(t){Fa(t)}}}class Mu extends Tu{constructor(n,t,r){let i;if(super(),Ve(n)||!n)i={next:n??void 0,error:t??void 0,complete:r??void 0};else{let o;this&&Pr.useDeprecatedNextContext?(o=Object.create(n),o.unsubscribe=()=>this.unsubscribe(),i={next:n.next&&Iu(n.next,o),error:n.error&&Iu(n.error,o),complete:n.complete&&Iu(n.complete,o)}):i=n}this.destination=new FT(i)}}function Fa(e){Pr.useDeprecatedSynchronousErrorHandling?function AT(e){Pr.useDeprecatedSynchronousErrorHandling&&Vr&&(Vr.errorThrown=!0,Vr.error=e)}(e):Rg(e)}function Nu(e,n){const{onStoppedNotification:t}=Pr;t&&Aa.setTimeout(()=>t(e,n))}const OT={closed:!0,next:Og,error:function RT(e){throw e},complete:Og},Au="function"==typeof Symbol&&Symbol.observable||"@@observable";function xT(e){return e}let Rt=(()=>{class e{constructor(t){t&&(this._subscribe=t)}lift(t){const r=new e;return r.source=this,r.operator=t,r}subscribe(t,r,i){const o=function PT(e){return e&&e instanceof Tu||function LT(e){return e&&Ve(e.next)&&Ve(e.error)&&Ve(e.complete)}(e)&&kg(e)}(t)?t:new Mu(t,r,i);return ka(()=>{const{operator:c,source:l}=this;o.add(c?c.call(o,l):l?this._subscribe(o):this._trySubscribe(o))}),o}_trySubscribe(t){try{return this._subscribe(t)}catch(r){t.error(r)}}forEach(t,r){return new(r=Lg(r))((i,o)=>{const c=new Mu({next:l=>{try{t(l)}catch(_){o(_),c.unsubscribe()}},error:o,complete:i});this.subscribe(c)})}_subscribe(t){var r;return null===(r=this.source)||void 0===r?void 0:r.subscribe(t)}[Au](){return this}pipe(...t){return function xg(e){return 0===e.length?xT:1===e.length?e[0]:function(t){return e.reduce((r,i)=>i(r),t)}}(t)(this)}toPromise(t){return new(t=Lg(t))((r,i)=>{let o;this.subscribe(c=>o=c,c=>i(c),()=>r(o))})}}return e.create=n=>new e(n),e})();function Lg(e){var n;return null!==(n=e??Pr.Promise)&&void 0!==n?n:Promise}const VT=Ng(e=>function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"});let Wr=(()=>{class e extends Rt{constructor(){super(),this.closed=!1,this.currentObservers=null,this.observers=[],this.isStopped=!1,this.hasError=!1,this.thrownError=null}lift(t){const r=new Pg(this,this);return r.operator=t,r}_throwIfClosed(){if(this.closed)throw new VT}next(t){ka(()=>{if(this._throwIfClosed(),!this.isStopped){this.currentObservers||(this.currentObservers=Array.from(this.observers));for(const r of this.currentObservers)r.next(t)}})}error(t){ka(()=>{if(this._throwIfClosed(),!this.isStopped){this.hasError=this.isStopped=!0,this.thrownError=t;const{observers:r}=this;for(;r.length;)r.shift().error(t)}})}complete(){ka(()=>{if(this._throwIfClosed(),!this.isStopped){this.isStopped=!0;const{observers:t}=this;for(;t.length;)t.shift().complete()}})}unsubscribe(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null}get observed(){var t;return(null===(t=this.observers)||void 0===t?void 0:t.length)>0}_trySubscribe(t){return this._throwIfClosed(),super._trySubscribe(t)}_subscribe(t){return this._throwIfClosed(),this._checkFinalizedStatuses(t),this._innerSubscribe(t)}_innerSubscribe(t){const{hasError:r,isStopped:i,observers:o}=this;return r||i?Ag:(this.currentObservers=null,o.push(t),new Qt(()=>{this.currentObservers=null,Cu(o,t)}))}_checkFinalizedStatuses(t){const{hasError:r,thrownError:i,isStopped:o}=this;r?t.error(i):o&&t.complete()}asObservable(){const t=new Rt;return t.source=this,t}}return e.create=(n,t)=>new Pg(n,t),e})();class Pg extends Wr{constructor(n,t){super(),this.destination=n,this.source=t}next(n){var t,r;null===(r=null===(t=this.destination)||void 0===t?void 0:t.next)||void 0===r||r.call(t,n)}error(n){var t,r;null===(r=null===(t=this.destination)||void 0===t?void 0:t.error)||void 0===r||r.call(t,n)}complete(){var n,t;null===(t=null===(n=this.destination)||void 0===n?void 0:n.complete)||void 0===t||t.call(n)}_subscribe(n){var t,r;return null!==(r=null===(t=this.source)||void 0===t?void 0:t.subscribe(n))&&void 0!==r?r:Ag}}class ku extends Wr{constructor(n){super(),this._value=n}get value(){return this.getValue()}_subscribe(n){const t=super._subscribe(n);return!t.closed&&n.next(this._value),t}getValue(){const{hasError:n,thrownError:t,_value:r}=this;if(n)throw t;return this._throwIfClosed(),r}next(n){super.next(this._value=n)}}function jr(e){return n=>{if(function WT(e){return Ve(e?.lift)}(n))return n.lift(function(t){try{return e(t,this)}catch(r){this.error(r)}});throw new TypeError("Unable to lift unknown Observable type")}}function pr(e,n,t,r,i){return new jT(e,n,t,r,i)}class jT extends Tu{constructor(n,t,r,i,o,c){super(n),this.onFinalize=o,this.shouldUnsubscribe=c,this._next=t?function(l){try{t(l)}catch(_){n.error(_)}}:super._next,this._error=i?function(l){try{i(l)}catch(_){n.error(_)}finally{this.unsubscribe()}}:super._error,this._complete=r?function(){try{r()}catch(l){n.error(l)}finally{this.unsubscribe()}}:super._complete}unsubscribe(){var n;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){const{closed:t}=this;super.unsubscribe(),!t&&(null===(n=this.onFinalize)||void 0===n||n.call(this))}}}function gr(e,n){return jr((t,r)=>{let i=0;t.subscribe(pr(r,o=>{r.next(e.call(n,o,i++))}))})}typeof navigator<"u"&&navigator,typeof navigator<"u"&&!/Opera/.test(navigator.userAgent)&&navigator,typeof navigator<"u"&&(/MSIE/.test(navigator.userAgent)||navigator),typeof navigator<"u"&&!/Opera|WebKit/.test(navigator.userAgent)&&navigator,typeof navigator<"u"&&navigator;const nh="https://g.co/ng/security#xss";class k extends Error{constructor(n,t){super(function Is(e,n){return`NG0${Math.abs(e)}${n?": "+n:""}`}(n,t)),this.code=n}}function Kn(e){return{toString:e}.toString()}const Ns="__parameters__";function ks(e,n,t){return Kn(()=>{const r=function Wu(e){return function(...t){if(e){const r=e(...t);for(const i in r)this[i]=r[i]}}}(n);function i(...o){if(this instanceof i)return r.apply(this,o),this;const c=new i(...o);return l.annotation=c,l;function l(_,d,p){const h=_.hasOwnProperty(Ns)?_[Ns]:Object.defineProperty(_,Ns,{value:[]})[Ns];for(;h.length<=p;)h.push(null);return(h[p]=h[p]||[]).push(c),_}}return t&&(i.prototype=Object.create(t.prototype)),i.prototype.ngMetadataName=e,i.annotationCls=i,i})}const Fe=globalThis;function Ee(e){for(let n in e)if(e[n]===Ee)return n;throw Error("Could not find renamed property on target object.")}function BI(e,n){for(const t in n)n.hasOwnProperty(t)&&!e.hasOwnProperty(t)&&(e[t]=n[t])}function Je(e){if("string"==typeof e)return e;if(Array.isArray(e))return"["+e.map(Je).join(", ")+"]";if(null==e)return""+e;if(e.overriddenName)return`${e.overriddenName}`;if(e.name)return`${e.name}`;const n=e.toString();if(null==n)return""+n;const t=n.indexOf("\n");return-1===t?n:n.substring(0,t)}function ju(e,n){return null==e||""===e?null===n?"":n:null==n||""===n?e:e+" "+n}const HI=Ee({__forward_ref__:Ee});function Ie(e){return e.__forward_ref__=Ie,e.toString=function(){return Je(this())},e}function J(e){return Pa(e)?e():e}function Pa(e){return"function"==typeof e&&e.hasOwnProperty(HI)&&e.__forward_ref__===Ie}function Z(e){return{token:e.token,providedIn:e.providedIn||null,factory:e.factory,value:void 0}}function An(e){return{providers:e.providers||[],imports:e.imports||[]}}function Va(e){return oh(e,ja)||oh(e,ah)}function oh(e,n){return e.hasOwnProperty(n)?e[n]:null}function Wa(e){return e&&(e.hasOwnProperty(Bu)||e.hasOwnProperty(qI))?e[Bu]:null}const ja=Ee({\u0275prov:Ee}),Bu=Ee({\u0275inj:Ee}),ah=Ee({ngInjectableDef:Ee}),qI=Ee({ngInjectorDef:Ee});class W{constructor(n,t){this._desc=n,this.ngMetadataName="InjectionToken",this.\u0275prov=void 0,"number"==typeof t?this.__NG_ELEMENT_ID__=t:void 0!==t&&(this.\u0275prov=Z({token:this,providedIn:t.providedIn||"root",factory:t.factory}))}get multi(){return this}toString(){return`InjectionToken ${this._desc}`}}function Gu(e){return e&&!!e.\u0275providers}const ji=Ee({\u0275cmp:Ee}),qu=Ee({\u0275dir:Ee}),Ku=Ee({\u0275pipe:Ee}),Jn=Ee({\u0275fac:Ee}),Bi=Ee({__NG_ELEMENT_ID__:Ee}),uh=Ee({__NG_ENV_ID__:Ee});function ee(e){return"string"==typeof e?e:null==e?"":String(e)}function Ju(e,n){throw new k(-201,!1)}var _e=function(e){return e[e.Default=0]="Default",e[e.Host=1]="Host",e[e.Self=2]="Self",e[e.SkipSelf=4]="SkipSelf",e[e.Optional=8]="Optional",e}(_e||{});let Zu;function _h(){return Zu}function Ot(e){const n=Zu;return Zu=e,n}function dh(e,n,t){const r=Va(e);return r&&"root"==r.providedIn?void 0===r.value?r.value=r.factory():r.value:t&_e.Optional?null:void 0!==n?n:void Ju()}const Hi={},Qu="__NG_DI_FLAG__",Ba="ngTempTokenPath",XI=/\n/gm,fh="__source";let Fs;function wr(e){const n=Fs;return Fs=e,n}function n1(e,n=_e.Default){if(void 0===Fs)throw new k(-203,!1);return null===Fs?dh(e,void 0,n):Fs.get(e,n&_e.Optional?null:void 0,n)}function U(e,n=_e.Default){return(_h()||n1)(J(e),n)}function j(e,n=_e.Default){return U(e,Ha(n))}function Ha(e){return typeof e>"u"||"number"==typeof e?e:(e.optional&&8)|(e.host&&1)|(e.self&&2)|(e.skipSelf&&4)}function Yu(e){const n=[];for(let t=0;tArray.isArray(t)?Rs(t,n):n(t))}function gh(e,n,t){n>=e.length?e.push(t):e.splice(n,0,t)}function za(e,n){return n>=e.length-1?e.pop():e.splice(n,1)[0]}function zt(e,n,t){let r=Os(e,n);return r>=0?e[1|r]=t:(r=~r,function hh(e,n,t,r){let i=e.length;if(i==n)e.push(t,r);else if(1===i)e.push(r,e[0]),e[0]=t;else{for(i--,e.push(e[i-1],e[i]);i>n;)e[i]=e[i-2],i--;e[n]=t,e[n+1]=r}}(e,r,n,t)),r}function n_(e,n){const t=Os(e,n);if(t>=0)return e[1|t]}function Os(e,n){return function mh(e,n,t){let r=0,i=e.length>>t;for(;i!==r;){const o=r+(i-r>>1),c=e[o<n?i=o:r=o+1}return~(i<n){c=o-1;break}}}for(;o-1){let o;for(;++io?"":i[p+1].toLowerCase(),2&r&&d!==h){if(_n(r))return!1;c=!0}}}}else{if(!c&&!_n(r)&&!_n(_))return!1;if(c&&_n(_))continue;c=!1,r=_|1&r}}return _n(r)||c}function _n(e){return!(1&e)}function p1(e,n,t,r){if(null===n)return-1;let i=0;if(r||!t){let o=!1;for(;i-1)for(t++;t0?'="'+l+'"':"")+"]"}else 8&r?i+="."+c:4&r&&(i+=" "+c);else""!==i&&!_n(c)&&(n+=Ch(o,i),i=""),r=c,o=o||!_n(r);t++}return""!==i&&(n+=Ch(o,i)),n}function ut(e){return Kn(()=>{const n=Th(e),t={...n,decls:e.decls,vars:e.vars,template:e.template,consts:e.consts||null,ngContentSelectors:e.ngContentSelectors,onPush:e.changeDetection===Ga.OnPush,directiveDefs:null,pipeDefs:null,dependencies:n.standalone&&e.dependencies||null,getStandaloneInjector:null,signals:e.signals??!1,data:e.data||{},encapsulation:e.encapsulation||un.Emulated,styles:e.styles||fe,_:null,schemas:e.schemas||null,tView:null,id:""};Ih(t);const r=e.dependencies;return t.directiveDefs=qa(r,!1),t.pipeDefs=qa(r,!0),t.id=function D1(e){let n=0;const t=[e.selectors,e.ngContentSelectors,e.hostVars,e.hostAttrs,e.consts,e.vars,e.decls,e.encapsulation,e.standalone,e.signals,e.exportAs,JSON.stringify(e.inputs),JSON.stringify(e.outputs),Object.getOwnPropertyNames(e.type.prototype),!!e.contentQueries,!!e.viewQuery].join("|");for(const i of t)n=Math.imul(31,n)+i.charCodeAt(0)|0;return n+=2147483648,"c"+n}(t),t})}function E1(e){return oe(e)||Ze(e)}function S1(e){return null!==e}function Zn(e){return Kn(()=>({type:e.type,bootstrap:e.bootstrap||fe,declarations:e.declarations||fe,imports:e.imports||fe,exports:e.exports||fe,transitiveCompileScopes:null,schemas:e.schemas||null,id:e.id||null}))}function Dh(e,n){if(null==e)return kn;const t={};for(const r in e)if(e.hasOwnProperty(r)){const i=e[r];let o,c,l=yr.None;Array.isArray(i)?(l=i[0],o=i[1],c=i[2]??o):(o=i,c=i),n?(t[o]=l!==yr.None?[r,l]:r,n[o]=c):t[o]=r}return t}function ne(e){return Kn(()=>{const n=Th(e);return Ih(n),n})}function oe(e){return e[ji]||null}function Ze(e){return e[qu]||null}function at(e){return e[Ku]||null}function Th(e){const n={};return{type:e.type,providersResolver:null,factory:null,hostBindings:e.hostBindings||null,hostVars:e.hostVars||0,hostAttrs:e.hostAttrs||null,contentQueries:e.contentQueries||null,declaredInputs:n,inputTransforms:null,inputConfig:e.inputs||kn,exportAs:e.exportAs||null,standalone:!0===e.standalone,signals:!0===e.signals,selectors:e.selectors||fe,viewQuery:e.viewQuery||null,features:e.features||null,setInput:null,findHostDirectiveDefs:null,hostDirectives:null,inputs:Dh(e.inputs,n),outputs:Dh(e.outputs),debugInfo:null}}function Ih(e){e.features?.forEach(n=>n(e))}function qa(e,n){if(!e)return null;const t=n?at:E1;return()=>("function"==typeof e?e():e).map(r=>t(r)).filter(S1)}function Mh(...e){return{\u0275providers:o_(0,e),\u0275fromNgModule:!0}}function o_(e,...n){const t=[],r=new Set;let i;const o=c=>{t.push(c)};return Rs(n,c=>{const l=c;Ka(l,o,[],r)&&(i||=[],i.push(l))}),void 0!==i&&Nh(i,o),t}function Nh(e,n){for(let t=0;t{n(o,r)})}}function Ka(e,n,t,r){if(!(e=J(e)))return!1;let i=null,o=Wa(e);const c=!o&&oe(e);if(o||c){if(c&&!c.standalone)return!1;i=e}else{const _=e.ngModule;if(o=Wa(_),!o)return!1;i=_}const l=r.has(i);if(c){if(l)return!1;if(r.add(i),c.dependencies){const _="function"==typeof c.dependencies?c.dependencies():c.dependencies;for(const d of _)Ka(d,n,t,r)}}else{if(!o)return!1;{if(null!=o.imports&&!l){let d;r.add(i);try{Rs(o.imports,p=>{Ka(p,n,t,r)&&(d||=[],d.push(p))})}finally{}void 0!==d&&Nh(d,n)}if(!l){const d=Hr(i)||(()=>new i);n({provide:i,useFactory:d,deps:fe},i),n({provide:r_,useValue:i,multi:!0},i),n({provide:Fn,useValue:()=>U(i),multi:!0},i)}const _=o.providers;if(null!=_&&!l){const d=e;a_(_,p=>{n(p,d)})}}}return i!==e&&void 0!==e.providers}function a_(e,n){for(let t of e)Gu(t)&&(t=t.\u0275providers),Array.isArray(t)?a_(t,n):n(t)}const T1=Ee({provide:String,useValue:Ee});function c_(e){return null!==e&&"object"==typeof e&&T1 in e}function Ur(e){return"function"==typeof e}const l_=new W(""),Ja={},M1={};let u_;function Za(){return void 0===u_&&(u_=new $a),u_}class Yt{}class xs extends Yt{get destroyed(){return this._destroyed}constructor(n,t,r,i){super(),this.parent=t,this.source=r,this.scopes=i,this.records=new Map,this._ngOnDestroyHooks=new Set,this._onDestroyHooks=[],this._destroyed=!1,d_(n,c=>this.processProvider(c)),this.records.set(wh,Ls(void 0,this)),i.has("environment")&&this.records.set(Yt,Ls(void 0,this));const o=this.records.get(l_);null!=o&&"string"==typeof o.value&&this.scopes.add(o.value),this.injectorDefTypes=new Set(this.get(r_,fe,_e.Self))}destroy(){this.assertNotDestroyed(),this._destroyed=!0;const n=M(null);try{for(const r of this._ngOnDestroyHooks)r.ngOnDestroy();const t=this._onDestroyHooks;this._onDestroyHooks=[];for(const r of t)r()}finally{this.records.clear(),this._ngOnDestroyHooks.clear(),this.injectorDefTypes.clear(),M(n)}}onDestroy(n){return this.assertNotDestroyed(),this._onDestroyHooks.push(n),()=>this.removeOnDestroy(n)}runInContext(n){this.assertNotDestroyed();const t=wr(this),r=Ot(void 0);try{return n()}finally{wr(t),Ot(r)}}get(n,t=Hi,r=_e.Default){if(this.assertNotDestroyed(),n.hasOwnProperty(uh))return n[uh](this);r=Ha(r);const o=wr(this),c=Ot(void 0);try{if(!(r&_e.SkipSelf)){let _=this.records.get(n);if(void 0===_){const d=function R1(e){return"function"==typeof e||"object"==typeof e&&e instanceof W}(n)&&Va(n);_=d&&this.injectableDefInScope(d)?Ls(__(n),Ja):null,this.records.set(n,_)}if(null!=_)return this.hydrate(n,_)}return(r&_e.Self?Za():this.parent).get(n,t=r&_e.Optional&&t===Hi?null:t)}catch(l){if("NullInjectorError"===l.name){if((l[Ba]=l[Ba]||[]).unshift(Je(n)),o)throw l;return function s1(e,n,t,r){const i=e[Ba];throw n[fh]&&i.unshift(n[fh]),e.message=function i1(e,n,t,r=null){e=e&&"\n"===e.charAt(0)&&"\u0275"==e.charAt(1)?e.slice(2):e;let i=Je(n);if(Array.isArray(n))i=n.map(Je).join(" -> ");else if("object"==typeof n){let o=[];for(let c in n)if(n.hasOwnProperty(c)){let l=n[c];o.push(c+":"+("string"==typeof l?JSON.stringify(l):Je(l)))}i=`{${o.join(", ")}}`}return`${t}${r?"("+r+")":""}[${i}]: ${e.replace(XI,"\n ")}`}("\n"+e.message,i,t,r),e.ngTokenPath=i,e[Ba]=null,e}(l,n,"R3InjectorError",this.source)}throw l}finally{Ot(c),wr(o)}}resolveInjectorInitializers(){const n=M(null),t=wr(this),r=Ot(void 0);try{const o=this.get(Fn,fe,_e.Self);for(const c of o)c()}finally{wr(t),Ot(r),M(n)}}toString(){const n=[],t=this.records;for(const r of t.keys())n.push(Je(r));return`R3Injector[${n.join(", ")}]`}assertNotDestroyed(){if(this._destroyed)throw new k(205,!1)}processProvider(n){let t=Ur(n=J(n))?n:J(n&&n.provide);const r=function A1(e){return c_(e)?Ls(void 0,e.useValue):Ls(Fh(e),Ja)}(n);if(!Ur(n)&&!0===n.multi){let i=this.records.get(t);i||(i=Ls(void 0,Ja,!0),i.factory=()=>Yu(i.multi),this.records.set(t,i)),t=n,i.multi.push(n)}this.records.set(t,r)}hydrate(n,t){const r=M(null);try{return t.value===Ja&&(t.value=M1,t.value=t.factory()),"object"==typeof t.value&&t.value&&function F1(e){return null!==e&&"object"==typeof e&&"function"==typeof e.ngOnDestroy}(t.value)&&this._ngOnDestroyHooks.add(t.value),t.value}finally{M(r)}}injectableDefInScope(n){if(!n.providedIn)return!1;const t=J(n.providedIn);return"string"==typeof t?"any"===t||this.scopes.has(t):this.injectorDefTypes.has(t)}removeOnDestroy(n){const t=this._onDestroyHooks.indexOf(n);-1!==t&&this._onDestroyHooks.splice(t,1)}}function __(e){const n=Va(e),t=null!==n?n.factory:Hr(e);if(null!==t)return t;if(e instanceof W)throw new k(204,!1);if(e instanceof Function)return function N1(e){if(e.length>0)throw new k(204,!1);const t=function GI(e){return e&&(e[ja]||e[ah])||null}(e);return null!==t?()=>t.factory(e):()=>new e}(e);throw new k(204,!1)}function Fh(e,n,t){let r;if(Ur(e)){const i=J(e);return Hr(i)||__(i)}if(c_(e))r=()=>J(e.useValue);else if(function kh(e){return!(!e||!e.useFactory)}(e))r=()=>e.useFactory(...Yu(e.deps||[]));else if(function Ah(e){return!(!e||!e.useExisting)}(e))r=()=>U(J(e.useExisting));else{const i=J(e&&(e.useClass||e.provide));if(!function k1(e){return!!e.deps}(e))return Hr(i)||__(i);r=()=>new i(...Yu(e.deps))}return r}function Ls(e,n,t=!1){return{factory:e,value:n,multi:t?[]:void 0}}function d_(e,n){for(const t of e)Array.isArray(t)?d_(t,n):t&&Gu(t)?d_(t.\u0275providers,n):n(t)}const Oe=0,F=1,$=2,Ue=3,dn=4,ct=5,yt=6,Vs=7,Me=8,$e=9,Rn=10,Q=11,qi=12,Lh=13,Ws=14,xe=15,$r=16,js=17,Qn=18,Bs=19,Ph=20,br=21,Xa=22,Xt=23,z=25,p_=1,On=7,Hs=9,We=10;var tc=function(e){return e[e.None=0]="None",e[e.HasTransplantedViews=2]="HasTransplantedViews",e}(tc||{});function Ye(e){return Array.isArray(e)&&"object"==typeof e[p_]}function dt(e){return Array.isArray(e)&&!0===e[p_]}function g_(e){return!!(4&e.flags)}function Gr(e){return e.componentOffset>-1}function nc(e){return!(1&~e.flags)}function fn(e){return!!e.template}function Ji(e){return!!(512&e[$])}class G1{constructor(n,t,r){this.previousValue=n,this.currentValue=t,this.firstChange=r}isFirstChange(){return this.firstChange}}function Bh(e,n,t,r){null!==n?n.applyValueToInputSignal(n,r):e[t]=r}function Yn(){return Hh}function Hh(e){return e.type.prototype.ngOnChanges&&(e.setInput=K1),q1}function q1(){const e=Uh(this),n=e?.current;if(n){const t=e.previous;if(t===kn)e.previous=n;else for(let r in n)t[r]=n[r];e.current=null,this.ngOnChanges(n)}}function K1(e,n,t,r,i){const o=this.declaredInputs[r],c=Uh(e)||function J1(e,n){return e[zh]=n}(e,{previous:kn,current:null}),l=c.current||(c.current={}),_=c.previous,d=_[o];l[o]=new G1(d&&d.currentValue,t,_===kn),Bh(e,n,i,t)}Yn.ngInherit=!0;const zh="__ngSimpleChanges__";function Uh(e){return e[zh]||null}const xn=function(e,n,t){},$h="svg";function pe(e){for(;Array.isArray(e);)e=e[Oe];return e}function Zi(e,n){return pe(n[e])}function bt(e,n){return pe(n[e.index])}function Qi(e,n){return e.data[n]}function Ut(e,n){const t=n[e];return Ye(t)?t:t[Oe]}function b_(e){return!(128&~e[$])}function en(e,n){return null==n?null:e[n]}function qh(e){e[js]=0}function Kh(e){1024&e[$]||(e[$]|=1024,b_(e)&&rc(e))}function Yi(e){return!!(9216&e[$]||e[Xt]?.dirty)}function v_(e){e[Rn].changeDetectionScheduler?.notify(7),64&e[$]&&(e[$]|=1024),Yi(e)&&rc(e)}function rc(e){e[Rn].changeDetectionScheduler?.notify(0);let n=Xn(e);for(;null!==n&&!(8192&n[$])&&(n[$]|=8192,b_(n));)n=Xn(n)}function sc(e,n){if(!(256&~e[$]))throw new k(911,!1);null===e[br]&&(e[br]=[]),e[br].push(n)}function Xn(e){const n=e[Ue];return dt(n)?n[Ue]:n}const Y={lFrame:am(null),bindingsEnabled:!0,skipHydrationRootTNode:null};let Zh=!1;function Qh(){return Y.bindingsEnabled}function Kr(){return null!==Y.skipHydrationRootTNode}function I(){return Y.lFrame.lView}function se(){return Y.lFrame.tView}function ge(e){return Y.lFrame.contextLView=e,e[Me]}function he(e){return Y.lFrame.contextLView=null,e}function Se(){let e=Yh();for(;null!==e&&64===e.type;)e=e.parent;return e}function Yh(){return Y.lFrame.currentTNode}function pn(e,n){const t=Y.lFrame;t.currentTNode=e,t.isParent=n}function C_(){return Y.lFrame.isParent}function D_(){Y.lFrame.isParent=!1}function tm(){return Zh}function nm(e){Zh=e}function vt(){const e=Y.lFrame;let n=e.bindingRootIndex;return-1===n&&(n=e.bindingRootIndex=e.tView.bindingStartIndex),n}function gn(){return Y.lFrame.bindingIndex++}function tr(e){const n=Y.lFrame,t=n.bindingIndex;return n.bindingIndex=n.bindingIndex+e,t}function lM(e,n){const t=Y.lFrame;t.bindingIndex=t.bindingRootIndex=e,T_(n)}function T_(e){Y.lFrame.currentDirectiveIndex=e}function M_(){return Y.lFrame.currentQueryIndex}function oc(e){Y.lFrame.currentQueryIndex=e}function _M(e){const n=e[F];return 2===n.type?n.declTNode:1===n.type?e[ct]:null}function im(e,n,t){if(t&_e.SkipSelf){let i=n,o=e;for(;!(i=i.parent,null!==i||t&_e.Host||(i=_M(o),null===i||(o=o[Ws],10&i.type))););if(null===i)return!1;n=i,e=o}const r=Y.lFrame=om();return r.currentTNode=n,r.lView=e,!0}function N_(e){const n=om(),t=e[F];Y.lFrame=n,n.currentTNode=t.firstChild,n.lView=e,n.tView=t,n.contextLView=e,n.bindingIndex=t.bindingStartIndex,n.inI18n=!1}function om(){const e=Y.lFrame,n=null===e?null:e.child;return null===n?am(e):n}function am(e){const n={currentTNode:null,isParent:!0,lView:null,tView:null,selectedIndex:-1,contextLView:null,elementDepthCount:0,currentNamespace:null,currentDirectiveIndex:-1,bindingRootIndex:-1,bindingIndex:-1,currentQueryIndex:0,parent:e,child:null,inI18n:!1};return null!==e&&(e.child=n),n}function cm(){const e=Y.lFrame;return Y.lFrame=e.parent,e.currentTNode=null,e.lView=null,e}const lm=cm;function A_(){const e=cm();e.isParent=!0,e.tView=null,e.selectedIndex=-1,e.contextLView=null,e.elementDepthCount=0,e.currentDirectiveIndex=-1,e.currentNamespace=null,e.bindingRootIndex=-1,e.bindingIndex=-1,e.currentQueryIndex=0}function lt(){return Y.lFrame.selectedIndex}function Jr(e){Y.lFrame.selectedIndex=e}function Ne(){const e=Y.lFrame;return Qi(e.tView,e.selectedIndex)}function ac(){Y.lFrame.currentNamespace=$h}let dm=!0;function eo(){return dm}function Ln(e){dm=e}function cc(e,n){for(let t=n.directiveStart,r=n.directiveEnd;t=r)break}else n[_]<0&&(e[js]+=65536),(l>14>16&&(3&e[$])===n&&(e[$]+=16384,pm(l,o)):pm(l,o)}const zs=-1;class to{constructor(n,t,r){this.factory=n,this.resolving=!1,this.canSeeViewProviders=t,this.injectImpl=r}}const R_={};class Zr{constructor(n,t){this.injector=n,this.parentInjector=t}get(n,t,r){r=Ha(r);const i=this.injector.get(n,R_,r);return i!==R_||t===R_?i:this.parentInjector.get(n,t,r)}}function O_(e){return e!==zs}function no(e){return 32767&e}function ro(e,n){let t=function bM(e){return e>>16}(e),r=n;for(;t>0;)r=r[Ws],t--;return r}let x_=!0;function _c(e){const n=x_;return x_=e,n}const hm=255,mm=5;let EM=0;const Pn={};function dc(e,n){const t=wm(e,n);if(-1!==t)return t;const r=n[F];r.firstCreatePass&&(e.injectorIndex=n.length,L_(r.data,e),L_(n,null),L_(r.blueprint,null));const i=fc(e,n),o=e.injectorIndex;if(O_(i)){const c=no(i),l=ro(i,n),_=l[F].data;for(let d=0;d<8;d++)n[o+d]=l[c+d]|_[c+d]}return n[o+8]=i,o}function L_(e,n){e.push(0,0,0,0,0,0,0,0,n)}function wm(e,n){return-1===e.injectorIndex||e.parent&&e.parent.injectorIndex===e.injectorIndex||null===n[e.injectorIndex+8]?-1:e.injectorIndex}function fc(e,n){if(e.parent&&-1!==e.parent.injectorIndex)return e.parent.injectorIndex;let t=0,r=null,i=n;for(;null!==i;){if(r=Dm(i),null===r)return zs;if(t++,i=i[Ws],-1!==r.injectorIndex)return r.injectorIndex|t<<16}return zs}function P_(e,n,t){!function SM(e,n,t){let r;"string"==typeof t?r=t.charCodeAt(0)||0:t.hasOwnProperty(Bi)&&(r=t[Bi]),null==r&&(r=t[Bi]=EM++);const i=r&hm;n.data[e+(i>>mm)]|=1<=0?n&hm:IM:n}(t);if("function"==typeof o){if(!im(n,e,r))return r&_e.Host?ym(i,0,r):bm(n,t,r,i);try{let c;if(c=o(r),null!=c||r&_e.Optional)return c;Ju()}finally{lm()}}else if("number"==typeof o){let c=null,l=wm(e,n),_=zs,d=r&_e.Host?n[xe][ct]:null;for((-1===l||r&_e.SkipSelf)&&(_=-1===l?fc(e,n):n[l+8],_!==zs&&Cm(r,!1)?(c=n[F],l=no(_),n=ro(_,n)):l=-1);-1!==l;){const p=n[F];if(Sm(o,l,p.data)){const h=DM(l,n,t,c,r,d);if(h!==Pn)return h}_=n[l+8],_!==zs&&Cm(r,n[F].data[l+8]===d)&&Sm(o,l,n)?(c=p,l=no(_),n=ro(_,n)):l=-1}}return i}function DM(e,n,t,r,i,o){const c=n[F],l=c.data[e+8],p=pc(l,c,t,null==r?Gr(l)&&x_:r!=c&&!!(3&l.type),i&_e.Host&&o===l);return null!==p?Qr(n,c,p,l):Pn}function pc(e,n,t,r,i){const o=e.providerIndexes,c=n.data,l=1048575&o,_=e.directiveStart,p=o>>20,m=i?l+p:e.directiveEnd;for(let w=r?l:l+p;w=_&&b.type===t)return w}if(i){const w=c[_];if(w&&fn(w)&&w.type===t)return _}return null}function Qr(e,n,t,r){let i=e[t];const o=n.data;if(function mM(e){return e instanceof to}(i)){const c=i;c.resolving&&function ZI(e,n){throw n&&n.join(" > "),new k(-200,e)}(function me(e){return"function"==typeof e?e.name||e.toString():"object"==typeof e&&null!=e&&"function"==typeof e.type?e.type.name||e.type.toString():ee(e)}(o[t]));const l=_c(c.canSeeViewProviders);c.resolving=!0;const d=c.injectImpl?Ot(c.injectImpl):null;im(e,r,_e.Default);try{i=e[t]=c.factory(void 0,o,e,r),n.firstCreatePass&&t>=r.directiveStart&&function gM(e,n,t){const{ngOnChanges:r,ngOnInit:i,ngDoCheck:o}=n.type.prototype;if(r){const c=Hh(n);(t.preOrderHooks??=[]).push(e,c),(t.preOrderCheckHooks??=[]).push(e,c)}i&&(t.preOrderHooks??=[]).push(0-e,i),o&&((t.preOrderHooks??=[]).push(e,o),(t.preOrderCheckHooks??=[]).push(e,o))}(t,o[t],n)}finally{null!==d&&Ot(d),_c(l),c.resolving=!1,lm()}}return i}function Sm(e,n,t){return!!(t[n+(e>>mm)]&1<{const n=e.prototype.constructor,t=n[Jn]||V_(n),r=Object.prototype;let i=Object.getPrototypeOf(e.prototype).constructor;for(;i&&i!==r;){const o=i[Jn]||V_(i);if(o&&o!==t)return o;i=Object.getPrototypeOf(i)}return o=>new o})}function V_(e){return Pa(e)?()=>{const n=V_(J(e));return n&&n()}:Hr(e)}function Dm(e){const n=e[F],t=n.type;return 2===t?n.declTNode:1===t?e[ct]:null}function Am(e,n=null,t=null,r){const i=function km(e,n=null,t=null,r,i=new Set){const o=[t||fe,Mh(e)];return r=r||("object"==typeof e?void 0:Je(e)),new xs(o,n||Za(),r||null,i)}(e,n,t,r);return i.resolveInjectorInitializers(),i}class et{static{this.THROW_IF_NOT_FOUND=Hi}static{this.NULL=new $a}static create(n,t){if(Array.isArray(n))return Am({name:""},t,n,"");{const r=n.name??"";return Am({name:r},n.parent,n.providers,r)}}static{this.\u0275prov=Z({token:et,providedIn:"any",factory:()=>U(wh)})}static{this.__NG_ELEMENT_ID__=-1}}new W("").__NG_ELEMENT_ID__=e=>{const n=Se();if(null===n)throw new k(204,!1);if(2&n.type)return n.value;if(e&_e.Optional)return null;throw new k(204,!1)};function j_(e){return e.ngOriginalError}let so=(()=>{class e{static{this.__NG_ELEMENT_ID__=VM}static{this.__NG_ENV_ID__=t=>t}}return e})();class PM extends so{constructor(n){super(),this._lView=n}onDestroy(n){return sc(this._lView,n),()=>function E_(e,n){if(null===e[br])return;const t=e[br].indexOf(n);-1!==t&&e[br].splice(t,1)}(this._lView,n)}}function VM(){return new PM(I())}let vr=(()=>{class e{constructor(){this.taskId=0,this.pendingTasks=new Set,this.hasPendingTasks=new ku(!1)}get _hasPendingTasks(){return this.hasPendingTasks.value}add(){this._hasPendingTasks||this.hasPendingTasks.next(!0);const t=this.taskId++;return this.pendingTasks.add(t),t}remove(t){this.pendingTasks.delete(t),0===this.pendingTasks.size&&this._hasPendingTasks&&this.hasPendingTasks.next(!1)}ngOnDestroy(){this.pendingTasks.clear(),this._hasPendingTasks&&this.hasPendingTasks.next(!1)}static{this.\u0275prov=Z({token:e,providedIn:"root",factory:()=>new e})}}return e})();const Re=class WM extends Wr{constructor(n=!1){super(),this.destroyRef=void 0,this.pendingTasks=void 0,this.__isAsync=n,function Oh(){return void 0!==_h()||null!=function t1(){return Fs}()}()&&(this.destroyRef=j(so,{optional:!0})??void 0,this.pendingTasks=j(vr,{optional:!0})??void 0)}emit(n){const t=M(null);try{super.next(n)}finally{M(t)}}subscribe(n,t,r){let i=n,o=t||(()=>null),c=r;if(n&&"object"==typeof n){const _=n;i=_.next?.bind(_),o=_.error?.bind(_),c=_.complete?.bind(_)}this.__isAsync&&(o=this.wrapInTimeout(o),i&&(i=this.wrapInTimeout(i)),c&&(c=this.wrapInTimeout(c)));const l=super.subscribe({next:i,error:o,complete:c});return n instanceof Qt&&n.add(l),l}wrapInTimeout(n){return t=>{const r=this.pendingTasks?.add();setTimeout(()=>{n(t),void 0!==r&&this.pendingTasks?.remove(r)})}}};function mc(...e){}function Rm(e){let n,t;function r(){e=mc;try{void 0!==t&&"function"==typeof cancelAnimationFrame&&cancelAnimationFrame(t),void 0!==n&&clearTimeout(n)}catch{}}return n=setTimeout(()=>{e(),r()}),"function"==typeof requestAnimationFrame&&(t=requestAnimationFrame(()=>{e(),r()})),()=>r()}function Om(e){return queueMicrotask(()=>e()),()=>{e=mc}}class ve{constructor({enableLongStackTrace:n=!1,shouldCoalesceEventChangeDetection:t=!1,shouldCoalesceRunChangeDetection:r=!1}){if(this.hasPendingMacrotasks=!1,this.hasPendingMicrotasks=!1,this.isStable=!0,this.onUnstable=new Re(!1),this.onMicrotaskEmpty=new Re(!1),this.onStable=new Re(!1),this.onError=new Re(!1),typeof Zone>"u")throw new k(908,!1);Zone.assertZonePatched();const i=this;i._nesting=0,i._outer=i._inner=Zone.current,Zone.TaskTrackingZoneSpec&&(i._inner=i._inner.fork(new Zone.TaskTrackingZoneSpec)),n&&Zone.longStackTraceZoneSpec&&(i._inner=i._inner.fork(Zone.longStackTraceZoneSpec)),i.shouldCoalesceEventChangeDetection=!r&&t,i.shouldCoalesceRunChangeDetection=r,i.callbackScheduled=!1,function HM(e){const n=()=>{!function BM(e){e.isCheckStableRunning||e.callbackScheduled||(e.callbackScheduled=!0,Zone.root.run(()=>{Rm(()=>{e.callbackScheduled=!1,H_(e),e.isCheckStableRunning=!0,B_(e),e.isCheckStableRunning=!1})}),H_(e))}(e)};e._inner=e._inner.fork({name:"angular",properties:{isAngularZone:!0},onInvokeTask:(t,r,i,o,c,l)=>{if(function zM(e){return Pm(e,"__ignore_ng_zone__")}(l))return t.invokeTask(i,o,c,l);try{return xm(e),t.invokeTask(i,o,c,l)}finally{(e.shouldCoalesceEventChangeDetection&&"eventTask"===o.type||e.shouldCoalesceRunChangeDetection)&&n(),Lm(e)}},onInvoke:(t,r,i,o,c,l,_)=>{try{return xm(e),t.invoke(i,o,c,l,_)}finally{e.shouldCoalesceRunChangeDetection&&!e.callbackScheduled&&!function UM(e){return Pm(e,"__scheduler_tick__")}(l)&&n(),Lm(e)}},onHasTask:(t,r,i,o)=>{t.hasTask(i,o),r===i&&("microTask"==o.change?(e._hasPendingMicrotasks=o.microTask,H_(e),B_(e)):"macroTask"==o.change&&(e.hasPendingMacrotasks=o.macroTask))},onHandleError:(t,r,i,o)=>(t.handleError(i,o),e.runOutsideAngular(()=>e.onError.emit(o)),!1)})}(i)}static isInAngularZone(){return typeof Zone<"u"&&!0===Zone.current.get("isAngularZone")}static assertInAngularZone(){if(!ve.isInAngularZone())throw new k(909,!1)}static assertNotInAngularZone(){if(ve.isInAngularZone())throw new k(909,!1)}run(n,t,r){return this._inner.run(n,t,r)}runTask(n,t,r,i){const o=this._inner,c=o.scheduleEventTask("NgZoneEvent: "+i,n,jM,mc,mc);try{return o.runTask(c,t,r)}finally{o.cancelTask(c)}}runGuarded(n,t,r){return this._inner.runGuarded(n,t,r)}runOutsideAngular(n){return this._outer.run(n)}}const jM={};function B_(e){if(0==e._nesting&&!e.hasPendingMicrotasks&&!e.isStable)try{e._nesting++,e.onMicrotaskEmpty.emit(null)}finally{if(e._nesting--,!e.hasPendingMicrotasks)try{e.runOutsideAngular(()=>e.onStable.emit(null))}finally{e.isStable=!0}}}function H_(e){e.hasPendingMicrotasks=!!(e._hasPendingMicrotasks||(e.shouldCoalesceEventChangeDetection||e.shouldCoalesceRunChangeDetection)&&!0===e.callbackScheduled)}function xm(e){e._nesting++,e.isStable&&(e.isStable=!1,e.onUnstable.emit(null))}function Lm(e){e._nesting--,B_(e)}class z_{constructor(){this.hasPendingMicrotasks=!1,this.hasPendingMacrotasks=!1,this.isStable=!0,this.onUnstable=new Re,this.onMicrotaskEmpty=new Re,this.onStable=new Re,this.onError=new Re}run(n,t,r){return n.apply(t,r)}runGuarded(n,t,r){return n.apply(t,r)}runOutsideAngular(n){return n()}runTask(n,t,r,i){return n.apply(t,r)}}function Pm(e,n){return!(!Array.isArray(e)||1!==e.length)&&!0===e[0]?.data?.[n]}class hn{constructor(){this._console=console}handleError(n){const t=this._findOriginalError(n);this._console.error("ERROR",n),t&&this._console.error("ORIGINAL ERROR",t)}_findOriginalError(n){let t=n&&j_(n);for(;t&&j_(t);)t=j_(t);return t||null}}const GM=new W("",{providedIn:"root",factory:()=>{const e=j(ve),n=j(hn);return t=>e.runOutsideAngular(()=>n.handleError(t))}});function qM(){return Gs(Se(),I())}function Gs(e,n){return new tn(bt(e,n))}let tn=(()=>{class e{constructor(t){this.nativeElement=t}static{this.__NG_ELEMENT_ID__=qM}}return e})();function Wm(e){return e instanceof tn?e.nativeElement:e}function KM(){return this._results[Symbol.iterator]()}class U_{get changes(){return this._changes??=new Re}constructor(n=!1){this._emitDistinctChangesOnly=n,this.dirty=!0,this._onDirty=void 0,this._results=[],this._changesDetected=!1,this._changes=void 0,this.length=0,this.first=void 0,this.last=void 0;const t=U_.prototype;t[Symbol.iterator]||(t[Symbol.iterator]=KM)}get(n){return this._results[n]}map(n){return this._results.map(n)}filter(n){return this._results.filter(n)}find(n){return this._results.find(n)}reduce(n,t){return this._results.reduce(n,t)}forEach(n){this._results.forEach(n)}some(n){return this._results.some(n)}toArray(){return this._results.slice()}toString(){return this._results.toString()}reset(n,t){this.dirty=!1;const r=function xt(e){return e.flat(Number.POSITIVE_INFINITY)}(n);(this._changesDetected=!function l1(e,n,t){if(e.length!==n.length)return!1;for(let r=0;rhN}),hN="ng",iw=new W(""),Yr=new W("",{providedIn:"platform",factory:()=>"unknown"}),ow=new W("",{providedIn:"root",factory:()=>Er().body?.querySelector("[ngCspNonce]")?.getAttribute("ngCspNonce")||null});let aw=()=>null;function td(e,n,t=!1){return aw(e,n,t)}const gw=new W("",{providedIn:"root",factory:()=>!1});let Ic,Mc;function Zs(e){return function od(){if(void 0===Ic&&(Ic=null,Fe.trustedTypes))try{Ic=Fe.trustedTypes.createPolicy("angular",{createHTML:e=>e,createScript:e=>e,createScriptURL:e=>e})}catch{}return Ic}()?.createHTML(e)||e}function ww(e){return function ad(){if(void 0===Mc&&(Mc=null,Fe.trustedTypes))try{Mc=Fe.trustedTypes.createPolicy("angular#unsafe-bypass",{createHTML:e=>e,createScript:e=>e,createScriptURL:e=>e})}catch{}return Mc}()?.createHTML(e)||e}class vw{constructor(n){this.changingThisBreaksApplicationSecurity=n}toString(){return`SafeValue must use [property]=binding: ${this.changingThisBreaksApplicationSecurity} (see ${nh})`}}function Sr(e){return e instanceof vw?e.changingThisBreaksApplicationSecurity:e}class LN{constructor(n){this.inertDocumentHelper=n}getInertBodyElement(n){n=""+n;try{const t=(new window.DOMParser).parseFromString(Zs(n),"text/html").body;return null===t?this.inertDocumentHelper.getInertBodyElement(n):(t.firstChild?.remove(),t)}catch{return null}}}class PN{constructor(n){this.defaultDoc=n,this.inertDocument=this.defaultDoc.implementation.createHTMLDocument("sanitization-inert")}getInertBodyElement(n){const t=this.inertDocument.createElement("template");return t.innerHTML=Zs(n),t}}const WN=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:\/?#]*(?:[\/?#]|$))/i;function nr(e){const n={};for(const t of e.split(","))n[t]=!0;return n}function ho(...e){const n={};for(const t of e)for(const r in t)t.hasOwnProperty(r)&&(n[r]=!0);return n}const Sw=nr("area,br,col,hr,img,wbr"),Cw=nr("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),Dw=nr("rp,rt"),ld=ho(Sw,ho(Cw,nr("address,article,aside,blockquote,caption,center,del,details,dialog,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,h6,header,hgroup,hr,ins,main,map,menu,nav,ol,pre,section,summary,table,ul")),ho(Dw,nr("a,abbr,acronym,audio,b,bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,picture,q,ruby,rp,rt,s,samp,small,source,span,strike,strong,sub,sup,time,track,tt,u,var,video")),ho(Dw,Cw)),ud=nr("background,cite,href,itemtype,longdesc,poster,src,xlink:href"),Tw=ho(ud,nr("abbr,accesskey,align,alt,autoplay,axis,bgcolor,border,cellpadding,cellspacing,class,clear,color,cols,colspan,compact,controls,coords,datetime,default,dir,download,face,headers,height,hidden,hreflang,hspace,ismap,itemscope,itemprop,kind,label,lang,language,loop,media,muted,nohref,nowrap,open,preload,rel,rev,role,rows,rowspan,rules,scope,scrolling,shape,size,sizes,span,srclang,srcset,start,summary,tabindex,target,title,translate,type,usemap,valign,value,vspace,width"),nr("aria-activedescendant,aria-atomic,aria-autocomplete,aria-busy,aria-checked,aria-colcount,aria-colindex,aria-colspan,aria-controls,aria-current,aria-describedby,aria-details,aria-disabled,aria-dropeffect,aria-errormessage,aria-expanded,aria-flowto,aria-grabbed,aria-haspopup,aria-hidden,aria-invalid,aria-keyshortcuts,aria-label,aria-labelledby,aria-level,aria-live,aria-modal,aria-multiline,aria-multiselectable,aria-orientation,aria-owns,aria-placeholder,aria-posinset,aria-pressed,aria-readonly,aria-relevant,aria-required,aria-roledescription,aria-rowcount,aria-rowindex,aria-rowspan,aria-selected,aria-setsize,aria-sort,aria-valuemax,aria-valuemin,aria-valuenow,aria-valuetext")),jN=nr("script,style,template");class BN{constructor(){this.sanitizedSomething=!1,this.buf=[]}sanitizeChildren(n){let t=n.firstChild,r=!0,i=[];for(;t;)if(t.nodeType===Node.ELEMENT_NODE?r=this.startElement(t):t.nodeType===Node.TEXT_NODE?this.chars(t.nodeValue):this.sanitizedSomething=!0,r&&t.firstChild)i.push(t),t=UN(t);else for(;t;){t.nodeType===Node.ELEMENT_NODE&&this.endElement(t);let o=zN(t);if(o){t=o;break}t=i.pop()}return this.buf.join("")}startElement(n){const t=Iw(n).toLowerCase();if(!ld.hasOwnProperty(t))return this.sanitizedSomething=!0,!jN.hasOwnProperty(t);this.buf.push("<"),this.buf.push(t);const r=n.attributes;for(let i=0;i"),!0}endElement(n){const t=Iw(n).toLowerCase();ld.hasOwnProperty(t)&&!Sw.hasOwnProperty(t)&&(this.buf.push(""))}chars(n){this.buf.push(Nw(n))}}function zN(e){const n=e.nextSibling;if(n&&e!==n.previousSibling)throw Mw(n);return n}function UN(e){const n=e.firstChild;if(n&&function HN(e,n){return(e.compareDocumentPosition(n)&Node.DOCUMENT_POSITION_CONTAINED_BY)!==Node.DOCUMENT_POSITION_CONTAINED_BY}(e,n))throw Mw(n);return n}function Iw(e){const n=e.nodeName;return"string"==typeof n?n:"FORM"}function Mw(e){return new Error(`Failed to sanitize html because the element is clobbered: ${e.outerHTML}`)}const $N=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,GN=/([^\#-~ |!])/g;function Nw(e){return e.replace(/&/g,"&").replace($N,function(n){return"&#"+(1024*(n.charCodeAt(0)-55296)+(n.charCodeAt(1)-56320)+65536)+";"}).replace(GN,function(n){return"&#"+n.charCodeAt(0)+";"}).replace(//g,">")}let Nc;function _d(e){return"content"in e&&function KN(e){return e.nodeType===Node.ELEMENT_NODE&&"TEMPLATE"===e.nodeName}(e)?e.content:null}var Qs=function(e){return e[e.NONE=0]="NONE",e[e.HTML=1]="HTML",e[e.STYLE=2]="STYLE",e[e.SCRIPT=3]="SCRIPT",e[e.URL=4]="URL",e[e.RESOURCE_URL=5]="RESOURCE_URL",e}(Qs||{});function Aw(e){const n=function mo(){const e=I();return e&&e[Rn].sanitizer}();return n?ww(n.sanitize(Qs.HTML,e)||""):function go(e,n){const t=function xN(e){return e instanceof vw&&e.getTypeName()||null}(e);if(null!=t&&t!==n){if("ResourceURL"===t&&"URL"===n)return!0;throw new Error(`Required a safe ${n}, got a ${t} (see ${nh})`)}return t===n}(e,"HTML")?ww(Sr(e)):function qN(e,n){let t=null;try{Nc=Nc||function Ew(e){const n=new PN(e);return function VN(){try{return!!(new window.DOMParser).parseFromString(Zs(""),"text/html")}catch{return!1}}()?new LN(n):n}(e);let r=n?String(n):"";t=Nc.getInertBodyElement(r);let i=5,o=r;do{if(0===i)throw new Error("Failed to sanitize html because the input is unstable");i--,r=o,o=t.innerHTML,t=Nc.getInertBodyElement(r)}while(r!==o);return Zs((new BN).sanitizeChildren(_d(t)||t))}finally{if(t){const r=_d(t)||t;for(;r.firstChild;)r.firstChild.remove()}}}(Er(),ee(e))}const tA=/^>|^->||--!>|)/g,rA="\u200b$1\u200b";var Cr=function(e){return e[e.Important=1]="Important",e[e.DashCase=2]="DashCase",e}(Cr||{});let pd;function gd(e,n){return pd(e,n)}function Xs(e,n,t,r,i){if(null!=r){let o,c=!1;dt(r)?o=r:Ye(r)&&(c=!0,r=r[Oe]);const l=pe(r);0===e&&null!==t?null==i?$w(n,t,l):es(n,t,l,i||null,!0):1===e&&null!==t?es(n,t,l,i||null,!0):2===e?function yo(e,n,t){e.removeChild(null,n,t)}(n,l,c):3===e&&n.destroyNode(l),null!=o&&function SA(e,n,t,r,i){const o=t[On];o!==pe(t)&&Xs(n,e,r,o,i);for(let l=We;ln.replace(nA,rA))}(n))}function Fc(e,n,t){return e.createElement(n,t)}function Hw(e,n){n[Rn].changeDetectionScheduler?.notify(8),xc(e,n,n[Q],2,null,null)}function zw(e,n){const t=e[Hs],r=n[Ue];(Ye(r)||n[xe]!==r[Ue][xe])&&(e[$]|=tc.HasTransplantedViews),null===t?e[Hs]=[n]:t.push(n)}function wd(e,n){const t=e[Hs],r=t.indexOf(n);t.splice(r,1)}function wo(e,n){if(e.length<=We)return;const t=We+n,r=e[t];if(r){const i=r[$r];null!==i&&i!==e&&wd(i,r),n>0&&(e[t-1][dn]=r[dn]);const o=za(e,We+n);!function gA(e,n){Hw(e,n),n[Oe]=null,n[ct]=null}(r[F],r);const c=o[Qn];null!==c&&c.detachView(o[F]),r[Ue]=null,r[dn]=null,r[$]&=-129}return r}function Rc(e,n){if(!(256&n[$])){const t=n[Q];t.destroyNode&&xc(e,n,t,3,null,null),function mA(e){let n=e[qi];if(!n)return yd(e[F],e);for(;n;){let t=null;if(Ye(n))t=n[qi];else{const r=n[We];r&&(t=r)}if(!t){for(;n&&!n[dn]&&n!==e;)Ye(n)&&yd(n[F],n),n=n[Ue];null===n&&(n=e),Ye(n)&&yd(n[F],n),t=n&&n[dn]}n=t}}(n)}}function yd(e,n){if(256&n[$])return;const t=M(null);try{n[$]&=-129,n[$]|=256,n[Xt]&&qn(n[Xt]),function bA(e,n){let t;if(null!=e&&null!=(t=e.destroyHooks))for(let r=0;r=0?r[c]():r[-c].unsubscribe(),o+=2}else t[o].call(r[t[o+1]]);null!==r&&(n[Vs]=null);const i=n[br];if(null!==i){n[br]=null;for(let o=0;o-1){const{encapsulation:o}=e.data[r.directiveStart+i];if(o===un.None||o===un.Emulated)return null}return bt(r,t)}}(e,n.parent,t)}function es(e,n,t,r,i){e.insertBefore(n,t,r,i)}function $w(e,n,t){e.appendChild(n,t)}function Gw(e,n,t,r,i){null!==r?es(e,n,t,r,i):$w(e,n,t)}function vd(e,n){return e.parentNode(n)}function qw(e,n,t){return Jw(e,n,t)}let Ed,Jw=function Kw(e,n,t){return 40&e.type?bt(e,t):null};function Oc(e,n,t,r){const i=bd(e,r,n),o=n[Q],l=qw(r.parent||n[ct],r,n);if(null!=i)if(Array.isArray(t))for(let _=0;_z&&ny(e,n,z,!1),xn(c?2:0,i),t(r,i)}finally{Jr(o),xn(c?3:1,i)}}function Td(e,n,t){if(g_(n)){const r=M(null);try{const o=n.directiveEnd;for(let c=n.directiveStart;cnull;function ay(e,n,t,r,i){for(let o in n){if(!n.hasOwnProperty(o))continue;const c=n[o];if(void 0===c)continue;r??={};let l,_=yr.None;Array.isArray(c)?(l=c[0],_=c[1]):l=c;let d=o;if(null!==i){if(!i.hasOwnProperty(o))continue;d=i[o]}0===e?cy(r,t,d,l,_):cy(r,t,d,l)}return r}function cy(e,n,t,r,i){let o;e.hasOwnProperty(t)?(o=e[t]).push(n,r):o=e[t]=[n,r],void 0!==i&&o.push(i)}function Wt(e,n,t,r,i,o,c,l){const _=bt(n,t);let p,d=n.inputs;!l&&null!=d&&(p=d[r])?(Od(e,t,p,r,i),Gr(n)&&function PA(e,n){const t=Ut(n,e);16&t[$]||(t[$]|=64)}(t,n.index)):3&n.type&&(r=function LA(e){return"class"===e?"className":"for"===e?"htmlFor":"formaction"===e?"formAction":"innerHtml"===e?"innerHTML":"readonly"===e?"readOnly":"tabindex"===e?"tabIndex":e}(r),i=null!=c?c(i,n.value||"",r):i,o.setProperty(_,r,i))}function Ad(e,n,t,r){if(Qh()){const i=null===r?null:{"":-1},o=function zA(e,n){const t=e.directiveRegistry;let r=null,i=null;if(t)for(let o=0;o0;){const t=e[--n];if("number"==typeof t&&t<0)return t}return 0})(c)!=l&&c.push(l),c.push(t,r,o)}}(e,n,r,bo(e,t,i.hostVars,te),i)}function Vn(e,n,t,r,i,o){const c=bt(e,n);!function Fd(e,n,t,r,i,o,c){if(null==o)e.removeAttribute(n,i,t);else{const l=null==c?ee(o):c(o,r||"",i);e.setAttribute(n,i,l,t)}}(n[Q],c,o,e.value,t,r,i)}function JA(e,n,t,r,i,o){const c=o[n];if(null!==c)for(let l=0;l0&&(t[i-1][dn]=n),r{rc(e.lView)},consumerOnSignalRead(){this.lView[Xt]=this}},ik={...le,consumerIsAlwaysLive:!0,consumerMarkedDirty:e=>{let n=Xn(e.lView);for(;n&&!yy(n[F]);)n=Xn(n);n&&Kh(n)},consumerOnSignalRead(){this.lView[Xt]=this}};function yy(e){return 2!==e.type}const ok=100;function Wc(e,n=!0,t=0){const r=e[Rn],i=r.rendererFactory;i.begin?.();try{!function ak(e,n){const t=tm();try{nm(!0),Pd(e,n);let r=0;for(;Yi(e);){if(r===ok)throw new k(103,!1);r++,Pd(e,1)}}finally{nm(t)}}(e,t)}catch(c){throw n&&Vc(e,c),c}finally{i.end?.(),r.inlineEffectRunner?.flush()}}function ck(e,n,t,r){const i=n[$];if(!(256&~i))return;n[Rn].inlineEffectRunner?.flush(),N_(n);let l=!0,_=null,d=null;yy(e)?(d=function ek(e){return e[Xt]??function tk(e){const n=wy.pop()??Object.create(rk);return n.lView=e,n}(e)}(n),_=Tn(d)):null===function B(){return y}()?(l=!1,d=function sk(e){const n=e[Xt]??Object.create(ik);return n.lView=e,n}(n),_=Tn(d)):n[Xt]&&(qn(n[Xt]),n[Xt]=null);try{qh(n),function rm(e){return Y.lFrame.bindingIndex=e}(e.bindingStartIndex),null!==t&&sy(e,n,t,2,r);const p=!(3&~i);if(p){const w=e.preOrderCheckHooks;null!==w&&lc(n,w,null)}else{const w=e.preOrderHooks;null!==w&&uc(n,w,0,null),k_(n,0)}if(function lk(e){for(let n=Jm(e);null!==n;n=Zm(n)){if(!(n[$]&tc.HasTransplantedViews))continue;const t=n[Hs];for(let r=0;r-1&&(wo(n,r),za(t,r))}this._attachedToViewContainer=!1}Rc(this._lView[F],this._lView)}onDestroy(n){sc(this._lView,n)}markForCheck(){Eo(this._cdRefInjectingView||this._lView,4)}detach(){this._lView[$]&=-129}reattach(){v_(this._lView),this._lView[$]|=128}detectChanges(){this._lView[$]|=1024,Wc(this._lView,this.notifyErrorHandler)}checkNoChanges(){}attachToViewContainerRef(){if(this._appRef)throw new k(902,!1);this._attachedToViewContainer=!0}detachFromAppRef(){this._appRef=null;const n=Ji(this._lView),t=this._lView[$r];null!==t&&!n&&wd(t,this._lView),Hw(this._lView[F],this._lView)}attachToAppRef(n){if(this._attachedToViewContainer)throw new k(902,!1);this._appRef=n;const t=Ji(this._lView),r=this._lView[$r];null!==r&&!t&&zw(r,this._lView),v_(this._lView)}}let sr=(()=>{class e{static{this.__NG_ELEMENT_ID__=fk}}return e})();const _k=sr,dk=class extends _k{constructor(n,t,r){super(),this._declarationLView=n,this._declarationTContainer=t,this.elementRef=r}get ssrId(){return this._declarationTContainer.tView?.ssrId||null}createEmbeddedView(n,t){return this.createEmbeddedViewImpl(n,t)}createEmbeddedViewImpl(n,t,r){const i=ei(this._declarationLView,this._declarationTContainer,n,{embeddedViewInjector:t,dehydratedView:r});return new So(i)}};function fk(){return jc(Se(),I())}function jc(e,n){return 4&e.type?new dk(n,e,Gs(e,n)):null}let Uy=()=>null;function is(e,n){return Uy(e,n)}class ri{}const ko=new W("",{providedIn:"root",factory:()=>!1}),$y=new W("");class iF{}class Gy{}class aF{resolveComponentFactory(n){throw function oF(e){const n=Error(`No component factory found for ${Je(e)}.`);return n.ngComponent=e,n}(n)}}class Gc{static{this.NULL=new aF}}class Kd{}let os=(()=>{class e{constructor(){this.destroyNode=null}static{this.__NG_ELEMENT_ID__=()=>function cF(){const e=I(),t=Ut(Se().index,e);return(Ye(t)?t:e)[Q]}()}}return e})(),lF=(()=>{class e{static{this.\u0275prov=Z({token:e,providedIn:"root",factory:()=>null})}}return e})();const Ky=new Set;function Et(e){Ky.has(e)||(Ky.add(e),performance?.mark?.("mark_feature_usage",{detail:{feature:e}}))}let qc=(()=>{class e{constructor(){this.handler=null,this.internalCallbacks=[]}execute(){this.executeInternalCallbacks(),this.handler?.execute()}executeInternalCallbacks(){const t=[...this.internalCallbacks];this.internalCallbacks.length=0;for(const r of t)r()}ngOnDestroy(){this.handler?.destroy(),this.handler=null,this.internalCallbacks.length=0}static{this.\u0275prov=Z({token:e,providedIn:"root",factory:()=>new e})}}return e})();function Jc(e,n,t){let r=t?e.styles:null,i=t?e.classes:null,o=0;if(null!==n)for(let c=0;c0&&ey(e,t,o.join(" "))}}(w,be,E,r),void 0!==t&&function CF(e,n,t){const r=e.projection=[];for(let i=0;i{class e{static{this.__NG_ELEMENT_ID__=TF}}return e})();function TF(){return rb(Se(),I())}const IF=Wn,tb=class extends IF{constructor(n,t,r){super(),this._lContainer=n,this._hostTNode=t,this._hostLView=r}get element(){return Gs(this._hostTNode,this._hostLView)}get injector(){return new Xe(this._hostTNode,this._hostLView)}get parentInjector(){const n=fc(this._hostTNode,this._hostLView);if(O_(n)){const t=ro(n,this._hostLView),r=no(n);return new Xe(t[F].data[r+8],t)}return new Xe(null,this._hostLView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(n){const t=nb(this._lContainer);return null!==t&&t[n]||null}get length(){return this._lContainer.length-We}createEmbeddedView(n,t,r){let i,o;"number"==typeof r?i=r:null!=r&&(i=r.index,o=r.injector);const c=is(this._lContainer,n.ssrId),l=n.createEmbeddedViewImpl(t||{},o,c);return this.insertImpl(l,i,rs(this._hostTNode,c)),l}createComponent(n,t,r,i,o){const c=n&&!function Gi(e){return"function"==typeof e}(n);let l;if(c)l=t;else{const b=t||{};l=b.index,r=b.injector,i=b.projectableNodes,o=b.environmentInjector||b.ngModuleRef}const _=c?n:new Oo(oe(n)),d=r||this.parentInjector;if(!o&&null==_.ngModule){const E=(c?d:this.parentInjector).get(Yt,null);E&&(o=E)}const p=oe(_.componentType??{}),h=is(this._lContainer,p?.id??null),w=_.create(d,i,h?.firstChild??null,o);return this.insertImpl(w.hostView,l,rs(this._hostTNode,h)),w}insert(n,t){return this.insertImpl(n,t,!0)}insertImpl(n,t,r){const i=n._lView;if(function X1(e){return dt(e[Ue])}(i)){const l=this.indexOf(n);if(-1!==l)this.detach(l);else{const _=i[Ue],d=new tb(_,_[ct],_[Ue]);d.detach(d.indexOf(n))}}const o=this._adjustIndex(t),c=this._lContainer;return ti(c,i,o,r),n.attachToViewContainerRef(),gh(Yd(c),o,n),n}move(n,t){return this.insert(n,t)}indexOf(n){const t=nb(this._lContainer);return null!==t?t.indexOf(n):-1}remove(n){const t=this._adjustIndex(n,-1),r=wo(this._lContainer,t);r&&(za(Yd(this._lContainer),t),Rc(r[F],r))}detach(n){const t=this._adjustIndex(n,-1),r=wo(this._lContainer,t);return r&&null!=za(Yd(this._lContainer),t)?new So(r):null}_adjustIndex(n,t=0){return n??this.length+t}};function nb(e){return e[8]}function Yd(e){return e[8]||(e[8]=[])}function rb(e,n){let t;const r=n[e.index];return dt(r)?t=r:(t=_y(r,n,null,e),n[e.index]=t,Pc(n,t)),sb(t,n,e,r),new tb(t,e,n)}let sb=function ob(e,n,t,r){if(e[On])return;let i;i=8&t.type?pe(r):function MF(e,n){const t=e[Q],r=t.createComment(""),i=bt(n,e);return es(t,vd(t,i),r,function vA(e,n){return e.nextSibling(n)}(t,i),!1),r}(n,t),e[On]=i},Xd=()=>!1;class ef{constructor(n){this.queryList=n,this.matches=null}clone(){return new ef(this.queryList)}setDirty(){this.queryList.setDirty()}}class tf{constructor(n=[]){this.queries=n}createEmbeddedView(n){const t=n.queries;if(null!==t){const r=null!==n.contentQueries?n.contentQueries[0]:t.length,i=[];for(let o=0;on.trim())}(n):n}}class nf{constructor(n=[]){this.queries=n}elementStart(n,t){for(let r=0;r0)r.push(c[l/2]);else{const d=o[l+1],p=n[-_];for(let h=We;h(ue(n),n.value);return t[A]=n,t}(e),r=t[A];return n?.equal&&(r.equal=n.equal),t.set=i=>Ig(r,i),t.update=i=>function ST(e,n){Ft()||Tg(),Ig(e,n(e.value))}(r,i),t.asReadonly=gb.bind(t),t}function gb(){const e=this[A];if(void 0===e.readonlyFn){const n=()=>this();n[A]=e,e.readonlyFn=n}return e.readonlyFn}function Ce(e){let n=function Ib(e){return Object.getPrototypeOf(e.prototype).constructor}(e.type),t=!0;const r=[e];for(;n;){let i;if(fn(e))i=n.\u0275cmp||n.\u0275dir;else{if(n.\u0275cmp)throw new k(903,!1);i=n.\u0275dir}if(i){if(t){r.push(i);const c=e;c.inputs=Qc(e.inputs),c.inputTransforms=Qc(e.inputTransforms),c.declaredInputs=Qc(e.declaredInputs),c.outputs=Qc(e.outputs);const l=i.hostBindings;l&&QF(e,l);const _=i.viewQuery,d=i.contentQueries;if(_&&JF(e,_),d&&ZF(e,d),qF(e,i),BI(e.outputs,i.outputs),fn(i)&&i.data.animation){const p=e.data;p.animation=(p.animation||[]).concat(i.data.animation)}}const o=i.features;if(o)for(let c=0;c=0;r--){const i=e[r];i.hostVars=n+=i.hostVars,i.hostAttrs=Ui(i.hostAttrs,t=Ui(t,i.hostAttrs))}}(r)}function qF(e,n){for(const t in n.inputs){if(!n.inputs.hasOwnProperty(t)||e.inputs.hasOwnProperty(t))continue;const r=n.inputs[t];if(void 0!==r&&(e.inputs[t]=r,e.declaredInputs[t]=n.declaredInputs[t],null!==n.inputTransforms)){const i=Array.isArray(r)?r[0]:r;if(!n.inputTransforms.hasOwnProperty(i))continue;e.inputTransforms??={},e.inputTransforms[i]=n.inputTransforms[i]}}}function Qc(e){return e===kn?{}:e===fe?[]:e}function JF(e,n){const t=e.viewQuery;e.viewQuery=t?(r,i)=>{n(r,i),t(r,i)}:n}function ZF(e,n){const t=e.contentQueries;e.contentQueries=t?(r,i,o)=>{n(r,i,o),t(r,i,o)}:n}function QF(e,n){const t=e.hostBindings;e.hostBindings=t?(r,i)=>{n(r,i),t(r,i)}:n}class cs{}class kb extends cs{constructor(n){super(),this.componentFactoryResolver=new Xy(this),this.instance=null;const t=new xs([...n.providers,{provide:cs,useValue:this},{provide:Gc,useValue:this.componentFactoryResolver}],n.parent||Za(),n.debugName,new Set(["environment"]));this.injector=t,n.runEnvironmentInitializers&&t.resolveInjectorInitializers()}destroy(){this.injector.destroy()}onDestroy(n){this.injector.onDestroy(n)}}function Yc(e){return!!function df(e){return null!==e&&("function"==typeof e||"object"==typeof e)}(e)&&(Array.isArray(e)||!(e instanceof Map)&&Symbol.iterator in e)}function jn(e,n,t){return e[n]=t}function je(e,n,t){return!Object.is(e[n],t)&&(e[n]=t,!0)}function ls(e,n,t,r){const i=je(e,n,t);return je(e,n+1,r)||i}function Po(e,n,t,r,i,o,c,l,_,d){const p=t+z,h=n.firstCreatePass?function _R(e,n,t,r,i,o,c,l,_){const d=n.consts,p=ns(n,e,4,c||null,l||null);Ad(n,t,p,en(d,_)),cc(n,p);const h=p.tView=Nd(2,p,r,i,o,n.directiveRegistry,n.pipeRegistry,null,n.schemas,d,null);return null!==n.queries&&(n.queries.template(n,p),h.queries=n.queries.embeddedTView(p)),p}(p,n,e,r,i,o,c,l,_):n.data[p];pn(h,!1);const m=Rb(n,e,h,t);eo()&&Oc(n,e,m,h),pt(m,e);const w=_y(m,e,m,h);return e[p]=w,Pc(e,w),function ib(e,n,t){return Xd(e,n,t)}(w,h,e),nc(h)&&Id(n,e,h),null!=_&&Md(e,h,d),h}function ae(e,n,t,r,i,o,c,l){const _=I(),d=se();return Po(_,d,e,n,t,r,i,en(d.consts,o),c,l),ae}let Rb=function Ob(e,n,t,r){return Ln(!0),n[Q].createComment("")};function Ct(e,n,t,r){const i=I();return je(i,gn(),n)&&(se(),Vn(Ne(),i,e,n,t,r)),Ct}function pi(e,n,t,r){return je(e,gn(),t)?n+ee(t)+r:te}function gi(e,n,t,r,i,o){const l=ls(e,function er(){return Y.lFrame.bindingIndex}(),t,i);return tr(2),l?n+ee(t)+r+ee(i)+o:te}function il(e,n){return e<<17|n<<2}function Ir(e){return e>>17&32767}function Sf(e){return 2|e}function _s(e){return(131068&e)>>2}function Cf(e,n){return-131069&e|n<<2}function Df(e){return 1|e}function _v(e,n,t,r){const i=e[t+1],o=null===n;let c=r?Ir(i):_s(i),l=!1;for(;0!==c&&(!1===l||o);){const d=e[c+1];ZR(e[c],n)&&(l=!0,e[c+1]=r?Df(d):Sf(d)),c=r?Ir(d):_s(d)}l&&(e[t+1]=r?Sf(i):Df(i))}function ZR(e,n){return null===e||null==n||(Array.isArray(e)?e[1]:e)===n||!(!Array.isArray(e)||"string"!=typeof n)&&Os(e,n)>=0}const tt={textEnd:0,key:0,keyEnd:0,value:0,valueEnd:0};function dv(e){return e.substring(tt.key,tt.keyEnd)}function fv(e,n){const t=tt.textEnd;return t===n?-1:(n=tt.keyEnd=function eO(e,n,t){for(;n32;)n++;return n}(e,tt.key=n,t),Ei(e,n,t))}function Ei(e,n,t){for(;n=0;t=fv(n,t))zt(e,dv(n),!0)}function yv(e,n){return n>=e.expandoStartIndex}function bv(e,n,t,r){const i=e.data;if(null===i[t+1]){const o=i[lt()],c=yv(e,t);Cv(o,r)&&null===n&&!c&&(n=!1),n=function sO(e,n,t,r){const i=function I_(e){const n=Y.lFrame.currentDirectiveIndex;return-1===n?null:e[n]}(e);let o=r?n.residualClasses:n.residualStyles;if(null===i)0===(r?n.classBindings:n.styleBindings)&&(t=Bo(t=If(null,e,n,t,r),n.attrs,r),o=null);else{const c=n.directiveStylingLast;if(-1===c||e[c]!==i)if(t=If(i,e,n,t,r),null===o){let _=function iO(e,n,t){const r=t?n.classBindings:n.styleBindings;if(0!==_s(r))return e[Ir(r)]}(e,n,r);void 0!==_&&Array.isArray(_)&&(_=If(null,e,n,_[1],r),_=Bo(_,n.attrs,r),function oO(e,n,t,r){e[Ir(t?n.classBindings:n.styleBindings)]=r}(e,n,r,_))}else o=function aO(e,n,t){let r;const i=n.directiveEnd;for(let o=1+n.directiveStylingLast;o0)&&(d=!0)):p=t,i)if(0!==_){const m=Ir(e[l+1]);e[r+1]=il(m,l),0!==m&&(e[m+1]=Cf(e[m+1],r)),e[l+1]=function GR(e,n){return 131071&e|n<<17}(e[l+1],r)}else e[r+1]=il(l,0),0!==l&&(e[l+1]=Cf(e[l+1],r)),l=r;else e[r+1]=il(_,0),0===l?l=r:e[_+1]=Cf(e[_+1],r),_=r;d&&(e[r+1]=Sf(e[r+1])),_v(e,p,r,!0),_v(e,p,r,!1),function JR(e,n,t,r,i){const o=i?e.residualClasses:e.residualStyles;null!=o&&"string"==typeof n&&Os(o,n)>=0&&(t[r+1]=Df(t[r+1]))}(n,p,e,r,o),c=il(l,_),o?n.classBindings=c:n.styleBindings=c}(i,o,n,t,c,r)}}function If(e,n,t,r,i){let o=null;const c=t.directiveEnd;let l=t.directiveStylingLast;for(-1===l?l=t.directiveStart:l++;l0;){const _=e[i],d=Array.isArray(_),p=d?_[1]:_,h=null===p;let m=t[i+1];m===te&&(m=h?fe:void 0);let w=h?n_(m,r):p===r?m:void 0;if(d&&!cl(w)&&(w=n_(_,r)),cl(w)&&(l=w,c))return l;const b=e[i+1];i=c?Ir(b):_s(b)}if(null!==n){let _=o?n.residualClasses:n.residualStyles;null!=_&&(l=n_(_,r))}return l}function cl(e){return void 0!==e}function Cv(e,n){return!!(e.flags&(n?8:16))}function O(e,n,t,r){const i=I(),o=se(),c=z+e,l=i[Q],_=o.firstCreatePass?function OO(e,n,t,r,i,o){const c=n.consts,_=ns(n,e,2,r,en(c,i));return Ad(n,t,_,en(c,o)),null!==_.attrs&&Jc(_,_.attrs,!1),null!==_.mergedAttrs&&Jc(_,_.mergedAttrs,!0),null!==n.queries&&n.queries.elementStart(n,_),_}(c,o,i,n,t,r):o.data[c],d=Mv(o,i,_,l,n,e);i[c]=d;const p=nc(_);return pn(_,!0),ty(l,d,_),!function oi(e){return!(32&~e.flags)}(_)&&eo()&&Oc(o,i,d,_),0===function eM(){return Y.lFrame.elementDepthCount}()&&pt(d,i),function tM(){Y.lFrame.elementDepthCount++}(),p&&(Id(o,i,_),Td(o,_,i)),null!==r&&Md(i,_),O}function x(){let e=Se();C_()?D_():(e=e.parent,pn(e,!1));const n=e;(function rM(e){return Y.skipHydrationRootTNode===e})(n)&&function aM(){Y.skipHydrationRootTNode=null}(),function nM(){Y.lFrame.elementDepthCount--}();const t=se();return t.firstCreatePass&&(cc(t,e),g_(e)&&t.queries.elementEnd(e)),null!=n.classesWithoutHost&&function wM(e){return!!(8&e.flags)}(n)&&Tf(t,n,I(),n.classesWithoutHost,!0),null!=n.stylesWithoutHost&&function yM(e){return!!(16&e.flags)}(n)&&Tf(t,n,I(),n.stylesWithoutHost,!1),x}function gt(e,n,t,r){return O(e,n,t,r),x(),gt}let Mv=(e,n,t,r,i,o)=>(Ln(!0),Fc(r,i,function _m(){return Y.lFrame.currentNamespace}()));function qt(e,n,t){const r=I(),i=se(),o=e+z,c=i.firstCreatePass?function PO(e,n,t,r,i){const o=n.consts,c=en(o,r),l=ns(n,e,8,"ng-container",c);return null!==c&&Jc(l,c,!0),Ad(n,t,l,en(o,i)),null!==n.queries&&n.queries.elementStart(n,l),l}(o,i,r,n,t):i.data[o];pn(c,!0);const l=Nv(i,r,c,e);return r[o]=l,eo()&&Oc(i,r,l,c),pt(l,r),nc(c)&&(Id(i,r,c),Td(i,c,r)),null!=t&&Md(r,c),qt}function Kt(){let e=Se();const n=se();return C_()?D_():(e=e.parent,pn(e,!1)),n.firstCreatePass&&(cc(n,e),g_(e)&&n.queries.elementEnd(e)),Kt}function ds(e,n,t){return qt(e,n,t),Kt(),ds}let Nv=(e,n,t,r)=>(Ln(!0),md(n[Q],""));function Le(){return I()}const Ci="en-US";let Ov=Ci;let Xv=(e,n,t)=>{};function re(e,n,t,r){const i=I(),o=se(),c=Se();return function Rf(e,n,t,r,i,o,c){const l=nc(r),d=e.firstCreatePass&&py(e),p=n[Me],h=fy(n);let m=!0;if(3&r.type||c){const E=bt(r,n),C=c?c(E):E,N=h.length,D=c?q=>c(pe(q[r.index])):r.index;let V=null;if(!c&&l&&(V=function Nx(e,n,t,r){const i=e.cleanup;if(null!=i)for(let o=0;o_?l[_]:null}"string"==typeof c&&(o+=2)}return null}(e,n,i,r.index)),null!==V)(V.__ngLastListenerFn__||V).__ngNextListenerFn__=o,V.__ngLastListenerFn__=o,m=!1;else{o=r0(r,n,p,o),Xv(E,i,o);const q=t.listen(C,i,o);h.push(o,q),d&&d.push(i,D,N,N+1)}}else o=r0(r,n,p,o);const w=r.outputs;let b;if(m&&null!==w&&(b=w[i])){const E=b.length;if(E)for(let C=0;C-1?Ut(e.index,n):n,5);let l=n0(n,t,r,o),_=i.__ngNextListenerFn__;for(;_;)l=n0(n,t,_,o)&&l,_=_.__ngNextListenerFn__;return l}}function H(e=1){return function dM(e){return(Y.lFrame.contextLView=function Jh(e,n){for(;e>0;)n=n[Ws],e--;return n}(e,Y.lFrame.contextLView))[Me]}(e)}function Ax(e,n){let t=null;const r=function g1(e){const n=e.attrs;if(null!=n){const t=n.indexOf(5);if(!(1&t))return n[t+1]}return null}(e);for(let i=0;i(Ln(!0),function hd(e,n){return e.createText(n)}(n[Q],r));function gs(e){return ht("",e,""),gs}function ht(e,n,t){const r=I(),i=pi(r,e,n,t);return i!==te&&rr(r,lt(),i),ht}function qo(e,n,t,r,i){const o=I(),c=gi(o,e,n,t,r,i);return c!==te&&rr(o,lt(),c),qo}function Pf(e,n,t,r,i){if(e=J(e),Array.isArray(e))for(let o=0;o>20;if(Ur(e)||!e.multi){const w=new to(d,i,T),b=Wf(_,n,i?p:p+m,h);-1===b?(P_(dc(l,c),o,_),Vf(o,e,n.length),n.push(_),l.directiveStart++,l.directiveEnd++,i&&(l.providerIndexes+=1048576),t.push(w),c.push(w)):(t[b]=w,c[b]=w)}else{const w=Wf(_,n,p+m,h),b=Wf(_,n,p,p+m),C=b>=0&&t[b];if(i&&!C||!i&&!(w>=0&&t[w])){P_(dc(l,c),o,_);const N=function Xx(e,n,t,r,i){const o=new to(e,t,T);return o.multi=[],o.index=n,o.componentProviders=0,L0(o,i,r&&!t),o}(i?Yx:Qx,t.length,i,r,d);!i&&C&&(t[b].providerFactory=N),Vf(o,e,n.length,0),n.push(_),l.directiveStart++,l.directiveEnd++,i&&(l.providerIndexes+=1048576),t.push(N),c.push(N)}else Vf(o,e,w>-1?w:b,L0(t[i?b:w],d,!i&&r));!i&&r&&C&&t[b].componentProviders++}}}function Vf(e,n,t,r){const i=Ur(n),o=function I1(e){return!!e.useClass}(n);if(i||o){const _=(o?J(n.useClass):n).prototype.ngOnDestroy;if(_){const d=e.destroyHooks||(e.destroyHooks=[]);if(!i&&n.multi){const p=d.indexOf(t);-1===p?d.push(t,[r,_]):d[p+1].push(r,_)}else d.push(t,_)}}}function L0(e,n,t){return t&&e.componentProviders++,e.multi.push(n)-1}function Wf(e,n,t,r){for(let i=t;i{t.providersResolver=(r,i)=>function Zx(e,n,t){const r=se();if(r.firstCreatePass){const i=fn(e);Pf(t,r.data,r.blueprint,i,!0),Pf(n,r.data,r.blueprint,i,!1)}}(r,i?i(e):e,n)}}let eL=(()=>{class e{constructor(t){this._injector=t,this.cachedInjectors=new Map}getOrCreateStandaloneInjector(t){if(!t.standalone)return null;if(!this.cachedInjectors.has(t)){const r=o_(0,t.type),i=r.length>0?function Fb(e,n,t=null){return new kb({providers:e,parent:n,debugName:t,runEnvironmentInitializers:!0}).injector}([r],this._injector,`Standalone[${t.type.name}]`):null;this.cachedInjectors.set(t,i)}return this.cachedInjectors.get(t)}ngOnDestroy(){try{for(const t of this.cachedInjectors.values())null!==t&&t.destroy()}finally{this.cachedInjectors.clear()}}static{this.\u0275prov=Z({token:e,providedIn:"environment",factory:()=>new e(U(Yt))})}}return e})();function mt(e){Et("NgStandalone"),e.getStandaloneInjector=n=>n.get(eL).getOrCreateStandaloneInjector(e)}function gl(e,n,t){const r=vt()+e,i=I();return i[r]===te?jn(i,r,t?n.call(t):n()):function Lo(e,n){return e[n]}(i,r)}function yn(e,n,t,r){return function j0(e,n,t,r,i,o){const c=n+t;return je(e,c,i)?jn(e,c+1,o?r.call(o,i):r(i)):Ko(e,c+1)}(I(),vt(),e,n,t,r)}function Di(e,n,t,r,i){return function B0(e,n,t,r,i,o,c){const l=n+t;return ls(e,l,i,o)?jn(e,l+2,c?r.call(c,i,o):r(i,o)):Ko(e,l+2)}(I(),vt(),e,n,t,r,i)}function W0(e,n,t,r,i,o){return function H0(e,n,t,r,i,o,c,l){const _=n+t;return function Xc(e,n,t,r,i){const o=ls(e,n,t,r);return je(e,n+2,i)||o}(e,_,i,o,c)?jn(e,_+3,l?r.call(l,i,o,c):r(i,o,c)):Ko(e,_+3)}(I(),vt(),e,n,t,r,i,o)}function Ko(e,n){const t=e[n];return t===te?void 0:t}function hs(e,n){return jc(e,n)}const uE=new W("");function bl(e){return!!e&&"function"==typeof e.then}function _E(e){return!!e&&"function"==typeof e.subscribe}const dE=new W("");let vl=(()=>{class e{constructor(){this.initialized=!1,this.done=!1,this.donePromise=new Promise((t,r)=>{this.resolve=t,this.reject=r}),this.appInits=j(dE,{optional:!0})??[]}runInitializers(){if(this.initialized)return;const t=[];for(const i of this.appInits){const o=i();if(bl(o))t.push(o);else if(_E(o)){const c=new Promise((l,_)=>{o.subscribe({complete:l,error:_})});t.push(c)}}const r=()=>{this.done=!0,this.resolve()};Promise.all(t).then(()=>{r()}).catch(i=>{this.reject(i)}),0===t.length&&r(),this.initialized=!0}static{this.\u0275fac=function(r){return new(r||e)}}static{this.\u0275prov=Z({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();const Jf=new W("");let zn=(()=>{class e{constructor(){this._bootstrapListeners=[],this._runningTick=!1,this._destroyed=!1,this._destroyListeners=[],this._views=[],this.internalErrorHandler=j(GM),this.afterRenderEffectManager=j(qc),this.zonelessEnabled=j(ko),this.externalTestViews=new Set,this.beforeRender=new Wr,this.afterTick=new Wr,this.componentTypes=[],this.components=[],this.isStable=j(vr).hasPendingTasks.pipe(gr(t=>!t)),this._injector=j(Yt)}get allViews(){return[...this.externalTestViews.keys(),...this._views]}get destroyed(){return this._destroyed}get injector(){return this._injector}bootstrap(t,r){const i=t instanceof Gy;if(!this._injector.get(vl).done)throw!i&&function zr(e){const n=oe(e)||Ze(e)||at(e);return null!==n&&n.standalone}(t),new k(405,!1);let c;c=i?t:this._injector.get(Gc).resolveComponentFactory(t),this.componentTypes.push(c.componentType);const l=function _P(e){return e.isBoundToModule}(c)?void 0:this._injector.get(cs),d=c.create(et.NULL,[],r||c.selector,l),p=d.location.nativeElement,h=d.injector.get(uE,null);return h?.registerApplication(p),d.onDestroy(()=>{this.detachView(d.hostView),El(this.components,d),h?.unregisterApplication(p)}),this._loadComponent(d),d}tick(){this._tick(!0)}_tick(t){if(this._runningTick)throw new k(101,!1);const r=M(null);try{this._runningTick=!0,this.detectChangesInAttachedViews(t)}catch(i){this.internalErrorHandler(i)}finally{this._runningTick=!1,M(r),this.afterTick.next()}}detectChangesInAttachedViews(t){let r=null;this._injector.destroyed||(r=this._injector.get(Kd,null,{optional:!0}));let i=0;const o=this.afterRenderEffectManager;for(;i<10;){const c=0===i;if(t||!c){this.beforeRender.next(c);for(let{_lView:l,notifyErrorHandler:_}of this._views)fP(l,_,c,this.zonelessEnabled)}else r?.begin?.(),r?.end?.();if(i++,o.executeInternalCallbacks(),!this.allViews.some(({_lView:l})=>Yi(l))&&(o.execute(),!this.allViews.some(({_lView:l})=>Yi(l))))break}}attachView(t){const r=t;this._views.push(r),r.attachToAppRef(this)}detachView(t){const r=t;El(this._views,r),r.detachFromAppRef()}_loadComponent(t){this.attachView(t.hostView),this.tick(),this.components.push(t);const r=this._injector.get(Jf,[]);[...this._bootstrapListeners,...r].forEach(i=>i(t))}ngOnDestroy(){if(!this._destroyed)try{this._destroyListeners.forEach(t=>t()),this._views.slice().forEach(t=>t.destroy())}finally{this._destroyed=!0,this._views=[],this._bootstrapListeners=[],this._destroyListeners=[]}}onDestroy(t){return this._destroyListeners.push(t),()=>El(this._destroyListeners,t)}destroy(){if(this._destroyed)throw new k(406,!1);const t=this._injector;t.destroy&&!t.destroyed&&t.destroy()}get viewCount(){return this._views.length}warnIfDestroyed(){}static{this.\u0275fac=function(r){return new(r||e)}}static{this.\u0275prov=Z({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();function El(e,n){const t=e.indexOf(n);t>-1&&e.splice(t,1)}function fP(e,n,t,r){(t||Yi(e))&&Wc(e,n,t&&!r?0:1)}let mP=(()=>{class e{constructor(){this.zone=j(ve),this.changeDetectionScheduler=j(ri),this.applicationRef=j(zn)}initialize(){this._onMicrotaskEmptySubscription||(this._onMicrotaskEmptySubscription=this.zone.onMicrotaskEmpty.subscribe({next:()=>{this.changeDetectionScheduler.runningTick||this.zone.run(()=>{this.applicationRef.tick()})}}))}ngOnDestroy(){this._onMicrotaskEmptySubscription?.unsubscribe()}static{this.\u0275fac=function(r){return new(r||e)}}static{this.\u0275prov=Z({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();function Zf({ngZoneFactory:e,ignoreChangesOutsideZone:n}){return e??=()=>new ve(function Qf(e){return{enableLongStackTrace:!1,shouldCoalesceEventChangeDetection:e?.eventCoalescing??!1,shouldCoalesceRunChangeDetection:e?.runCoalescing??!1}}()),[{provide:ve,useFactory:e},{provide:Fn,multi:!0,useFactory:()=>{const t=j(mP,{optional:!0});return()=>t.initialize()}},{provide:Fn,multi:!0,useFactory:()=>{const t=j(yP);return()=>{t.initialize()}}},!0===n?{provide:$y,useValue:!0}:[]]}let yP=(()=>{class e{constructor(){this.subscription=new Qt,this.initialized=!1,this.zone=j(ve),this.pendingTasks=j(vr)}initialize(){if(this.initialized)return;this.initialized=!0;let t=null;!this.zone.isStable&&!this.zone.hasPendingMacrotasks&&!this.zone.hasPendingMicrotasks&&(t=this.pendingTasks.add()),this.zone.runOutsideAngular(()=>{this.subscription.add(this.zone.onStable.subscribe(()=>{ve.assertNotInAngularZone(),queueMicrotask(()=>{null!==t&&!this.zone.hasPendingMacrotasks&&!this.zone.hasPendingMicrotasks&&(this.pendingTasks.remove(t),t=null)})}))}),this.subscription.add(this.zone.onUnstable.subscribe(()=>{ve.assertInAngularZone(),t??=this.pendingTasks.add()}))}ngOnDestroy(){this.subscription.unsubscribe()}static{this.\u0275fac=function(r){return new(r||e)}}static{this.\u0275prov=Z({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})(),Yo=(()=>{class e{constructor(){this.appRef=j(zn),this.taskService=j(vr),this.ngZone=j(ve),this.zonelessEnabled=j(ko),this.disableScheduling=j($y,{optional:!0})??!1,this.zoneIsDefined=typeof Zone<"u"&&!!Zone.root.run,this.schedulerTickApplyArgs=[{data:{__scheduler_tick__:!0}}],this.subscriptions=new Qt,this.cancelScheduledCallback=null,this.shouldRefreshViews=!1,this.useMicrotaskScheduler=!1,this.runningTick=!1,this.pendingRenderTaskId=null,this.subscriptions.add(this.appRef.afterTick.subscribe(()=>{this.runningTick||this.cleanup()})),this.subscriptions.add(this.ngZone.onUnstable.subscribe(()=>{this.runningTick||this.cleanup()})),this.disableScheduling||=!this.zonelessEnabled&&(this.ngZone instanceof z_||!this.zoneIsDefined)}notify(t){if(!this.zonelessEnabled&&5===t)return;switch(t){case 3:case 2:case 0:case 4:case 5:case 1:this.shouldRefreshViews=!0}if(!this.shouldScheduleTick())return;const r=this.useMicrotaskScheduler?Om:Rm;this.pendingRenderTaskId=this.taskService.add(),this.zoneIsDefined?Zone.root.run(()=>{this.cancelScheduledCallback=r(()=>{this.tick(this.shouldRefreshViews)})}):this.cancelScheduledCallback=r(()=>{this.tick(this.shouldRefreshViews)})}shouldScheduleTick(){return!(this.disableScheduling||null!==this.pendingRenderTaskId||this.runningTick||this.appRef._runningTick||!this.zonelessEnabled&&this.zoneIsDefined&&ve.isInAngularZone())}tick(t){if(this.runningTick||this.appRef.destroyed)return;const r=this.taskService.add();try{this.ngZone.run(()=>{this.runningTick=!0,this.appRef._tick(t)},void 0,this.schedulerTickApplyArgs)}catch(i){throw this.taskService.remove(r),i}finally{this.cleanup()}this.useMicrotaskScheduler=!0,Om(()=>{this.useMicrotaskScheduler=!1,this.taskService.remove(r)})}ngOnDestroy(){this.subscriptions.unsubscribe(),this.cleanup()}cleanup(){if(this.shouldRefreshViews=!1,this.runningTick=!1,this.cancelScheduledCallback?.(),this.cancelScheduledCallback=null,null!==this.pendingRenderTaskId){const t=this.pendingRenderTaskId;this.pendingRenderTaskId=null,this.taskService.remove(t)}}static{this.\u0275fac=function(r){return new(r||e)}}static{this.\u0275prov=Z({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();const ir=new W("",{providedIn:"root",factory:()=>j(ir,_e.Optional|_e.SkipSelf)||function bP(){return typeof $localize<"u"&&$localize.locale||Ci}()}),Xf=new W("");let Mr=null;let Jt=(()=>{class e{static{this.__NG_ELEMENT_ID__=TP}}return e})();function TP(e){return function IP(e,n,t){if(Gr(e)&&!t){const r=Ut(e.index,n);return new So(r,r)}return 175&e.type?new So(n[xe],n):null}(Se(),I(),!(16&~e))}class ME{constructor(){}supports(n){return Yc(n)}create(n){return new FP(n)}}const kP=(e,n)=>n;class FP{constructor(n){this.length=0,this._linkedRecords=null,this._unlinkedRecords=null,this._previousItHead=null,this._itHead=null,this._itTail=null,this._additionsHead=null,this._additionsTail=null,this._movesHead=null,this._movesTail=null,this._removalsHead=null,this._removalsTail=null,this._identityChangesHead=null,this._identityChangesTail=null,this._trackByFn=n||kP}forEachItem(n){let t;for(t=this._itHead;null!==t;t=t._next)n(t)}forEachOperation(n){let t=this._itHead,r=this._removalsHead,i=0,o=null;for(;t||r;){const c=!r||t&&t.currentIndex{c=this._trackByFn(i,l),null!==t&&Object.is(t.trackById,c)?(r&&(t=this._verifyReinsertion(t,l,c,i)),Object.is(t.item,l)||this._addIdentityChange(t,l)):(t=this._mismatch(t,l,c,i),r=!0),t=t._next,i++}),this.length=i;return this._truncate(t),this.collection=n,this.isDirty}get isDirty(){return null!==this._additionsHead||null!==this._movesHead||null!==this._removalsHead||null!==this._identityChangesHead}_reset(){if(this.isDirty){let n;for(n=this._previousItHead=this._itHead;null!==n;n=n._next)n._nextPrevious=n._next;for(n=this._additionsHead;null!==n;n=n._nextAdded)n.previousIndex=n.currentIndex;for(this._additionsHead=this._additionsTail=null,n=this._movesHead;null!==n;n=n._nextMoved)n.previousIndex=n.currentIndex;this._movesHead=this._movesTail=null,this._removalsHead=this._removalsTail=null,this._identityChangesHead=this._identityChangesTail=null}}_mismatch(n,t,r,i){let o;return null===n?o=this._itTail:(o=n._prev,this._remove(n)),null!==(n=null===this._unlinkedRecords?null:this._unlinkedRecords.get(r,null))?(Object.is(n.item,t)||this._addIdentityChange(n,t),this._reinsertAfter(n,o,i)):null!==(n=null===this._linkedRecords?null:this._linkedRecords.get(r,i))?(Object.is(n.item,t)||this._addIdentityChange(n,t),this._moveAfter(n,o,i)):n=this._addAfter(new RP(t,r),o,i),n}_verifyReinsertion(n,t,r,i){let o=null===this._unlinkedRecords?null:this._unlinkedRecords.get(r,null);return null!==o?n=this._reinsertAfter(o,n._prev,i):n.currentIndex!=i&&(n.currentIndex=i,this._addToMoves(n,i)),n}_truncate(n){for(;null!==n;){const t=n._next;this._addToRemovals(this._unlink(n)),n=t}null!==this._unlinkedRecords&&this._unlinkedRecords.clear(),null!==this._additionsTail&&(this._additionsTail._nextAdded=null),null!==this._movesTail&&(this._movesTail._nextMoved=null),null!==this._itTail&&(this._itTail._next=null),null!==this._removalsTail&&(this._removalsTail._nextRemoved=null),null!==this._identityChangesTail&&(this._identityChangesTail._nextIdentityChange=null)}_reinsertAfter(n,t,r){null!==this._unlinkedRecords&&this._unlinkedRecords.remove(n);const i=n._prevRemoved,o=n._nextRemoved;return null===i?this._removalsHead=o:i._nextRemoved=o,null===o?this._removalsTail=i:o._prevRemoved=i,this._insertAfter(n,t,r),this._addToMoves(n,r),n}_moveAfter(n,t,r){return this._unlink(n),this._insertAfter(n,t,r),this._addToMoves(n,r),n}_addAfter(n,t,r){return this._insertAfter(n,t,r),this._additionsTail=null===this._additionsTail?this._additionsHead=n:this._additionsTail._nextAdded=n,n}_insertAfter(n,t,r){const i=null===t?this._itHead:t._next;return n._next=i,n._prev=t,null===i?this._itTail=n:i._prev=n,null===t?this._itHead=n:t._next=n,null===this._linkedRecords&&(this._linkedRecords=new NE),this._linkedRecords.put(n),n.currentIndex=r,n}_remove(n){return this._addToRemovals(this._unlink(n))}_unlink(n){null!==this._linkedRecords&&this._linkedRecords.remove(n);const t=n._prev,r=n._next;return null===t?this._itHead=r:t._next=r,null===r?this._itTail=t:r._prev=t,n}_addToMoves(n,t){return n.previousIndex===t||(this._movesTail=null===this._movesTail?this._movesHead=n:this._movesTail._nextMoved=n),n}_addToRemovals(n){return null===this._unlinkedRecords&&(this._unlinkedRecords=new NE),this._unlinkedRecords.put(n),n.currentIndex=null,n._nextRemoved=null,null===this._removalsTail?(this._removalsTail=this._removalsHead=n,n._prevRemoved=null):(n._prevRemoved=this._removalsTail,this._removalsTail=this._removalsTail._nextRemoved=n),n}_addIdentityChange(n,t){return n.item=t,this._identityChangesTail=null===this._identityChangesTail?this._identityChangesHead=n:this._identityChangesTail._nextIdentityChange=n,n}}class RP{constructor(n,t){this.item=n,this.trackById=t,this.currentIndex=null,this.previousIndex=null,this._nextPrevious=null,this._prev=null,this._next=null,this._prevDup=null,this._nextDup=null,this._prevRemoved=null,this._nextRemoved=null,this._nextAdded=null,this._nextMoved=null,this._nextIdentityChange=null}}class OP{constructor(){this._head=null,this._tail=null}add(n){null===this._head?(this._head=this._tail=n,n._nextDup=null,n._prevDup=null):(this._tail._nextDup=n,n._prevDup=this._tail,n._nextDup=null,this._tail=n)}get(n,t){let r;for(r=this._head;null!==r;r=r._nextDup)if((null===t||t<=r.currentIndex)&&Object.is(r.trackById,n))return r;return null}remove(n){const t=n._prevDup,r=n._nextDup;return null===t?this._head=r:t._nextDup=r,null===r?this._tail=t:r._prevDup=t,null===this._head}}class NE{constructor(){this.map=new Map}put(n){const t=n.trackById;let r=this.map.get(t);r||(r=new OP,this.map.set(t,r)),r.add(n)}get(n,t){const i=this.map.get(n);return i?i.get(n,t):null}remove(n){const t=n.trackById;return this.map.get(t).remove(n)&&this.map.delete(t),n}get isEmpty(){return 0===this.map.size}clear(){this.map.clear()}}function AE(e,n,t){const r=e.previousIndex;if(null===r)return r;let i=0;return t&&r{class e{static{this.\u0275prov=Z({token:e,providedIn:"root",factory:FE})}constructor(t){this.factories=t}static create(t,r){if(null!=r){const i=r.factories.slice();t=t.concat(i)}return new e(t)}static extend(t){return{provide:e,useFactory:r=>e.create(t,r||FE()),deps:[[e,new e_,new Xu]]}}find(t){const r=this.factories.find(i=>i.supports(t));if(null!=r)return r;throw new k(901,!1)}}return e})();function XP(e){try{const{rootComponent:n,appProviders:t,platformProviders:r}=e,i=function DP(e=[]){if(Mr)return Mr;const n=function EE(e=[],n){return et.create({name:n,providers:[{provide:l_,useValue:"platform"},{provide:Xf,useValue:new Set([()=>Mr=null])},...e]})}(e);return Mr=n,function fE(){!function vT(e){Ma=e}(()=>{throw new k(600,!1)})}(),function SE(e){e.get(iw,null)?.forEach(t=>t())}(n),n}(r),o=[Zf({}),{provide:ri,useExisting:Yo},...t||[]],l=new kb({providers:o,parent:i,debugName:"",runEnvironmentInitializers:!1}).injector,_=l.get(ve);return _.run(()=>{l.resolveInjectorInitializers();const d=l.get(hn,null);let p;_.runOutsideAngular(()=>{p=_.onError.subscribe({next:w=>{d.handleError(w)}})});const h=()=>l.destroy(),m=i.get(Xf);return m.add(h),l.onDestroy(()=>{p.unsubscribe(),m.delete(h)}),function pE(e,n,t){try{const r=t();return bl(r)?r.catch(i=>{throw n.runOutsideAngular(()=>e.handleError(i)),i}):r}catch(r){throw n.runOutsideAngular(()=>e.handleError(r)),r}}(d,_,()=>{const w=l.get(vl);return w.runInitializers(),w.donePromise.then(()=>{!function xv(e){"string"==typeof e&&(Ov=e.toLowerCase().replace(/_/g,"-"))}(l.get(ir,Ci)||Ci);const E=l.get(zn);return void 0!==n&&E.bootstrap(n),E})})})}catch(n){return Promise.reject(n)}}const ZE=new W("");function na(e,n){Et("NgSignals");const t=function bu(e){const n=Object.create(vu);n.computation=e;const t=()=>{if(rt(n),ue(n),n.value===Ts)throw n.error;return n.value};return t[A]=n,t}(e);return n?.equal&&(t[A].equal=n.equal),t}function Un(e){const n=M(null);try{return e()}finally{M(n)}}function up(e){return e[e.length-1]}function Nr(e){return this instanceof Nr?(this.v=e,this):new Nr(e)}function lS(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=function pp(e){var n="function"==typeof Symbol&&Symbol.iterator,t=n&&e[n],r=0;if(t)return t.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(n?"Object is not iterable.":"Symbol.iterator is not defined.")}(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(o){t[o]=e[o]&&function(c){return new Promise(function(l,_){!function i(o,c,l,_){Promise.resolve(_).then(function(d){o({value:d,done:l})},c)}(l,_,(c=e[o](c)).done,c.value)})}}}"function"==typeof SuppressedError&&SuppressedError;const uS=e=>e&&"number"==typeof e.length&&"function"!=typeof e;function _S(e){return Ve(e?.then)}function dS(e){return Ve(e[Au])}function fS(e){return Symbol.asyncIterator&&Ve(e?.[Symbol.asyncIterator])}function pS(e){return new TypeError(`You provided ${null!==e&&"object"==typeof e?"an invalid object":`'${e}'`} where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.`)}const gS=function t2(){return"function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"}();function hS(e){return Ve(e?.[gS])}function mS(e){return function cS(e,n,t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var i,r=t.apply(e,n||[]),o=[];return i=Object.create(("function"==typeof AsyncIterator?AsyncIterator:Object).prototype),l("next"),l("throw"),l("return",function c(w){return function(b){return Promise.resolve(b).then(w,h)}}),i[Symbol.asyncIterator]=function(){return this},i;function l(w,b){r[w]&&(i[w]=function(E){return new Promise(function(C,N){o.push([w,E,C,N])>1||_(w,E)})},b&&(i[w]=b(i[w])))}function _(w,b){try{!function d(w){w.value instanceof Nr?Promise.resolve(w.value.v).then(p,h):m(o[0][2],w)}(r[w](b))}catch(E){m(o[0][3],E)}}function p(w){_("next",w)}function h(w){_("throw",w)}function m(w,b){w(b),o.shift(),o.length&&_(o[0][0],o[0][1])}}(this,arguments,function*(){const t=e.getReader();try{for(;;){const{value:r,done:i}=yield Nr(t.read());if(i)return yield Nr(void 0);yield yield Nr(r)}}finally{t.releaseLock()}})}function wS(e){return Ve(e?.getReader)}function ws(e){if(e instanceof Rt)return e;if(null!=e){if(dS(e))return function n2(e){return new Rt(n=>{const t=e[Au]();if(Ve(t.subscribe))return t.subscribe(n);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}(e);if(uS(e))return function r2(e){return new Rt(n=>{for(let t=0;t{e.then(t=>{n.closed||(n.next(t),n.complete())},t=>n.error(t)).then(null,Rg)})}(e);if(fS(e))return yS(e);if(hS(e))return function i2(e){return new Rt(n=>{for(const t of e)if(n.next(t),n.closed)return;n.complete()})}(e);if(wS(e))return function o2(e){return yS(mS(e))}(e)}throw pS(e)}function yS(e){return new Rt(n=>{(function a2(e,n){var t,r,i,o;return function oS(e,n,t,r){return new(t||(t=Promise))(function(o,c){function l(p){try{d(r.next(p))}catch(h){c(h)}}function _(p){try{d(r.throw(p))}catch(h){c(h)}}function d(p){p.done?o(p.value):function i(o){return o instanceof t?o:new t(function(c){c(o)})}(p.value).then(l,_)}d((r=r.apply(e,n||[])).next())})}(this,void 0,void 0,function*(){try{for(t=lS(e);!(r=yield t.next()).done;)if(n.next(r.value),n.closed)return}catch(c){i={error:c}}finally{try{r&&!r.done&&(o=t.return)&&(yield o.call(t))}finally{if(i)throw i.error}}n.complete()})})(e,n).catch(t=>n.error(t))})}function Ar(e,n,t,r=0,i=!1){const o=n.schedule(function(){t(),i?e.add(this.schedule(null,r)):this.unsubscribe()},r);if(e.add(o),!i)return o}function bS(e,n=0){return jr((t,r)=>{t.subscribe(pr(r,i=>Ar(r,e,()=>r.next(i),n),()=>Ar(r,e,()=>r.complete(),n),i=>Ar(r,e,()=>r.error(i),n)))})}function vS(e,n=0){return jr((t,r)=>{r.add(e.schedule(()=>t.subscribe(r),n))})}function ES(e,n){if(!e)throw new Error("Iterable cannot be null");return new Rt(t=>{Ar(t,n,()=>{const r=e[Symbol.asyncIterator]();Ar(t,n,()=>{r.next().then(i=>{i.done?t.complete():t.next(i.value)})},0,!0)})})}function gp(e,n){return n?function f2(e,n){if(null!=e){if(dS(e))return function c2(e,n){return ws(e).pipe(vS(n),bS(n))}(e,n);if(uS(e))return function u2(e,n){return new Rt(t=>{let r=0;return n.schedule(function(){r===e.length?t.complete():(t.next(e[r++]),t.closed||this.schedule())})})}(e,n);if(_S(e))return function l2(e,n){return ws(e).pipe(vS(n),bS(n))}(e,n);if(fS(e))return ES(e,n);if(hS(e))return function _2(e,n){return new Rt(t=>{let r;return Ar(t,n,()=>{r=e[gS](),Ar(t,n,()=>{let i,o;try{({value:i,done:o}=r.next())}catch(c){return void t.error(c)}o?t.complete():t.next(i)},0,!0)}),()=>Ve(r?.return)&&r.return()})}(e,n);if(wS(e))return function d2(e,n){return ES(mS(e),n)}(e,n)}throw pS(e)}(e,n):ws(e)}function SS(...e){return gp(e,function MV(e){return function TV(e){return e&&Ve(e.schedule)}(up(e))?e.pop():void 0}(e))}function hp(e,n,t=1/0){return Ve(n)?hp((r,i)=>gr((o,c)=>n(r,o,i,c))(ws(e(r,i))),t):("number"==typeof n&&(t=n),jr((r,i)=>function p2(e,n,t,r,i,o,c,l){const _=[];let d=0,p=0,h=!1;const m=()=>{h&&!_.length&&!d&&n.complete()},w=E=>d{o&&n.next(E),d++;let C=!1;ws(t(E,p++)).subscribe(pr(n,N=>{i?.(N),o?w(N):n.next(N)},()=>{C=!0},void 0,()=>{if(C)try{for(d--;_.length&&db(N)):b(N)}m()}catch(N){n.error(N)}}))};return e.subscribe(pr(n,w,()=>{h=!0,m()})),()=>{l?.()}}(r,i,e,t)))}function CS(e){return jr((n,t)=>{try{n.subscribe(t)}finally{t.add(e)}})}let DS=null;function ra(){return DS}class y2{}const rn=new W("");function OS(e,n){n=encodeURIComponent(n);for(const t of e.split(";")){const r=t.indexOf("="),[i,o]=-1==r?[t,""]:[t.slice(0,r),t.slice(r+1)];if(i.trim()===n)return decodeURIComponent(o)}return null}const Tp=/\s+/,xS=[];let cr=(()=>{class e{constructor(t,r){this._ngEl=t,this._renderer=r,this.initialClasses=xS,this.stateMap=new Map}set klass(t){this.initialClasses=null!=t?t.trim().split(Tp):xS}set ngClass(t){this.rawClass="string"==typeof t?t.trim().split(Tp):t}ngDoCheck(){for(const r of this.initialClasses)this._updateState(r,!0);const t=this.rawClass;if(Array.isArray(t)||t instanceof Set)for(const r of t)this._updateState(r,!0);else if(null!=t)for(const r of Object.keys(t))this._updateState(r,!!t[r]);this._applyStateDiff()}_updateState(t,r){const i=this.stateMap.get(t);void 0!==i?(i.enabled!==r&&(i.changed=!0,i.enabled=r),i.touched=!0):this.stateMap.set(t,{enabled:r,changed:!0,touched:!0})}_applyStateDiff(){for(const t of this.stateMap){const r=t[0],i=t[1];i.changed?(this._toggleClass(r,i.enabled),i.changed=!1):i.touched||(i.enabled&&this._toggleClass(r,!1),this.stateMap.delete(r)),i.touched=!1}}_toggleClass(t,r){(t=t.trim()).length>0&&t.split(Tp).forEach(i=>{r?this._renderer.addClass(this._ngEl.nativeElement,i):this._renderer.removeClass(this._ngEl.nativeElement,i)})}static{this.\u0275fac=function(r){return new(r||e)(T(tn),T(os))}}static{this.\u0275dir=ne({type:e,selectors:[["","ngClass",""]],inputs:{klass:[0,"class","klass"],ngClass:"ngClass"},standalone:!0})}}return e})();class oW{constructor(n,t,r,i){this.$implicit=n,this.ngForOf=t,this.index=r,this.count=i}get first(){return 0===this.index}get last(){return this.index===this.count-1}get even(){return this.index%2==0}get odd(){return!this.even}}let ia=(()=>{class e{set ngForOf(t){this._ngForOf=t,this._ngForOfDirty=!0}set ngForTrackBy(t){this._trackByFn=t}get ngForTrackBy(){return this._trackByFn}constructor(t,r,i){this._viewContainer=t,this._template=r,this._differs=i,this._ngForOf=null,this._ngForOfDirty=!0,this._differ=null}set ngForTemplate(t){t&&(this._template=t)}ngDoCheck(){if(this._ngForOfDirty){this._ngForOfDirty=!1;const t=this._ngForOf;!this._differ&&t&&(this._differ=this._differs.find(t).create(this.ngForTrackBy))}if(this._differ){const t=this._differ.diff(this._ngForOf);t&&this._applyChanges(t)}}_applyChanges(t){const r=this._viewContainer;t.forEachOperation((i,o,c)=>{if(null==i.previousIndex)r.createEmbeddedView(this._template,new oW(i.item,this._ngForOf,-1,-1),null===c?void 0:c);else if(null==c)r.remove(null===o?void 0:o);else if(null!==o){const l=r.get(o);r.move(l,c),PS(l,i)}});for(let i=0,o=r.length;i{PS(r.get(i.currentIndex),i)})}static ngTemplateContextGuard(t,r){return!0}static{this.\u0275fac=function(r){return new(r||e)(T(Wn),T(sr),T(ip))}}static{this.\u0275dir=ne({type:e,selectors:[["","ngFor","","ngForOf",""]],inputs:{ngForOf:"ngForOf",ngForTrackBy:"ngForTrackBy",ngForTemplate:"ngForTemplate"},standalone:!0})}}return e})();function PS(e,n){e.context.$implicit=n.item}let an=(()=>{class e{constructor(t,r){this._viewContainer=t,this._context=new aW,this._thenTemplateRef=null,this._elseTemplateRef=null,this._thenViewRef=null,this._elseViewRef=null,this._thenTemplateRef=r}set ngIf(t){this._context.$implicit=this._context.ngIf=t,this._updateView()}set ngIfThen(t){VS("ngIfThen",t),this._thenTemplateRef=t,this._thenViewRef=null,this._updateView()}set ngIfElse(t){VS("ngIfElse",t),this._elseTemplateRef=t,this._elseViewRef=null,this._updateView()}_updateView(){this._context.$implicit?this._thenViewRef||(this._viewContainer.clear(),this._elseViewRef=null,this._thenTemplateRef&&(this._thenViewRef=this._viewContainer.createEmbeddedView(this._thenTemplateRef,this._context))):this._elseViewRef||(this._viewContainer.clear(),this._thenViewRef=null,this._elseTemplateRef&&(this._elseViewRef=this._viewContainer.createEmbeddedView(this._elseTemplateRef,this._context)))}static ngTemplateContextGuard(t,r){return!0}static{this.\u0275fac=function(r){return new(r||e)(T(Wn),T(sr))}}static{this.\u0275dir=ne({type:e,selectors:[["","ngIf",""]],inputs:{ngIf:"ngIf",ngIfThen:"ngIfThen",ngIfElse:"ngIfElse"},standalone:!0})}}return e})();class aW{constructor(){this.$implicit=null,this.ngIf=null}}function VS(e,n){if(n&&!n.createEmbeddedView)throw new Error(`${e} must be a TemplateRef, but received '${Je(n)}'.`)}let jS=(()=>{class e{constructor(t){this._viewContainerRef=t,this._viewRef=null,this.ngTemplateOutletContext=null,this.ngTemplateOutlet=null,this.ngTemplateOutletInjector=null}ngOnChanges(t){if(this._shouldRecreateView(t)){const r=this._viewContainerRef;if(this._viewRef&&r.remove(r.indexOf(this._viewRef)),!this.ngTemplateOutlet)return void(this._viewRef=null);const i=this._createContextForwardProxy();this._viewRef=r.createEmbeddedView(this.ngTemplateOutlet,i,{injector:this.ngTemplateOutletInjector??void 0})}}_shouldRecreateView(t){return!!t.ngTemplateOutlet||!!t.ngTemplateOutletInjector}_createContextForwardProxy(){return new Proxy({},{set:(t,r,i)=>!!this.ngTemplateOutletContext&&Reflect.set(this.ngTemplateOutletContext,r,i),get:(t,r,i)=>{if(this.ngTemplateOutletContext)return Reflect.get(this.ngTemplateOutletContext,r,i)}})}static{this.\u0275fac=function(r){return new(r||e)(T(Wn))}}static{this.\u0275dir=ne({type:e,selectors:[["","ngTemplateOutlet",""]],inputs:{ngTemplateOutletContext:"ngTemplateOutletContext",ngTemplateOutlet:"ngTemplateOutlet",ngTemplateOutletInjector:"ngTemplateOutletInjector"},standalone:!0,features:[Yn]})}}return e})(),Ke=(()=>{class e{static{this.\u0275fac=function(r){return new(r||e)}}static{this.\u0275mod=Zn({type:e})}static{this.\u0275inj=An({})}}return e})();function zS(e){return"server"===e}class US{}class ql{}class Kl{}class cn{constructor(n){this.normalizedNames=new Map,this.lazyUpdate=null,n?"string"==typeof n?this.lazyInit=()=>{this.headers=new Map,n.split("\n").forEach(t=>{const r=t.indexOf(":");if(r>0){const i=t.slice(0,r),o=i.toLowerCase(),c=t.slice(r+1).trim();this.maybeSetNormalizedName(i,o),this.headers.has(o)?this.headers.get(o).push(c):this.headers.set(o,[c])}})}:typeof Headers<"u"&&n instanceof Headers?(this.headers=new Map,n.forEach((t,r)=>{this.setHeaderEntries(r,t)})):this.lazyInit=()=>{this.headers=new Map,Object.entries(n).forEach(([t,r])=>{this.setHeaderEntries(t,r)})}:this.headers=new Map}has(n){return this.init(),this.headers.has(n.toLowerCase())}get(n){this.init();const t=this.headers.get(n.toLowerCase());return t&&t.length>0?t[0]:null}keys(){return this.init(),Array.from(this.normalizedNames.values())}getAll(n){return this.init(),this.headers.get(n.toLowerCase())||null}append(n,t){return this.clone({name:n,value:t,op:"a"})}set(n,t){return this.clone({name:n,value:t,op:"s"})}delete(n,t){return this.clone({name:n,value:t,op:"d"})}maybeSetNormalizedName(n,t){this.normalizedNames.has(t)||this.normalizedNames.set(t,n)}init(){this.lazyInit&&(this.lazyInit instanceof cn?this.copyFrom(this.lazyInit):this.lazyInit(),this.lazyInit=null,this.lazyUpdate&&(this.lazyUpdate.forEach(n=>this.applyUpdate(n)),this.lazyUpdate=null))}copyFrom(n){n.init(),Array.from(n.headers.keys()).forEach(t=>{this.headers.set(t,n.headers.get(t)),this.normalizedNames.set(t,n.normalizedNames.get(t))})}clone(n){const t=new cn;return t.lazyInit=this.lazyInit&&this.lazyInit instanceof cn?this.lazyInit:this,t.lazyUpdate=(this.lazyUpdate||[]).concat([n]),t}applyUpdate(n){const t=n.name.toLowerCase();switch(n.op){case"a":case"s":let r=n.value;if("string"==typeof r&&(r=[r]),0===r.length)return;this.maybeSetNormalizedName(n.name,t);const i=("a"===n.op?this.headers.get(t):void 0)||[];i.push(...r),this.headers.set(t,i);break;case"d":const o=n.value;if(o){let c=this.headers.get(t);if(!c)return;c=c.filter(l=>-1===o.indexOf(l)),0===c.length?(this.headers.delete(t),this.normalizedNames.delete(t)):this.headers.set(t,c)}else this.headers.delete(t),this.normalizedNames.delete(t)}}setHeaderEntries(n,t){const r=(Array.isArray(t)?t:[t]).map(o=>o.toString()),i=n.toLowerCase();this.headers.set(i,r),this.maybeSetNormalizedName(n,i)}forEach(n){this.init(),Array.from(this.normalizedNames.keys()).forEach(t=>n(this.normalizedNames.get(t),this.headers.get(t)))}}class lj{encodeKey(n){return eC(n)}encodeValue(n){return eC(n)}decodeKey(n){return decodeURIComponent(n)}decodeValue(n){return decodeURIComponent(n)}}const _j=/%(\d[a-f0-9])/gi,dj={40:"@","3A":":",24:"$","2C":",","3B":";","3D":"=","3F":"?","2F":"/"};function eC(e){return encodeURIComponent(e).replace(_j,(n,t)=>dj[t]??n)}function Jl(e){return`${e}`}class kr{constructor(n={}){if(this.updates=null,this.cloneFrom=null,this.encoder=n.encoder||new lj,n.fromString){if(n.fromObject)throw new Error("Cannot specify both fromString and fromObject.");this.map=function uj(e,n){const t=new Map;return e.length>0&&e.replace(/^\?/,"").split("&").forEach(i=>{const o=i.indexOf("="),[c,l]=-1==o?[n.decodeKey(i),""]:[n.decodeKey(i.slice(0,o)),n.decodeValue(i.slice(o+1))],_=t.get(c)||[];_.push(l),t.set(c,_)}),t}(n.fromString,this.encoder)}else n.fromObject?(this.map=new Map,Object.keys(n.fromObject).forEach(t=>{const r=n.fromObject[t],i=Array.isArray(r)?r.map(Jl):[Jl(r)];this.map.set(t,i)})):this.map=null}has(n){return this.init(),this.map.has(n)}get(n){this.init();const t=this.map.get(n);return t?t[0]:null}getAll(n){return this.init(),this.map.get(n)||null}keys(){return this.init(),Array.from(this.map.keys())}append(n,t){return this.clone({param:n,value:t,op:"a"})}appendAll(n){const t=[];return Object.keys(n).forEach(r=>{const i=n[r];Array.isArray(i)?i.forEach(o=>{t.push({param:r,value:o,op:"a"})}):t.push({param:r,value:i,op:"a"})}),this.clone(t)}set(n,t){return this.clone({param:n,value:t,op:"s"})}delete(n,t){return this.clone({param:n,value:t,op:"d"})}toString(){return this.init(),this.keys().map(n=>{const t=this.encoder.encodeKey(n);return this.map.get(n).map(r=>t+"="+this.encoder.encodeValue(r)).join("&")}).filter(n=>""!==n).join("&")}clone(n){const t=new kr({encoder:this.encoder});return t.cloneFrom=this.cloneFrom||this,t.updates=(this.updates||[]).concat(n),t}init(){null===this.map&&(this.map=new Map),null!==this.cloneFrom&&(this.cloneFrom.init(),this.cloneFrom.keys().forEach(n=>this.map.set(n,this.cloneFrom.map.get(n))),this.updates.forEach(n=>{switch(n.op){case"a":case"s":const t=("a"===n.op?this.map.get(n.param):void 0)||[];t.push(Jl(n.value)),this.map.set(n.param,t);break;case"d":if(void 0===n.value){this.map.delete(n.param);break}{let r=this.map.get(n.param)||[];const i=r.indexOf(Jl(n.value));-1!==i&&r.splice(i,1),r.length>0?this.map.set(n.param,r):this.map.delete(n.param)}}}),this.cloneFrom=this.updates=null)}}class fj{constructor(){this.map=new Map}set(n,t){return this.map.set(n,t),this}get(n){return this.map.has(n)||this.map.set(n,n.defaultValue()),this.map.get(n)}delete(n){return this.map.delete(n),this}has(n){return this.map.has(n)}keys(){return this.map.keys()}}function tC(e){return typeof ArrayBuffer<"u"&&e instanceof ArrayBuffer}function nC(e){return typeof Blob<"u"&&e instanceof Blob}function rC(e){return typeof FormData<"u"&&e instanceof FormData}class ca{constructor(n,t,r,i){let o;if(this.url=t,this.body=null,this.reportProgress=!1,this.withCredentials=!1,this.responseType="json",this.method=n.toUpperCase(),function pj(e){switch(e){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"JSONP":return!1;default:return!0}}(this.method)||i?(this.body=void 0!==r?r:null,o=i):o=r,o&&(this.reportProgress=!!o.reportProgress,this.withCredentials=!!o.withCredentials,o.responseType&&(this.responseType=o.responseType),o.headers&&(this.headers=o.headers),o.context&&(this.context=o.context),o.params&&(this.params=o.params),this.transferCache=o.transferCache),this.headers??=new cn,this.context??=new fj,this.params){const c=this.params.toString();if(0===c.length)this.urlWithParams=t;else{const l=t.indexOf("?");this.urlWithParams=t+(-1===l?"?":lm.set(w,n.setHeaders[w]),d)),n.setParams&&(p=Object.keys(n.setParams).reduce((m,w)=>m.set(w,n.setParams[w]),p)),new ca(t,r,c,{params:p,headers:d,context:h,reportProgress:_,responseType:i,withCredentials:l,transferCache:o})}}var Fr=function(e){return e[e.Sent=0]="Sent",e[e.UploadProgress=1]="UploadProgress",e[e.ResponseHeader=2]="ResponseHeader",e[e.DownloadProgress=3]="DownloadProgress",e[e.Response=4]="Response",e[e.User=5]="User",e}(Fr||{});class Op{constructor(n,t=200,r="OK"){this.headers=n.headers||new cn,this.status=void 0!==n.status?n.status:t,this.statusText=n.statusText||r,this.url=n.url||null,this.ok=this.status>=200&&this.status<300}}class Zl extends Op{constructor(n={}){super(n),this.type=Fr.ResponseHeader}clone(n={}){return new Zl({headers:n.headers||this.headers,status:void 0!==n.status?n.status:this.status,statusText:n.statusText||this.statusText,url:n.url||this.url||void 0})}}class ys extends Op{constructor(n={}){super(n),this.type=Fr.Response,this.body=void 0!==n.body?n.body:null}clone(n={}){return new ys({body:void 0!==n.body?n.body:this.body,headers:n.headers||this.headers,status:void 0!==n.status?n.status:this.status,statusText:n.statusText||this.statusText,url:n.url||this.url||void 0})}}class Ai extends Op{constructor(n){super(n,0,"Unknown Error"),this.name="HttpErrorResponse",this.ok=!1,this.message=this.status>=200&&this.status<300?`Http failure during parsing for ${n.url||"(unknown url)"}`:`Http failure response for ${n.url||"(unknown url)"}: ${n.status} ${n.statusText}`,this.error=n.error||null}}function xp(e,n){return{body:n,headers:e.headers,context:e.context,observe:e.observe,params:e.params,reportProgress:e.reportProgress,responseType:e.responseType,withCredentials:e.withCredentials,transferCache:e.transferCache}}let wj=(()=>{class e{constructor(t){this.handler=t}request(t,r,i={}){let o;if(t instanceof ca)o=t;else{let _,d;_=i.headers instanceof cn?i.headers:new cn(i.headers),i.params&&(d=i.params instanceof kr?i.params:new kr({fromObject:i.params})),o=new ca(t,r,void 0!==i.body?i.body:null,{headers:_,context:i.context,params:d,reportProgress:i.reportProgress,responseType:i.responseType||"json",withCredentials:i.withCredentials,transferCache:i.transferCache})}const c=SS(o).pipe(function g2(e,n){return Ve(n)?hp(e,n,1):hp(e,1)}(_=>this.handler.handle(_)));if(t instanceof ca||"events"===i.observe)return c;const l=c.pipe(function h2(e,n){return jr((t,r)=>{let i=0;t.subscribe(pr(r,o=>e.call(n,o,i++)&&r.next(o)))})}(_=>_ instanceof ys));switch(i.observe||"body"){case"body":switch(o.responseType){case"arraybuffer":return l.pipe(gr(_=>{if(null!==_.body&&!(_.body instanceof ArrayBuffer))throw new Error("Response is not an ArrayBuffer.");return _.body}));case"blob":return l.pipe(gr(_=>{if(null!==_.body&&!(_.body instanceof Blob))throw new Error("Response is not a Blob.");return _.body}));case"text":return l.pipe(gr(_=>{if(null!==_.body&&"string"!=typeof _.body)throw new Error("Response is not a string.");return _.body}));default:return l.pipe(gr(_=>_.body))}case"response":return l;default:throw new Error(`Unreachable: unhandled observe type ${i.observe}}`)}}delete(t,r={}){return this.request("DELETE",t,r)}get(t,r={}){return this.request("GET",t,r)}head(t,r={}){return this.request("HEAD",t,r)}jsonp(t,r){return this.request("JSONP",t,{params:(new kr).append(r,"JSONP_CALLBACK"),observe:"body",responseType:"json"})}options(t,r={}){return this.request("OPTIONS",t,r)}patch(t,r,i={}){return this.request("PATCH",t,xp(i,r))}post(t,r,i={}){return this.request("POST",t,xp(i,r))}put(t,r,i={}){return this.request("PUT",t,xp(i,r))}static{this.\u0275fac=function(r){return new(r||e)(U(ql))}}static{this.\u0275prov=Z({token:e,factory:e.\u0275fac})}}return e})();const yj=/^\)\]\}',?\n/;function iC(e){if(e.url)return e.url;const n="X-Request-URL".toLocaleLowerCase();return e.headers.get(n)}let Lp=(()=>{class e{constructor(){this.fetchImpl=j(vj,{optional:!0})?.fetch??fetch.bind(globalThis),this.ngZone=j(ve)}handle(t){return new Rt(r=>{const i=new AbortController;return this.doRequest(t,i.signal,r).then(Pp,o=>r.error(new Ai({error:o}))),()=>i.abort()})}doRequest(t,r,i){var o=this;return(0,u.A)(function*(){const c=o.createRequestInit(t);let l;try{const b=o.ngZone.runOutsideAngular(()=>o.fetchImpl(t.urlWithParams,{signal:r,...c}));(function Ej(e){e.then(Pp,Pp)})(b),i.next({type:Fr.Sent}),l=yield b}catch(b){return void i.error(new Ai({error:b,status:b.status??0,statusText:b.statusText,url:t.urlWithParams,headers:b.headers}))}const _=new cn(l.headers),d=l.statusText,p=iC(l)??t.urlWithParams;let h=l.status,m=null;if(t.reportProgress&&i.next(new Zl({headers:_,status:h,statusText:d,url:p})),l.body){const b=l.headers.get("content-length"),E=[],C=l.body.getReader();let D,V,N=0;const q=typeof Zone<"u"&&Zone.current;yield o.ngZone.runOutsideAngular((0,u.A)(function*(){for(;;){const{done:be,value:it}=yield C.read();if(be)break;if(E.push(it),N+=it.length,t.reportProgress){V="text"===t.responseType?(V??"")+(D??=new TextDecoder).decode(it,{stream:!0}):void 0;const ur=()=>i.next({type:Fr.DownloadProgress,total:b?+b:void 0,loaded:N,partialText:V});q?q.run(ur):ur()}}}));const ce=o.concatChunks(E,N);try{const be=l.headers.get("Content-Type")??"";m=o.parseBody(t,ce,be)}catch(be){return void i.error(new Ai({error:be,headers:new cn(l.headers),status:l.status,statusText:l.statusText,url:iC(l)??t.urlWithParams}))}}0===h&&(h=m?200:0),h>=200&&h<300?(i.next(new ys({body:m,headers:_,status:h,statusText:d,url:p})),i.complete()):i.error(new Ai({error:m,headers:_,status:h,statusText:d,url:p}))})()}parseBody(t,r,i){switch(t.responseType){case"json":const o=(new TextDecoder).decode(r).replace(yj,"");return""===o?null:JSON.parse(o);case"text":return(new TextDecoder).decode(r);case"blob":return new Blob([r],{type:i});case"arraybuffer":return r.buffer}}createRequestInit(t){const r={},i=t.withCredentials?"include":void 0;if(t.headers.forEach((o,c)=>r[o]=c.join(",")),t.headers.has("Accept")||(r.Accept="application/json, text/plain, */*"),!t.headers.has("Content-Type")){const o=t.detectContentTypeHeader();null!==o&&(r["Content-Type"]=o)}return{body:t.serializeBody(),method:t.method,headers:r,credentials:i}}concatChunks(t,r){const i=new Uint8Array(r);let o=0;for(const c of t)i.set(c,o),o+=c.length;return i}static{this.\u0275fac=function(r){return new(r||e)}}static{this.\u0275prov=Z({token:e,factory:e.\u0275fac})}}return e})();class vj{}function Pp(){}function oC(e,n){return n(e)}function Sj(e,n){return(t,r)=>n.intercept(t,{handle:i=>e(i,r)})}const Dj=new W(""),la=new W(""),aC=new W(""),cC=new W("",{providedIn:"root",factory:()=>!0});function Tj(){let e=null;return(n,t)=>{null===e&&(e=(j(Dj,{optional:!0})??[]).reduceRight(Sj,oC));const r=j(vr);if(j(cC)){const o=r.add();return e(n,t).pipe(CS(()=>r.remove(o)))}return e(n,t)}}let lC=(()=>{class e extends ql{constructor(t,r){super(),this.backend=t,this.injector=r,this.chain=null,this.pendingTasks=j(vr),this.contributeToStability=j(cC)}handle(t){if(null===this.chain){const r=Array.from(new Set([...this.injector.get(la),...this.injector.get(aC,[])]));this.chain=r.reduceRight((i,o)=>function Cj(e,n,t){return(r,i)=>function Rh(e,n){e instanceof xs&&e.assertNotDestroyed();const r=wr(e),i=Ot(void 0);try{return n()}finally{wr(r),Ot(i)}}(t,()=>n(r,o=>e(o,i)))}(i,o,this.injector),oC)}if(this.contributeToStability){const r=this.pendingTasks.add();return this.chain(t,i=>this.backend.handle(i)).pipe(CS(()=>this.pendingTasks.remove(r)))}return this.chain(t,r=>this.backend.handle(r))}static{this.\u0275fac=function(r){return new(r||e)(U(Kl),U(Yt))}}static{this.\u0275prov=Z({token:e,factory:e.\u0275fac})}}return e})();const kj=/^\)\]\}',?\n/;let _C=(()=>{class e{constructor(t){this.xhrFactory=t}handle(t){if("JSONP"===t.method)throw new k(-2800,!1);const r=this.xhrFactory;return(r.\u0275loadImpl?gp(r.\u0275loadImpl()):SS(null)).pipe(function m2(e,n){return jr((t,r)=>{let i=null,o=0,c=!1;const l=()=>c&&!i&&r.complete();t.subscribe(pr(r,_=>{i?.unsubscribe();let d=0;const p=o++;ws(e(_,p)).subscribe(i=pr(r,h=>r.next(n?n(_,h,p,d++):h),()=>{i=null,l()}))},()=>{c=!0,l()}))})}(()=>new Rt(o=>{const c=r.build();if(c.open(t.method,t.urlWithParams),t.withCredentials&&(c.withCredentials=!0),t.headers.forEach((E,C)=>c.setRequestHeader(E,C.join(","))),t.headers.has("Accept")||c.setRequestHeader("Accept","application/json, text/plain, */*"),!t.headers.has("Content-Type")){const E=t.detectContentTypeHeader();null!==E&&c.setRequestHeader("Content-Type",E)}if(t.responseType){const E=t.responseType.toLowerCase();c.responseType="json"!==E?E:"text"}const l=t.serializeBody();let _=null;const d=()=>{if(null!==_)return _;const E=c.statusText||"OK",C=new cn(c.getAllResponseHeaders()),N=function Fj(e){return"responseURL"in e&&e.responseURL?e.responseURL:/^X-Request-URL:/m.test(e.getAllResponseHeaders())?e.getResponseHeader("X-Request-URL"):null}(c)||t.url;return _=new Zl({headers:C,status:c.status,statusText:E,url:N}),_},p=()=>{let{headers:E,status:C,statusText:N,url:D}=d(),V=null;204!==C&&(V=typeof c.response>"u"?c.responseText:c.response),0===C&&(C=V?200:0);let q=C>=200&&C<300;if("json"===t.responseType&&"string"==typeof V){const ce=V;V=V.replace(kj,"");try{V=""!==V?JSON.parse(V):null}catch(be){V=ce,q&&(q=!1,V={error:be,text:V})}}q?(o.next(new ys({body:V,headers:E,status:C,statusText:N,url:D||void 0})),o.complete()):o.error(new Ai({error:V,headers:E,status:C,statusText:N,url:D||void 0}))},h=E=>{const{url:C}=d(),N=new Ai({error:E,status:c.status||0,statusText:c.statusText||"Unknown Error",url:C||void 0});o.error(N)};let m=!1;const w=E=>{m||(o.next(d()),m=!0);let C={type:Fr.DownloadProgress,loaded:E.loaded};E.lengthComputable&&(C.total=E.total),"text"===t.responseType&&c.responseText&&(C.partialText=c.responseText),o.next(C)},b=E=>{let C={type:Fr.UploadProgress,loaded:E.loaded};E.lengthComputable&&(C.total=E.total),o.next(C)};return c.addEventListener("load",p),c.addEventListener("error",h),c.addEventListener("timeout",h),c.addEventListener("abort",h),t.reportProgress&&(c.addEventListener("progress",w),null!==l&&c.upload&&c.upload.addEventListener("progress",b)),c.send(l),o.next({type:Fr.Sent}),()=>{c.removeEventListener("error",h),c.removeEventListener("abort",h),c.removeEventListener("load",p),c.removeEventListener("timeout",h),t.reportProgress&&(c.removeEventListener("progress",w),null!==l&&c.upload&&c.upload.removeEventListener("progress",b)),c.readyState!==c.DONE&&c.abort()}})))}static{this.\u0275fac=function(r){return new(r||e)(U(US))}}static{this.\u0275prov=Z({token:e,factory:e.\u0275fac})}}return e})();const Vp=new W(""),dC=new W("",{providedIn:"root",factory:()=>"XSRF-TOKEN"}),fC=new W("",{providedIn:"root",factory:()=>"X-XSRF-TOKEN"});class pC{}let xj=(()=>{class e{constructor(t,r,i){this.doc=t,this.platform=r,this.cookieName=i,this.lastCookieString="",this.lastToken=null,this.parseCount=0}getToken(){if("server"===this.platform)return null;const t=this.doc.cookie||"";return t!==this.lastCookieString&&(this.parseCount++,this.lastToken=OS(t,this.cookieName),this.lastCookieString=t),this.lastToken}static{this.\u0275fac=function(r){return new(r||e)(U(rn),U(Yr),U(dC))}}static{this.\u0275prov=Z({token:e,factory:e.\u0275fac})}}return e})();function Lj(e,n){const t=e.url.toLowerCase();if(!j(Vp)||"GET"===e.method||"HEAD"===e.method||t.startsWith("http://")||t.startsWith("https://"))return n(e);const r=j(pC).getToken(),i=j(fC);return null!=r&&!e.headers.has(i)&&(e=e.clone({headers:e.headers.set(i,r)})),n(e)}var Rr=function(e){return e[e.Interceptors=0]="Interceptors",e[e.LegacyInterceptors=1]="LegacyInterceptors",e[e.CustomXsrfConfiguration=2]="CustomXsrfConfiguration",e[e.NoXsrfProtection=3]="NoXsrfProtection",e[e.JsonpSupport=4]="JsonpSupport",e[e.RequestsMadeViaParent=5]="RequestsMadeViaParent",e[e.Fetch=6]="Fetch",e}(Rr||{});function bs(e,n){return{\u0275kind:e,\u0275providers:n}}function Pj(...e){const n=[wj,_C,lC,{provide:ql,useExisting:lC},{provide:Kl,useFactory:()=>j(Lp,{optional:!0})??j(_C)},{provide:la,useValue:Lj,multi:!0},{provide:Vp,useValue:!0},{provide:pC,useClass:xj}];for(const t of e)n.push(...t.\u0275providers);return function $i(e){return{\u0275providers:e}}(n)}const gC=new W("");let Wj=(()=>{class e{static{this.\u0275fac=function(r){return new(r||e)}}static{this.\u0275mod=Zn({type:e})}static{this.\u0275inj=An({providers:[Pj(bs(Rr.LegacyInterceptors,[{provide:gC,useFactory:Tj},{provide:la,useExisting:gC,multi:!0}]))]})}}return e})();class Kj extends y2{constructor(){super(...arguments),this.supportsDOMEvents=!0}}class Wp extends Kj{static makeCurrent(){!function w2(e){DS??=e}(new Wp)}onAndCancel(n,t,r){return n.addEventListener(t,r),()=>{n.removeEventListener(t,r)}}dispatchEvent(n,t){n.dispatchEvent(t)}remove(n){n.remove()}createElement(n,t){return(t=t||this.getDefaultDocument()).createElement(n)}createHtmlDocument(){return document.implementation.createHTMLDocument("fakeTitle")}getDefaultDocument(){return document}isElementNode(n){return n.nodeType===Node.ELEMENT_NODE}isShadowRoot(n){return n instanceof DocumentFragment}getGlobalEventTarget(n,t){return"window"===t?window:"document"===t?n:"body"===t?n.body:null}getBaseHref(n){const t=function Jj(){return ua=ua||document.querySelector("base"),ua?ua.getAttribute("href"):null}();return null==t?null:function Zj(e){return new URL(e,document.baseURI).pathname}(t)}resetBaseElement(){ua=null}getUserAgent(){return window.navigator.userAgent}getCookie(n){return OS(document.cookie,n)}}let ua=null,Yj=(()=>{class e{build(){return new XMLHttpRequest}static{this.\u0275fac=function(r){return new(r||e)}}static{this.\u0275prov=Z({token:e,factory:e.\u0275fac})}}return e})();const Yl=new W("");let SC=(()=>{class e{constructor(t,r){this._zone=r,this._eventNameToPlugin=new Map,t.forEach(i=>{i.manager=this}),this._plugins=t.slice().reverse()}addEventListener(t,r,i){return this._findPluginFor(r).addEventListener(t,r,i)}getZone(){return this._zone}_findPluginFor(t){let r=this._eventNameToPlugin.get(t);if(r)return r;if(r=this._plugins.find(o=>o.supports(t)),!r)throw new k(5101,!1);return this._eventNameToPlugin.set(t,r),r}static{this.\u0275fac=function(r){return new(r||e)(U(Yl),U(ve))}}static{this.\u0275prov=Z({token:e,factory:e.\u0275fac})}}return e})();class jp{constructor(n){this._doc=n}}const Bp="ng-app-id";let CC=(()=>{class e{constructor(t,r,i,o={}){this.doc=t,this.appId=r,this.nonce=i,this.platformId=o,this.styleRef=new Map,this.hostNodes=new Set,this.styleNodesInDOM=this.collectServerRenderedStyles(),this.platformIsServer=zS(o),this.resetHostNodes()}addStyles(t){for(const r of t)1===this.changeUsageCount(r,1)&&this.onStyleAdded(r)}removeStyles(t){for(const r of t)this.changeUsageCount(r,-1)<=0&&this.onStyleRemoved(r)}ngOnDestroy(){const t=this.styleNodesInDOM;t&&(t.forEach(r=>r.remove()),t.clear());for(const r of this.getAllStyles())this.onStyleRemoved(r);this.resetHostNodes()}addHost(t){this.hostNodes.add(t);for(const r of this.getAllStyles())this.addStyleToHost(t,r)}removeHost(t){this.hostNodes.delete(t)}getAllStyles(){return this.styleRef.keys()}onStyleAdded(t){for(const r of this.hostNodes)this.addStyleToHost(r,t)}onStyleRemoved(t){const r=this.styleRef;r.get(t)?.elements?.forEach(i=>i.remove()),r.delete(t)}collectServerRenderedStyles(){const t=this.doc.head?.querySelectorAll(`style[${Bp}="${this.appId}"]`);if(t?.length){const r=new Map;return t.forEach(i=>{null!=i.textContent&&r.set(i.textContent,i)}),r}return null}changeUsageCount(t,r){const i=this.styleRef;if(i.has(t)){const o=i.get(t);return o.usage+=r,o.usage}return i.set(t,{usage:r,elements:[]}),r}getStyleElement(t,r){const i=this.styleNodesInDOM,o=i?.get(r);if(o?.parentNode===t)return i.delete(r),o.removeAttribute(Bp),o;{const c=this.doc.createElement("style");return this.nonce&&c.setAttribute("nonce",this.nonce),c.textContent=r,this.platformIsServer&&c.setAttribute(Bp,this.appId),t.appendChild(c),c}}addStyleToHost(t,r){const i=this.getStyleElement(t,r),o=this.styleRef,c=o.get(r)?.elements;c?c.push(i):o.set(r,{elements:[i],usage:1})}resetHostNodes(){const t=this.hostNodes;t.clear(),t.add(this.doc.head)}static{this.\u0275fac=function(r){return new(r||e)(U(rn),U(co),U(ow,8),U(Yr))}}static{this.\u0275prov=Z({token:e,factory:e.\u0275fac})}}return e})();const Hp={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/",math:"http://www.w3.org/1998/Math/MathML"},zp=/%COMP%/g,nB=new W("",{providedIn:"root",factory:()=>!0});function TC(e,n){return n.map(t=>t.replace(zp,e))}let IC=(()=>{class e{constructor(t,r,i,o,c,l,_,d=null){this.eventManager=t,this.sharedStylesHost=r,this.appId=i,this.removeStylesOnCompDestroy=o,this.doc=c,this.platformId=l,this.ngZone=_,this.nonce=d,this.rendererByCompId=new Map,this.platformIsServer=zS(l),this.defaultRenderer=new Up(t,c,_,this.platformIsServer)}createRenderer(t,r){if(!t||!r)return this.defaultRenderer;this.platformIsServer&&r.encapsulation===un.ShadowDom&&(r={...r,encapsulation:un.Emulated});const i=this.getOrCreateRenderer(t,r);return i instanceof NC?i.applyToHost(t):i instanceof $p&&i.applyStyles(),i}getOrCreateRenderer(t,r){const i=this.rendererByCompId;let o=i.get(r.id);if(!o){const c=this.doc,l=this.ngZone,_=this.eventManager,d=this.sharedStylesHost,p=this.removeStylesOnCompDestroy,h=this.platformIsServer;switch(r.encapsulation){case un.Emulated:o=new NC(_,d,r,this.appId,p,c,l,h);break;case un.ShadowDom:return new oB(_,d,t,r,c,l,this.nonce,h);default:o=new $p(_,d,r,p,c,l,h)}i.set(r.id,o)}return o}ngOnDestroy(){this.rendererByCompId.clear()}static{this.\u0275fac=function(r){return new(r||e)(U(SC),U(CC),U(co),U(nB),U(rn),U(Yr),U(ve),U(ow))}}static{this.\u0275prov=Z({token:e,factory:e.\u0275fac})}}return e})();class Up{constructor(n,t,r,i){this.eventManager=n,this.doc=t,this.ngZone=r,this.platformIsServer=i,this.data=Object.create(null),this.throwOnSyntheticProps=!0,this.destroyNode=null}destroy(){}createElement(n,t){return t?this.doc.createElementNS(Hp[t]||t,n):this.doc.createElement(n)}createComment(n){return this.doc.createComment(n)}createText(n){return this.doc.createTextNode(n)}appendChild(n,t){(MC(n)?n.content:n).appendChild(t)}insertBefore(n,t,r){n&&(MC(n)?n.content:n).insertBefore(t,r)}removeChild(n,t){t.remove()}selectRootElement(n,t){let r="string"==typeof n?this.doc.querySelector(n):n;if(!r)throw new k(-5104,!1);return t||(r.textContent=""),r}parentNode(n){return n.parentNode}nextSibling(n){return n.nextSibling}setAttribute(n,t,r,i){if(i){t=i+":"+t;const o=Hp[i];o?n.setAttributeNS(o,t,r):n.setAttribute(t,r)}else n.setAttribute(t,r)}removeAttribute(n,t,r){if(r){const i=Hp[r];i?n.removeAttributeNS(i,t):n.removeAttribute(`${r}:${t}`)}else n.removeAttribute(t)}addClass(n,t){n.classList.add(t)}removeClass(n,t){n.classList.remove(t)}setStyle(n,t,r,i){i&(Cr.DashCase|Cr.Important)?n.style.setProperty(t,r,i&Cr.Important?"important":""):n.style[t]=r}removeStyle(n,t,r){r&Cr.DashCase?n.style.removeProperty(t):n.style[t]=""}setProperty(n,t,r){null!=n&&(n[t]=r)}setValue(n,t){n.nodeValue=t}listen(n,t,r){if("string"==typeof n&&!(n=ra().getGlobalEventTarget(this.doc,n)))throw new Error(`Unsupported event target ${n} for event ${t}`);return this.eventManager.addEventListener(n,t,this.decoratePreventDefault(r))}decoratePreventDefault(n){return t=>{if("__ngUnwrap__"===t)return n;!1===(this.platformIsServer?this.ngZone.runGuarded(()=>n(t)):n(t))&&t.preventDefault()}}}function MC(e){return"TEMPLATE"===e.tagName&&void 0!==e.content}class oB extends Up{constructor(n,t,r,i,o,c,l,_){super(n,o,c,_),this.sharedStylesHost=t,this.hostEl=r,this.shadowRoot=r.attachShadow({mode:"open"}),this.sharedStylesHost.addHost(this.shadowRoot);const d=TC(i.id,i.styles);for(const p of d){const h=document.createElement("style");l&&h.setAttribute("nonce",l),h.textContent=p,this.shadowRoot.appendChild(h)}}nodeOrShadowRoot(n){return n===this.hostEl?this.shadowRoot:n}appendChild(n,t){return super.appendChild(this.nodeOrShadowRoot(n),t)}insertBefore(n,t,r){return super.insertBefore(this.nodeOrShadowRoot(n),t,r)}removeChild(n,t){return super.removeChild(null,t)}parentNode(n){return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(n)))}destroy(){this.sharedStylesHost.removeHost(this.shadowRoot)}}class $p extends Up{constructor(n,t,r,i,o,c,l,_){super(n,o,c,l),this.sharedStylesHost=t,this.removeStylesOnCompDestroy=i,this.styles=_?TC(_,r.styles):r.styles}applyStyles(){this.sharedStylesHost.addStyles(this.styles)}destroy(){this.removeStylesOnCompDestroy&&this.sharedStylesHost.removeStyles(this.styles)}}class NC extends $p{constructor(n,t,r,i,o,c,l,_){const d=i+"-"+r.id;super(n,t,r,o,c,l,_,d),this.contentAttr=function rB(e){return"_ngcontent-%COMP%".replace(zp,e)}(d),this.hostAttr=function sB(e){return"_nghost-%COMP%".replace(zp,e)}(d)}applyToHost(n){this.applyStyles(),this.setAttribute(n,this.hostAttr,"")}createElement(n,t){const r=super.createElement(n,t);return super.setAttribute(r,this.contentAttr,""),r}}let aB=(()=>{class e extends jp{constructor(t){super(t)}supports(t){return!0}addEventListener(t,r,i){return t.addEventListener(r,i,!1),()=>this.removeEventListener(t,r,i)}removeEventListener(t,r,i){return t.removeEventListener(r,i)}static{this.\u0275fac=function(r){return new(r||e)(U(rn))}}static{this.\u0275prov=Z({token:e,factory:e.\u0275fac})}}return e})(),cB=(()=>{class e extends jp{constructor(t){super(t),this.delegate=j(ZE,{optional:!0})}supports(t){return!!this.delegate&&this.delegate.supports(t)}addEventListener(t,r,i){return this.delegate.addEventListener(t,r,i)}removeEventListener(t,r,i){return this.delegate.removeEventListener(t,r,i)}static{this.\u0275fac=function(r){return new(r||e)(U(rn))}}static{this.\u0275prov=Z({token:e,factory:e.\u0275fac})}}return e})();const AC=["alt","control","meta","shift"],lB={"\b":"Backspace","\t":"Tab","\x7f":"Delete","\x1b":"Escape",Del:"Delete",Esc:"Escape",Left:"ArrowLeft",Right:"ArrowRight",Up:"ArrowUp",Down:"ArrowDown",Menu:"ContextMenu",Scroll:"ScrollLock",Win:"OS"},uB={alt:e=>e.altKey,control:e=>e.ctrlKey,meta:e=>e.metaKey,shift:e=>e.shiftKey};function kC(e){return{appProviders:[...wB,...e?.providers??[]],platformProviders:hB}}const hB=[{provide:Yr,useValue:"browser"},{provide:iw,useValue:function fB(){Wp.makeCurrent()},multi:!0},{provide:rn,useFactory:function gB(){return function gN(e){K_=e}(document),document},deps:[]}],wB=[{provide:l_,useValue:"root"},{provide:hn,useFactory:function pB(){return new hn},deps:[]},{provide:Yl,useClass:aB,multi:!0,deps:[rn,ve,Yr]},{provide:Yl,useClass:(()=>{class e extends jp{constructor(t){super(t)}supports(t){return null!=e.parseEventName(t)}addEventListener(t,r,i){const o=e.parseEventName(r),c=e.eventCallback(o.fullKey,i,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>ra().onAndCancel(t,o.domEventName,c))}static parseEventName(t){const r=t.toLowerCase().split("."),i=r.shift();if(0===r.length||"keydown"!==i&&"keyup"!==i)return null;const o=e._normalizeKey(r.pop());let c="",l=r.indexOf("code");if(l>-1&&(r.splice(l,1),c="code."),AC.forEach(d=>{const p=r.indexOf(d);p>-1&&(r.splice(p,1),c+=d+".")}),c+=o,0!=r.length||0===o.length)return null;const _={};return _.domEventName=i,_.fullKey=c,_}static matchEventFullKeyCode(t,r){let i=lB[t.key]||t.key,o="";return r.indexOf("code.")>-1&&(i=t.code,o="code."),!(null==i||!i)&&(i=i.toLowerCase()," "===i?i="space":"."===i&&(i="dot"),AC.forEach(c=>{c!==i&&(0,uB[c])(t)&&(o+=c+".")}),o+=i,o===r)}static eventCallback(t,r,i){return o=>{e.matchEventFullKeyCode(o,t)&&i.runGuarded(()=>r(o))}}static _normalizeKey(t){return"esc"===t?"escape":t}static{this.\u0275fac=function(r){return new(r||e)(U(rn))}}static{this.\u0275prov=Z({token:e,factory:e.\u0275fac})}}return e})(),multi:!0,deps:[rn]},{provide:Yl,useClass:cB,multi:!0},IC,CC,SC,{provide:Kd,useExisting:IC},{provide:US,useClass:Yj,deps:[]},[]];var P=a(8825);const _a=new W("SDK"),OC=new W("wasm_asset_path"),xC=new W("rpc_address"),LC=(new W("node_address"),new W("verbosity")),CB=function SB(e,n){const t={value:void 0};return[{provide:dE,useFactory:(r,i,o,c)=>(0,u.A)(function*(){return t.value=yield n({wasm_asset_path:r,rpc_address:i,node_address:o,verbosity:c})}),multi:!0,deps:[OC,xC,LC]},{provide:e,useFactory:()=>{if(!j(vl).done)throw new Error(`Cannot inject ${e} until bootstrap is complete.`);return t.value}}]}(_a,function(){var e=(0,u.A)(function*(n){return(yield(0,P.Ay)(n.wasm_asset_path))&&new P.hp(n.rpc_address,n.node_address,n.verbosity)});return function(t){return e.apply(this,arguments)}}());let DB=(()=>{class e{static{this.\u0275fac=function(r){return new(r||e)}}static{this.\u0275mod=Zn({type:e})}static{this.\u0275inj=An({providers:CB,imports:[Ke]})}}return e})();const lr=new W("EnvironmentConfig"),Gp=new W("EnvironmentConfig"),PC=["deploy","transfer","put_deploy","speculative_deploy","speculative_transfer","speculative_exec_deploy","sign_deploy","call_entrypoint_deploy","install"],TB=["make_deploy","make_transfer",...PC],En={wasm_asset_path:"assets/casper_rust_wasm_sdk_bg.wasm",default_action:"get_node_status",verbosity:P.WT.High,minimum_transfer:"2500000000",TTL:"30m",standard_payment_amount:"100000000",default_pricing_mode:P.MK.Fixed,default_gas_price_tolerance:"1",default_additional_computation_factor:"0",default_is_install_upgrade:!0,action_needs_secret_key:PC,action_needs_public_key:TB,networks:{"node-launcher":{rpc_address:"http://localhost:7777",stream_address:"http://localhost:9999/events/main",chain_name:"casper-net-1"},ntcl:{rpc_address:"http://localhost:11101",stream_address:"http://localhost:18101/events/main",chain_name:"casper-net-1"},integration:{rpc_address:"https://rpc.integration.casperlabs.io",stream_address:"https://events.integration.casperlabs.io/events/main",chain_name:"integration-test"},testnet:{rpc_address:"https://rpc.testnet.casperlabs.io",stream_address:"https://events.testnet.casperlabs.io/events/main",chain_name:"casper-test"},mainnet:{rpc_address:"https://rpc.mainnet.casperlabs.io",stream_address:"https://events.mainnet.casperlabs.io/events/main",chain_name:"casper"},custom:{rpc_address:"http://3.136.227.9:7777",stream_address:"http://3.136.227.9:9999/events/main",chain_name:"casper-test"},dev:{rpc_address:"http://localhost:4200",stream_address:"http://localhost:4200/events/main",chain_name:"casper-net-1"}},localhost:"localhost",app_port:"4200",default_port:"7777",default_protocol:"http://"},qp={production:!0,default_network:"integration",localhost_to_gateway:!1},{isArray:IB}=Array,{getPrototypeOf:MB,prototype:NB,keys:AB}=Object;const{isArray:RB}=Array;function LB(e,n){return e.reduce((t,r,i)=>(t[r]=n[i],t),{})}function PB(...e){const n=function IV(e){return Ve(up(e))?e.pop():void 0}(e),{args:t,keys:r}=function kB(e){if(1===e.length){const n=e[0];if(IB(n))return{args:n,keys:null};if(function FB(e){return e&&"object"==typeof e&&MB(e)===NB}(n)){const t=AB(n);return{args:t.map(r=>n[r]),keys:t}}}return{args:e,keys:null}}(e),i=new Rt(o=>{const{length:c}=t;if(!c)return void o.complete();const l=new Array(c);let _=c,d=c;for(let p=0;p{h||(h=!0,d--),l[p]=m},()=>_--,void 0,()=>{(!_||!h)&&(d||o.next(r?LB(r,l):l),o.complete())}))}});return n?i.pipe(function xB(e){return gr(n=>function OB(e,n){return RB(n)?e(...n):e(n)}(e,n))}(n)):i}let VC=(()=>{class e{constructor(t,r){this._renderer=t,this._elementRef=r,this.onChange=i=>{},this.onTouched=()=>{}}setProperty(t,r){this._renderer.setProperty(this._elementRef.nativeElement,t,r)}registerOnTouched(t){this.onTouched=t}registerOnChange(t){this.onChange=t}setDisabledState(t){this.setProperty("disabled",t)}static{this.\u0275fac=function(r){return new(r||e)(T(os),T(tn))}}static{this.\u0275dir=ne({type:e})}}return e})(),Es=(()=>{class e extends VC{static{this.\u0275fac=(()=>{let t;return function(i){return(t||(t=ft(e)))(i||e)}})()}static{this.\u0275dir=ne({type:e,features:[Ce]})}}return e})();const $n=new W(""),VB={provide:$n,useExisting:Ie(()=>Kp),multi:!0};let Kp=(()=>{class e extends Es{writeValue(t){this.setProperty("checked",t)}static{this.\u0275fac=(()=>{let t;return function(i){return(t||(t=ft(e)))(i||e)}})()}static{this.\u0275dir=ne({type:e,selectors:[["input","type","checkbox","formControlName",""],["input","type","checkbox","formControl",""],["input","type","checkbox","ngModel",""]],hostBindings:function(r,i){1&r&&re("change",function(c){return i.onChange(c.target.checked)})("blur",function(){return i.onTouched()})},features:[Pe([VB]),Ce]})}}return e})();const WB={provide:$n,useExisting:Ie(()=>da),multi:!0},BB=new W("");let da=(()=>{class e extends VC{constructor(t,r,i){super(t,r),this._compositionMode=i,this._composing=!1,null==this._compositionMode&&(this._compositionMode=!function jB(){const e=ra()?ra().getUserAgent():"";return/android (\d+)/.test(e.toLowerCase())}())}writeValue(t){this.setProperty("value",t??"")}_handleInput(t){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(t)}_compositionStart(){this._composing=!0}_compositionEnd(t){this._composing=!1,this._compositionMode&&this.onChange(t)}static{this.\u0275fac=function(r){return new(r||e)(T(os),T(tn),T(BB,8))}}static{this.\u0275dir=ne({type:e,selectors:[["input","formControlName","",3,"type","checkbox"],["textarea","formControlName",""],["input","formControl","",3,"type","checkbox"],["textarea","formControl",""],["input","ngModel","",3,"type","checkbox"],["textarea","ngModel",""],["","ngDefaultControl",""]],hostBindings:function(r,i){1&r&&re("input",function(c){return i._handleInput(c.target.value)})("blur",function(){return i.onTouched()})("compositionstart",function(){return i._compositionStart()})("compositionend",function(c){return i._compositionEnd(c.target.value)})},features:[Pe([WB]),Ce]})}}return e})();function Or(e){return null==e||("string"==typeof e||Array.isArray(e))&&0===e.length}function WC(e){return null!=e&&"number"==typeof e.length}const wt=new W(""),xr=new W(""),HB=/^(?=.{1,254}$)(?=.{1,64}@)[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;class zB{static min(n){return function jC(e){return n=>{if(Or(n.value)||Or(e))return null;const t=parseFloat(n.value);return!isNaN(t)&&t{if(Or(n.value)||Or(e))return null;const t=parseFloat(n.value);return!isNaN(t)&&t>e?{max:{max:e,actual:n.value}}:null}}(n)}static required(n){return function HC(e){return Or(e.value)?{required:!0}:null}(n)}static requiredTrue(n){return function zC(e){return!0===e.value?null:{required:!0}}(n)}static email(n){return function UC(e){return Or(e.value)||HB.test(e.value)?null:{email:!0}}(n)}static minLength(n){return function $C(e){return n=>Or(n.value)||!WC(n.value)?null:n.value.lengthWC(n.value)&&n.value.length>e?{maxlength:{requiredLength:e,actualLength:n.value.length}}:null}function qC(e){if(!e)return eu;let n,t;return"string"==typeof e?(t="","^"!==e.charAt(0)&&(t+="^"),t+=e,"$"!==e.charAt(e.length-1)&&(t+="$"),n=new RegExp(t)):(t=e.toString(),n=e),r=>{if(Or(r.value))return null;const i=r.value;return n.test(i)?null:{pattern:{requiredPattern:t,actualValue:i}}}}function eu(e){return null}function KC(e){return null!=e}function JC(e){return bl(e)?gp(e):e}function ZC(e){let n={};return e.forEach(t=>{n=null!=t?{...n,...t}:n}),0===Object.keys(n).length?null:n}function QC(e,n){return n.map(t=>t(e))}function YC(e){return e.map(n=>function UB(e){return!e.validate}(n)?n:t=>n.validate(t))}function XC(e){if(!e)return null;const n=e.filter(KC);return 0==n.length?null:function(t){return ZC(QC(t,n))}}function Jp(e){return null!=e?XC(YC(e)):null}function eD(e){if(!e)return null;const n=e.filter(KC);return 0==n.length?null:function(t){return PB(QC(t,n).map(JC)).pipe(gr(ZC))}}function Zp(e){return null!=e?eD(YC(e)):null}function tD(e,n){return null===e?[n]:Array.isArray(e)?[...e,n]:[e,n]}function nD(e){return e._rawValidators}function rD(e){return e._rawAsyncValidators}function Qp(e){return e?Array.isArray(e)?e:[e]:[]}function tu(e,n){return Array.isArray(e)?e.includes(n):e===n}function sD(e,n){const t=Qp(n);return Qp(e).forEach(i=>{tu(t,i)||t.push(i)}),t}function iD(e,n){return Qp(n).filter(t=>!tu(e,t))}class oD{constructor(){this._rawValidators=[],this._rawAsyncValidators=[],this._onDestroyCallbacks=[]}get value(){return this.control?this.control.value:null}get valid(){return this.control?this.control.valid:null}get invalid(){return this.control?this.control.invalid:null}get pending(){return this.control?this.control.pending:null}get disabled(){return this.control?this.control.disabled:null}get enabled(){return this.control?this.control.enabled:null}get errors(){return this.control?this.control.errors:null}get pristine(){return this.control?this.control.pristine:null}get dirty(){return this.control?this.control.dirty:null}get touched(){return this.control?this.control.touched:null}get status(){return this.control?this.control.status:null}get untouched(){return this.control?this.control.untouched:null}get statusChanges(){return this.control?this.control.statusChanges:null}get valueChanges(){return this.control?this.control.valueChanges:null}get path(){return null}_setValidators(n){this._rawValidators=n||[],this._composedValidatorFn=Jp(this._rawValidators)}_setAsyncValidators(n){this._rawAsyncValidators=n||[],this._composedAsyncValidatorFn=Zp(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn||null}get asyncValidator(){return this._composedAsyncValidatorFn||null}_registerOnDestroy(n){this._onDestroyCallbacks.push(n)}_invokeOnDestroyCallbacks(){this._onDestroyCallbacks.forEach(n=>n()),this._onDestroyCallbacks=[]}reset(n=void 0){this.control&&this.control.reset(n)}hasError(n,t){return!!this.control&&this.control.hasError(n,t)}getError(n,t){return this.control?this.control.getError(n,t):null}}class kt extends oD{get formDirective(){return null}get path(){return null}}class Lr extends oD{constructor(){super(...arguments),this._parent=null,this.name=null,this.valueAccessor=null}}class aD{constructor(n){this._cd=n}get isTouched(){return this._cd?.control?._touched?.(),!!this._cd?.control?.touched}get isUntouched(){return!!this._cd?.control?.untouched}get isPristine(){return this._cd?.control?._pristine?.(),!!this._cd?.control?.pristine}get isDirty(){return!!this._cd?.control?.dirty}get isValid(){return this._cd?.control?._status?.(),!!this._cd?.control?.valid}get isInvalid(){return!!this._cd?.control?.invalid}get isPending(){return!!this._cd?.control?.pending}get isSubmitted(){return this._cd?._submitted?.(),!!this._cd?.submitted}}let nu=(()=>{class e extends aD{constructor(t){super(t)}static{this.\u0275fac=function(r){return new(r||e)(T(Lr,2))}}static{this.\u0275dir=ne({type:e,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(r,i){2&r&&ol("ng-untouched",i.isUntouched)("ng-touched",i.isTouched)("ng-pristine",i.isPristine)("ng-dirty",i.isDirty)("ng-valid",i.isValid)("ng-invalid",i.isInvalid)("ng-pending",i.isPending)},features:[Ce]})}}return e})(),fa=(()=>{class e extends aD{constructor(t){super(t)}static{this.\u0275fac=function(r){return new(r||e)(T(kt,10))}}static{this.\u0275dir=ne({type:e,selectors:[["","formGroupName",""],["","formArrayName",""],["","ngModelGroup",""],["","formGroup",""],["form",3,"ngNoForm",""],["","ngForm",""]],hostVars:16,hostBindings:function(r,i){2&r&&ol("ng-untouched",i.isUntouched)("ng-touched",i.isTouched)("ng-pristine",i.isPristine)("ng-dirty",i.isDirty)("ng-valid",i.isValid)("ng-invalid",i.isInvalid)("ng-pending",i.isPending)("ng-submitted",i.isSubmitted)},features:[Ce]})}}return e})();const pa="VALID",su="INVALID",ki="PENDING",ga="DISABLED";class Fi{}class lD extends Fi{constructor(n,t){super(),this.value=n,this.source=t}}class eg extends Fi{constructor(n,t){super(),this.pristine=n,this.source=t}}class tg extends Fi{constructor(n,t){super(),this.touched=n,this.source=t}}class iu extends Fi{constructor(n,t){super(),this.status=n,this.source=t}}class JB extends Fi{constructor(n){super(),this.source=n}}class ZB extends Fi{constructor(n){super(),this.source=n}}function ng(e){return(ou(e)?e.validators:e)||null}function rg(e,n){return(ou(n)?n.asyncValidators:e)||null}function ou(e){return null!=e&&!Array.isArray(e)&&"object"==typeof e}function uD(e,n,t){const r=e.controls;if(!(n?Object.keys(r):r).length)throw new k(1e3,"");if(!r[t])throw new k(1001,"")}function _D(e,n,t){e._forEachChild((r,i)=>{if(void 0===t[i])throw new k(1002,"")})}class au{constructor(n,t){this._pendingDirty=!1,this._hasOwnPendingAsyncValidator=null,this._pendingTouched=!1,this._onCollectionChange=()=>{},this._parent=null,this._status=na(()=>this.statusReactive()),this.statusReactive=si(void 0),this._pristine=na(()=>this.pristineReactive()),this.pristineReactive=si(!0),this._touched=na(()=>this.touchedReactive()),this.touchedReactive=si(!1),this._events=new Wr,this.events=this._events.asObservable(),this._onDisabledChange=[],this._assignValidators(n),this._assignAsyncValidators(t)}get validator(){return this._composedValidatorFn}set validator(n){this._rawValidators=this._composedValidatorFn=n}get asyncValidator(){return this._composedAsyncValidatorFn}set asyncValidator(n){this._rawAsyncValidators=this._composedAsyncValidatorFn=n}get parent(){return this._parent}get status(){return Un(this.statusReactive)}set status(n){Un(()=>this.statusReactive.set(n))}get valid(){return this.status===pa}get invalid(){return this.status===su}get pending(){return this.status==ki}get disabled(){return this.status===ga}get enabled(){return this.status!==ga}get pristine(){return Un(this.pristineReactive)}set pristine(n){Un(()=>this.pristineReactive.set(n))}get dirty(){return!this.pristine}get touched(){return Un(this.touchedReactive)}set touched(n){Un(()=>this.touchedReactive.set(n))}get untouched(){return!this.touched}get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}setValidators(n){this._assignValidators(n)}setAsyncValidators(n){this._assignAsyncValidators(n)}addValidators(n){this.setValidators(sD(n,this._rawValidators))}addAsyncValidators(n){this.setAsyncValidators(sD(n,this._rawAsyncValidators))}removeValidators(n){this.setValidators(iD(n,this._rawValidators))}removeAsyncValidators(n){this.setAsyncValidators(iD(n,this._rawAsyncValidators))}hasValidator(n){return tu(this._rawValidators,n)}hasAsyncValidator(n){return tu(this._rawAsyncValidators,n)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(n={}){const t=!1===this.touched;this.touched=!0;const r=n.sourceControl??this;this._parent&&!n.onlySelf&&this._parent.markAsTouched({...n,sourceControl:r}),t&&!1!==n.emitEvent&&this._events.next(new tg(!0,r))}markAllAsTouched(n={}){this.markAsTouched({onlySelf:!0,emitEvent:n.emitEvent,sourceControl:this}),this._forEachChild(t=>t.markAllAsTouched(n))}markAsUntouched(n={}){const t=!0===this.touched;this.touched=!1,this._pendingTouched=!1;const r=n.sourceControl??this;this._forEachChild(i=>{i.markAsUntouched({onlySelf:!0,emitEvent:n.emitEvent,sourceControl:r})}),this._parent&&!n.onlySelf&&this._parent._updateTouched(n,r),t&&!1!==n.emitEvent&&this._events.next(new tg(!1,r))}markAsDirty(n={}){const t=!0===this.pristine;this.pristine=!1;const r=n.sourceControl??this;this._parent&&!n.onlySelf&&this._parent.markAsDirty({...n,sourceControl:r}),t&&!1!==n.emitEvent&&this._events.next(new eg(!1,r))}markAsPristine(n={}){const t=!1===this.pristine;this.pristine=!0,this._pendingDirty=!1;const r=n.sourceControl??this;this._forEachChild(i=>{i.markAsPristine({onlySelf:!0,emitEvent:n.emitEvent})}),this._parent&&!n.onlySelf&&this._parent._updatePristine(n,r),t&&!1!==n.emitEvent&&this._events.next(new eg(!0,r))}markAsPending(n={}){this.status=ki;const t=n.sourceControl??this;!1!==n.emitEvent&&(this._events.next(new iu(this.status,t)),this.statusChanges.emit(this.status)),this._parent&&!n.onlySelf&&this._parent.markAsPending({...n,sourceControl:t})}disable(n={}){const t=this._parentMarkedDirty(n.onlySelf);this.status=ga,this.errors=null,this._forEachChild(i=>{i.disable({...n,onlySelf:!0})}),this._updateValue();const r=n.sourceControl??this;!1!==n.emitEvent&&(this._events.next(new lD(this.value,r)),this._events.next(new iu(this.status,r)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors({...n,skipPristineCheck:t},this),this._onDisabledChange.forEach(i=>i(!0))}enable(n={}){const t=this._parentMarkedDirty(n.onlySelf);this.status=pa,this._forEachChild(r=>{r.enable({...n,onlySelf:!0})}),this.updateValueAndValidity({onlySelf:!0,emitEvent:n.emitEvent}),this._updateAncestors({...n,skipPristineCheck:t},this),this._onDisabledChange.forEach(r=>r(!1))}_updateAncestors(n,t){this._parent&&!n.onlySelf&&(this._parent.updateValueAndValidity(n),n.skipPristineCheck||this._parent._updatePristine({},t),this._parent._updateTouched({},t))}setParent(n){this._parent=n}getRawValue(){return this.value}updateValueAndValidity(n={}){if(this._setInitialStatus(),this._updateValue(),this.enabled){const r=this._cancelExistingSubscription();this.errors=this._runValidator(),this.status=this._calculateStatus(),(this.status===pa||this.status===ki)&&this._runAsyncValidator(r,n.emitEvent)}const t=n.sourceControl??this;!1!==n.emitEvent&&(this._events.next(new lD(this.value,t)),this._events.next(new iu(this.status,t)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._parent&&!n.onlySelf&&this._parent.updateValueAndValidity({...n,sourceControl:t})}_updateTreeValidity(n={emitEvent:!0}){this._forEachChild(t=>t._updateTreeValidity(n)),this.updateValueAndValidity({onlySelf:!0,emitEvent:n.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?ga:pa}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(n,t){if(this.asyncValidator){this.status=ki,this._hasOwnPendingAsyncValidator={emitEvent:!1!==t};const r=JC(this.asyncValidator(this));this._asyncValidationSubscription=r.subscribe(i=>{this._hasOwnPendingAsyncValidator=null,this.setErrors(i,{emitEvent:t,shouldHaveEmitted:n})})}}_cancelExistingSubscription(){if(this._asyncValidationSubscription){this._asyncValidationSubscription.unsubscribe();const n=this._hasOwnPendingAsyncValidator?.emitEvent??!1;return this._hasOwnPendingAsyncValidator=null,n}return!1}setErrors(n,t={}){this.errors=n,this._updateControlsErrors(!1!==t.emitEvent,this,t.shouldHaveEmitted)}get(n){let t=n;return null==t||(Array.isArray(t)||(t=t.split(".")),0===t.length)?null:t.reduce((r,i)=>r&&r._find(i),this)}getError(n,t){const r=t?this.get(t):this;return r&&r.errors?r.errors[n]:null}hasError(n,t){return!!this.getError(n,t)}get root(){let n=this;for(;n._parent;)n=n._parent;return n}_updateControlsErrors(n,t,r){this.status=this._calculateStatus(),n&&this.statusChanges.emit(this.status),(n||r)&&this._events.next(new iu(this.status,t)),this._parent&&this._parent._updateControlsErrors(n,t,r)}_initObservables(){this.valueChanges=new Re,this.statusChanges=new Re}_calculateStatus(){return this._allControlsDisabled()?ga:this.errors?su:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(ki)?ki:this._anyControlsHaveStatus(su)?su:pa}_anyControlsHaveStatus(n){return this._anyControls(t=>t.status===n)}_anyControlsDirty(){return this._anyControls(n=>n.dirty)}_anyControlsTouched(){return this._anyControls(n=>n.touched)}_updatePristine(n,t){const r=!this._anyControlsDirty(),i=this.pristine!==r;this.pristine=r,this._parent&&!n.onlySelf&&this._parent._updatePristine(n,t),i&&this._events.next(new eg(this.pristine,t))}_updateTouched(n={},t){this.touched=this._anyControlsTouched(),this._events.next(new tg(this.touched,t)),this._parent&&!n.onlySelf&&this._parent._updateTouched(n,t)}_registerOnCollectionChange(n){this._onCollectionChange=n}_setUpdateStrategy(n){ou(n)&&null!=n.updateOn&&(this._updateOn=n.updateOn)}_parentMarkedDirty(n){return!n&&!(!this._parent||!this._parent.dirty)&&!this._parent._anyControlsDirty()}_find(n){return null}_assignValidators(n){this._rawValidators=Array.isArray(n)?n.slice():n,this._composedValidatorFn=function QB(e){return Array.isArray(e)?Jp(e):e||null}(this._rawValidators)}_assignAsyncValidators(n){this._rawAsyncValidators=Array.isArray(n)?n.slice():n,this._composedAsyncValidatorFn=function YB(e){return Array.isArray(e)?Zp(e):e||null}(this._rawAsyncValidators)}}class ha extends au{constructor(n,t,r){super(ng(t),rg(r,t)),this.controls=n,this._initObservables(),this._setUpdateStrategy(t),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}registerControl(n,t){return this.controls[n]?this.controls[n]:(this.controls[n]=t,t.setParent(this),t._registerOnCollectionChange(this._onCollectionChange),t)}addControl(n,t,r={}){this.registerControl(n,t),this.updateValueAndValidity({emitEvent:r.emitEvent}),this._onCollectionChange()}removeControl(n,t={}){this.controls[n]&&this.controls[n]._registerOnCollectionChange(()=>{}),delete this.controls[n],this.updateValueAndValidity({emitEvent:t.emitEvent}),this._onCollectionChange()}setControl(n,t,r={}){this.controls[n]&&this.controls[n]._registerOnCollectionChange(()=>{}),delete this.controls[n],t&&this.registerControl(n,t),this.updateValueAndValidity({emitEvent:r.emitEvent}),this._onCollectionChange()}contains(n){return this.controls.hasOwnProperty(n)&&this.controls[n].enabled}setValue(n,t={}){_D(this,0,n),Object.keys(n).forEach(r=>{uD(this,!0,r),this.controls[r].setValue(n[r],{onlySelf:!0,emitEvent:t.emitEvent})}),this.updateValueAndValidity(t)}patchValue(n,t={}){null!=n&&(Object.keys(n).forEach(r=>{const i=this.controls[r];i&&i.patchValue(n[r],{onlySelf:!0,emitEvent:t.emitEvent})}),this.updateValueAndValidity(t))}reset(n={},t={}){this._forEachChild((r,i)=>{r.reset(n?n[i]:null,{onlySelf:!0,emitEvent:t.emitEvent})}),this._updatePristine(t,this),this._updateTouched(t,this),this.updateValueAndValidity(t)}getRawValue(){return this._reduceChildren({},(n,t,r)=>(n[r]=t.getRawValue(),n))}_syncPendingControls(){let n=this._reduceChildren(!1,(t,r)=>!!r._syncPendingControls()||t);return n&&this.updateValueAndValidity({onlySelf:!0}),n}_forEachChild(n){Object.keys(this.controls).forEach(t=>{const r=this.controls[t];r&&n(r,t)})}_setUpControls(){this._forEachChild(n=>{n.setParent(this),n._registerOnCollectionChange(this._onCollectionChange)})}_updateValue(){this.value=this._reduceValue()}_anyControls(n){for(const[t,r]of Object.entries(this.controls))if(this.contains(t)&&n(r))return!0;return!1}_reduceValue(){return this._reduceChildren({},(t,r,i)=>((r.enabled||this.disabled)&&(t[i]=r.value),t))}_reduceChildren(n,t){let r=n;return this._forEachChild((i,o)=>{r=t(r,i,o)}),r}_allControlsDisabled(){for(const n of Object.keys(this.controls))if(this.controls[n].enabled)return!1;return Object.keys(this.controls).length>0||this.disabled}_find(n){return this.controls.hasOwnProperty(n)?this.controls[n]:null}}class dD extends ha{}const Ri=new W("CallSetDisabledState",{providedIn:"root",factory:()=>cu}),cu="always";function ma(e,n,t=cu){sg(e,n),n.valueAccessor.writeValue(e.value),(e.disabled||"always"===t)&&n.valueAccessor.setDisabledState?.(e.disabled),function eH(e,n){n.valueAccessor.registerOnChange(t=>{e._pendingValue=t,e._pendingChange=!0,e._pendingDirty=!0,"change"===e.updateOn&&fD(e,n)})}(e,n),function nH(e,n){const t=(r,i)=>{n.valueAccessor.writeValue(r),i&&n.viewToModelUpdate(r)};e.registerOnChange(t),n._registerOnDestroy(()=>{e._unregisterOnChange(t)})}(e,n),function tH(e,n){n.valueAccessor.registerOnTouched(()=>{e._pendingTouched=!0,"blur"===e.updateOn&&e._pendingChange&&fD(e,n),"submit"!==e.updateOn&&e.markAsTouched()})}(e,n),function XB(e,n){if(n.valueAccessor.setDisabledState){const t=r=>{n.valueAccessor.setDisabledState(r)};e.registerOnDisabledChange(t),n._registerOnDestroy(()=>{e._unregisterOnDisabledChange(t)})}}(e,n)}function uu(e,n,t=!0){const r=()=>{};n.valueAccessor&&(n.valueAccessor.registerOnChange(r),n.valueAccessor.registerOnTouched(r)),du(e,n),e&&(n._invokeOnDestroyCallbacks(),e._registerOnCollectionChange(()=>{}))}function _u(e,n){e.forEach(t=>{t.registerOnValidatorChange&&t.registerOnValidatorChange(n)})}function sg(e,n){const t=nD(e);null!==n.validator?e.setValidators(tD(t,n.validator)):"function"==typeof t&&e.setValidators([t]);const r=rD(e);null!==n.asyncValidator?e.setAsyncValidators(tD(r,n.asyncValidator)):"function"==typeof r&&e.setAsyncValidators([r]);const i=()=>e.updateValueAndValidity();_u(n._rawValidators,i),_u(n._rawAsyncValidators,i)}function du(e,n){let t=!1;if(null!==e){if(null!==n.validator){const i=nD(e);if(Array.isArray(i)&&i.length>0){const o=i.filter(c=>c!==n.validator);o.length!==i.length&&(t=!0,e.setValidators(o))}}if(null!==n.asyncValidator){const i=rD(e);if(Array.isArray(i)&&i.length>0){const o=i.filter(c=>c!==n.asyncValidator);o.length!==i.length&&(t=!0,e.setAsyncValidators(o))}}}const r=()=>{};return _u(n._rawValidators,r),_u(n._rawAsyncValidators,r),t}function fD(e,n){e._pendingDirty&&e.markAsDirty(),e.setValue(e._pendingValue,{emitModelToViewChange:!1}),n.viewToModelUpdate(e._pendingValue),e._pendingChange=!1}function hD(e,n){const t=e.indexOf(n);t>-1&&e.splice(t,1)}function mD(e){return"object"==typeof e&&null!==e&&2===Object.keys(e).length&&"value"in e&&"disabled"in e}Promise.resolve();const Oi=class extends au{constructor(n=null,t,r){super(ng(t),rg(r,t)),this.defaultValue=null,this._onChange=[],this._pendingChange=!1,this._applyFormState(n),this._setUpdateStrategy(t),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator}),ou(t)&&(t.nonNullable||t.initialValueIsDefault)&&(this.defaultValue=mD(n)?n.value:n)}setValue(n,t={}){this.value=this._pendingValue=n,this._onChange.length&&!1!==t.emitModelToViewChange&&this._onChange.forEach(r=>r(this.value,!1!==t.emitViewToModelChange)),this.updateValueAndValidity(t)}patchValue(n,t={}){this.setValue(n,t)}reset(n=this.defaultValue,t={}){this._applyFormState(n),this.markAsPristine(t),this.markAsUntouched(t),this.setValue(this.value,t),this._pendingChange=!1}_updateValue(){}_anyControls(n){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(n){this._onChange.push(n)}_unregisterOnChange(n){hD(this._onChange,n)}registerOnDisabledChange(n){this._onDisabledChange.push(n)}_unregisterOnDisabledChange(n){hD(this._onDisabledChange,n)}_forEachChild(n){}_syncPendingControls(){return!("submit"!==this.updateOn||(this._pendingDirty&&this.markAsDirty(),this._pendingTouched&&this.markAsTouched(),!this._pendingChange)||(this.setValue(this._pendingValue,{onlySelf:!0,emitModelToViewChange:!1}),0))}_applyFormState(n){mD(n)?(this.value=this._pendingValue=n.value,n.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=n}};Promise.resolve();let ED=(()=>{class e{static{this.\u0275fac=function(r){return new(r||e)}}static{this.\u0275dir=ne({type:e,selectors:[["form",3,"ngNoForm","",3,"ngNativeValidate",""]],hostAttrs:["novalidate",""]})}}return e})();const lg=new W(""),hH={provide:kt,useExisting:Ie(()=>Ss)};let Ss=(()=>{class e extends kt{get submitted(){return Un(this._submittedReactive)}set submitted(t){this._submittedReactive.set(t)}constructor(t,r,i){super(),this.callSetDisabledState=i,this._submitted=na(()=>this._submittedReactive()),this._submittedReactive=si(!1),this._onCollectionChange=()=>this._updateDomValue(),this.directives=[],this.form=null,this.ngSubmit=new Re,this._setValidators(t),this._setAsyncValidators(r)}ngOnChanges(t){this._checkFormPresent(),t.hasOwnProperty("form")&&(this._updateValidators(),this._updateDomValue(),this._updateRegistrations(),this._oldForm=this.form)}ngOnDestroy(){this.form&&(du(this.form,this),this.form._onCollectionChange===this._onCollectionChange&&this.form._registerOnCollectionChange(()=>{}))}get formDirective(){return this}get control(){return this.form}get path(){return[]}addControl(t){const r=this.form.get(t.path);return ma(r,t,this.callSetDisabledState),r.updateValueAndValidity({emitEvent:!1}),this.directives.push(t),r}getControl(t){return this.form.get(t.path)}removeControl(t){uu(t.control||null,t,!1),function oH(e,n){const t=e.indexOf(n);t>-1&&e.splice(t,1)}(this.directives,t)}addFormGroup(t){this._setUpFormContainer(t)}removeFormGroup(t){this._cleanUpFormContainer(t)}getFormGroup(t){return this.form.get(t.path)}addFormArray(t){this._setUpFormContainer(t)}removeFormArray(t){this._cleanUpFormContainer(t)}getFormArray(t){return this.form.get(t.path)}updateModel(t,r){this.form.get(t.path).setValue(r)}onSubmit(t){return this._submittedReactive.set(!0),function gD(e,n){e._syncPendingControls(),n.forEach(t=>{const r=t.control;"submit"===r.updateOn&&r._pendingChange&&(t.viewToModelUpdate(r._pendingValue),r._pendingChange=!1)})}(this.form,this.directives),this.ngSubmit.emit(t),this.form._events.next(new JB(this.control)),"dialog"===t?.target?.method}onReset(){this.resetForm()}resetForm(t=void 0){this.form.reset(t),this._submittedReactive.set(!1),this.form._events.next(new ZB(this.form))}_updateDomValue(){this.directives.forEach(t=>{const r=t.control,i=this.form.get(t.path);r!==i&&(uu(r||null,t),(e=>e instanceof Oi)(i)&&(ma(i,t,this.callSetDisabledState),t.control=i))}),this.form._updateTreeValidity({emitEvent:!1})}_setUpFormContainer(t){const r=this.form.get(t.path);(function pD(e,n){sg(e,n)})(r,t),r.updateValueAndValidity({emitEvent:!1})}_cleanUpFormContainer(t){if(this.form){const r=this.form.get(t.path);r&&function rH(e,n){return du(e,n)}(r,t)&&r.updateValueAndValidity({emitEvent:!1})}}_updateRegistrations(){this.form._registerOnCollectionChange(this._onCollectionChange),this._oldForm&&this._oldForm._registerOnCollectionChange(()=>{})}_updateValidators(){sg(this.form,this),this._oldForm&&du(this._oldForm,this)}_checkFormPresent(){}static{this.\u0275fac=function(r){return new(r||e)(T(wt,10),T(xr,10),T(Ri,8))}}static{this.\u0275dir=ne({type:e,selectors:[["","formGroup",""]],hostBindings:function(r,i){1&r&&re("submit",function(c){return i.onSubmit(c)})("reset",function(){return i.onReset()})},inputs:{form:[0,"formGroup","form"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[Pe([hH]),Ce,Yn]})}}return e})();const yH={provide:Lr,useExisting:Ie(()=>ya)};let ya=(()=>{class e extends Lr{set isDisabled(t){}static{this._ngModelWarningSentOnce=!1}constructor(t,r,i,o,c){super(),this._ngModelWarningConfig=c,this._added=!1,this.name=null,this.update=new Re,this._ngModelWarningSent=!1,this._parent=t,this._setValidators(r),this._setAsyncValidators(i),this.valueAccessor=function ag(e,n){if(!n)return null;let t,r,i;return Array.isArray(n),n.forEach(o=>{o.constructor===da?t=o:function iH(e){return Object.getPrototypeOf(e.constructor)===Es}(o)?r=o:i=o}),i||r||t||null}(0,o)}ngOnChanges(t){this._added||this._setUpControl(),function og(e,n){if(!e.hasOwnProperty("model"))return!1;const t=e.model;return!!t.isFirstChange()||!Object.is(n,t.currentValue)}(t,this.viewModel)&&(this.viewModel=this.model,this.formDirective.updateModel(this,this.model))}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}viewToModelUpdate(t){this.viewModel=t,this.update.emit(t)}get path(){return function lu(e,n){return[...n.path,e]}(null==this.name?this.name:this.name.toString(),this._parent)}get formDirective(){return this._parent?this._parent.formDirective:null}_checkParentType(){}_setUpControl(){this._checkParentType(),this.control=this.formDirective.addControl(this),this._added=!0}static{this.\u0275fac=function(r){return new(r||e)(T(kt,13),T(wt,10),T(xr,10),T($n,10),T(lg,8))}}static{this.\u0275dir=ne({type:e,selectors:[["","formControlName",""]],inputs:{name:[0,"formControlName","name"],isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"]},outputs:{update:"ngModelChange"},features:[Pe([yH]),Ce,Yn]})}}return e})();const bH={provide:$n,useExisting:Ie(()=>fu),multi:!0};function MD(e,n){return null==e?`${n}`:(n&&"object"==typeof n&&(n="Object"),`${e}: ${n}`.slice(0,50))}let fu=(()=>{class e extends Es{constructor(){super(...arguments),this._optionMap=new Map,this._idCounter=0,this._compareWith=Object.is}set compareWith(t){this._compareWith=t}writeValue(t){this.value=t;const i=MD(this._getOptionId(t),t);this.setProperty("value",i)}registerOnChange(t){this.onChange=r=>{this.value=this._getOptionValue(r),t(this.value)}}_registerOption(){return(this._idCounter++).toString()}_getOptionId(t){for(const r of this._optionMap.keys())if(this._compareWith(this._optionMap.get(r),t))return r;return null}_getOptionValue(t){const r=function vH(e){return e.split(":")[0]}(t);return this._optionMap.has(r)?this._optionMap.get(r):t}static{this.\u0275fac=(()=>{let t;return function(i){return(t||(t=ft(e)))(i||e)}})()}static{this.\u0275dir=ne({type:e,selectors:[["select","formControlName","",3,"multiple",""],["select","formControl","",3,"multiple",""],["select","ngModel","",3,"multiple",""]],hostBindings:function(r,i){1&r&&re("change",function(c){return i.onChange(c.target.value)})("blur",function(){return i.onTouched()})},inputs:{compareWith:"compareWith"},features:[Pe([bH]),Ce]})}}return e})(),ND=(()=>{class e{constructor(t,r,i){this._element=t,this._renderer=r,this._select=i,this._select&&(this.id=this._select._registerOption())}set ngValue(t){null!=this._select&&(this._select._optionMap.set(this.id,t),this._setElementValue(MD(this.id,t)),this._select.writeValue(this._select.value))}set value(t){this._setElementValue(t),this._select&&this._select.writeValue(this._select.value)}_setElementValue(t){this._renderer.setProperty(this._element.nativeElement,"value",t)}ngOnDestroy(){this._select&&(this._select._optionMap.delete(this.id),this._select.writeValue(this._select.value))}static{this.\u0275fac=function(r){return new(r||e)(T(tn),T(os),T(fu,9))}}static{this.\u0275dir=ne({type:e,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"}})}}return e})();const EH={provide:$n,useExisting:Ie(()=>dg),multi:!0};function AD(e,n){return null==e?`${n}`:("string"==typeof n&&(n=`'${n}'`),n&&"object"==typeof n&&(n="Object"),`${e}: ${n}`.slice(0,50))}let dg=(()=>{class e extends Es{constructor(){super(...arguments),this._optionMap=new Map,this._idCounter=0,this._compareWith=Object.is}set compareWith(t){this._compareWith=t}writeValue(t){let r;if(this.value=t,Array.isArray(t)){const i=t.map(o=>this._getOptionId(o));r=(o,c)=>{o._setSelected(i.indexOf(c.toString())>-1)}}else r=(i,o)=>{i._setSelected(!1)};this._optionMap.forEach(r)}registerOnChange(t){this.onChange=r=>{const i=[],o=r.selectedOptions;if(void 0!==o){const c=o;for(let l=0;l{let t;return function(i){return(t||(t=ft(e)))(i||e)}})()}static{this.\u0275dir=ne({type:e,selectors:[["select","multiple","","formControlName",""],["select","multiple","","formControl",""],["select","multiple","","ngModel",""]],hostBindings:function(r,i){1&r&&re("change",function(c){return i.onChange(c.target)})("blur",function(){return i.onTouched()})},inputs:{compareWith:"compareWith"},features:[Pe([EH]),Ce]})}}return e})(),kD=(()=>{class e{constructor(t,r,i){this._element=t,this._renderer=r,this._select=i,this._select&&(this.id=this._select._registerOption(this))}set ngValue(t){null!=this._select&&(this._value=t,this._setElementValue(AD(this.id,t)),this._select.writeValue(this._select.value))}set value(t){this._select?(this._value=t,this._setElementValue(AD(this.id,t)),this._select.writeValue(this._select.value)):this._setElementValue(t)}_setElementValue(t){this._renderer.setProperty(this._element.nativeElement,"value",t)}_setSelected(t){this._renderer.setProperty(this._element.nativeElement,"selected",t)}ngOnDestroy(){this._select&&(this._select._optionMap.delete(this.id),this._select.writeValue(this._select.value))}static{this.\u0275fac=function(r){return new(r||e)(T(tn),T(os),T(dg,9))}}static{this.\u0275dir=ne({type:e,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"}})}}return e})();let Cs=(()=>{class e{constructor(){this._validator=eu}ngOnChanges(t){if(this.inputName in t){const r=this.normalizeInput(t[this.inputName].currentValue);this._enabled=this.enabled(r),this._validator=this._enabled?this.createValidator(r):eu,this._onChange&&this._onChange()}}validate(t){return this._validator(t)}registerOnValidatorChange(t){this._onChange=t}enabled(t){return null!=t}static{this.\u0275fac=function(r){return new(r||e)}}static{this.\u0275dir=ne({type:e,features:[Yn]})}}return e})();const AH={provide:wt,useExisting:Ie(()=>pg),multi:!0};let pg=(()=>{class e extends Cs{constructor(){super(...arguments),this.inputName="maxlength",this.normalizeInput=t=>function FD(e){return"number"==typeof e?e:parseInt(e,10)}(t),this.createValidator=t=>GC(t)}static{this.\u0275fac=(()=>{let t;return function(i){return(t||(t=ft(e)))(i||e)}})()}static{this.\u0275dir=ne({type:e,selectors:[["","maxlength","","formControlName",""],["","maxlength","","formControl",""],["","maxlength","","ngModel",""]],hostVars:1,hostBindings:function(r,i){2&r&&Ct("maxlength",i._enabled?i.maxlength:null)},inputs:{maxlength:"maxlength"},features:[Pe([AH]),Ce]})}}return e})();const kH={provide:wt,useExisting:Ie(()=>gg),multi:!0};let gg=(()=>{class e extends Cs{constructor(){super(...arguments),this.inputName="pattern",this.normalizeInput=t=>t,this.createValidator=t=>qC(t)}static{this.\u0275fac=(()=>{let t;return function(i){return(t||(t=ft(e)))(i||e)}})()}static{this.\u0275dir=ne({type:e,selectors:[["","pattern","","formControlName",""],["","pattern","","formControl",""],["","pattern","","ngModel",""]],hostVars:1,hostBindings:function(r,i){2&r&&Ct("pattern",i._enabled?i.pattern:null)},inputs:{pattern:"pattern"},features:[Pe([kH]),Ce]})}}return e})(),FH=(()=>{class e{static{this.\u0275fac=function(r){return new(r||e)}}static{this.\u0275mod=Zn({type:e})}static{this.\u0275inj=An({})}}return e})();class WD extends au{constructor(n,t,r){super(ng(t),rg(r,t)),this.controls=n,this._initObservables(),this._setUpdateStrategy(t),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}at(n){return this.controls[this._adjustIndex(n)]}push(n,t={}){this.controls.push(n),this._registerControl(n),this.updateValueAndValidity({emitEvent:t.emitEvent}),this._onCollectionChange()}insert(n,t,r={}){this.controls.splice(n,0,t),this._registerControl(t),this.updateValueAndValidity({emitEvent:r.emitEvent})}removeAt(n,t={}){let r=this._adjustIndex(n);r<0&&(r=0),this.controls[r]&&this.controls[r]._registerOnCollectionChange(()=>{}),this.controls.splice(r,1),this.updateValueAndValidity({emitEvent:t.emitEvent})}setControl(n,t,r={}){let i=this._adjustIndex(n);i<0&&(i=0),this.controls[i]&&this.controls[i]._registerOnCollectionChange(()=>{}),this.controls.splice(i,1),t&&(this.controls.splice(i,0,t),this._registerControl(t)),this.updateValueAndValidity({emitEvent:r.emitEvent}),this._onCollectionChange()}get length(){return this.controls.length}setValue(n,t={}){_D(this,0,n),n.forEach((r,i)=>{uD(this,!1,i),this.at(i).setValue(r,{onlySelf:!0,emitEvent:t.emitEvent})}),this.updateValueAndValidity(t)}patchValue(n,t={}){null!=n&&(n.forEach((r,i)=>{this.at(i)&&this.at(i).patchValue(r,{onlySelf:!0,emitEvent:t.emitEvent})}),this.updateValueAndValidity(t))}reset(n=[],t={}){this._forEachChild((r,i)=>{r.reset(n[i],{onlySelf:!0,emitEvent:t.emitEvent})}),this._updatePristine(t,this),this._updateTouched(t,this),this.updateValueAndValidity(t)}getRawValue(){return this.controls.map(n=>n.getRawValue())}clear(n={}){this.controls.length<1||(this._forEachChild(t=>t._registerOnCollectionChange(()=>{})),this.controls.splice(0),this.updateValueAndValidity({emitEvent:n.emitEvent}))}_adjustIndex(n){return n<0?n+this.length:n}_syncPendingControls(){let n=this.controls.reduce((t,r)=>!!r._syncPendingControls()||t,!1);return n&&this.updateValueAndValidity({onlySelf:!0}),n}_forEachChild(n){this.controls.forEach((t,r)=>{n(t,r)})}_updateValue(){this.value=this.controls.filter(n=>n.enabled||this.disabled).map(n=>n.value)}_anyControls(n){return this.controls.some(t=>t.enabled&&n(t))}_setUpControls(){this._forEachChild(n=>this._registerControl(n))}_allControlsDisabled(){for(const n of this.controls)if(n.enabled)return!1;return this.controls.length>0||this.disabled}_registerControl(n){n.setParent(this),n._registerOnCollectionChange(this._onCollectionChange)}_find(n){return this.at(n)??null}}function jD(e){return!!e&&(void 0!==e.asyncValidators||void 0!==e.validators||void 0!==e.updateOn)}let RH=(()=>{class e{constructor(){this.useNonNullable=!1}get nonNullable(){const t=new e;return t.useNonNullable=!0,t}group(t,r=null){const i=this._reduceControls(t);let o={};return jD(r)?o=r:null!==r&&(o.validators=r.validator,o.asyncValidators=r.asyncValidator),new ha(i,o)}record(t,r=null){const i=this._reduceControls(t);return new dD(i,r)}control(t,r,i){let o={};return this.useNonNullable?(jD(r)?o=r:(o.validators=r,o.asyncValidators=i),new Oi(t,{...o,nonNullable:!0})):new Oi(t,r,i)}array(t,r,i){const o=t.map(c=>this._createControl(c));return new WD(o,r,i)}_reduceControls(t){const r={};return Object.keys(t).forEach(i=>{r[i]=this._createControl(t[i])}),r}_createControl(t){return t instanceof Oi||t instanceof au?t:Array.isArray(t)?this.control(t[0],t.length>1?t[1]:null,t.length>2?t[2]:null):this.control(t)}static{this.\u0275fac=function(r){return new(r||e)}}static{this.\u0275prov=Z({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})(),Ds=(()=>{class e{static withConfig(t){return{ngModule:e,providers:[{provide:lg,useValue:t.warnOnNgModelWithFormControl??"always"},{provide:Ri,useValue:t.callSetDisabledState??cu}]}}static{this.\u0275fac=function(r){return new(r||e)}}static{this.\u0275mod=Zn({type:e})}static{this.\u0275inj=An({imports:[FH]})}}return e})();const ba={id:"stateRootHashElt",type:"search",wrap_class:"col-xl-8 mb-2",class:"form-control",label:"State Root Hash",name:"state_root_hash",controlName:"stateRootHash",placeholder:"0x",e2e:"stateRootHashElt"},va={id:"paymentAmountElt",type:"tel",wrap_class:"col-lg-3 mb-2",class:"form-control",label:"Payment Amount",name:"payment_amount",controlName:"paymentAmount",placeholder:"",e2e:"paymentAmountElt",change:"motesToCSPR"},xi={id:"TTLElt",type:"search",wrap_class:"col-lg-2 mb-2",class:"form-control",label:"TTL",name:"ttl",controlName:"TTL",e2e:"TTLElt",config_name:"TTL"},BD={id:"sessionHashElt",type:"search",wrap_class:"col-xl-6 mb-2",class:"form-control",label:"Smart Contract hash or Package hash",name:"session_hash",controlName:"sessionHash",placeholder:"Contract Hash or Package Hash",e2e:"sessionHashElt",disabled_when:["has_wasm","sessionName.value"]},HD={id:"entityHashElt",type:"search",wrap_class:"col-xl-6 mb-2",class:"form-control",label:"Entity hash or Package hash",name:"entity_hash",controlName:"entityHash",placeholder:"Entity Hash (entity-contract-0x) or Package Hash (package-0x)",e2e:"entityHashElt",disabled_when:["has_wasm","entityAlias.value"]},pu={id:"callPackageElt",type:"checkbox",wrap_class:"col-xl-1 col-lg-2 mb-2",class:"form-check-input mt-0",label:"Call Package",name:"call_package",controlName:"callPackage",placeholder:"",e2e:"callPackageElt",label_class:"form-label",disabled_when:["has_wasm"]},gu={id:"versionElt",type:"search",wrap_class:"col-xl-3 mb-2",class:"form-control",label:"Version",name:"version",controlName:"version",placeholder:"1, empty last",e2e:"versionElt",disabled_when:["has_wasm"]},Ea={id:"gasPriceToleranceElt",type:"search",wrap_class:"col-xl-2 mb-2",class:"form-control",label:"Gas Price Tolerance",name:"gas_price_tolerance",controlName:"gasPriceTolerance",placeholder:"1, empty default",e2e:"gasPriceToleranceElt"},hg={id:"additionalComputationFactorElt",type:"search",wrap_class:"col-xl-2 mb-2",class:"form-control",label:"Computation Factor",name:"additional_computation_factor",controlName:"additionalComputationFactor",placeholder:"0, empty default",e2e:"additionalComputationFactorElt",disabled_when:["fixedPricingMode"]},zD={id:"sessionNameElt",type:"search",wrap_class:"col-xl-8 mb-2",class:"form-control",label:"Smart Contract name or Package name",name:"session_name",controlName:"sessionName",placeholder:"Counter",e2e:"sessionNameElt",disabled_when:["has_wasm","sessionHash.value"]},UD={id:"entityAliasElt",type:"search",wrap_class:"col-xl-8 mb-2",class:"form-control",label:"Entity alias or Package alias",name:"entity_alias",controlName:"entityAlias",placeholder:"Counter",e2e:"entityAliasElt",disabled_when:["has_wasm","entityHash.value"]},hu={id:"entryPointElt",type:"search",wrap_class:"col-lg-5 mb-2",class:"form-control",label:"Entry point",name:"entry_point",controlName:"entryPoint",placeholder:"counter_inc",e2e:"entryPointElt",disabled_when:["has_wasm"]},Sa={id:"argsSimpleElt",type:"search",wrap_class:"col-lg-8 mb-2",class:"form-control",label:"Args",name:"args_simple",controlName:"argsSimple",placeholder:"foo:Bool='true', bar:String='value'",e2e:"argsSimpleElt",disabled_when:["argsJson.value"],storage_name:"args_simple"},Ca={id:"argsJsonElt",type:"textarea",wrap_class:"col-lg-8 mb-2",class:"form-control",label:"Args Json",name:"args_json",controlName:"argsJson",placeholder:'Args as Json [{ "name": "foo", "type": "U256", "value": 1 }]',e2e:"argsJsonElt",disabled_when:["argsSimple.value"],storage_name:"args_json"},$D={id:"finalizedApprovalsElt",type:"checkbox",wrap_class:"col-lg-3 mt-3 mt-xl-0",class:"form-check-input mt-0",label:"Finalized approvals",name:"finalized_approvals",controlName:"finalizedApprovals",placeholder:"",e2e:"finalizedApprovalsElt",label_class:"form-label"},GD={id:"seedEntityHashElt",type:"search",wrap_class:"col-xl-8 mb-2",class:"form-control",label:"Entity Hash",name:"seed_entity_hash",controlName:"seedEntityHash",placeholder:"entity-contract-0x",e2e:"seedEntityHashElt",enabled_when:["newFromEntityInfo"]},qD={id:"seedNameElt",type:"search",wrap_class:"col-lg-6 mb-2",class:"form-control",label:"Dictionary Name",name:"seed_name",controlName:"seedName",placeholder:"events",e2e:"seedNameElt",enabled_when:["newFromContractInfo","newFromAccountInfo","newFromEntityInfo"]},KD={id:"itemKeyElt",type:"search",wrap_class:"col-xl-8 mb-2",class:"form-control",label:"Dictionary Item key",name:"item_key",controlName:"itemKey",placeholder:"Item key string",e2e:"itemKeyElt",enabled_when:["newFromContractInfo","newFromAccountInfo","newFromSeedUref","newFromEntityInfo"]},JD={id:"queryKeyElt",type:"search",wrap_class:"col-xl-8 mb-2",class:"form-control",label:"Key",name:"query_key",controlName:"queryKey",placeholder:"uref-0x || hash-0x || account-hash-0x",e2e:"queryKeyElt"},KH={...JD,label:"Contract Hash",placeholder:"hash-0x"},ZD={id:"queryPathElt",type:"search",wrap_class:"col-lg-4 mb-2",class:"form-control",label:"Path",name:"query_path",controlName:"queryPath",placeholder:"counter/count",e2e:"queryPathElt"},mg={id:"deployJsonElt",type:"textarea",wrap_class:"col-lg-12",class:"form-control",label:"Deploy as Json string",name:"deploy_json",controlName:"deployJson",placeholder:"Deploy as Json string",e2e:"deployJsonElt",state_name:["deploy_json"]},wg={id:"transactionJsonElt",type:"textarea",wrap_class:"col-lg-12",class:"form-control",label:"Transaction as Json string",name:"transaction_json",controlName:"transactionJson",placeholder:"Transaction as Json string",e2e:"transactionJsonElt",state_name:["transaction_json"]},yg={id:"selectPricingMode",type:"select",wrap_class:"mt-3 col-xl-3 mb-3",class:"form-select form-control form-control-sm",label:"Pricing mode",label_class:"input-group-text",name:"pricing_mode",controlName:"selectPricingMode",e2e:"selectPricingModeElt",options:[{value:P.MK.Classic.toString(),label:"Classic",default:En.default_pricing_mode===P.MK.Classic},{value:P.MK.Fixed.toString(),label:"Fixed",default:En.default_pricing_mode===P.MK.Fixed}]},bg={id:"selectTransactionCategory",type:"select",wrap_class:"mt-3 col-xl-3 mb-3",class:"form-select form-control form-control-sm",label:"Category",label_class:"input-group-text",name:"transaction_category",controlName:"selectTransactionCategory",e2e:"selectTransactionCategoryElt",options:[{value:"true",label:"Install & Upgrade",default:!0===En.default_is_install_upgrade},{value:"false",label:"Session",default:!1===En.default_is_install_upgrade}],enabled_when:["has_wasm"]},Sn=[[{input:{id:"blockIdentifierHeightElt",type:"search",wrap_class:"col-lg-3 col-xl-2 mb-2",class:"form-control",label:"Block Height",name:"block_identifier_height",controlName:"blockIdentifierHeight",placeholder:"Block Height",e2e:"blockIdentifierHeightElt"}},{input:{id:"blockIdentifierHashElt",type:"search",wrap_class:"col-lg-9 col-xl-8 mb-2",class:"form-control",label:"Block Hash",name:"block_identifier_hash",controlName:"blockIdentifierHash",placeholder:"Block Hash",e2e:"blockIdentifierHashElt"}}]],ZH=[...Sn,[{input:{id:"accountIdentifierElt",type:"search",wrap_class:"col-lg-9",class:"form-control",label:"Account identifier",name:"account_identifier",controlName:"accountIdentifier",placeholder:"Public Key, AccountHash",e2e:"accountIdentifierElt",state_name:["account_hash","public_key"]},required:!0}]],QH=[...Sn,[{input:{id:"entityIdentifierElt",type:"search",wrap_class:"col-lg-9",class:"form-control",label:"Entity identifier",name:"entity_identifier",controlName:"entityIdentifier",placeholder:"Public Key, AccountHash, Entity",e2e:"entityIdentifierElt",state_name:["account_hash","public_key","entity"]},required:!0}]],YH=[[{input:ba}],[{input:{id:"purseUrefElt",type:"search",wrap_class:"col-xl-8 mb-2",class:"form-control",label:"Purse Uref",name:"purse_uref",controlName:"purseUref",placeholder:"uref-0x",e2e:"purseUrefElt",state_name:["main_purse"]},required:!0}]],QD=[...Sn,[{input:ba}],[{input:{id:"purseIdentifierElt",type:"search",wrap_class:"col-xl-8 mb-2",class:"form-control",label:"Purse Identifier",name:"purse_identifier",controlName:"purseIdentifier",placeholder:"Public Key, AccountHash, Purse URef",e2e:"purseIdentifierElt",state_name:["main_purse","account_hash","public_key"]},required:!0}]],XH=[...Sn,[{input:ba}],[{input:JD,required:!0}],[{input:ZD}]],ez=[[{input:ba}],[{input:GD,required:!0}],[{input:qD,required:!0}],[{input:KD,required:!0}]],tz=[...Sn,[{input:KH,required:!0}],[{input:ZD,required:!0}]],nz=[[{input:ba}],[{select:{id:"selectDictIdentifierElt",type:"select",wrap_class:"mt-3 col-lg-5 mb-4",class:"form-select form-control form-control-sm",label:"Dictionary identifier",label_class:"input-group-text",name:"select_dict_identifier",controlName:"selectDictIdentifier",e2e:"selectDictIdentifierElt",state_name:["select_dict_identifier"],options:[{value:"newFromSeedUref",label:"From Dictionary Uref"},{value:"newFromContractInfo",label:"From Contract Info (depr.)"},{value:"newFromEntityInfo",label:"From Entity Info",default:!0},{value:"newFromAccountInfo",label:"From Account Info"},{value:"newFromDictionaryKey",label:"From Dictionary Key"}]}}],[{input:{id:"seedContractHashElt",type:"search",wrap_class:"col-xl-8 mb-2",class:"form-control",label:"Contract Hash",name:"seed_contract_hash",controlName:"seedContractHash",placeholder:"hash-0x",e2e:"seedContractHashElt",enabled_when:["newFromContractInfo"]},required:!0}],[{input:GD,required:!0}],[{input:{id:"seedAccountHashElt",type:"search",wrap_class:"col-xl-8 mb-2",class:"form-control",label:"Account Hash",name:"seed_account_hash",controlName:"seedAccountHash",placeholder:"account-hash-0x",e2e:"seedAccountHashElt",enabled_when:["newFromAccountInfo"]},required:!0}],[{input:{id:"seedUrefElt",type:"search",wrap_class:"col-xl-8 mb-2",class:"form-control",label:"Dictionary Uref",name:"seed_uref",controlName:"seedUref",placeholder:"uref-0x",e2e:"seedUrefElt",enabled_when:["newFromSeedUref"]},required:!0}],[{input:qD,required:!0}],[{input:KD,required:!0}],[{input:{id:"seedKeyElt",type:"search",wrap_class:"col-xl-8 mb-2",class:"form-control",label:"Dictionary Key",name:"seed_key",controlName:"seedKey",placeholder:"dictionary-0x",e2e:"seedKeyElt",enabled_when:["newFromDictionaryKey"]},required:!0}]],rz=[[{input:{id:"deployHashElt",type:"search",wrap_class:"col-xl-7",class:"form-control",label:"Deploy Hash",name:"deploy_hash",controlName:"deployHash",placeholder:"0x",e2e:"deployHashElt"},required:!0},{input:$D}]],sz=[[{input:{id:"transactionHashElt",type:"search",wrap_class:"col-xl-7",class:"form-control",label:"Transaction Hash",name:"transaction_hash",controlName:"transactionHash",placeholder:"0x",e2e:"transactionHashElt"},required:!0},{input:$D}]],Da=[[{input:{id:"transferAmountElt",type:"tel",wrap_class:"col-lg-3 mb-2",class:"form-control",label:"Transfer Amount",name:"transfer_amount",controlName:"transferAmount",e2e:"transferAmountElt",config_name:"minimum_transfer",maxlength:"28",pattern:"\\d*",change:"motesToCSPR"},required:!0},{input:xi}],[{input:{id:"targetAccountElt",type:"search",wrap_class:"col-xl-9",class:"form-control",label:"Target Account",name:"target_account",controlName:"targetAccount",placeholder:"Public Key, AccountHash, Purse URef",e2e:"targetAccountElt"},required:!0}]],YD=[...Sn,...Da],XD=[[{input:va,required:!0},{input:xi},{input:Ea},{select:yg},{input:hg}],[{wasm_button:!0},{select:bg}],[{input:Sa}],[{textarea:Ca}]],vg=[[{input:va,required:!0},{input:xi},{input:Ea}],[{wasm_button:!0},{select:bg}],[{input:BD,required:!0},{input:pu},{input:gu}],[{input:zD,required:!0}],[{input:hu,required:!0}],[{input:Sa}],[{textarea:Ca}]],Eg=[[{input:va,required:!0},{input:xi},{input:Ea},{select:yg},{input:hg}],[{wasm_button:!0},{select:bg}],[{input:HD,required:!0},{input:pu},{input:gu}],[{input:UD,required:!0}],[{input:hu,required:!0}],[{input:Sa}],[{textarea:Ca}]],iz=[...vg],oz=[...Eg],mu=new Map([["call_entrypoint",[[{input:va,required:!0},{input:xi},{input:Ea},{select:yg},{input:hg}],[{input:HD},{input:pu},{input:gu}],[{input:UD}],[{input:hu}],[{input:Sa}],[{textarea:Ca}]]],["call_entrypoint_deploy",[[{input:va,required:!0},{input:xi},{input:Ea}],[{input:BD},{input:pu},{input:gu}],[{input:zD}],[{input:hu}],[{input:Sa}],[{textarea:Ca}]]],["deploy",vg],["get_account",ZH],["get_balance",YH],["get_block",Sn],["get_block_transfers",Sn],["get_deploy",rz],["get_dictionary_item",nz],["get_era_info",Sn],["get_era_summary",Sn],["get_entity",QH],["get_state_root_hash",Sn],["get_transaction",sz],["install",XD],["install_deploy",XD],["make_deploy",vg],["make_transaction",Eg],["make_transfer",Da],["make_transfer_transaction",Da],["put_deploy",[[{file_button:!0}],[{textarea:mg,required:!0}]]],["put_transaction",[[{file_button:!0}],[{textarea:wg,required:!0}]]],["query_balance",QD],["query_balance_details",QD],["query_contract_dict",ez],["query_contract_key",tz],["query_global_state",XH],["sign_deploy",[[{file_button:!0}],[{textarea:mg,required:!0}]]],["sign_transaction",[[{file_button:!0}],[{textarea:wg,required:!0}]]],["speculative_deploy",iz],["speculative_exec_deploy",[[{file_button:!0}],[{textarea:mg,required:!0}]]],["speculative_exec",[[{file_button:!0}],[{textarea:wg,required:!0}]]],["speculative_transaction",oz],["speculative_transfer",YD],["speculative_transfer_transaction",YD],["transaction",Eg],["transfer",Da],["transfer_transaction",Da]]);let Cn=(()=>{class e{constructor(){this.state=new ku({})}setState(t){const i={...this.state.getValue(),...t};this.state.next(i)}getState(){return this.state.asObservable()}getValue(){return this.state.getValue()}static{this.\u0275fac=function(r){return new(r||e)}}static{this.\u0275prov=Z({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})(),Ta=(()=>{class e{constructor(t){this.document=t,this.prefix="casper-client",this.window=this.document.defaultView}setState(t){const i={...JSON.parse(this.window?.localStorage.getItem(this.prefix)||"{}"),...t};this.window?.localStorage.setItem(this.prefix,JSON.stringify(i))}get(t){return(JSON.parse(this.window?.localStorage.getItem(this.prefix)||"{}")||{})[t]}static{this.\u0275fac=function(r){return new(r||e)(U(rn))}}static{this.\u0275prov=Z({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})(),Li=(()=>{class e{constructor(t,r,i,o){this.config=t,this.formBuilder=r,this.stateService=i,this.storageService=o,this.stateService.getState().subscribe(c=>{this.has_wasm=!!c?.has_wasm,c?.select_dict_identifier&&(this.select_dict_identifier=c.select_dict_identifier),c?.action&&this.action!==c.action&&(c.action&&(this.action=c.action),this.initializeForm()),c&&(this.state=c),this.action&&this.updateForm()}),this.form=this.defaultForm}get defaultForm(){const t={};return mu.forEach(r=>{r.forEach(i=>{i.forEach(({input:o,textarea:c,select:l})=>{const _=o?.controlName||c?.controlName||l?.controlName||"";if(_&&(t[_]=new Oi(this.getDefaultOptionValue(l?.options))),l?.options&&"selectDictIdentifier"===_){const d=l?.options.find(p=>p.default)?.value||"";this.stateService.setState({select_dict_identifier:d})}})})}),this.formBuilder.group(t)}getDefaultOptionValue(t){const r=t&&t.find(i=>i.default);return r?r.value:null}initializeForm(){Object.values(this.form.controls).forEach(r=>{r.clearValidators(),r.markAsPristine(),r.disable()});const t=this.action&&mu.get(this.action);t&&t.forEach(r=>{r.forEach(({input:i,textarea:o,select:c,required:l})=>{if(!i&&!o&&!c)return;const d=this.form.get(i?.controlName||o?.controlName||c?.controlName||"");if(!d)return;const p=i?.state_name||o?.state_name||c?.state_name||[],h=p&&p.find(b=>this.state[b]),m=i?.storage_name||o?.storage_name||c?.storage_name||"";let w=h?this.state[h]:"";if(w=m?this.storageService.get(m):w,w)w&&d.setValue(w);else if(i?.config_name){const b=this.config[i?.config_name]||"";b&&d.setValue(b),b&&(i.placeholder_config_value=b)}d.enable(),l&&(i&&(i.required=!0),o&&(o.required=!0),d.setValidators([zB.required]))})})}updateForm(){console.log("updateForm");const t=this.action&&mu.get(this.action);if(!t)return;const r=[];t.forEach(i=>{i.forEach(({input:o,textarea:c,select:l})=>{const _=o?.controlName||c?.controlName||l?.controlName||"";if(!_)return;const d=this.form.get(_);if(d){if(c){const p=c?.state_name||[],h=p&&p.find(w=>this.state[w]),m=h?this.state[h]:"";if(m&&d.setValue(m),c.disabled_when){const w=d.value&&c.disabled_when?.find(C=>C.includes("value")),b=w&&w.split(".")[0],E=b&&this.form?.get(b);E&&(E.disable(),r.push(b)),r.includes(c.controlName)||d.enable()}}else if(l&&l.enabled_when)this.has_wasm&&l.enabled_when?.includes("has_wasm")?d.enable():d.disable();else if(o){const p=o?.state_name||[],h=p&&p.find(w=>this.state[w]),m=h?this.state[h]:"";if(m&&d.setValue(m),o.enabled_when)"get_dictionary_item"===this.action&&this.select_dict_identifier&&!o.enabled_when?.includes(this.select_dict_identifier)?d.disable():this.select_dict_identifier&&d.enable();else if(o.disabled_when){const w=d.value&&o.disabled_when?.find(N=>N.includes("value")),b=w&&w.split(".")[0],E=b&&this.form?.get(b);E&&(E.disable(),r.push(b)),this.has_wasm&&o?.disabled_when?.includes("has_wasm")?(d.reset(),d.disable()):r.includes(o.controlName)||d.enable();const C=P.MK[this.state.pricing_mode]===P.MK.Classic;o?.disabled_when?.includes("fixedPricingMode")&&C&&(d.reset(),d.disable())}}if(o||c){const p=o?.storage_name||c?.storage_name||"";p&&this.storageService.setState({[p]:d.value})}}})})}get formFields(){return mu}static{this.\u0275fac=function(r){return new(r||e)(U(lr),U(RH),U(Cn),U(Ta))}}static{this.\u0275prov=Z({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();const gz=["template"],hz=(e,n)=>[e,n],mz=(e,n,t)=>[e,n,t];function wz(e,n){if(1&e&&(O(0,"span",10),ie(1),x()),2&e){let t;const r=H(2),i=r.inputField,o=r.parentForm,c=H();L(),ht("(",c.motesToCSPR(null==(t=o.get(i.controlName))?null:t.value)," CSPR)")}}function yz(e,n){if(1&e){const t=Le();qt(0,3),O(1,"input",11),re("change",function(){ge(t);const i=H(2).inputField;return he(H().onChange(i))}),x(),Kt()}if(2&e){const t=H(2),r=t.inputField,i=t.parentForm,o=H();R("formGroup",i),L(),R("id",r.id)("type",r.type)("name",r.name)("maxlength",r.maxlength||"")("pattern",r.pattern||"")("formControlName",r.controlName)("placeholder",r.placeholder_config_value?"e.g. "+r.placeholder_config_value:r.placeholder||"")("ngClass",W0(10,mz,r.class||"form-control",o.isInvalid(r.controlName)?"is-invalid":"",o.isRequired(r)?"is-required":"")),Ct("e2e-id",r.e2e)}}function bz(e,n){if(1&e&&(O(0,"label",12),ie(1),x()),2&e){const t=H(2).inputField;R("for",t.id),L(),ht("e.g. ",t.placeholder,"")}}function vz(e,n){if(1&e&&(O(0,"label",12),ie(1),x()),2&e){const t=H(2).inputField;R("for",t.id),L(),ht("e.g. ",t.placeholder_config_value,"")}}function Ez(e,n){if(1&e&&(O(0,"div",4)(1,"label",5),ie(2),ae(3,wz,2,1,"span",6),x(),O(4,"div",7),ae(5,yz,2,14,"ng-container",8)(6,bz,2,2,"label",9)(7,vz,2,2,"label",9),x()()),2&e){let t,r;const i=H(),o=i.inputField,c=i.parentForm,l=ps(2);R("ngClass",o.wrap_class),L(),R("for",o.id)("ngClass",Di(10,hz,o.label_class||"",null!=(t=c.get(o.controlName))&&t.disabled?"disabled":"")),L(),qo("",o.label,"",o.required?" *":""," "),L(),R("ngIf",(null==o.change?null:o.change.includes("motesToCSPR"))&&(null==(r=c.get(o.controlName))?null:r.value)),L(2),R("ngIf","checkbox"!==o.type)("ngIfElse",l),L(),R("ngIf",o.placeholder),L(),R("ngIf",o.placeholder_config_value)}}function Sz(e,n){if(1&e&>(0,"input",13),2&e){const t=H().inputField;R("id",t.id)("name",t.name)("formControlName",t.controlName),Ct("e2e-id",t.e2e)}}function Cz(e,n){if(1&e&&ae(0,Ez,8,13,"div",2)(1,Sz,1,4,"ng-template",3,1,hs),2&e){let t;const r=n.inputField,i=n.parentForm;R("ngIf",!(H().hidden_when_disabled&&null!=(t=i.get(r.controlName))&&t.disabled)),L(),R("formGroup",i)}}let eT=(()=>{class e{constructor(t){this.formService=t}onChange(t){this.parentForm?.get(t.controlName)&&t.disabled_when?.find(o=>o.includes("value"))&&this.formService.updateForm()}isInvalid(t){const r=this.parentForm?.get(t);return!(!r?.enabled||!r?.dirty||r?.value||r?.valid)}isRequired(t){const r=this.parentForm?.get(t.controlName);return!(!r?.enabled||r?.dirty||r?.value||!t.required)}motesToCSPR(t){if(t)return t=this.parse_commas(t),(0,P.S3)(t)}parse_commas(t){return t.replace(/[,.]/g,"")}static{this.\u0275fac=function(r){return new(r||e)(T(Li))}}static{this.\u0275cmp=ut({type:e,selectors:[["ui-input"]],viewQuery:function(r,i){if(1&r&&Tt(gz,7),2&r){let o;It(o=Mt())&&(i.template=o.first)}},inputs:{inputField:"inputField",parentForm:"parentForm",hidden_when_disabled:"hidden_when_disabled"},standalone:!0,features:[mt],decls:2,vars:0,consts:[["template",""],["checkboxContent",""],[3,"ngClass",4,"ngIf"],[3,"formGroup"],[3,"ngClass"],[3,"for","ngClass"],["class","fw-light small text-nowrap",4,"ngIf"],[1,"form-floating"],[3,"formGroup",4,"ngIf","ngIfElse"],[3,"for",4,"ngIf"],[1,"fw-light","small","text-nowrap"],[3,"change","id","type","name","maxlength","pattern","formControlName","placeholder","ngClass"],[3,"for"],["type","checkbox",3,"id","name","formControlName"]],template:function(r,i){1&r&&ae(0,Cz,3,2,"ng-template",null,0,hs)},dependencies:[Ke,cr,an,Ds,da,Kp,nu,fa,pg,gg,Ss,ya],styles:["[_nghost-%COMP%]{display:none}label[_ngcontent-%COMP%]{max-width:100%}.form-floating[_ngcontent-%COMP%] > label[_ngcontent-%COMP%], label.disabled[_ngcontent-%COMP%]{color:#d3d3d3}"],changeDetection:0})}}return e})();const Dz=["template"],tT=e=>[e];function Tz(e,n){if(1&e&&(O(0,"option",7),ie(1),x()),2&e){const t=n.$implicit,r=H(2);Of("value",t.value),R("selected",t.default||r.select_dict_identifier===t.value),L(),ht(" ",t.label," ")}}function Iz(e,n){if(1&e){const t=Le();O(0,"div",1)(1,"div",2)(2,"label",3),ie(3),x(),qt(4,4),O(5,"select",5),re("change",function(i){return ge(t),he(H().onChange(i))}),ae(6,Tz,2,3,"option",6),x(),Kt(),x()()}if(2&e){const t=n.inputField,r=n.parentForm;R("ngClass",t.wrap_class),L(2),R("for",t.id)("ngClass",yn(11,tT,t.label_class||"")),L(),gs(t.label),L(),R("formGroup",r),L(),R("id",t.id)("name",t.name)("ngClass",yn(13,tT,t.class||"form-control"))("formControlName",t.controlName),Ct("e2e-id",t.e2e),L(),R("ngForOf",t.options)}}let nT=(()=>{class e{constructor(t,r,i){this.config=t,this.stateService=r,this.changeDetectorRef=i}ngAfterViewInit(){var t=this;return(0,u.A)(function*(){t.setStateSubscription()})()}ngOnDestroy(){this.stateSubscription&&this.stateSubscription.unsubscribe()}setStateSubscription(){this.stateSubscription=this.stateService.getState().subscribe(t=>{setTimeout(()=>{t.select_dict_identifier&&(this.select_dict_identifier=t.select_dict_identifier),this.changeDetectorRef.markForCheck()})})}onChange(t){const r=t.target?.value,i=t.target?.name;"select_dict_identifier"===i&&this.stateService.setState({select_dict_identifier:r}),"pricing_mode"===i&&this.stateService.setState({pricing_mode:P.MK[r].toString()})}static{this.\u0275fac=function(r){return new(r||e)(T(lr),T(Cn),T(Jt))}}static{this.\u0275cmp=ut({type:e,selectors:[["ui-select"]],viewQuery:function(r,i){if(1&r&&Tt(Dz,7),2&r){let o;It(o=Mt())&&(i.template=o.first)}},inputs:{inputField:"inputField",parentForm:"parentForm"},standalone:!0,features:[mt],decls:2,vars:0,consts:[["template",""],[3,"ngClass"],[1,"input-group"],[3,"for","ngClass"],[3,"formGroup"],[3,"change","id","name","ngClass","formControlName"],[3,"value","selected",4,"ngFor","ngForOf"],[3,"value","selected"]],template:function(r,i){1&r&&ae(0,Iz,7,15,"ng-template",null,0,hs)},dependencies:[Ke,cr,ia,Ds,ND,kD,fu,nu,fa,Ss,ya],styles:["[_nghost-%COMP%]{display:none}label[_ngcontent-%COMP%]{max-width:100%}[_ngcontent-%COMP%]:disabled{color:#d3d3d3}"],changeDetection:0})}}return e})();const Mz=["template"],Nz=(e,n)=>[e,n];function Az(e,n){if(1&e&&(O(0,"label",6),ie(1),x()),2&e){const t=H().inputField,r=H();R("for",t.id),L(),gs(r.currentPlaceholder||t.placeholder)}}function kz(e,n){if(1&e){const t=Le();O(0,"div",1)(1,"div",2),qt(2,3),O(3,"textarea",4),re("change",function(i){const o=ge(t).inputField;return he(H().onChange(i,o))})("focus",function(i){return ge(t),he(H().onFocus(i))})("blur",function(i){return ge(t),he(H().onBlur(i))}),ie(4," "),x(),ae(5,Az,2,2,"label",5),Kt(),x()()}if(2&e){const t=n.inputField,r=n.parentForm,i=H();R("ngClass",t.wrap_class),L(2),R("formGroup",r),L(),R("id",t.id)("name",t.name)("formControlName",t.controlName)("placeholder",i.currentPlaceholder||t.placeholder||"")("ngClass",Di(9,Nz,t.class||"form-control",i.isInvalid(t.controlName)?"is-invalid":"")),Ct("e2e-id",t.e2e),L(2),R("ngIf",t.placeholder)}}let rT=(()=>{class e{constructor(t){this.formService=t,this.update_deploy_json=new Re,this.update_transaction_json=new Re,this.jsonPattern=/\[\{.*?\}\]/g}ngOnInit(){this.originalPlaceholder=this.inputField.placeholder||""}ngAfterViewInit(){this.initializePlaceholder()}isInvalid(t){const r=this.parentForm?.get(t);return!!this.parentForm?.touched&&!!r?.invalid}onChange(t,r){const i=t.target;i.name.includes("deploy")?this.update_deploy_json.emit(i.value):i.name.includes("transaction")?this.update_transaction_json.emit(i.value):this.updateForm(r)}onFocus(t){this.currentPlaceholder=this.removeJsonParts(t.target.placeholder)}onBlur(t){t.target.value||(this.currentPlaceholder=this.originalPlaceholder)}updateForm(t){this.parentForm?.get(t.controlName)&&t.disabled_when?.find(o=>o.includes("value"))&&this.formService.updateForm()}removeJsonParts(t){return t.replace(this.jsonPattern,"").trim()}initializePlaceholder(){const t=this.parentForm.get(this.inputField.controlName);this.currentPlaceholder=t&&t.value?this.removeJsonParts(this.originalPlaceholder):this.originalPlaceholder}static{this.\u0275fac=function(r){return new(r||e)(T(Li))}}static{this.\u0275cmp=ut({type:e,selectors:[["ui-textarea"]],viewQuery:function(r,i){if(1&r&&Tt(Mz,7),2&r){let o;It(o=Mt())&&(i.template=o.first)}},inputs:{inputField:"inputField",parentForm:"parentForm"},outputs:{update_deploy_json:"update_deploy_json",update_transaction_json:"update_transaction_json"},standalone:!0,features:[mt],decls:2,vars:0,consts:[["template",""],[3,"ngClass"],[1,"form-floating","mt-3"],[3,"formGroup"],[3,"change","focus","blur","id","name","formControlName","placeholder","ngClass"],[3,"for",4,"ngIf"],[3,"for"]],template:function(r,i){1&r&&ae(0,kz,6,12,"ng-template",null,0,hs)},dependencies:[Ke,cr,an,Ds,da,nu,fa,Ss,ya],styles:["textarea[_ngcontent-%COMP%]{min-height:350px!important;white-space:pre-wrap}@media (max-width: 767px){textarea[_ngcontent-%COMP%]{min-height:200px!important}}.form-floating[_ngcontent-%COMP%] > label[_ngcontent-%COMP%], label.disabled[_ngcontent-%COMP%]{color:#d3d3d3}"],changeDetection:0})}}return e})();const Fz=["wasmElt"],Rz=["template"];function Oz(e,n){if(1&e){const t=Le();O(0,"button",6),re("click",function(){return ge(t),he(H(2).onWasmClick())}),ie(1," Wasm Module Bytes "),x()}}function xz(e,n){if(1&e){const t=Le();O(0,"span",7),re("click",function(){return ge(t),he(H(2).resetWasmClick())}),ie(1),ac(),O(2,"svg",8),gt(3,"path",9),x()()}if(2&e){const t=H(2);L(),ht(" ",t.file_name," ")}}function Lz(e,n){if(1&e){const t=Le();O(0,"div",2)(1,"input",3,1),re("change",function(i){return ge(t),he(H().onWasmSelected(i))}),x(),ae(3,Oz,2,0,"button",4)(4,xz,4,1,"span",5),x()}if(2&e){const t=H();L(3),R("ngIf",!t.file_name),L(),R("ngIf",t.file_name)}}let sT=(()=>{class e{constructor(){this.select_wasm=new Re}onWasmSelected(t){var r=this;return(0,u.A)(function*(){r.file_name=r.wasmElt?.nativeElement.value.split("\\").pop();const i=t.target.files?.item(0),o=yield i?.arrayBuffer();r.wasm=o&&new Uint8Array(o),r.wasm?.buffer||r.resetWasmClick(),r.select_wasm.emit(r.wasm)})()}onWasmClick(){this.wasmElt.nativeElement.click()}resetWasmClick(){this.wasmElt.nativeElement.value="",this.wasm=void 0,this.file_name="",this.select_wasm.emit(void 0)}static{this.\u0275fac=function(r){return new(r||e)}}static{this.\u0275cmp=ut({type:e,selectors:[["comp-submit-wasm"]],viewQuery:function(r,i){if(1&r&&(Tt(Fz,5),Tt(Rz,7)),2&r){let o;It(o=Mt())&&(i.wasmElt=o.first),It(o=Mt())&&(i.template=o.first)}},outputs:{select_wasm:"select_wasm"},standalone:!0,features:[mt],decls:2,vars:0,consts:[["template",""],["wasmElt",""],[1,"col-sm-2","mb-3","mt-3"],["name","wasm","type","file","id","wasmElt","accept",".wasm","e2e-id","wasmElt",1,"visually-hidden",3,"change"],["class","btn btn-secondary",3,"click",4,"ngIf"],["class","btn btn-light","e2e-id","wasmName",3,"click",4,"ngIf"],[1,"btn","btn-secondary",3,"click"],["e2e-id","wasmName",1,"btn","btn-light",3,"click"],["fill","none","stroke","currentColor","viewBox","0 0 24 24","xmlns","http://www.w3.org/2000/svg",1,"w-6","h-6","ml-1","cursor-pointer","shrink-0"],["stroke-linecap","round","stroke-linejoin","round","stroke-width","2","d","M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"]],template:function(r,i){1&r&&ae(0,Lz,5,2,"ng-template",null,0,hs)},dependencies:[Ke,an],styles:["[_nghost-%COMP%]{display:none}"],changeDetection:0})}}return e})(),Ia=(()=>{class e{constructor(){this.error=new ku("")}setError(t){this.error.getValue()!==t&&this.error.next(t)}getError(){return this.error.asObservable()}static{this.\u0275fac=function(r){return new(r||e)}}static{this.\u0275prov=Z({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();const Pz=["template"],Vz=["deployFileElt"],Wz=["transactionFileElt"];function jz(e,n){if(1&e){const t=Le();O(0,"div",4)(1,"input",5,1),re("change",function(i){return ge(t),he(H(2).onDeployFileSelected(i))}),x(),O(3,"button",6),re("click",function(){return ge(t),he(H(2).deployFileClick())}),ie(4," Load deploy file "),x()()}}function Bz(e,n){if(1&e){const t=Le();O(0,"div",4)(1,"input",7,2),re("change",function(i){return ge(t),he(H(2).onTransactionFileSelected(i))}),x(),O(3,"button",6),re("click",function(){return ge(t),he(H(2).transactionFileClick())}),ie(4," Load transaction file "),x()()}}function Hz(e,n){if(1&e&&ae(0,jz,5,0,"div",3)(1,Bz,5,0,"div",3),2&e){const t=H();R("ngIf","deploy"===t.type),L(),R("ngIf","transaction"===t.type)}}let iT=(()=>{class e{constructor(t){this.errorService=t,this.select_deploy=new Re,this.select_transaction=new Re,this.type="deploy"}onDeployFileSelected(t){var r=this;return(0,u.A)(function*(){const i=t.target.files?.item(0);let o;if(r.deploy_json="",i){if(o=yield i.text(),!o.trim())return;o=o.trim();try{const c=JSON.parse(o);r.deploy_json=c}catch{const c="Error parsing deploy";console.error(c),r.errorService.setError(c)}}r.select_deploy.emit(r.deploy_json),r.deployFileElt.nativeElement.value=""})()}onTransactionFileSelected(t){var r=this;return(0,u.A)(function*(){const i=t.target.files?.item(0);let o;if(r.transaction_json="",i){if(o=yield i.text(),!o.trim())return;o=o.trim();try{const c=JSON.parse(o);r.transaction_json=c}catch{const c="Error parsing transaction";console.error(c),r.errorService.setError(c)}}r.select_transaction.emit(r.transaction_json),r.transactionFileElt.nativeElement.value=""})()}deployFileClick(){this.deployFileElt.nativeElement.click()}transactionFileClick(){this.transactionFileElt.nativeElement.click()}static{this.\u0275fac=function(r){return new(r||e)(T(Ia))}}static{this.\u0275cmp=ut({type:e,selectors:[["comp-submit-file"]],viewQuery:function(r,i){if(1&r&&(Tt(Pz,7),Tt(Vz,5),Tt(Wz,5)),2&r){let o;It(o=Mt())&&(i.template=o.first),It(o=Mt())&&(i.deployFileElt=o.first),It(o=Mt())&&(i.transactionFileElt=o.first)}},inputs:{type:"type"},outputs:{select_deploy:"select_deploy",select_transaction:"select_transaction"},standalone:!0,features:[mt],decls:2,vars:0,consts:[["template",""],["deployFileElt",""],["transactionFileElt",""],["class","col-sm-2 mt-2",4,"ngIf"],[1,"col-sm-2","mt-2"],["name","deploy_file","type","file","id","deployFileElt","accept",".json, .txt, .deploy","e2e-id","deployFileElt",1,"visually-hidden",3,"change"],[1,"btn","btn-secondary",3,"click"],["name","transaction_file","type","file","id","transactionFileElt","accept",".json, .txt, .deploy","e2e-id","transactionFileElt",1,"visually-hidden",3,"change"]],template:function(r,i){1&r&&ae(0,Hz,2,2,"ng-template",null,0,hs)},dependencies:[Ke,an],styles:["[_nghost-%COMP%]{display:none}"],changeDetection:0})}}return e})();const Sg=(e,n)=>({parentForm:e,inputField:n});function zz(e,n){1&e&&ds(0)}function Uz(e,n){if(1&e&&(qt(0),gt(1,"ui-input",7,0),ae(3,zz,1,0,"ng-container",8),Kt()),2&e){const t=ps(2),r=H().$implicit,i=H(3);L(),R("parentForm",i.form)("inputField",r.input)("hidden_when_disabled","get_dictionary_item"===i.action),L(2),R("ngTemplateOutlet",t.template)("ngTemplateOutletContext",Di(5,Sg,i.form,r.input))}}function $z(e,n){1&e&&ds(0)}function Gz(e,n){if(1&e){const t=Le();qt(0),O(1,"ui-textarea",9,0),re("update_deploy_json",function(i){return ge(t),he(H(4).updateDeployJson(i))})("update_transaction_json",function(i){return ge(t),he(H(4).updateTransactionJson(i))}),x(),ae(3,$z,1,0,"ng-container",8),Kt()}if(2&e){const t=ps(2),r=H().$implicit,i=H(3);L(),R("parentForm",i.form)("inputField",r.textarea),L(2),R("ngTemplateOutlet",t.template)("ngTemplateOutletContext",Di(4,Sg,i.form,r.textarea))}}function qz(e,n){1&e&&ds(0)}function Kz(e,n){if(1&e&&(qt(0),gt(1,"ui-select",10,0),ae(3,qz,1,0,"ng-container",8),Kt()),2&e){const t=ps(2),r=H().$implicit,i=H(3);L(),R("parentForm",i.form)("inputField",r.select),L(2),R("ngTemplateOutlet",t.template)("ngTemplateOutletContext",Di(4,Sg,i.form,r.select))}}function Jz(e,n){1&e&&ds(0)}function Zz(e,n){if(1&e){const t=Le();qt(0),O(1,"comp-submit-wasm",11,1),re("select_wasm",function(i){return ge(t),he(H(4).onWasmSelected(i))}),x(),ae(3,Jz,1,0,"ng-container",12),Kt()}if(2&e){const t=ps(2);L(3),R("ngTemplateOutlet",t.template)}}function Qz(e,n){1&e&&ds(0)}function Yz(e,n){if(1&e){const t=Le();qt(0),O(1,"comp-submit-file",13,1),re("select_deploy",function(i){return ge(t),he(H(4).onDeployFileSelected(i))})("select_transaction",function(i){return ge(t),he(H(4).onTransactionFileSelected(i))}),x(),ae(3,Qz,1,0,"ng-container",12),Kt()}if(2&e){const t=ps(2),r=H(4);L(),R("type",r.action.includes("transaction")?"transaction":"deploy"),L(2),R("ngTemplateOutlet",t.template)}}function Xz(e,n){if(1&e&&(qt(0),ae(1,Uz,4,8,"ng-container",6)(2,Gz,4,7,"ng-container",6)(3,Kz,4,7,"ng-container",6)(4,Zz,4,1,"ng-container",6)(5,Yz,4,2,"ng-container",6),Kt()),2&e){const t=n.$implicit;L(),R("ngIf",t.input),L(),R("ngIf",t.textarea),L(),R("ngIf",t.select),L(),R("ngIf",t.wasm_button),L(),R("ngIf",t.file_button)}}function eU(e,n){if(1&e&&(qt(0),O(1,"div",5),ae(2,Xz,6,5,"ng-container",4),x(),Kt()),2&e){const t=n.$implicit;L(2),R("ngForOf",t)}}function tU(e,n){if(1&e&&(O(0,"form",3),ae(1,eU,3,1,"ng-container",4),x()),2&e){const t=H();R("formGroup",t.form),L(),R("ngForOf",t.formFields.get(t.action))}}let oT=(()=>{class e{constructor(t,r,i,o){this.config=t,this.formService=r,this.stateService=i,this.changeDetectorRef=o,this.formFields=this.formService.formFields,this.wasm_selected=new Re,this.verbosity=this.config.verbosity}ngOnDestroy(){this.stateSubscription&&this.stateSubscription.unsubscribe()}ngAfterViewInit(){var t=this;return(0,u.A)(function*(){t.setStateSubscription()})()}setStateSubscription(){this.stateSubscription=this.stateService.getState().subscribe(t=>{t.action&&(this.action=t.action),this.changeDetectorRef.markForCheck()})}onWasmSelected(t){var r=this;return(0,u.A)(function*(){t&&r.wasm_selected.emit(t),r.stateService.setState({has_wasm:!!t})})()}onDeployFileSelected(t){var r=this;return(0,u.A)(function*(){t=t&&(0,P.mL)(new P.m9(t).toJson(),r.verbosity),r.updateDeployJson(t)})()}onTransactionFileSelected(t){var r=this;return(0,u.A)(function*(){t=t&&(0,P.mL)(new P.ZX(t).toJson(),r.verbosity),r.updateTransactionJson(t)})()}updateDeployJson(t){t&&this.stateService.setState({deploy_json:t})}updateTransactionJson(t){t&&this.stateService.setState({transaction_json:t})}static{this.\u0275fac=function(r){return new(r||e)(T(lr),T(Li),T(Cn),T(Jt))}}static{this.\u0275cmp=ut({type:e,selectors:[["comp-form"]],inputs:{form:"form"},outputs:{wasm_selected:"wasm_selected"},standalone:!0,features:[mt],decls:1,vars:1,consts:[["inputTemplate",""],["submitTemplate",""],["class","mt-3",3,"formGroup",4,"ngIf"],[1,"mt-3",3,"formGroup"],[4,"ngFor","ngForOf"],[1,"row","align-items-end"],[4,"ngIf"],[3,"parentForm","inputField","hidden_when_disabled"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[3,"update_deploy_json","update_transaction_json","parentForm","inputField"],[3,"parentForm","inputField"],[3,"select_wasm"],[4,"ngTemplateOutlet"],[3,"select_deploy","select_transaction","type"]],template:function(r,i){1&r&&ae(0,tU,2,2,"form",2),2&r&&R("ngIf",i.action&&i.formFields&&i.formFields.has(i.action))},dependencies:[Ke,ia,an,jS,Ds,ED,fa,Ss,eT,sT,iT,rT,nT],changeDetection:0})}}return e})();const aT=new W("highlight");var nU=a(7278),rU=a.n(nU);let cT=(()=>{class e{constructor(t){this.highlightWebworkerFactory=t}highlightMessage(t){var r=this;return(0,u.A)(function*(){r.activateWorker();const i=r.hightlightWebworker&&(yield r.hightlightWebworker.postMessage(t).catch(o=>{console.error(o)}));return r.terminateWorker(),i})()}activateWorker(){if(this.webworker)return;const t=this.highlightWebworkerFactory();this.webworker=t[0],this.hightlightWebworker=t[1]}terminateWorker(){this.webworker&&(this.webworker.terminate(),delete this.webworker)}static{this.\u0275fac=function(r){return new(r||e)(U(aT))}}static{this.\u0275prov=Z({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();const sU={provide:aT,useValue:function(){const e=new Worker(a.tu(new URL(a.p+a.u(755),a.b)),{name:"highlight.worker",type:void 0});return[e,new(rU())(e)]}};let lT=(()=>{class e{static{this.\u0275fac=function(r){return new(r||e)}}static{this.\u0275mod=Zn({type:e})}static{this.\u0275inj=An({providers:[sU,cT],imports:[Ke]})}}return e})(),wu=(()=>{class e{constructor(t,r){this.highlightService=t,this.document=r,this.result=new Wr,this.window=this.document.defaultView}getResult(){return this.result.asObservable()}setResult(t){var r=this;return(0,u.A)(function*(){const i=t,o=yield r.highlightService.highlightMessage(i),c="string"==typeof t;r.result.next({result:c?i:JSON.stringify(i),resultHtml:c?i:o})})()}copyClipboard(t){this.window?.navigator.clipboard.writeText(t).catch(r=>console.error(r))}static{this.\u0275fac=function(r){return new(r||e)(U(cT),U(rn))}}static{this.\u0275prov=Z({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})(),iU=(()=>{class e{static{this.\u0275fac=function(r){return new(r||e)}}static{this.\u0275mod=Zn({type:e})}static{this.\u0275inj=An({providers:[wu],imports:[Ke,lT]})}}return e})();const oU=["resultElt"],aU=["codeElt"];function cU(e,n){if(1&e&&(O(0,"div",15,0)(2,"div",16),gt(3,"code",17,1),x()()),2&e){const t=H(2);L(3),R("innerHtml",t.resultHtml,Aw)}}function lU(e,n){if(1&e){const t=Le();O(0,"div",4)(1,"div",5)(2,"span"),ac(),O(3,"svg",6),re("click",function(){ge(t);const i=H();return he(i.copy(i.result))}),gt(4,"rect",7)(5,"path",8),x()(),function um(){!function pM(){Y.lFrame.currentNamespace=null}()}(),O(6,"span",9),re("click",function(){return ge(t),he(H().reset())}),ac(),O(7,"svg",10),gt(8,"path",11)(9,"path",12)(10,"path",13),x()()(),ae(11,cU,5,1,"div",14),x()}if(2&e){const t=H();L(11),R("ngIf",t.resultHtml)}}let uT=(()=>{class e{constructor(t,r){this.resultService=t,this.changeDetectorRef=r}ngAfterViewInit(){this.getResultSubscription=this.resultService.getResult().subscribe(t=>{this.result=t.result,this.resultHtml=t.resultHtml,this.changeDetectorRef.markForCheck()})}ngOnDestroy(){this.getResultSubscription&&this.getResultSubscription.unsubscribe()}copy(t){this.resultService.copyClipboard((0,P.mL)(JSON.parse(t),P.WT.High))}reset(){this.result="",this.resultHtml="",this.resultService.setResult("")}static{this.\u0275fac=function(r){return new(r||e)(T(wu),T(Jt))}}static{this.\u0275cmp=ut({type:e,selectors:[["comp-result"]],viewQuery:function(r,i){if(1&r&&(Tt(oU,5),Tt(aU,5,tn)),2&r){let o;It(o=Mt())&&(i.resultElt=o.first),It(o=Mt())&&(i.contentChildren=o.first)}},standalone:!0,features:[mt],decls:2,vars:1,consts:[["resultElt",""],["codeElt",""],[1,"mt-3"],["class","row",4,"ngIf"],[1,"row"],[1,"col-xs-12","d-flex","flex-row","justify-content-between","mb-2"],["viewBox","0 0 24 24","fill","none","stroke","currentColor","stroke-width","2","stroke-linecap","round","stroke-linejoin","round",1,"shrink-0","ml-2","w-5","min-w-5","text-gray-500","cursor-pointer",3,"click"],["x","9","y","9","width","13","height","13","rx","2","ry","2"],["d","M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"],["e2e-id","clear result",3,"click"],["xmlns","http://www.w3.org/2000/svg","width","16","height","16","fill","currentColor","viewBox","0 0 16 16",1,"bi","bi-journal-x","cursor-pointer"],["fill-rule","evenodd","d","M6.146 6.146a.5.5 0 0 1 .708 0L8 7.293l1.146-1.147a.5.5 0 1 1 .708.708L8.707 8l1.147 1.146a.5.5 0 0 1-.708.708L8 8.707 6.854 9.854a.5.5 0 0 1-.708-.708L7.293 8 6.146 6.854a.5.5 0 0 1 0-.708z"],["d","M3 0h10a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2v-1h1v1a1 1 0 0 0 1 1h10a1 1 0 0 0 1-1V2a1 1 0 0 0-1-1H3a1 1 0 0 0-1 1v1H1V2a2 2 0 0 1 2-2z"],["d","M1 5v-.5a.5.5 0 0 1 1 0V5h.5a.5.5 0 0 1 0 1h-2a.5.5 0 0 1 0-1H1zm0 3v-.5a.5.5 0 0 1 1 0V8h.5a.5.5 0 0 1 0 1h-2a.5.5 0 0 1 0-1H1zm0 3v-.5a.5.5 0 0 1 1 0v.5h.5a.5.5 0 0 1 0 1h-2a.5.5 0 0 1 0-1H1z"],["class","col-xs-12",4,"ngIf"],[1,"col-xs-12"],[1,"card"],["e2e-id","result",1,"card-body",3,"innerHtml"]],template:function(r,i){1&r&&(O(0,"section",2),ae(1,lU,12,1,"div",3),x()),2&r&&(L(),R("ngIf",i.result))},dependencies:[Ke,an,lT],styles:["code[_ngcontent-%COMP%]{white-space:pre-wrap;overflow-x:hidden;word-wrap:break-word;max-width:100%}.card[_ngcontent-%COMP%]{max-height:calc(95vh - 20px);overflow-y:auto;margin-bottom:20px}@media (max-width: 767px){[_nghost-%COMP%] .hljs-string{overflow-wrap:break-word;word-break:break-all;max-width:100%}}[_nghost-%COMP%] .hljs-attr{font-weight:700}@media (max-width: 767px){code[_ngcontent-%COMP%]{font-size:.8em}}"],changeDetection:0})}}return e})();const uU=["selectNetworkElt"],_T=e=>[e];function _U(e,n){if(1&e&&(O(0,"option",18),ie(1),x()),2&e){const t=n.$implicit,r=H();R("value",null==t?null:t.name)("selected",t.rpc_address===r.rpc_address),L(),qo(" ",null==t?null:t.name," (",t.rpc_address,") ")}}function dU(e,n){if(1&e&&(O(0,"option",18),ie(1),x()),2&e){const t=n.$implicit,r=H(2);R("value",r.changePort(t))("selected",r.changePort(t)===r.rpc_address),L(),qo(" ",r.changePort(t)," (",r.chain_name,") ")}}function fU(e,n){if(1&e&&(O(0,"optgroup",19),ae(1,dU,2,4,"option",15),x()),2&e){const t=H();L(),R("ngForOf",t.peers)}}function pU(e,n){if(1&e){const t=Le();O(0,"div",20)(1,"div",21)(2,"label",22)(3,"span",23),ie(4,"Net."),x(),O(5,"span",24),ie(6,"Network"),x()(),O(7,"input",25,1),re("change",function(i){return ge(t),he(H().onCustomNetworkChange(i))}),x()(),O(9,"div",26)(10,"label",27)(11,"span",23),ie(12,"Chai."),x(),O(13,"span",24),ie(14,"Chain"),x()(),O(15,"input",28,1),re("change",function(i){return ge(t),he(H().onCcustomChainChange(i))}),x()()()}if(2&e){const t=H();L(7),R("value",t.rpc_address||"")("ngClass",yn(4,_T,t.isCustomNetworkInvalid()?"is-invalid":"")),L(8),R("value",t.chain_name||"")("ngClass",yn(6,_T,t.iscustomChainInvalid()?"is-invalid":""))}}let dT=(()=>{class e{constructor(t,r,i,o,c,l,_){this.sdk=t,this.config=r,this.env=i,this.document=o,this.stateService=c,this.storageService=l,this.changeDetectorRef=_,this.networks=this.config.networks,this.network=this.config.network,this.chain_name=this.network.chain_name,this.rpc_address=this.network.rpc_address,this.is_production=this.env.production,this.localhost_to_gateway=this.env.localhost_to_gateway,this.window=this.document.defaultView,this.is_electron=this.isElectron()}ngAfterViewInit(){var t=this;return(0,u.A)(function*(){t.storageService.get("chain_name")&&t.storageService.get("rpc_address")&&(t.chain_name=t.storageService.get("chain_name")||t.chain_name,t.rpc_address=t.storageService.get("rpc_address")||t.rpc_address,t.network=t.networks.find(r=>r.rpc_address==t.rpc_address)||t.network),t.stateService.setState({chain_name:t.chain_name,rpc_address:t.rpc_address}),t.setRPCAddress(),t.changeDetectorRef.markForCheck()})()}selectNetwork(t){let r=t.target?.value||this.selectNetworkElt.nativeElement.value;r=r&&this.networks.find(i=>i.name==r),this.network=r,this.chain_name=r.chain_name,this.rpc_address=r.rpc_address,this.setRPCAddress(),this.stateService.setState({chain_name:r.chain_name}),this.storageService.setState({rpc_address:this.rpc_address,chain_name:this.chain_name})}changePort(t){const r=t.address.split(":");return[this.config.default_protocol,r.shift(),":",this.config.default_port].join("")}onCustomNetworkChange(t){this.rpc_address=t.target?.value||this.network.rpc_address;const r=this.networks.find(i=>"custom"===i.name);r&&(r.rpc_address=this.rpc_address,this.sdk.setRPCAddress(this.rpc_address),this.stateService.setState({rpc_address:this.rpc_address}),this.storageService.setState({rpc_address:this.rpc_address}))}isCustomNetworkInvalid(){return!1}onCcustomChainChange(t){this.chain_name=t.target?.value||this.network.chain_name;const r=this.networks.find(i=>"custom"===i.name);r&&(r.chain_name=this.chain_name,this.stateService.setState({chain_name:this.chain_name}),this.storageService.setState({chain_name:this.chain_name}))}iscustomChainInvalid(){return!1}isElectron(){return typeof this.window<"u"&&window.location?.origin?.startsWith("file://")}setRPCAddress(){if(this.is_electron)this.sdk.setRPCAddress(this.rpc_address);else{const t=this.networks.find(r=>r.rpc_address==this.rpc_address);this.is_production&&!this.localhost_to_gateway&&t&&["ntcl","node-launcher"].includes(t?.name)?this.sdk.setRPCAddress(this.rpc_address):t&&this.sdk.setRPCAddress([this.window?.location?.href,t?.name].join(""))}}static{this.\u0275fac=function(r){return new(r||e)(T(_a),T(lr),T(Gp),T(rn),T(Cn),T(Ta),T(Jt))}}static{this.\u0275cmp=ut({type:e,selectors:[["comp-header"]],viewQuery:function(r,i){if(1&r&&Tt(uU,5),2&r){let o;It(o=Mt())&&(i.selectNetworkElt=o.first)}},inputs:{peers:"peers"},standalone:!0,features:[mt],decls:20,vars:7,consts:[["selectNetworkElt",""],["publicKeyElt",""],[1,"navbar","navbar-light"],[1,"col-5","col-md-2"],[1,"navbar-brand"],["src","assets/logo.png","alt","CasperLabs"],[1,"col-7","col-md-4","col-lg-4","col-xl-5","d-flex","flex-column","flex-xl-row","justify-content-end","px-2","pt-2"],["e2e-id","chain_name",1,"badge","rounded-pill","bg-success","mb-2","ellipsis-container","px-2","me-xl-3",3,"hidden"],["e2e-id","rpc_address",1,"badge","rounded-pill","bg-success","mb-2","ellipsis-container","px-2","me-xl-3",3,"hidden"],[1,"col-12","col-md-6","col-lg-5"],[1,"form-inline"],[1,"input-group"],["for","selectActionElt","for","selectNetworkElt",1,"input-group-text"],["id","selectNetworkElt","e2e-id","selectNetworkElt",1,"form-select","form-control","form-control-sm",3,"change"],["label","default"],[3,"value","selected",4,"ngFor","ngForOf"],["label","fetched",4,"ngIf"],["class","input-group mt-2 justify-content-between",4,"ngIf"],[3,"value","selected"],["label","fetched"],[1,"input-group","mt-2","justify-content-between"],[1,"col-7"],["for","customNetworkElt",1,"input-group-text"],[1,"d-none","d-md-inline","d-lg-none"],[1,"d-md-none","d-lg-inline"],["type","search","name","customNetwork","id","customNetworkElt","e2e-id","customNetworkElt",1,"form-control","form-control-xs",3,"change","value","ngClass"],[1,"col-4"],["for","publicKeyElt",1,"input-group-text"],["type","search","name","customChain","id","customChainElt","e2e-id","customChainElt",1,"form-control","form-control-xs",3,"change","value","ngClass"]],template:function(r,i){if(1&r){const o=Le();O(0,"nav",2)(1,"div",3)(2,"a",4),gt(3,"img",5),x()(),O(4,"div",6)(5,"span",7),ie(6),x(),O(7,"span",8),ie(8),x()(),O(9,"div",9)(10,"form",10)(11,"div",11)(12,"label",12),ie(13,"RPC"),x(),O(14,"select",13,0),re("change",function(l){return ge(o),he(i.selectNetwork(l))}),O(16,"optgroup",14),ae(17,_U,2,4,"option",15),x(),ae(18,fU,2,1,"optgroup",16),x()(),ae(19,pU,17,8,"div",17),x()()()}2&r&&(L(5),R("hidden",!i.chain_name),L(),gs(i.chain_name),L(),R("hidden",!i.rpc_address),L(),gs(i.rpc_address),L(9),R("ngForOf",i.networks),L(),R("ngIf",i.peers),L(),R("ngIf","custom"===(null==i.network?null:i.network.name)))},dependencies:[Ke,cr,ia,an],styles:[".ellipsis-container[_ngcontent-%COMP%]{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;width:auto}"],changeDetection:0})}}return e})();function gU(e,n){if(1&e&&(O(0,"section",1)(1,"pre",2),ie(2),x()()),2&e){const t=H();L(2),gs(t.error)}}let fT=(()=>{class e{constructor(t,r){this.errorService=t,this.changeDetectorRef=r}ngAfterViewInit(){var t=this;return(0,u.A)(function*(){t.seterrorSubscription()})()}ngOnDestroy(){this.errorSubscription&&this.errorSubscription.unsubscribe()}seterrorSubscription(){var t=this;this.errorSubscription=this.errorService.getError().subscribe(function(){var r=(0,u.A)(function*(i){t.error!==i&&(t.error=i,t.changeDetectorRef.markForCheck())});return function(i){return r.apply(this,arguments)}}())}static{this.\u0275fac=function(r){return new(r||e)(T(Ia),T(Jt))}}static{this.\u0275cmp=ut({type:e,selectors:[["comp-error"]],standalone:!0,features:[mt],decls:1,vars:1,consts:[["class","mt-3","e2e-id","error",4,"ngIf"],["e2e-id","error",1,"mt-3"],[1,"error","alert","alert-warning","d-flex"]],template:function(r,i){1&r&&ae(0,gU,3,1,"section",0),2&r&&R("ngIf",i.error)},dependencies:[Ke,an],styles:[".error[_ngcontent-%COMP%]{display:block;font-family:monospace;white-space:pre-wrap;word-break:break-word}"],changeDetection:0})}}return e})();function hU(e,n){if(1&e){const t=Le();O(0,"div",4)(1,"span",5),ie(2),x(),O(3,"button",6),re("click",function(){return ge(t),he(H().get_state_root_hash())}),ie(4,"Refresh"),x()()}if(2&e){const t=H();L(2),ht("state root hash is ",t.state_root_hash,"")}}function mU(e,n){if(1&e&&(O(0,"div",7)(1,"span",8),ie(2),x()()),2&e){const t=H();L(2),ht("account hash is ",t.account_hash,"")}}function wU(e,n){if(1&e&&(O(0,"div",7)(1,"span",9),ie(2),x()()),2&e){const t=H();L(2),ht("main purse is ",t.main_purse,"")}}let pT=(()=>{class e{constructor(t,r){this.stateService=t,this.changeDetectorRef=r,this.get_state_root_hash_output=new Re}ngOnDestroy(){this.stateSubscription&&this.stateSubscription.unsubscribe()}setStateSubscription(){this.stateSubscription=this.stateService.getState().subscribe(t=>{t.account_hash&&(this.account_hash=t.account_hash),t.main_purse&&(this.main_purse=t.main_purse),t.state_root_hash&&(this.state_root_hash=t.state_root_hash),t&&this.changeDetectorRef.markForCheck()})}ngAfterViewInit(){var t=this;return(0,u.A)(function*(){t.setStateSubscription()})()}get_state_root_hash(){this.get_state_root_hash_output.emit(!0)}static{this.\u0275fac=function(r){return new(r||e)(T(Cn),T(Jt))}}static{this.\u0275cmp=ut({type:e,selectors:[["comp-status"]],outputs:{get_state_root_hash_output:"get_state_root_hash_output"},standalone:!0,features:[mt],decls:5,vars:3,consts:[[1,"row"],[1,"col-sm-12"],["class","alert alert-success d-flex flex-md-row flex-column justify-content-between align-items-center mb-1 mb-md-3",4,"ngIf"],["class","alert alert-warning d-flex mb-1 mb-md-3",4,"ngIf"],[1,"alert","alert-success","d-flex","flex-md-row","flex-column","justify-content-between","align-items-center","mb-1","mb-md-3"],["e2e-id","state_root_hash",1,"ellipsis-container"],[1,"btn","me-0",3,"click"],[1,"alert","alert-warning","d-flex","mb-1","mb-md-3"],["e2e-id","account_hash",1,"ellipsis-container"],["e2e-id","main_purse",1,"ellipsis-container"]],template:function(r,i){1&r&&(O(0,"div",0)(1,"div",1),ae(2,hU,5,1,"div",2)(3,mU,3,1,"div",3)(4,wU,3,1,"div",3),x()()),2&r&&(L(2),R("ngIf",i.state_root_hash),L(),R("ngIf",i.account_hash),L(),R("ngIf",i.main_purse))},dependencies:[Ke,an],styles:[".ellipsis-container[_ngcontent-%COMP%]{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;width:auto;font-size:.8em;max-width:260px}@media (min-width: 380px){.ellipsis-container[_ngcontent-%COMP%]{max-width:320px}}@media (min-width: 425px){.ellipsis-container[_ngcontent-%COMP%]{max-width:360px}}@media (min-width: 576px){.ellipsis-container[_ngcontent-%COMP%]{max-width:480px}}@media (min-width: 768px){.ellipsis-container[_ngcontent-%COMP%]{max-width:none;font-size:1em}}.btn[_ngcontent-%COMP%]{white-space:nowrap}@media (max-width: 767px){.btn[_ngcontent-%COMP%]{font-size:.8em;padding-bottom:0}}"],changeDetection:0})}}return e})();const Cg=e=>({deprecated:e});function yU(e,n){if(1&e&&(O(0,"option",11),ie(1),x()),2&e){const t=n.$implicit,r=H();R("value",t)("selected",r.action===t)("ngClass",yn(4,Cg,r.sdk_deprecated.includes(t))),L(),ht(" ",t," ")}}function bU(e,n){if(1&e&&(O(0,"option",12),ie(1),x()),2&e){const t=n.$implicit,r=H();R("value",t)("selected",r.action===t),L(),ht(" ",t," ")}}function vU(e,n){if(1&e&&(O(0,"option",12),ie(1),x()),2&e){const t=n.$implicit,r=H();R("value",t)("selected",r.action===t),L(),ht(" ",t," ")}}function EU(e,n){if(1&e&&(O(0,"option",11),ie(1),x()),2&e){const t=n.$implicit,r=H();R("value",t)("selected",r.action===t)("ngClass",yn(4,Cg,r.sdk_deprecated.includes(t))),L(),ht(" ",t," ")}}function SU(e,n){if(1&e&&(O(0,"option",11),ie(1),x()),2&e){const t=n.$implicit,r=H();R("value",t)("selected",r.action===t)("ngClass",yn(4,Cg,r.sdk_deprecated.includes(t))),L(),ht(" ",t," ")}}let gT=(()=>{class e{constructor(t,r,i){this.sdk=t,this.stateService=r,this.changeDetectorRef=i,this.select_action=new Re}ngAfterViewInit(){var t=this;return(0,u.A)(function*(){t.sdk_methods=Object.getOwnPropertyNames(Object.getPrototypeOf(t.sdk)).filter(r=>"function"==typeof t.sdk[r]).filter(r=>!["free","constructor","__destroy_into_raw","getRPCAddress","setRPCAddress","getVerbosity","setVerbosity","watchDeploy","waitDeploy"].includes(r)).filter(r=>!r.endsWith("_options")).filter(r=>!r.startsWith("chain_")).filter(r=>!r.startsWith("state_")).filter(r=>!r.startsWith("info_")).filter(r=>!r.startsWith("account_")).filter(r=>!r.startsWith("wait")).filter(r=>!r.startsWith("watch")).sort(),t.sdk_deploy_methods=t.sdk_methods.filter(r=>["deploy","speculative_deploy","speculative_transfer","transfer"].includes(r)),t.sdk_deploy_utils_methods=t.sdk_methods.filter(r=>["make_deploy","make_transfer","sign_deploy","put_deploy","call_entrypoint_deploy","install_deploy"].includes(r)),t.sdk_transaction_methods=t.sdk_methods.filter(r=>["transaction","speculative_transaction","speculative_transfer_transaction","transfer_transaction"].includes(r)),t.sdk_transaction_utils_methods=t.sdk_methods.filter(r=>["make_transaction","make_transfer_transaction","sign_transaction","put_transaction","call_entrypoint","install","query_contract_dict","query_contract_key"].includes(r)),t.sdk_deprecated=t.sdk_methods.filter(r=>["get_account","get_deploy","get_era_info","put_deploy","speculative_exec_deploy","sign_deploy","make_deploy","make_transfer","speculative_deploy","speculative_transfer","deploy","transfer","call_entrypoint_deploy","install_deploy","get_balance"].includes(r)),t.sdk_rpc_methods=t.sdk_methods.filter(r=>!t.sdk_deploy_methods.concat(t.sdk_deploy_utils_methods,t.sdk_transaction_utils_methods,t.sdk_transaction_methods,t.sdk_contract_methods).includes(r)),t.setStateSubscription()})()}ngOnDestroy(){this.stateSubscription&&this.stateSubscription.unsubscribe()}setStateSubscription(){this.stateSubscription=this.stateService.getState().subscribe(t=>{t.action&&(this.action=t.action),this.changeDetectorRef.markForCheck()})}selectAction(t){this.select_action.emit(t.target.value)}static{this.\u0275fac=function(r){return new(r||e)(T(_a),T(Cn),T(Jt))}}static{this.\u0275cmp=ut({type:e,selectors:[["comp-action"]],outputs:{select_action:"select_action"},standalone:!0,features:[mt],decls:16,vars:5,consts:[["selectActionElt",""],[1,"input-group"],["for","selectActionElt",1,"input-group-text"],["id","selectActionElt","e2e-id","selectActionElt",1,"form-select","form-control","form-control-sm",3,"change"],["label","rpc"],[3,"value","selected","ngClass",4,"ngFor","ngForOf"],["label","transaction"],[3,"value","selected",4,"ngFor","ngForOf"],["label","utils"],["label","deploy",1,"deprecated"],["label","deploy utils",1,"deprecated"],[3,"value","selected","ngClass"],[3,"value","selected"]],template:function(r,i){if(1&r){const o=Le();O(0,"div",1)(1,"label",2),ie(2,"Action"),x(),O(3,"select",3,0),re("change",function(l){return ge(o),he(i.selectAction(l))}),gt(5,"option"),O(6,"optgroup",4),ae(7,yU,2,6,"option",5),x(),O(8,"optgroup",6),ae(9,bU,2,3,"option",7),x(),O(10,"optgroup",8),ae(11,vU,2,3,"option",7),x(),O(12,"optgroup",9),ae(13,EU,2,6,"option",5),x(),O(14,"optgroup",10),ae(15,SU,2,6,"option",5),x()()()}2&r&&(L(7),R("ngForOf",i.sdk_rpc_methods),L(2),R("ngForOf",i.sdk_transaction_methods),L(2),R("ngForOf",i.sdk_transaction_utils_methods),L(2),R("ngForOf",i.sdk_deploy_methods),L(2),R("ngForOf",i.sdk_deploy_utils_methods))},dependencies:[Ke,cr,ia],styles:["[_nghost-%COMP%] .deprecated[_ngcontent-%COMP%]{font-style:italic;color:#d3d3d3}"],changeDetection:0})}}return e})();const CU=["*"],DU=e=>[e];let hT=(()=>{class e{constructor(t,r){this.stateService=t,this.changeDetectorRef=r,this.submit_action=new Re}ngAfterViewInit(){var t=this;return(0,u.A)(function*(){t.setStateSubscription()})()}ngOnDestroy(){this.stateSubscription&&this.stateSubscription.unsubscribe()}setStateSubscription(){this.stateSubscription=this.stateService.getState().subscribe(t=>{t.action&&(this.action=t.action),this.changeDetectorRef.markForCheck()})}submitAction(t){this.submit_action.emit(t)}static{this.\u0275fac=function(r){return new(r||e)(T(Cn),T(Jt))}}static{this.\u0275cmp=ut({type:e,selectors:[["comp-submit-action"]],inputs:{class:"class",e2e:"e2e"},outputs:{submit_action:"submit_action"},standalone:!0,features:[mt],ngContentSelectors:CU,decls:2,vars:4,consts:[["type","button",1,"btn",3,"click","ngClass"]],template:function(r,i){1&r&&(function s0(e){const n=I()[xe][ct];if(!n.projection){const r=n.projection=function Ua(e,n){const t=[];for(let r=0;r{class e{constructor(t,r,i,o,c,l){this.config=t,this.sdk=r,this.resultService=i,this.formService=o,this.errorService=c,this.stateService=l,this.verbosity=P.WT.High,this.setStateSubscription()}setStateSubscription(){this.stateService.getState().subscribe(t=>{t.chain_name&&(this.chain_name=t.chain_name),t.public_key&&(this.public_key=t.public_key),t.secret_key&&(this.secret_key=t.secret_key),t.deploy_json&&(this.deploy_json=t.deploy_json),t.verbosity&&(this.verbosity=t.verbosity),t.select_dict_identifier&&(this.select_dict_identifier=t.select_dict_identifier)})}get_account(t){var r=this;return(0,u.A)(function*(){let i;if(i=t||r.getIdentifier("accountIdentifier")?.value?.trim(),!i){const c="account_identifier is missing";return void(c&&r.errorService.setError(c.toString()))}const o=r.sdk.get_account_options({account_identifier_as_string:i});if(o){r.getIdentifieBlock(o);try{const c=yield r.sdk.get_account(o);return t||r.resultService.setResult(c.toJson()),c}catch(c){return r.errorService.setError(c.toString()),c}}else{const c="get_account_options is missing";c&&r.errorService.setError(c.toString())}})()}get_deploy(){var t=this;return(0,u.A)(function*(){const r=t.getIdentifier("finalizedApprovals")?.value,i=t.getIdentifier("deployHash")?.value?.trim();if(!i){const c="deploy_hash is missing";return void(c&&t.errorService.setError(c.toString()))}const o=t.sdk.get_deploy_options({deploy_hash_as_string:i});o.finalized_approvals=r;try{const c=yield t.sdk.get_deploy(o);c&&t.resultService.setResult(c.toJson())}catch(c){c&&t.errorService.setError(c.toString())}})()}get_transaction(){var t=this;return(0,u.A)(function*(){const r=t.getIdentifier("finalizedApprovals")?.value,i=t.getIdentifier("transactionHash")?.value?.trim();if(!i){const c="transaction_hash is missing";return void(c&&t.errorService.setError(c.toString()))}const o=t.sdk.get_transaction_options({transaction_hash_as_string:i});o.finalized_approvals=r;try{const c=yield t.sdk.get_transaction(o);c&&t.resultService.setResult(c.toJson())}catch(c){c&&t.errorService.setError(c.toString())}})()}get_entity(t){var r=this;return(0,u.A)(function*(){let i;if(i=t||r.getIdentifier("entityIdentifier")?.value?.trim(),!i){const c="entity_identifier is missing";return void(c&&r.errorService.setError(c.toString()))}const o=r.sdk.get_entity_options({entity_identifier_as_string:i});if(o){r.getIdentifieBlock(o);try{const c=yield r.sdk.get_entity(o);return t||r.resultService.setResult(c.toJson()),c}catch(c){return r.errorService.setError(c.toString()),c}}else{const c="get_entity_options is missing";c&&r.errorService.setError(c.toString())}})()}get_peers(){var t=this;return(0,u.A)(function*(){const r=yield t.sdk.get_binary_peers("localhost:4200/localws");let i;console.log(r);try{const o=yield t.sdk.get_peers();o&&t.resultService.setResult(o.toJson()),o&&(i=o.peers)}catch(o){o&&t.errorService.setError(o.toString())}return i})()}get_node_status(){var t=this;return(0,u.A)(function*(){const r=yield t.sdk.get_node_status();return r&&t.resultService.setResult(r.toJson()),r})()}get_state_root_hash(t){var r=this;return(0,u.A)(function*(){let i="";const o=r.sdk.get_state_root_hash_options({});if(!o){const c="get_state_root_hash options are missing";c&&r.errorService.setError(c.toString())}if(t)i=(yield r.sdk.get_state_root_hash(o)).toString();else{r.getIdentifieBlock(o);const c=yield r.sdk.get_state_root_hash(o);c&&r.resultService.setResult(c.toJson())}return i})()}get_auction_info(){var t=this;return(0,u.A)(function*(){try{const r=t.sdk.get_auction_info_options({});t.getIdentifieBlock(r);const i=yield t.sdk.get_auction_info(r);i&&t.resultService.setResult(i.toJson())}catch(r){r&&t.errorService.setError(r.toString())}})()}get_balance(){var t=this;return(0,u.A)(function*(){const r=t.getIdentifier("purseUref")?.value?.trim(),i=t.getIdentifier("stateRootHash")?.value?.trim();if(r)try{const o=t.sdk.get_balance_options({state_root_hash_as_string:i||"",purse_uref_as_string:r}),c=yield t.sdk.get_balance(o);c&&t.resultService.setResult(c.toJson())}catch(o){o&&t.errorService.setError(o.toString())}else{const o="purse_uref is missing";o&&t.errorService.setError(o.toString())}})()}get_block(){var t=this;return(0,u.A)(function*(){try{const r=t.sdk.get_block_options({});t.getIdentifieBlock(r);const i=yield t.sdk.get_block(r);i&&t.resultService.setResult(i.toJson())}catch(r){r&&t.errorService.setError(r.toString())}})()}get_block_transfers(){var t=this;return(0,u.A)(function*(){try{const r=t.sdk.get_block_transfers_options({});t.getIdentifieBlock(r);const i=yield t.sdk.get_block_transfers(r);i&&t.resultService.setResult(i.toJson())}catch(r){r&&t.errorService.setError(r.toString())}})()}get_chainspec(){var t=this;return(0,u.A)(function*(){try{const r=yield t.sdk.get_chainspec(),i=(0,P.IQ)(r?.chainspec_bytes.chainspec_bytes);i&&t.resultService.setResult(i)}catch(r){r&&t.errorService.setError(r.toString())}})()}get_era_info(){var t=this;return(0,u.A)(function*(){const r=t.sdk.get_era_info_options({});t.getIdentifieBlock(r);try{const i=yield t.sdk.get_era_info(r);i&&t.resultService.setResult(i.toJson())}catch(i){i&&t.errorService.setError(i.toString())}})()}get_era_summary(){var t=this;return(0,u.A)(function*(){const r=t.sdk.get_era_summary_options({});t.getIdentifieBlock(r);try{const i=yield t.sdk.get_era_summary(r);i&&t.resultService.setResult(i.toJson())}catch(i){i&&t.errorService.setError(i.toString())}})()}get_validator_changes(){var t=this;return(0,u.A)(function*(){try{const r=yield t.sdk.get_validator_changes();r&&t.resultService.setResult(r.toJson())}catch(r){r&&t.errorService.setError(r.toString())}})()}list_rpcs(){var t=this;return(0,u.A)(function*(){try{const r=yield t.sdk.list_rpcs();r&&t.resultService.setResult(r.toJson())}catch(r){r&&t.errorService.setError(r.toString())}})()}query_balance(){var t=this;return(0,u.A)(function*(){const r=t.getIdentifier("purseIdentifier")?.value?.trim();if(!r){const o="deploy_hash is missing";return void(o&&t.errorService.setError(o.toString()))}const i=t.sdk.query_balance_options({purse_identifier_as_string:r});t.getGlobalIdentifier(i);try{const o=yield t.sdk.query_balance(i);o&&t.resultService.setResult(o.balance)}catch(o){o&&t.errorService.setError(o.toString())}})()}query_balance_details(){var t=this;return(0,u.A)(function*(){const r=t.getIdentifier("purseIdentifier")?.value?.trim();if(!r){const o="deploy_hash is missing";return void(o&&t.errorService.setError(o.toString()))}const i=t.sdk.query_balance_details_options({purse_identifier_as_string:r});t.getGlobalIdentifier(i);try{const o=yield t.sdk.query_balance_details(i);o&&t.resultService.setResult(o.toJson())}catch(o){o&&t.errorService.setError(o.toString())}})()}query_global_state(){var t=this;return(0,u.A)(function*(){const r=t.getIdentifier("queryPath")?.value?.trim()||"",i=t.getIdentifier("queryKey")?.value?.trim();if(!i){const c="key is missing";return void(c&&t.errorService.setError(c.toString()))}const o=t.sdk.query_global_state_options({key_as_string:i,path_as_string:r});t.getGlobalIdentifier(o);try{const c=yield t.sdk.query_global_state(o);c&&t.resultService.setResult(c.toJson())}catch(c){c&&t.errorService.setError(c.toString())}})()}deploy(t=!0,r,i){var o=this;return(0,u.A)(function*(){const c=(0,P.lg)(),l=o.getIdentifier("TTL")?.value?.trim()||"";if(!t&&!o.public_key)return void o.errorService.setError("public_key is missing".toString());if(t&&!o.secret_key)return void o.errorService.setError("secret_key is missing".toString());const _=new P.Bh(o.chain_name,o.public_key,o.secret_key,c,l),d=new P.q1,p=o.getIdentifier("paymentAmount")?.value?.trim();if(!p){const m="paymentAmount is missing";return void(m&&o.errorService.setError(m.toString()))}d.payment_amount=p;const h=o.get_session_params(i);try{let m;if(m=r?yield o.sdk.speculative_deploy(_,h,d):t?yield o.sdk.deploy(_,h,d):o.sdk.make_deploy(_,h,d),m){const w=m.toJson();o.deploy_json=(0,P.mL)(w,o.verbosity),o.deploy_json&&o.resultService.setResult(w),!t&&o.updateDeployJson(o.deploy_json)}return m}catch(m){return void(m&&o.errorService.setError(m))}})()}transaction(t=!0,r,i){var o=this;return(0,u.A)(function*(){const c=(0,P.lg)(),l=o.getIdentifier("TTL")?.value?.trim()||"",_=o.getIdentifier("gasPriceTolerance")?.value?.trim()||"",d=o.getIdentifier("selectPricingMode")?.value?.trim()||"",p=o.getIdentifier("additionalComputationFactor")?.value?.trim()||"";if(!t&&!o.public_key){const b="public_key is missing";return void(b&&o.errorService.setError(b.toString()))}if(t&&!o.secret_key){const b="secret_key is missing";return void(b&&o.errorService.setError(b.toString()))}const h=o.get_builder_params(i);let m=new P.kD(o.chain_name,o.public_key,o.secret_key,c,l);_&&(m.gas_price_tolerance=_),d&&(m.pricing_mode=d),d==P.MK.Fixed&&(m.additional_computation_factor=p);const w=o.getIdentifier("paymentAmount")?.value?.trim();if(w){m.payment_amount=w,m=o.addTransactionArgs(m);try{let b;if(b=r?yield o.sdk.speculative_transaction(h,m):t?yield o.sdk.transaction(h,m):o.sdk.make_transaction(h,m),b){const E=b.toJson();o.transaction_json=(0,P.mL)(E,o.verbosity),o.transaction_json&&o.resultService.setResult(E),!t&&o.updateTransactionJson(o.transaction_json)}return b}catch(b){return void(b&&o.errorService.setError(b))}}else{const b="paymentAmount is missing";b&&o.errorService.setError(b.toString())}})()}install_deploy(t){var r=this;return(0,u.A)(function*(){const i=r.getIdentifier("paymentAmount")?.value?.trim();if(!i){const _="paymentAmount is missing";return void(_&&r.errorService.setError(_.toString()))}if(!r.secret_key){const _="secret_key is missing";return void(_&&r.errorService.setError(_.toString()))}if(!t?.buffer){const _="wasmBuffer is missing";_&&r.errorService.setError(_.toString())}const c=new P.Bh(r.chain_name,r.public_key,r.secret_key),l=r.get_session_params(t);try{const _=yield r.sdk.install_deploy(c,l,i);_&&r.resultService.setResult(_.toJson())}catch(_){_&&r.errorService.setError(_.toString())}})()}install(t){var r=this;return(0,u.A)(function*(){const i=r.getIdentifier("paymentAmount")?.value?.trim();if(!i){const l="paymentAmount is missing";return void(l&&r.errorService.setError(l.toString()))}if(!r.secret_key){const l="secret_key is missing";return void(l&&r.errorService.setError(l.toString()))}if(!t?.buffer){const l="wasmBuffer is missing";l&&r.errorService.setError(l.toString())}let c=new P.kD(r.chain_name,r.public_key,r.secret_key);c.payment_amount=i,c=r.addTransactionArgs(c);try{const l=t&&(yield r.sdk.install(c,P.Ix.fromUint8Array(t)));l&&r.resultService.setResult(l.toJson())}catch(l){l&&r.errorService.setError(l.toString())}})()}transfer(t=!0,r){var i=this;return(0,u.A)(function*(){const o=(0,P.lg)(),c=i.getIdentifier("TTL")?.value?.trim()||"";if(!t&&!i.public_key)return void i.errorService.setError("public_key is missing".toString());if(t&&!i.secret_key)return void i.errorService.setError("secret_key is missing".toString());const l=new P.Bh(i.chain_name,i.public_key,i.secret_key,o,c),_=new P.q1;_.payment_amount=i.config.standard_payment_amount.toString();const d=i.getIdentifier("transferAmount")?.value?.trim(),p=i.getIdentifier("targetAccount")?.value?.trim();if(d&&p)try{let h;if(h=r?yield i.sdk.speculative_transfer(d,p,void 0,l,_):t?yield i.sdk.transfer(d,p,void 0,l,_):yield i.sdk.make_transfer(d,p,void 0,l,_),h){const m=h.toJson();i.deploy_json=(0,P.mL)(m,i.verbosity),i.deploy_json&&i.resultService.setResult(m),!t&&i.updateDeployJson(i.deploy_json)}return h}catch(h){return void(h&&i.errorService.setError(h))}else{const h="transfer_amount or target_account is missing";h&&i.errorService.setError(h.toString())}})()}transfer_transaction(t=!0,r){var i=this;return(0,u.A)(function*(){const o=(0,P.lg)(),c=i.getIdentifier("TTL")?.value?.trim()||"";if(!t&&!i.public_key)return void i.errorService.setError("public_key is missing".toString());if(t&&!i.secret_key)return void i.errorService.setError("secret_key is missing".toString());const l=new P.kD(i.chain_name,i.public_key,i.secret_key,o,c),_=i.getIdentifier("transferAmount")?.value?.trim(),d=i.getIdentifier("targetAccount")?.value?.trim();if(!_||!d){const h="transfer_amount or target_account is missing";return void(h&&i.errorService.setError(h.toString()))}const p=i.config.standard_payment_amount.toString();l.payment_amount=p;try{let h;if(h=r?yield i.sdk.speculative_transfer_transaction(void 0,d,_,l,void 0):t?yield i.sdk.transfer_transaction(void 0,d,_,l):yield i.sdk.make_transfer_transaction(void 0,d,_,l),h){const m=h.toJson();i.transaction_json=(0,P.mL)(m,i.verbosity),i.transaction_json&&i.resultService.setResult(m),!t&&i.updateTransactionJson(i.transaction_json)}return h}catch(h){return void(h&&i.errorService.setError(h))}})()}put_deploy(){var t=this;return(0,u.A)(function*(){const r=t.getIdentifier("deployJson")?.value?.trim();if(!r){const c="deployJson is missing";return void(c&&t.errorService.setError(c.toString()))}const i=new P.m9(JSON.parse(r)),o=yield t.sdk.put_deploy(i);return o&&t.resultService.setResult(o.toJson()),o})()}put_transaction(){var t=this;return(0,u.A)(function*(){const r=t.getIdentifier("transactionJson")?.value?.trim();if(!r){const c="deployJson is missing";return void(c&&t.errorService.setError(c.toString()))}const i=new P.ZX(JSON.parse(r)),o=yield t.sdk.put_transaction(i);return o&&t.resultService.setResult(o.toJson()),o})()}speculative_exec_deploy(){var t=this;return(0,u.A)(function*(){const r=t.getIdentifier("deployJson")?.value?.trim();if(!r){const l="signed_deploy is missing";return void(l&&t.errorService.setError(l.toString()))}const i=new P.m9(JSON.parse(r)),o=t.sdk.get_speculative_exec_deploy_options({deploy:i.toJson()}),c=yield t.sdk.speculative_exec_deploy(o);return c&&t.resultService.setResult(c.toJson()),c})()}speculative_exec(){var t=this;return(0,u.A)(function*(){const r=t.getIdentifier("transactionJson")?.value?.trim();if(!r){const l="signed_transaction is missing";return void(l&&t.errorService.setError(l.toString()))}const i=new P.ZX(JSON.parse(r)),o=t.sdk.get_speculative_exec_options({transaction:i.toJson()}),c=yield t.sdk.speculative_exec(o);return c&&t.resultService.setResult(c.toJson()),c})()}sign_deploy(){var t=this;return(0,u.A)(function*(){if(!t.secret_key){const o="secret_key is missing";return void(o&&t.errorService.setError(o.toString()))}const r=t.getIdentifier("deployJson")?.value?.trim();if(!r){const o="signed_deploy is missing";return void(o&&t.errorService.setError(o.toString()))}let i;try{i=new P.m9(JSON.parse(r))}catch{const o="Error parsing deploy";return void(o&&t.errorService.setError(o.toString()))}if(i)i=i.sign(t.secret_key),t.deploy_json=(0,P.mL)(i.toJson(),t.verbosity),t.getIdentifier("deployJson")?.setValue(t.deploy_json),t.updateDeployJson(t.deploy_json);else{const o="signed_deploy is missing";o&&t.errorService.setError(o.toString())}})()}sign_transaction(){var t=this;return(0,u.A)(function*(){if(!t.secret_key){const o="secret_key is missing";return void(o&&t.errorService.setError(o.toString()))}const r=t.getIdentifier("transactionJson")?.value?.trim();if(!r){const o="signed_transaction is missing";return void(o&&t.errorService.setError(o.toString()))}let i;try{i=new P.ZX(JSON.parse(r))}catch{const o="Error parsing transaction";return void(o&&t.errorService.setError(o.toString()))}if(i)i=i.sign(t.secret_key),t.transaction_json=(0,P.mL)(i.toJson(),t.verbosity),t.getIdentifier("transactionJson")?.setValue(t.transaction_json),t.updateTransactionJson(t.transaction_json);else{const o="signed_transaction is missing";o&&t.errorService.setError(o.toString())}})()}wallet_sign_deploy(){var t=this;return(0,u.A)(function*(){const r=t.getIdentifier("deployJson")?.value?.trim();if(!r)return void t.errorService.setError("deploy_to_sign is missing".toString());let i;try{i=new P.m9(JSON.parse(r))}catch(o){return void(o&&t.errorService.setError(o))}try{i=yield(new P._e).signDeploy(i,t.public_key)}catch(o){return void(o&&t.errorService.setError(o))}t.deploy_json=(0,P.mL)(i.toJson(),t.verbosity),t.getIdentifier("deployJson")?.setValue(t.deploy_json),t.updateDeployJson(t.deploy_json)})()}wallet_sign_transaction(){var t=this;return(0,u.A)(function*(){const r=t.getIdentifier("transactionJson")?.value?.trim();if(!r)return void t.errorService.setError("transaction_to_sign is missing".toString());let i;try{i=new P.ZX(JSON.parse(r))}catch(o){return void(o&&t.errorService.setError(o))}try{i=yield(new P._e).signTransaction(i,t.public_key)}catch(o){return void(o&&t.errorService.setError(o))}t.transaction_json=(0,P.mL)(i.toJson(),t.verbosity),t.getIdentifier("transactionJson")?.setValue(t.transaction_json),t.updateTransactionJson(t.transaction_json)})()}updateDeployJson(t){t&&this.stateService.setState({deploy_json:t})}updateTransactionJson(t){t&&this.stateService.setState({transaction_json:t})}make_deploy(t){var r=this;return(0,u.A)(function*(){yield r.deploy(!1,!1,t)})()}make_transaction(t){var r=this;return(0,u.A)(function*(){yield r.transaction(!1,!1,t)})()}make_transfer(){var t=this;return(0,u.A)(function*(){yield t.transfer(!1)})()}make_transfer_transaction(){var t=this;return(0,u.A)(function*(){yield t.transfer_transaction(!1)})()}speculative_transfer(){var t=this;return(0,u.A)(function*(){yield t.transfer(!1,!0)})()}speculative_transfer_transaction(){var t=this;return(0,u.A)(function*(){yield t.transfer(!1,!0)})()}speculative_deploy(t){var r=this;return(0,u.A)(function*(){yield r.deploy(!1,!0,t)})()}speculative_transaction(t){var r=this;return(0,u.A)(function*(){yield r.transaction(!1,!0,t)})()}call_entrypoint_deploy(){var t=this;return(0,u.A)(function*(){if(!t.secret_key){const c="secret_key is missing";return void(c&&t.errorService.setError(c.toString()))}const r=new P.Bh(t.chain_name,t.public_key,t.secret_key),i=t.get_session_params(),o=t.getIdentifier("paymentAmount")?.value?.trim();if(o)try{const c=yield t.sdk.call_entrypoint_deploy(r,i,o);c&&t.resultService.setResult(c.toJson())}catch(c){c&&t.errorService.setError(c.toString())}else{const c="paymentAmount is missing";c&&t.errorService.setError(c.toString())}})()}call_entrypoint(){var t=this;return(0,u.A)(function*(){if(!t.secret_key){const c="secret_key is missing";return void(c&&t.errorService.setError(c.toString()))}let r=new P.kD(t.chain_name,t.public_key,t.secret_key);const i=t.getIdentifier("paymentAmount")?.value?.trim();if(!i){const c="paymentAmount is missing";return void(c&&t.errorService.setError(c.toString()))}r.payment_amount=i,r=t.addTransactionArgs(r);const o=t.get_builder_params();try{const c=yield t.sdk.call_entrypoint(o,r);c&&t.resultService.setResult(c.toJson())}catch(c){c&&t.errorService.setError(c.toString())}})()}query_contract_dict(){var t=this;return(0,u.A)(function*(){const r=t.getIdentifier("stateRootHash")?.value?.trim(),i=t.getIdentifier("itemKey")?.value?.trim();if(!i){const d="itemKey is missing";return void(d&&t.errorService.setError(d.toString()))}const o=t.getIdentifier("seedEntityHash")?.value?.trim()||"",c=t.getIdentifier("seedName")?.value?.trim();if(!c){const d="seedName is missing";return void(d&&t.errorService.setError(d.toString()))}let l;if(o&&(l=new P.NX,l.setEntityNamedKey(o,c,i)),!l){const d="dictionary_item_params is missing";return void(d&&t.errorService.setError(d.toString()))}const _=t.sdk.query_contract_dict_options({state_root_hash_as_string:r||""});_.dictionary_item_params=l;try{const d=yield t.sdk.query_contract_dict(_);d&&t.resultService.setResult(d.toJson())}catch(d){d&&t.errorService.setError(d.toString())}})()}query_contract_key(){var t=this;return(0,u.A)(function*(){const r=t.getIdentifier("queryKey")?.value?.trim();if(!r){const c="key is missing";return void(c&&t.errorService.setError(c.toString()))}const i=t.getIdentifier("queryPath")?.value?.toString().trim().replace(/^\/+|\/+$/g,""),o=t.sdk.query_contract_key_options({entity_identifier_as_string:r,path_as_string:i});t.getIdentifieBlock(o);try{const c=yield t.sdk.query_contract_key(o);c&&t.resultService.setResult(c.toJson())}catch(c){c&&t.errorService.setError(c.toString())}})()}get_dictionary_item(){var t=this;return(0,u.A)(function*(){const r=t.getIdentifier("stateRootHash")?.value?.trim(),i=t.getIdentifier("itemKey")?.value?.trim(),o=t.getIdentifier("seedKey")?.value?.trim();if(!i&&!o){const d="seedKey or itemKey is missing";return void(d&&t.errorService.setError(d.toString()))}const c=t.getIdentifier("seedUref")?.value?.trim();let l;if(c&&"newFromSeedUref"===t.select_dict_identifier)l=P.bL.newFromSeedUref(c,i);else if(o&&"newFromDictionaryKey"===t.select_dict_identifier)l=P.bL.newFromDictionaryKey(o);else{const d=t.getIdentifier("seedContractHash")?.value?.trim(),p=t.getIdentifier("seedEntityHash")?.value?.trim(),h=t.getIdentifier("seedAccountHash")?.value?.trim(),m=t.getIdentifier("seedName")?.value?.trim();if(!m){const w="seed_name is missing";return void(w&&t.errorService.setError(w.toString()))}d&&"newFromContractInfo"===t.select_dict_identifier&&(l=P.bL.newFromContractInfo(d,m,i)),p&&"newFromEntityInfo"===t.select_dict_identifier?l=P.bL.newFromEntityInfo(p,m,i):h&&"newFromAccountInfo"===t.select_dict_identifier&&(l=P.bL.newFromAccountInfo(h,m,i))}if(!l){const d="dictionary_item_identifier is missing";return void(d&&t.errorService.setError(d.toString()))}const _=t.sdk.get_dictionary_item_options({state_root_hash_as_string:r||""});_.dictionary_item_identifier=l;try{const d=yield t.sdk.state_get_dictionary_item(_);d&&t.resultService.setResult(d.toJson())}catch(d){d&&t.errorService.setError(d.toString())}})()}getIdentifier(t){return this.formService.form.get(t)}getIdentifieBlock(t){const r=this.getIdentifier("blockIdentifierHeight")?.value?.trim(),i=this.getIdentifier("blockIdentifierHash")?.value?.trim();if(i)t.maybe_block_id_as_string=i,t.maybe_block_identifier=void 0;else if(r){const o=P.z$.fromHeight(BigInt(r));t.maybe_block_id_as_string=void 0,t.maybe_block_identifier=o}else t.maybe_block_id_as_string=void 0,t.maybe_block_identifier=void 0}getGlobalIdentifier(t){const r=this.getIdentifier("stateRootHash")?.value?.trim();let i;if(r)i=P.eg.fromStateRootHash(new P.np(r));else{const o=this.getIdentifier("blockIdentifierHeight")?.value?.trim(),c=this.getIdentifier("blockIdentifierHash")?.value?.trim();c?i=P.eg.fromBlockHash(new P.Iy(c)):o&&(i=P.eg.fromBlockHeight(BigInt(o)))}i&&(t.global_state_identifier=i)}get_session_params(t){const r=new P.Qt,i=this.getIdentifier("entryPoint")?.value?.trim();i&&(r.session_entry_point=i);const o=this.getIdentifier("argsSimple")?.value?.trim().split(",").map(h=>h.trim()).filter(h=>""!==h),c=this.getIdentifier("argsJson")?.value?.trim();o?.length?r.session_args_simple=o:c&&(r.session_args_json=c);const l=this.getIdentifier("callPackage")?.value,_=this.getIdentifier("sessionHash")?.value?.trim(),d=this.getIdentifier("sessionName")?.value?.trim();l?_?r.session_package_hash=_:d&&(r.session_package_name=d):_?r.session_hash=_:d&&(r.session_name=d),t&&(r.session_bytes=P.Ix.fromUint8Array(t));const p=this.getIdentifier("version")?.value?.trim();return p&&(r.session_version=p),r}get_builder_params(t){let r=new P.C_;const i=this.getIdentifier("entityHash")?.value?.trim(),o=this.getIdentifier("entityAlias")?.value?.trim(),c=this.getIdentifier("entryPoint")?.value?.trim();if(this.getIdentifier("callPackage")?.value){const _=this.getIdentifier("version")?.value?.trim();if(o)r=P.C_.newPackageAlias(o,c,_);else{let d=null;try{d=P.Vt.fromFormattedStr(i)}catch{try{d=new P.Vt(i)}catch{return this.errorService.setError("package_hash could not be parsed".toString()),r}}d&&(r=P.C_.newPackage(d,c,_))}}else if(o)r=P.C_.newInvocableEntityAlias(o,c);else if(i){let _=null,d=null;try{_=P.xM.fromFormattedStr(i),d=new P.Ep(_.toHexString())}catch{try{d=new P.Ep(i)}catch{return this.errorService.setError("entity_hash could not be parsed".toString()),r}}d&&(r=P.C_.newInvocableEntity(d,c))}if(t){const _="true"===this.getIdentifier("selectTransactionCategory")?.value?.trim();r=P.C_.newSession(P.Ix.fromUint8Array(t),_)}return r}addTransactionArgs(t){const r=this.getIdentifier("argsSimple")?.value?.trim().split(",").map(o=>o.trim()).filter(o=>""!==o),i=this.getIdentifier("argsJson")?.value?.trim();return r?.length?t.session_args_simple=r:i&&(t.session_args_json=i),t}static{this.\u0275fac=function(r){return new(r||e)(U(lr),U(_a),U(wu),U(Li),U(Ia),U(Cn))}}static{this.\u0275prov=Z({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();const TU=["publicKeyElt"],IU=e=>[e];let wT=(()=>{class e{constructor(t,r,i,o,c,l){this.config=t,this.stateService=r,this.clientService=i,this.storageService=o,this.changeDetectorRef=c,this.formService=l}ngAfterViewInit(){var t=this;return(0,u.A)(function*(){t.setStateSubscription(),t.public_key=t.storageService.get("public_key")||t.public_key,t.public_key&&(yield t.updateAccount(),t.stateService.setState({public_key:t.public_key}))})()}ngOnDestroy(){this.stateSubscription&&this.stateSubscription.unsubscribe()}setStateSubscription(){var t=this;this.stateSubscription=this.stateService.getState().subscribe(function(){var r=(0,u.A)(function*(i){i.action&&(t.action=i.action),i.public_key&&t.public_key!=i.public_key?(i.public_key&&(t.public_key=i.public_key),i.secret_key&&(t.secret_key=i.secret_key),yield t.updateAccount()):i.public_key&&i.public_key&&(t.public_key=i.public_key),t.changeDetectorRef.markForCheck()});return function(i){return r.apply(this,arguments)}}())}onPublicKeyChange(){var t=this;return(0,u.A)(function*(){const r=t.publicKeyElt&&t.publicKeyElt.nativeElement.value.toString().trim();t.public_key="",t.stateService.setState({public_key:r,secret_key:""}),t.storageService.setState({public_key:r})})()}isInvalid(){return!(this.config.action_needs_public_key&&!this.config.action_needs_public_key?.includes(this.action)||this.publicKeyElt?.nativeElement.value?.trim())}updateAccount(){var t=this;return(0,u.A)(function*(){const r=yield t.clientService.get_entity(t.public_key);if(!r.entity_result)return;const i=r?.entity_result?.AddressableEntity?.entity.entity_kind.Account,o=r?.entity_result?.AddressableEntity?.entity.main_purse;t.stateService.setState({account_hash:i,main_purse:o}),t.storageService.setState({account_hash:i,main_purse:o}),i&&t.formService.updateForm()})()}static{this.\u0275fac=function(r){return new(r||e)(T(lr),T(Cn),T(mT),T(Ta),T(Jt),T(Li))}}static{this.\u0275cmp=ut({type:e,selectors:[["comp-public-key"]],viewQuery:function(r,i){if(1&r&&Tt(TU,5),2&r){let o;It(o=Mt())&&(i.publicKeyElt=o.first)}},standalone:!0,features:[mt],decls:7,vars:4,consts:[["publicKeyElt",""],["for","publicKeyElt",1,"input-group-text"],[1,"d-none","d-md-inline","d-lg-none"],[1,"d-md-none","d-lg-inline"],["type","search","name","public_key","placeholder","e.g. 0x","id","publicKeyElt","e2e-id","publicKeyElt",1,"form-control","form-control-xs",3,"input","value","ngClass"]],template:function(r,i){if(1&r){const o=Le();O(0,"label",1)(1,"span",2),ie(2,"Pub. Key"),x(),O(3,"span",3),ie(4,"Public Key"),x()(),O(5,"input",4,0),re("input",function(){return ge(o),he(i.onPublicKeyChange())}),x()}2&r&&(L(5),R("value",i.public_key||"")("ngClass",yn(2,IU,i.isInvalid()?"is-invalid":"")))},dependencies:[Ke,cr],changeDetection:0})}}return e})();const MU=["secretKeyElt"],NU=e=>[e];function AU(e,n){if(1&e){const t=Le();O(0,"button",4),re("click",function(){return ge(t),he(H().onSecretKeyClick())}),ie(1," Load Secret Key\n"),x()}if(2&e){const t=H();R("ngClass",yn(1,NU,t.isInvalid()?"btn-warning":"btn-secondary"))}}function kU(e,n){if(1&e){const t=Le();O(0,"button",5),re("click",function(){return ge(t),he(H().onSecretKeyClick())}),ie(1," Secret Key Loaded\n"),x()}}let yT=(()=>{class e{constructor(t,r,i,o,c){this.config=t,this.stateService=r,this.errorService=i,this.storageService=o,this.changeDetectorRef=c}ngAfterViewInit(){var t=this;return(0,u.A)(function*(){t.setStateSubscription()})()}ngOnDestroy(){this.stateSubscription&&this.stateSubscription.unsubscribe()}setStateSubscription(){var t=this;this.stateSubscription=this.stateService.getState().subscribe(function(){var r=(0,u.A)(function*(i){i.action&&(t.action=i.action),t.changeDetectorRef.markForCheck()});return function(i){return r.apply(this,arguments)}}())}onSecretKeyClick(){this.secretKeyElt.nativeElement.click()}onPemSelected(t){var r=this;return(0,u.A)(function*(){const i=t.target.files?.item(0);let o="";if(i){let c=yield i.text();if(!c.trim())return;c=c.trim(),r.errorService.setError("");try{o=(0,P.kw)(c)}catch(l){r.errorService.setError(l)}o&&(r.secret_key=c)}else r.secret_key="";r.stateService.setState({public_key:o,secret_key:r.secret_key}),r.storageService.setState({public_key:o}),r.secretKeyElt.nativeElement.value="",r.changeDetectorRef.markForCheck()})()}isInvalid(){return!(this.config.action_needs_secret_key&&!this.config.action_needs_secret_key?.includes(this.action)||this.secret_key)}static{this.\u0275fac=function(r){return new(r||e)(T(lr),T(Cn),T(Ia),T(Ta),T(Jt))}}static{this.\u0275cmp=ut({type:e,selectors:[["comp-secret-key"]],viewQuery:function(r,i){if(1&r&&Tt(MU,5),2&r){let o;It(o=Mt())&&(i.secretKeyElt=o.first)}},standalone:!0,features:[mt],decls:4,vars:2,consts:[["secretKeyElt",""],["name","secret_key","type","file","id","secretKeyElt","accept",".pem","e2e-id","secretKeyElt",1,"visually-hidden",3,"change"],["class","btn",3,"ngClass","click",4,"ngIf"],["class","btn btn-light",3,"click",4,"ngIf"],[1,"btn",3,"click","ngClass"],[1,"btn","btn-light",3,"click"]],template:function(r,i){if(1&r){const o=Le();O(0,"input",1,0),re("change",function(l){return ge(o),he(i.onPemSelected(l))}),x(),ae(2,AU,2,3,"button",2)(3,kU,2,0,"button",3)}2&r&&(L(2),R("ngIf",!i.secret_key),L(),R("ngIf",i.secret_key))},dependencies:[Ke,cr,an],changeDetection:0})}}return e})();const FU=["selectDictIdentifierElt"],Dg=()=>["sign_deploy","sign_transaction"];function RU(e,n){if(1&e){const t=Le();O(0,"comp-submit-action",12),re("submit_action",function(i){return ge(t),he(H().submitAction(i))}),ie(1,"Go"),x()}2&e&&(al("btn-success ms-1 ms-sm-2 ms-xl-3"),R("e2e","submit"))}function OU(e,n){if(1&e){const t=Le();O(0,"comp-submit-action",12),re("submit_action",function(i){return ge(t),he(H().submitAction(i))}),ie(1,"Sign "),x()}2&e&&(al("btn-warning mt-3"),R("e2e","sign"))}function xU(e,n){if(1&e){const t=Le();O(0,"button",13),re("click",function(i){ge(t);const o=H();return he(o.walletSign(i,o.action))}),ie(1," Casper Wallet Sign "),x()}2&e&&(al("btn-warning mt-3 ms-3"),Ct("e2e","wallet_sign"))}let LU=(()=>{class e{constructor(t,r,i,o,c,l,_,d,p){this.sdk=t,this.config=r,this.env=i,this.clientService=o,this.resultService=c,this.stateService=l,this.formService=_,this.errorService=d,this.storageService=p,this.form=this.formService.form}ngOnInit(){var t=this;return(0,u.A)(function*(){console.info(t.sdk)})()}ngOnDestroy(){this.stateSubscription&&this.stateSubscription.unsubscribe()}setStateSubscription(){this.stateSubscription=this.stateService.getState().subscribe(t=>{t.action&&(this.action=t.action)})}ngAfterViewInit(){var t=this;return(0,u.A)(function*(){const i=t.storageService.get("action")||t.config.default_action.toString();try{i==t.config.default_action.toString()&&(yield t.handleAction(i,!0)),yield t.get_state_root_hash(!0)}catch(o){console.error(o),t.errorService.setError(o)}t.stateService.setState({action:i}),t.setStateSubscription()})()}selectAction(t){var r=this;return(0,u.A)(function*(){yield r.cleanResult(),r.stateService.setState({action:t}),yield r.handleAction(t),r.storageService.setState({action:t})})()}submitAction(t){var r=this;return(0,u.A)(function*(){yield r.cleanResult(),(r.form.disabled||r.form.valid)&&(yield r.handleAction(t,!0))})()}walletSign(t,r){var i=this;return(0,u.A)(function*(){i.clientService.wallet_sign_deploy()})()}handleAction(t,r){var i=this;return(0,u.A)(function*(){const o=i[t];if(o&&"function"==typeof o){if(r)try{yield o.bind(i)()}catch(c){i.errorService.setError(c)}}else{const c=`Method ${t} is not defined on the component.`;console.error(c),i.errorService.setError(c)}})()}onWasmSelected(t){var r=this;return(0,u.A)(function*(){t&&(r.wasm=t)})()}cleanResult(){var t=this;return(0,u.A)(function*(){t.errorService.setError(""),yield t.resultService.setResult("")})()}call_entrypoint_deploy(){var t=this;return(0,u.A)(function*(){return yield t.clientService.call_entrypoint_deploy()})()}call_entrypoint(){var t=this;return(0,u.A)(function*(){return yield t.clientService.call_entrypoint()})()}deploy(t=!0,r){var i=this;return(0,u.A)(function*(){return yield i.clientService.deploy(t,r,i.wasm)})()}transaction(t=!0,r){var i=this;return(0,u.A)(function*(){return yield i.clientService.transaction(t,r,i.wasm)})()}get_account(t){var r=this;return(0,u.A)(function*(){return yield r.clientService.get_account(t)})()}get_auction_info(){var t=this;return(0,u.A)(function*(){return yield t.clientService.get_auction_info()})()}get_balance(){var t=this;return(0,u.A)(function*(){return yield t.clientService.get_balance()})()}get_block(){var t=this;return(0,u.A)(function*(){return yield t.clientService.get_block()})()}get_block_transfers(){var t=this;return(0,u.A)(function*(){return yield t.clientService.get_block_transfers()})()}get_chainspec(){var t=this;return(0,u.A)(function*(){return yield t.clientService.get_chainspec()})()}get_deploy(){var t=this;return(0,u.A)(function*(){return yield t.clientService.get_deploy()})()}get_transaction(){var t=this;return(0,u.A)(function*(){return yield t.clientService.get_transaction()})()}get_dictionary_item(){var t=this;return(0,u.A)(function*(){return yield t.clientService.get_dictionary_item()})()}get_entity(t){var r=this;return(0,u.A)(function*(){return yield r.clientService.get_entity(t)})()}get_era_info(){var t=this;return(0,u.A)(function*(){return yield t.clientService.get_era_info()})()}get_era_summary(){var t=this;return(0,u.A)(function*(){return yield t.clientService.get_era_summary()})()}get_node_status(){var t=this;return(0,u.A)(function*(){return yield t.clientService.get_node_status()})()}get_peers(){var t=this;return(0,u.A)(function*(){return t.peers=yield t.clientService.get_peers(),t.peers})()}get_state_root_hash(t){var r=this;return(0,u.A)(function*(){const i=yield r.clientService.get_state_root_hash(t);return r.stateService.setState({state_root_hash:i}),i})()}get_validator_changes(){var t=this;return(0,u.A)(function*(){return yield t.clientService.get_validator_changes()})()}install_deploy(){var t=this;return(0,u.A)(function*(){return yield t.clientService.install_deploy(t.wasm)})()}install(){var t=this;return(0,u.A)(function*(){return yield t.clientService.install(t.wasm)})()}list_rpcs(){var t=this;return(0,u.A)(function*(){return yield t.clientService.list_rpcs()})()}make_deploy(){var t=this;return(0,u.A)(function*(){return yield t.clientService.make_deploy(t.wasm)})()}make_transaction(){var t=this;return(0,u.A)(function*(){return yield t.clientService.make_transaction(t.wasm)})()}make_transfer(){var t=this;return(0,u.A)(function*(){return yield t.clientService.make_transfer()})()}make_transfer_transaction(){var t=this;return(0,u.A)(function*(){return yield t.clientService.make_transfer_transaction()})()}put_deploy(){var t=this;return(0,u.A)(function*(){return yield t.clientService.put_deploy()})()}put_transaction(){var t=this;return(0,u.A)(function*(){return yield t.clientService.put_transaction()})()}query_balance(){var t=this;return(0,u.A)(function*(){return yield t.clientService.query_balance()})()}query_balance_details(){var t=this;return(0,u.A)(function*(){return yield t.clientService.query_balance_details()})()}query_contract_dict(){var t=this;return(0,u.A)(function*(){return yield t.clientService.query_contract_dict()})()}query_contract_key(){var t=this;return(0,u.A)(function*(){return yield t.clientService.query_contract_key()})()}query_global_state(){var t=this;return(0,u.A)(function*(){return yield t.clientService.query_global_state()})()}sign_deploy(){var t=this;return(0,u.A)(function*(){return yield t.clientService.sign_deploy()})()}sign_transaction(){var t=this;return(0,u.A)(function*(){return yield t.clientService.sign_transaction()})()}speculative_deploy(){var t=this;return(0,u.A)(function*(){return yield t.clientService.speculative_deploy(t.wasm)})()}speculative_transaction(){var t=this;return(0,u.A)(function*(){return yield t.clientService.speculative_transaction(t.wasm)})()}speculative_exec_deploy(){var t=this;return(0,u.A)(function*(){return yield t.clientService.speculative_exec_deploy()})()}speculative_exec(){var t=this;return(0,u.A)(function*(){return yield t.clientService.speculative_exec()})()}speculative_transfer(){var t=this;return(0,u.A)(function*(){return yield t.clientService.speculative_transfer()})()}speculative_transfer_transaction(){var t=this;return(0,u.A)(function*(){return yield t.clientService.speculative_transfer_transaction()})()}transfer(t=!0,r){var i=this;return(0,u.A)(function*(){return yield i.clientService.transfer(t,r)})()}transfer_transaction(t=!0,r){var i=this;return(0,u.A)(function*(){return yield i.clientService.transfer_transaction(t,r)})()}static{this.\u0275fac=function(r){return new(r||e)(T(_a),T(lr),T(Gp),T(mT),T(wu),T(Cn),T(Li),T(Ia),T(Ta))}}static{this.\u0275cmp=ut({type:e,selectors:[["app-root"]],viewQuery:function(r,i){if(1&r&&Tt(FU,5),2&r){let o;It(o=Mt())&&(i.selectDictIdentifierElt=o.first)}},standalone:!0,features:[mt],decls:16,vars:8,consts:[[1,"container"],[3,"peers"],[3,"get_state_root_hash_output"],[1,"row","flex-column-reverse","flex-column-reverse","flex-md-row"],[1,"col-12","col-md-6","col-lg-5","my-1","my-md-0","d-flex","justify-content-between"],[1,"w-100",3,"select_action"],[3,"class","e2e","submit_action",4,"ngIf"],[1,"col-12","col-md-6","col-lg-7","my-1","my-md-0","d-flex","justify-content-end","ps-md-0"],[1,"input-group"],[1,"d-flex","justify-content-end","ms-1","ms-sm-2","ms-xl-3"],[3,"wasm_selected","form"],["type","button","class","btn",3,"class","click",4,"ngIf"],[3,"submit_action","e2e"],["type","button",1,"btn",3,"click"]],template:function(r,i){1&r&&(O(0,"main",0),gt(1,"comp-header",1),O(2,"comp-status",2),re("get_state_root_hash_output",function(c){return i.get_state_root_hash(c)}),x(),O(3,"div",3)(4,"div",4)(5,"comp-action",5),re("select_action",function(c){return i.selectAction(c)}),x(),ae(6,RU,2,3,"comp-submit-action",6),x(),O(7,"div",7),gt(8,"comp-public-key",8),O(9,"div",9),gt(10,"comp-secret-key"),x()()(),gt(11,"comp-error"),O(12,"comp-form",10),re("wasm_selected",function(c){return i.onWasmSelected(c)}),x(),ae(13,OU,2,3,"comp-submit-action",6)(14,xU,2,3,"button",11),gt(15,"comp-result"),x()),2&r&&(L(),R("peers",i.peers),L(5),R("ngIf",!gl(5,Dg).includes(i.action)),L(6),R("form",i.form),L(),R("ngIf",gl(6,Dg).includes(i.action)),L(),R("ngIf",gl(7,Dg).includes(i.action)))},dependencies:[Ke,an,Ds,oT,uT,dT,fT,pT,gT,hT,wT,yT],changeDetection:0})}}return e})(),yu=Object.entries(En.networks).map(([e,n])=>({name:e,...n}));qp.production&&(yu=yu.filter(e=>"dev"!==e.name)),En.networks=yu,En.network=yu.find(e=>e.name==qp.default_network.toString()),function dB(e,n){return XP({rootComponent:e,...kC(n)})}(LU,{providers:[{provide:Gp,useValue:qp},{provide:lr,useValue:En},{provide:OC,useValue:En.wasm_asset_path},{provide:xC,useValue:En.network?.rpc_address},{provide:LC,useValue:P.WT[En.verbosity]},Mh([Wj,DB,iU])]}).then(()=>{}).catch(()=>{})},7278:f=>{var s=0;function a(g,y){var v=y.data;if(Array.isArray(v)&&!(v.length<2)){var S=v[0],A=v[1],M=v[2],B=g._callbacks[S];B&&(delete g._callbacks[S],B(A,M))}}function u(g){var y=this;y._worker=g,y._callbacks={},g.addEventListener("message",function(v){a(y,v)})}u.prototype.postMessage=function(g){var y=this,v=s++,S=[v,g];return new Promise(function(A,M){if(y._callbacks[v]=function(X,de){if(X)return M(new Error(X.message));A(de)},typeof y._worker.controller<"u"){var B=new MessageChannel;B.port1.onmessage=function(X){a(y,X)},y._worker.controller.postMessage(S,[B.port2])}else y._worker.postMessage(S)})},f.exports=u},8825:(__unused_webpack___webpack_module__,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{Ay:()=>__WEBPACK_DEFAULT_EXPORT__,Bh:()=>DeployStrParams,C_:()=>TransactionBuilderParams,Ep:()=>AddressableEntityHash,IQ:()=>hexToString,Ix:()=>Bytes,Iy:()=>BlockHash,MK:()=>PricingMode,NX:()=>DictionaryItemStrParams,Qt:()=>SessionStrParams,S3:()=>motesToCSPR,Vt:()=>PackageHash,WT:()=>Verbosity,ZX:()=>Transaction,_e:()=>CasperWallet,bL:()=>DictionaryItemIdentifier,eg:()=>GlobalStateIdentifier,hp:()=>SDK,kD:()=>TransactionStrParams,kw:()=>publicKeyFromSecretKey,lg:()=>getTimestamp,m9:()=>Deploy,mL:()=>jsonPrettyPrint,np:()=>Digest,q1:()=>PaymentStrParams,xM:()=>EntityAddr,z$:()=>BlockIdentifier});var _opt2_casper_rustSDK_examples_frontend_angular_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(467);let wasm;const cachedTextDecoder=typeof TextDecoder<"u"?new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}):{decode:()=>{throw Error("TextDecoder not available")}};typeof TextDecoder<"u"&&cachedTextDecoder.decode();let cachedUint8ArrayMemory0=null;function getUint8ArrayMemory0(){return(null===cachedUint8ArrayMemory0||0===cachedUint8ArrayMemory0.byteLength)&&(cachedUint8ArrayMemory0=new Uint8Array(wasm.memory.buffer)),cachedUint8ArrayMemory0}function getStringFromWasm0(f,s){return f>>>=0,cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(f,f+s))}let WASM_VECTOR_LEN=0;const cachedTextEncoder=typeof TextEncoder<"u"?new TextEncoder("utf-8"):{encode:()=>{throw Error("TextEncoder not available")}},encodeString="function"==typeof cachedTextEncoder.encodeInto?function(f,s){return cachedTextEncoder.encodeInto(f,s)}:function(f,s){const a=cachedTextEncoder.encode(f);return s.set(a),{read:f.length,written:a.length}};function passStringToWasm0(f,s,a){if(void 0===a){const S=cachedTextEncoder.encode(f),A=s(S.length,1)>>>0;return getUint8ArrayMemory0().subarray(A,A+S.length).set(S),WASM_VECTOR_LEN=S.length,A}let u=f.length,g=s(u,1)>>>0;const y=getUint8ArrayMemory0();let v=0;for(;v127)break;y[g+v]=S}if(v!==u){0!==v&&(f=f.slice(v)),g=a(g,u,u=v+3*f.length,1)>>>0;const S=getUint8ArrayMemory0().subarray(g+v,g+u);v+=encodeString(f,S).written,g=a(g,u,v,1)>>>0}return WASM_VECTOR_LEN=v,g}function isLikeNone(f){return null==f}let cachedDataViewMemory0=null;function getDataViewMemory0(){return(null===cachedDataViewMemory0||!0===cachedDataViewMemory0.buffer.detached||void 0===cachedDataViewMemory0.buffer.detached&&cachedDataViewMemory0.buffer!==wasm.memory.buffer)&&(cachedDataViewMemory0=new DataView(wasm.memory.buffer)),cachedDataViewMemory0}function debugString(f){const s=typeof f;if("number"==s||"boolean"==s||null==f)return`${f}`;if("string"==s)return`"${f}"`;if("symbol"==s){const g=f.description;return null==g?"Symbol":`Symbol(${g})`}if("function"==s){const g=f.name;return"string"==typeof g&&g.length>0?`Function(${g})`:"Function"}if(Array.isArray(f)){const g=f.length;let y="[";g>0&&(y+=debugString(f[0]));for(let v=1;v1))return toString.call(f);if(u=a[1],"Object"==u)try{return"Object("+JSON.stringify(f)+")"}catch{return"Object"}return f instanceof Error?`${f.name}: ${f.message}\n${f.stack}`:u}const CLOSURE_DTORS=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>{wasm.__wbindgen_export_3.get(f.dtor)(f.a,f.b)});function makeMutClosure(f,s,a,u){const g={a:f,b:s,cnt:1,dtor:a},y=(...v)=>{g.cnt++;const S=g.a;g.a=0;try{return u(S,g.b,...v)}finally{0==--g.cnt?(wasm.__wbindgen_export_3.get(g.dtor)(S,g.b),CLOSURE_DTORS.unregister(g)):g.a=S}};return y.original=g,CLOSURE_DTORS.register(y,g,g),y}function __wbg_adapter_38(f,s,a){wasm.closure820_externref_shim(f,s,a)}function __wbg_adapter_45(f,s){wasm._dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hbccf68cb4005f2b4(f,s)}function __wbg_adapter_48(f,s,a){wasm.closure1141_externref_shim(f,s,a)}function __wbg_adapter_51(f,s,a){wasm.closure1155_externref_shim(f,s,a)}function _assertClass(f,s){if(!(f instanceof s))throw new Error(`expected instance of ${s.name}`);return f.ptr}function takeFromExternrefTable0(f){const s=wasm.__wbindgen_export_2.get(f);return wasm.__externref_table_dealloc(f),s}function passArray8ToWasm0(f,s){const a=s(1*f.length,1)>>>0;return getUint8ArrayMemory0().set(f,a/1),WASM_VECTOR_LEN=f.length,a}function getArrayU8FromWasm0(f,s){return f>>>=0,getUint8ArrayMemory0().subarray(f/1,f/1+s)}function addToExternrefTable0(f){const s=wasm.__externref_table_alloc();return wasm.__wbindgen_export_2.set(s,f),s}function passArrayJsValueToWasm0(f,s){const a=s(4*f.length,4)>>>0,u=getDataViewMemory0();for(let g=0;g>>=0;const a=getDataViewMemory0(),u=[];for(let g=f;g{throw new Error(`${f} is not defined`)}}function handleError(f,s){try{return f.apply(this,s)}catch(a){const u=addToExternrefTable0(a);wasm.__wbindgen_exn_store(u)}}function hexToString(f){let s,a;try{const u=passStringToWasm0(f,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),y=wasm.hexToString(u,WASM_VECTOR_LEN);return s=y[0],a=y[1],getStringFromWasm0(y[0],y[1])}finally{wasm.__wbindgen_free(s,a,1)}}function hexToUint8Array(f){const s=passStringToWasm0(f,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),u=wasm.hexToUint8Array(s,WASM_VECTOR_LEN);var g=getArrayU8FromWasm0(u[0],u[1]).slice();return wasm.__wbindgen_free(u[0],1*u[1],1),g}function uint8ArrayToBytes(f){const s=wasm.uint8ArrayToBytes(f);return Bytes.__wrap(s)}function motesToCSPR(f){let s,a;try{const y=passStringToWasm0(f,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),S=wasm.motesToCSPR(y,WASM_VECTOR_LEN);var u=S[0],g=S[1];if(S[3])throw u=0,g=0,takeFromExternrefTable0(S[2]);return s=u,a=g,getStringFromWasm0(u,g)}finally{wasm.__wbindgen_free(s,a,1)}}function jsonPrettyPrint(f,s){const a=wasm.jsonPrettyPrint(f,isLikeNone(s)?3:s);if(a[2])throw takeFromExternrefTable0(a[1]);return takeFromExternrefTable0(a[0])}function publicKeyFromSecretKey(f){const s=passStringToWasm0(f,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),u=wasm.publicKeyFromSecretKey(s,WASM_VECTOR_LEN);if(u[2])throw takeFromExternrefTable0(u[1]);return takeFromExternrefTable0(u[0])}function generateSecretKey(){const f=wasm.generateSecretKey();if(f[2])throw takeFromExternrefTable0(f[1]);return takeFromExternrefTable0(f[0])}function generateSecretKey_secp256k1(){const f=wasm.generateSecretKey_secp256k1();if(f[2])throw takeFromExternrefTable0(f[1]);return takeFromExternrefTable0(f[0])}function accountHashToBase64Key(f){let s,a;try{const y=passStringToWasm0(f,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),S=wasm.accountHashToBase64Key(y,WASM_VECTOR_LEN);var u=S[0],g=S[1];if(S[3])throw u=0,g=0,takeFromExternrefTable0(S[2]);return s=u,a=g,getStringFromWasm0(u,g)}finally{wasm.__wbindgen_free(s,a,1)}}function getTimestamp(){return wasm.getTimestamp()}function encodeLowerBlake2b(f){const s=passStringToWasm0(f,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);return wasm.encodeLowerBlake2b(s,WASM_VECTOR_LEN)}function makeDictionaryItemKey(f,s){let a,u;try{_assertClass(f,Key);var g=f.__destroy_into_raw();const S=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),M=wasm.makeDictionaryItemKey(g,S,WASM_VECTOR_LEN);var y=M[0],v=M[1];if(M[3])throw y=0,v=0,takeFromExternrefTable0(M[2]);return a=y,u=v,getStringFromWasm0(y,v)}finally{wasm.__wbindgen_free(a,u,1)}}function __wbg_adapter_1203(f,s,a,u){wasm.closure1703_externref_shim(f,s,a,u)}const PricingMode=Object.freeze({Fixed:0,0:"Fixed",Classic:1,1:"Classic",Reserved:2,2:"Reserved"}),TransactionKind=Object.freeze({InvocableEntity:0,0:"InvocableEntity",InvocableEntityAlias:1,1:"InvocableEntityAlias",Package:2,2:"Package",PackageAlias:3,3:"PackageAlias",Session:4,4:"Session",Transfer:5,5:"Transfer",AddBid:6,6:"AddBid",Delegate:7,7:"Delegate",Undelegate:8,8:"Undelegate",Redelegate:9,9:"Redelegate",WithdrawBid:10,10:"WithdrawBid"}),TransferTargetKind=Object.freeze({PublicKey:0,0:"PublicKey",AccountHash:1,1:"AccountHash",URef:2,2:"URef"}),Verbosity=Object.freeze({Low:0,0:"Low",Medium:1,1:"Medium",High:2,2:"High"}),__wbindgen_enum_ReadableStreamReaderMode=null,__wbindgen_enum_ReadableStreamType=["bytes"],__wbindgen_enum_RequestCredentials=["omit","same-origin","include"],__wbindgen_enum_RequestMode=["same-origin","no-cors","cors","navigate"],AccessRightsFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_accessrights_free(f>>>0,1));class AccessRights{static __wrap(s){s>>>=0;const a=Object.create(AccessRights.prototype);return a.__wbg_ptr=s,AccessRightsFinalization.register(a,a.__wbg_ptr,a),a}__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,AccessRightsFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_accessrights_free(s,0)}static NONE(){return wasm.accessrights_NONE()}static READ(){return wasm.accessrights_READ()}static WRITE(){return wasm.accessrights_WRITE()}static ADD(){return wasm.accessrights_ADD()}static READ_ADD(){return wasm.accessrights_READ_ADD()}static READ_WRITE(){return wasm.accessrights_READ_WRITE()}static ADD_WRITE(){return wasm.accessrights_ADD_WRITE()}static READ_ADD_WRITE(){return wasm.accessrights_READ_ADD_WRITE()}constructor(s){const a=wasm.accessrights_new(s);if(a[2])throw takeFromExternrefTable0(a[1]);return this.__wbg_ptr=a[0]>>>0,AccessRightsFinalization.register(this,this.__wbg_ptr,this),this}static from_bits(s,a,u){const g=wasm.accessrights_from_bits(s,a,u);return AccessRights.__wrap(g)}is_readable(){return 0!==wasm.accessrights_is_readable(this.__wbg_ptr)}is_writeable(){return 0!==wasm.accessrights_is_writeable(this.__wbg_ptr)}is_addable(){return 0!==wasm.accessrights_is_addable(this.__wbg_ptr)}is_none(){return 0!==wasm.accessrights_is_none(this.__wbg_ptr)}}const AccountHashFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_accounthash_free(f>>>0,1));class AccountHash{static __wrap(s){s>>>=0;const a=Object.create(AccountHash.prototype);return a.__wbg_ptr=s,AccountHashFinalization.register(a,a.__wbg_ptr,a),a}__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,AccountHashFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_accounthash_free(s,0)}constructor(s){const a=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),g=wasm.accounthash_new_js_alias(a,WASM_VECTOR_LEN);if(g[2])throw takeFromExternrefTable0(g[1]);return this.__wbg_ptr=g[0]>>>0,AccountHashFinalization.register(this,this.__wbg_ptr,this),this}static fromFormattedStr(s){const a=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),g=wasm.accounthash_fromFormattedStr(a,WASM_VECTOR_LEN);if(g[2])throw takeFromExternrefTable0(g[1]);return AccountHash.__wrap(g[0])}static fromPublicKey(s){_assertClass(s,PublicKey);var a=s.__destroy_into_raw();const u=wasm.accounthash_fromPublicKey(a);return AccountHash.__wrap(u)}toFormattedString(){let s,a;try{const u=wasm.accounthash_toFormattedString(this.__wbg_ptr);return s=u[0],a=u[1],getStringFromWasm0(u[0],u[1])}finally{wasm.__wbindgen_free(s,a,1)}}toHexString(){let s,a;try{const u=wasm.accounthash_toHexString(this.__wbg_ptr);return s=u[0],a=u[1],getStringFromWasm0(u[0],u[1])}finally{wasm.__wbindgen_free(s,a,1)}}static fromUint8Array(s){const a=passArray8ToWasm0(s,wasm.__wbindgen_malloc),g=wasm.accounthash_fromUint8Array(a,WASM_VECTOR_LEN);return AccountHash.__wrap(g)}toJson(){return wasm.accounthash_toJson(this.__wbg_ptr)}}const AccountIdentifierFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_accountidentifier_free(f>>>0,1));class AccountIdentifier{static __wrap(s){s>>>=0;const a=Object.create(AccountIdentifier.prototype);return a.__wbg_ptr=s,AccountIdentifierFinalization.register(a,a.__wbg_ptr,a),a}__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,AccountIdentifierFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_accountidentifier_free(s,0)}constructor(s){const a=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),g=wasm.accountidentifier_new(a,WASM_VECTOR_LEN);if(g[2])throw takeFromExternrefTable0(g[1]);return this.__wbg_ptr=g[0]>>>0,AccountIdentifierFinalization.register(this,this.__wbg_ptr,this),this}static fromFormattedStr(s){const a=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),g=wasm.accountidentifier_fromFormattedStr(a,WASM_VECTOR_LEN);if(g[2])throw takeFromExternrefTable0(g[1]);return AccountIdentifier.__wrap(g[0])}static fromPublicKey(s){_assertClass(s,PublicKey);var a=s.__destroy_into_raw();const u=wasm.accountidentifier_fromPublicKey(a);return AccountIdentifier.__wrap(u)}static fromAccountHash(s){_assertClass(s,AccountHash);var a=s.__destroy_into_raw();const u=wasm.accountidentifier_fromAccountHash(a);return AccountIdentifier.__wrap(u)}toJson(){return wasm.accountidentifier_toJson(this.__wbg_ptr)}}const AddressableEntityHashFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_addressableentityhash_free(f>>>0,1));class AddressableEntityHash{static __wrap(s){s>>>=0;const a=Object.create(AddressableEntityHash.prototype);return a.__wbg_ptr=s,AddressableEntityHashFinalization.register(a,a.__wbg_ptr,a),a}__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,AddressableEntityHashFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_addressableentityhash_free(s,0)}constructor(s){const a=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),g=wasm.addressableentityhash_new_js_alias(a,WASM_VECTOR_LEN);if(g[2])throw takeFromExternrefTable0(g[1]);return this.__wbg_ptr=g[0]>>>0,AddressableEntityHashFinalization.register(this,this.__wbg_ptr,this),this}static fromFormattedStr(s){const a=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),g=wasm.addressableentityhash_fromFormattedStr(a,WASM_VECTOR_LEN);if(g[2])throw takeFromExternrefTable0(g[1]);return AddressableEntityHash.__wrap(g[0])}toFormattedString(){let s,a;try{const u=wasm.addressableentityhash_toFormattedString(this.__wbg_ptr);return s=u[0],a=u[1],getStringFromWasm0(u[0],u[1])}finally{wasm.__wbindgen_free(s,a,1)}}static fromUint8Array(s){const a=passArray8ToWasm0(s,wasm.__wbindgen_malloc),g=wasm.addressableentityhash_fromUint8Array(a,WASM_VECTOR_LEN);return AddressableEntityHash.__wrap(g)}}const ArgsSimpleFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_argssimple_free(f>>>0,1));class ArgsSimple{static __wrap(s){s>>>=0;const a=Object.create(ArgsSimple.prototype);return a.__wbg_ptr=s,ArgsSimpleFinalization.register(a,a.__wbg_ptr,a),a}__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,ArgsSimpleFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_argssimple_free(s,0)}}const BlockHashFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_blockhash_free(f>>>0,1));class BlockHash{static __wrap(s){s>>>=0;const a=Object.create(BlockHash.prototype);return a.__wbg_ptr=s,BlockHashFinalization.register(a,a.__wbg_ptr,a),a}__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,BlockHashFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_blockhash_free(s,0)}constructor(s){const a=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),g=wasm.blockhash_new_js_alias(a,WASM_VECTOR_LEN);if(g[2])throw takeFromExternrefTable0(g[1]);return this.__wbg_ptr=g[0]>>>0,BlockHashFinalization.register(this,this.__wbg_ptr,this),this}static fromDigest(s){_assertClass(s,Digest);var a=s.__destroy_into_raw();const u=wasm.blockhash_fromDigest(a);if(u[2])throw takeFromExternrefTable0(u[1]);return BlockHash.__wrap(u[0])}toJson(){return wasm.blockhash_toJson(this.__wbg_ptr)}toString(){let s,a;try{const u=wasm.blockhash_toString(this.__wbg_ptr);return s=u[0],a=u[1],getStringFromWasm0(u[0],u[1])}finally{wasm.__wbindgen_free(s,a,1)}}}const BlockIdentifierFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_blockidentifier_free(f>>>0,1));class BlockIdentifier{static __wrap(s){s>>>=0;const a=Object.create(BlockIdentifier.prototype);return a.__wbg_ptr=s,BlockIdentifierFinalization.register(a,a.__wbg_ptr,a),a}__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,BlockIdentifierFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_blockidentifier_free(s,0)}constructor(s){_assertClass(s,BlockIdentifier);var a=s.__destroy_into_raw();const u=wasm.blockidentifier_new(a);return this.__wbg_ptr=u>>>0,BlockIdentifierFinalization.register(this,this.__wbg_ptr,this),this}static from_hash(s){_assertClass(s,BlockHash);var a=s.__destroy_into_raw();const u=wasm.blockidentifier_from_hash(a);return BlockIdentifier.__wrap(u)}static fromHeight(s){const a=wasm.blockidentifier_fromHeight(s);return BlockIdentifier.__wrap(a)}toJson(){return wasm.blockidentifier_toJson(this.__wbg_ptr)}}const BodyFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_body_free(f>>>0,1));class Body{static __wrap(s){s>>>=0;const a=Object.create(Body.prototype);return a.__wbg_ptr=s,BodyFinalization.register(a,a.__wbg_ptr,a),a}__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,BodyFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_body_free(s,0)}get transaction_processed(){const s=wasm.__wbg_get_body_transaction_processed(this.__wbg_ptr);return 0===s?void 0:TransactionProcessed.__wrap(s)}set transaction_processed(s){let a=0;isLikeNone(s)||(_assertClass(s,TransactionProcessed),a=s.__destroy_into_raw()),wasm.__wbg_set_body_transaction_processed(this.__wbg_ptr,a)}get get_deploy_processed(){const s=wasm.body_get_deploy_processed(this.__wbg_ptr);return 0===s?void 0:TransactionProcessed.__wrap(s)}get get_transaction_processed(){const s=wasm.body_get_deploy_processed(this.__wbg_ptr);return 0===s?void 0:TransactionProcessed.__wrap(s)}}const BytesFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_bytes_free(f>>>0,1));class Bytes{static __wrap(s){s>>>=0;const a=Object.create(Bytes.prototype);return a.__wbg_ptr=s,BytesFinalization.register(a,a.__wbg_ptr,a),a}__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,BytesFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_bytes_free(s,0)}constructor(){const s=wasm.bytes_new();return this.__wbg_ptr=s>>>0,BytesFinalization.register(this,this.__wbg_ptr,this),this}static fromUint8Array(s){const a=wasm.bytes_fromUint8Array(s);return Bytes.__wrap(a)}}const CasperWalletFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_casperwallet_free(f>>>0,1));class CasperWallet{__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,CasperWalletFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_casperwallet_free(s,0)}constructor(){const s=wasm.casperwallet_new();return this.__wbg_ptr=s>>>0,CasperWalletFinalization.register(this,this.__wbg_ptr,this),this}signDeploy(s,a){_assertClass(s,Deploy);var u=s.__destroy_into_raw(),g=isLikeNone(a)?0:passStringToWasm0(a,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);return wasm.casperwallet_signDeploy(this.__wbg_ptr,u,g,WASM_VECTOR_LEN)}signTransaction(s,a){_assertClass(s,Transaction);var u=s.__destroy_into_raw(),g=isLikeNone(a)?0:passStringToWasm0(a,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);return wasm.casperwallet_signTransaction(this.__wbg_ptr,u,g,WASM_VECTOR_LEN)}signDeployHash(s,a){const u=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),g=WASM_VECTOR_LEN;var y=isLikeNone(a)?0:passStringToWasm0(a,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);return wasm.casperwallet_signDeployHash(this.__wbg_ptr,u,g,y,WASM_VECTOR_LEN)}signTransactionHash(s,a){const u=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),g=WASM_VECTOR_LEN;var y=isLikeNone(a)?0:passStringToWasm0(a,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);return wasm.casperwallet_signTransactionHash(this.__wbg_ptr,u,g,y,WASM_VECTOR_LEN)}signMessage(s,a){const u=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),g=WASM_VECTOR_LEN;var y=isLikeNone(a)?0:passStringToWasm0(a,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);return wasm.casperwallet_signMessage(this.__wbg_ptr,u,g,y,WASM_VECTOR_LEN)}connect(){return wasm.casperwallet_connect(this.__wbg_ptr)}disconnect(){return wasm.casperwallet_disconnect(this.__wbg_ptr)}isConnected(){return wasm.casperwallet_isConnected(this.__wbg_ptr)}getVersion(){return wasm.casperwallet_getVersion(this.__wbg_ptr)}getActivePublicKey(){return wasm.casperwallet_getActivePublicKey(this.__wbg_ptr)}switchAccount(){return wasm.casperwallet_switchAccount(this.__wbg_ptr)}}const ContractHashFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_contracthash_free(f>>>0,1));class ContractHash{static __wrap(s){s>>>=0;const a=Object.create(ContractHash.prototype);return a.__wbg_ptr=s,ContractHashFinalization.register(a,a.__wbg_ptr,a),a}__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,ContractHashFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_contracthash_free(s,0)}constructor(s){const a=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),g=wasm.contracthash_new_js_alias(a,WASM_VECTOR_LEN);if(g[2])throw takeFromExternrefTable0(g[1]);return this.__wbg_ptr=g[0]>>>0,ContractHashFinalization.register(this,this.__wbg_ptr,this),this}static fromFormattedStr(s){const a=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),g=wasm.contracthash_fromFormattedStr(a,WASM_VECTOR_LEN);if(g[2])throw takeFromExternrefTable0(g[1]);return ContractHash.__wrap(g[0])}toFormattedString(){let s,a;try{const u=wasm.contracthash_toFormattedString(this.__wbg_ptr);return s=u[0],a=u[1],getStringFromWasm0(u[0],u[1])}finally{wasm.__wbindgen_free(s,a,1)}}static fromUint8Array(s){const a=passArray8ToWasm0(s,wasm.__wbindgen_malloc),g=wasm.contracthash_fromUint8Array(a,WASM_VECTOR_LEN);return ContractHash.__wrap(g)}}const ContractPackageHashFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_contractpackagehash_free(f>>>0,1));class ContractPackageHash{static __wrap(s){s>>>=0;const a=Object.create(ContractPackageHash.prototype);return a.__wbg_ptr=s,ContractPackageHashFinalization.register(a,a.__wbg_ptr,a),a}__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,ContractPackageHashFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_contractpackagehash_free(s,0)}constructor(s){const a=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),g=wasm.contractpackagehash_new_js_alias(a,WASM_VECTOR_LEN);if(g[2])throw takeFromExternrefTable0(g[1]);return this.__wbg_ptr=g[0]>>>0,ContractPackageHashFinalization.register(this,this.__wbg_ptr,this),this}static fromFormattedStr(s){const a=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),g=wasm.contractpackagehash_fromFormattedStr(a,WASM_VECTOR_LEN);if(g[2])throw takeFromExternrefTable0(g[1]);return ContractPackageHash.__wrap(g[0])}toFormattedString(){let s,a;try{const u=wasm.contractpackagehash_toFormattedString(this.__wbg_ptr);return s=u[0],a=u[1],getStringFromWasm0(u[0],u[1])}finally{wasm.__wbindgen_free(s,a,1)}}static fromUint8Array(s){const a=passArray8ToWasm0(s,wasm.__wbindgen_malloc),g=wasm.contractpackagehash_fromUint8Array(a,WASM_VECTOR_LEN);return ContractPackageHash.__wrap(g)}}const DeployFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_deploy_free(f>>>0,1));class Deploy{static __wrap(s){s>>>=0;const a=Object.create(Deploy.prototype);return a.__wbg_ptr=s,DeployFinalization.register(a,a.__wbg_ptr,a),a}__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,DeployFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_deploy_free(s,0)}constructor(s){const a=wasm.deploy_new(s);return this.__wbg_ptr=a>>>0,DeployFinalization.register(this,this.__wbg_ptr,this),this}toJson(){return wasm.deploy_toJson(this.__wbg_ptr)}static withPaymentAndSession(s,a,u){_assertClass(s,DeployStrParams);var g=s.__destroy_into_raw();_assertClass(a,SessionStrParams);var y=a.__destroy_into_raw();_assertClass(u,PaymentStrParams);var v=u.__destroy_into_raw();const S=wasm.deploy_withPaymentAndSession(g,y,v);if(S[2])throw takeFromExternrefTable0(S[1]);return Deploy.__wrap(S[0])}static withTransfer(s,a,u,g,y){const v=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),S=WASM_VECTOR_LEN,A=passStringToWasm0(a,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),M=WASM_VECTOR_LEN;var B=isLikeNone(u)?0:passStringToWasm0(u,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),X=WASM_VECTOR_LEN;_assertClass(g,DeployStrParams);var de=g.__destroy_into_raw();_assertClass(y,PaymentStrParams);var le=y.__destroy_into_raw();const ue=wasm.deploy_withTransfer(v,S,A,M,B,X,de,le);if(ue[2])throw takeFromExternrefTable0(ue[1]);return Deploy.__wrap(ue[0])}withTTL(s,a){const u=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),g=WASM_VECTOR_LEN;var y=isLikeNone(a)?0:passStringToWasm0(a,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);const S=wasm.deploy_withTTL(this.__wbg_ptr,u,g,y,WASM_VECTOR_LEN);return Deploy.__wrap(S)}withTimestamp(s,a){const u=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),g=WASM_VECTOR_LEN;var y=isLikeNone(a)?0:passStringToWasm0(a,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);const S=wasm.deploy_withTimestamp(this.__wbg_ptr,u,g,y,WASM_VECTOR_LEN);return Deploy.__wrap(S)}withChainName(s,a){const u=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),g=WASM_VECTOR_LEN;var y=isLikeNone(a)?0:passStringToWasm0(a,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);const S=wasm.deploy_withChainName(this.__wbg_ptr,u,g,y,WASM_VECTOR_LEN);return Deploy.__wrap(S)}withAccount(s,a){_assertClass(s,PublicKey);var u=s.__destroy_into_raw(),g=isLikeNone(a)?0:passStringToWasm0(a,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);const v=wasm.deploy_withAccount(this.__wbg_ptr,u,g,WASM_VECTOR_LEN);return Deploy.__wrap(v)}withEntryPointName(s,a){const u=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),g=WASM_VECTOR_LEN;var y=isLikeNone(a)?0:passStringToWasm0(a,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);const S=wasm.deploy_withEntryPointName(this.__wbg_ptr,u,g,y,WASM_VECTOR_LEN);return Deploy.__wrap(S)}withHash(s,a){_assertClass(s,ContractHash);var u=s.__destroy_into_raw(),g=isLikeNone(a)?0:passStringToWasm0(a,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);const v=wasm.deploy_withHash(this.__wbg_ptr,u,g,WASM_VECTOR_LEN);return Deploy.__wrap(v)}withPackageHash(s,a){_assertClass(s,ContractPackageHash);var u=s.__destroy_into_raw(),g=isLikeNone(a)?0:passStringToWasm0(a,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);const v=wasm.deploy_withPackageHash(this.__wbg_ptr,u,g,WASM_VECTOR_LEN);return Deploy.__wrap(v)}withModuleBytes(s,a){_assertClass(s,Bytes);var u=s.__destroy_into_raw(),g=isLikeNone(a)?0:passStringToWasm0(a,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);const v=wasm.deploy_withModuleBytes(this.__wbg_ptr,u,g,WASM_VECTOR_LEN);return Deploy.__wrap(v)}withSecretKey(s){var a=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);const g=wasm.deploy_withSecretKey(this.__wbg_ptr,a,WASM_VECTOR_LEN);return Deploy.__wrap(g)}withStandardPayment(s,a){const u=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),g=WASM_VECTOR_LEN;var y=isLikeNone(a)?0:passStringToWasm0(a,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);const S=wasm.deploy_withStandardPayment(this.__wbg_ptr,u,g,y,WASM_VECTOR_LEN);return Deploy.__wrap(S)}withPayment(s,a){var u=isLikeNone(a)?0:passStringToWasm0(a,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);const y=wasm.deploy_withPayment(this.__wbg_ptr,s,u,WASM_VECTOR_LEN);return Deploy.__wrap(y)}withSession(s,a){var u=isLikeNone(a)?0:passStringToWasm0(a,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);const y=wasm.deploy_withSession(this.__wbg_ptr,s,u,WASM_VECTOR_LEN);return Deploy.__wrap(y)}validateDeploySize(){return 0!==wasm.deploy_validateDeploySize(this.__wbg_ptr)}isValid(){return 0!==wasm.deploy_isValid(this.__wbg_ptr)}get hash(){const s=wasm.deploy_hash(this.__wbg_ptr);return DeployHash.__wrap(s)}hasValidHash(){return 0!==wasm.deploy_hasValidHash(this.__wbg_ptr)}isExpired(){return 0!==wasm.deploy_isExpired(this.__wbg_ptr)}sign(s){const a=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),g=wasm.deploy_sign(this.__wbg_ptr,a,WASM_VECTOR_LEN);return Deploy.__wrap(g)}approvalsHash(){return wasm.deploy_approvalsHash(this.__wbg_ptr)}approvals(){return wasm.deploy_approvals(this.__wbg_ptr)}isTransfer(){return 0!==wasm.deploy_isTransfer(this.__wbg_ptr)}isStandardPayment(s){return 0!==wasm.deploy_isStandardPayment(this.__wbg_ptr,s)}isStoredContract(){return 0!==wasm.deploy_isStoredContract(this.__wbg_ptr)}isStoredContractPackage(){return 0!==wasm.deploy_isStoredContractPackage(this.__wbg_ptr)}isModuleBytes(){return 0!==wasm.deploy_isModuleBytes(this.__wbg_ptr)}isByName(){return 0!==wasm.deploy_isByName(this.__wbg_ptr)}byName(){const s=wasm.deploy_byName(this.__wbg_ptr);let a;return 0!==s[0]&&(a=getStringFromWasm0(s[0],s[1]).slice(),wasm.__wbindgen_free(s[0],1*s[1],1)),a}entryPointName(){let s,a;try{const u=wasm.deploy_entryPointName(this.__wbg_ptr);return s=u[0],a=u[1],getStringFromWasm0(u[0],u[1])}finally{wasm.__wbindgen_free(s,a,1)}}addSignature(s,a){const u=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),g=WASM_VECTOR_LEN,y=passStringToWasm0(a,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),S=wasm.deploy_addSignature(this.__wbg_ptr,u,g,y,WASM_VECTOR_LEN);return Deploy.__wrap(S)}TTL(){let s,a;try{const u=wasm.deploy_TTL(this.__wbg_ptr);return s=u[0],a=u[1],getStringFromWasm0(u[0],u[1])}finally{wasm.__wbindgen_free(s,a,1)}}timestamp(){let s,a;try{const u=wasm.deploy_timestamp(this.__wbg_ptr);return s=u[0],a=u[1],getStringFromWasm0(u[0],u[1])}finally{wasm.__wbindgen_free(s,a,1)}}chainName(){let s,a;try{const u=wasm.deploy_chainName(this.__wbg_ptr);return s=u[0],a=u[1],getStringFromWasm0(u[0],u[1])}finally{wasm.__wbindgen_free(s,a,1)}}account(){let s,a;try{const u=wasm.deploy_account(this.__wbg_ptr);return s=u[0],a=u[1],getStringFromWasm0(u[0],u[1])}finally{wasm.__wbindgen_free(s,a,1)}}paymentAmount(s){let a,u;try{const g=wasm.deploy_paymentAmount(this.__wbg_ptr,s);return a=g[0],u=g[1],getStringFromWasm0(g[0],g[1])}finally{wasm.__wbindgen_free(a,u,1)}}args(){return wasm.deploy_args(this.__wbg_ptr)}addArg(s,a){var u=isLikeNone(a)?0:passStringToWasm0(a,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);const y=wasm.deploy_addArg(this.__wbg_ptr,s,u,WASM_VECTOR_LEN);if(y[2])throw takeFromExternrefTable0(y[1]);return Deploy.__wrap(y[0])}}const DeployHashFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_deployhash_free(f>>>0,1));class DeployHash{static __wrap(s){s>>>=0;const a=Object.create(DeployHash.prototype);return a.__wbg_ptr=s,DeployHashFinalization.register(a,a.__wbg_ptr,a),a}__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,DeployHashFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_deployhash_free(s,0)}constructor(s){const a=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),g=wasm.deployhash_new_js_alias(a,WASM_VECTOR_LEN);if(g[2])throw takeFromExternrefTable0(g[1]);return this.__wbg_ptr=g[0]>>>0,DeployHashFinalization.register(this,this.__wbg_ptr,this),this}static fromDigest(s){_assertClass(s,Digest);var a=s.__destroy_into_raw();const u=wasm.deployhash_fromDigest(a);if(u[2])throw takeFromExternrefTable0(u[1]);return DeployHash.__wrap(u[0])}toJson(){return wasm.deployhash_toJson(this.__wbg_ptr)}toString(){let s,a;try{const u=wasm.deployhash_toString(this.__wbg_ptr);return s=u[0],a=u[1],getStringFromWasm0(u[0],u[1])}finally{wasm.__wbindgen_free(s,a,1)}}}const DeployStrParamsFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_deploystrparams_free(f>>>0,1));class DeployStrParams{__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,DeployStrParamsFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_deploystrparams_free(s,0)}constructor(s,a,u,g,y,v){const S=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),A=WASM_VECTOR_LEN,M=passStringToWasm0(a,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),B=WASM_VECTOR_LEN;var X=isLikeNone(u)?0:passStringToWasm0(u,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),de=WASM_VECTOR_LEN,le=isLikeNone(g)?0:passStringToWasm0(g,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),ue=WASM_VECTOR_LEN,ot=isLikeNone(y)?0:passStringToWasm0(y,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),rt=WASM_VECTOR_LEN,st=isLikeNone(v)?0:passStringToWasm0(v,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);const Dn=wasm.deploystrparams_new(S,A,M,B,X,de,le,ue,ot,rt,st,WASM_VECTOR_LEN);return this.__wbg_ptr=Dn>>>0,DeployStrParamsFinalization.register(this,this.__wbg_ptr,this),this}get secret_key(){const s=wasm.deploystrparams_secret_key(this.__wbg_ptr);let a;return 0!==s[0]&&(a=getStringFromWasm0(s[0],s[1]).slice(),wasm.__wbindgen_free(s[0],1*s[1],1)),a}set secret_key(s){const a=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.deploystrparams_set_secret_key(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get timestamp(){const s=wasm.deploystrparams_timestamp(this.__wbg_ptr);let a;return 0!==s[0]&&(a=getStringFromWasm0(s[0],s[1]).slice(),wasm.__wbindgen_free(s[0],1*s[1],1)),a}set timestamp(s){var a=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.deploystrparams_set_timestamp(this.__wbg_ptr,a,WASM_VECTOR_LEN)}setDefaultTimestamp(){wasm.deploystrparams_setDefaultTimestamp(this.__wbg_ptr)}get ttl(){const s=wasm.deploystrparams_ttl(this.__wbg_ptr);let a;return 0!==s[0]&&(a=getStringFromWasm0(s[0],s[1]).slice(),wasm.__wbindgen_free(s[0],1*s[1],1)),a}set ttl(s){var a=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.deploystrparams_set_ttl(this.__wbg_ptr,a,WASM_VECTOR_LEN)}setDefaultTTL(){wasm.deploystrparams_setDefaultTTL(this.__wbg_ptr)}get chain_name(){const s=wasm.deploystrparams_chain_name(this.__wbg_ptr);let a;return 0!==s[0]&&(a=getStringFromWasm0(s[0],s[1]).slice(),wasm.__wbindgen_free(s[0],1*s[1],1)),a}set chain_name(s){const a=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.deploystrparams_set_chain_name(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get session_account(){const s=wasm.deploystrparams_session_account(this.__wbg_ptr);let a;return 0!==s[0]&&(a=getStringFromWasm0(s[0],s[1]).slice(),wasm.__wbindgen_free(s[0],1*s[1],1)),a}set session_account(s){const a=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.deploystrparams_set_session_account(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get gas_price_tolerance(){const s=wasm.deploystrparams_gas_price_tolerance(this.__wbg_ptr);let a;return 0!==s[0]&&(a=getStringFromWasm0(s[0],s[1]).slice(),wasm.__wbindgen_free(s[0],1*s[1],1)),a}set gas_price_tolerance(s){const a=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.deploystrparams_set_gas_price_tolerance(this.__wbg_ptr,a,WASM_VECTOR_LEN)}}const DictionaryAddrFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_dictionaryaddr_free(f>>>0,1));class DictionaryAddr{static __wrap(s){s>>>=0;const a=Object.create(DictionaryAddr.prototype);return a.__wbg_ptr=s,DictionaryAddrFinalization.register(a,a.__wbg_ptr,a),a}__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,DictionaryAddrFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_dictionaryaddr_free(s,0)}constructor(s){const a=passArray8ToWasm0(s,wasm.__wbindgen_malloc),g=wasm.dictionaryaddr_new(a,WASM_VECTOR_LEN);if(g[2])throw takeFromExternrefTable0(g[1]);return this.__wbg_ptr=g[0]>>>0,DictionaryAddrFinalization.register(this,this.__wbg_ptr,this),this}}const DictionaryItemIdentifierFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_dictionaryitemidentifier_free(f>>>0,1));class DictionaryItemIdentifier{static __wrap(s){s>>>=0;const a=Object.create(DictionaryItemIdentifier.prototype);return a.__wbg_ptr=s,DictionaryItemIdentifierFinalization.register(a,a.__wbg_ptr,a),a}__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,DictionaryItemIdentifierFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_dictionaryitemidentifier_free(s,0)}static newFromAccountInfo(s,a,u){const g=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),y=WASM_VECTOR_LEN,v=passStringToWasm0(a,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),S=WASM_VECTOR_LEN,A=passStringToWasm0(u,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),B=wasm.dictionaryitemidentifier_newFromAccountInfo(g,y,v,S,A,WASM_VECTOR_LEN);if(B[2])throw takeFromExternrefTable0(B[1]);return DictionaryItemIdentifier.__wrap(B[0])}static newFromContractInfo(s,a,u){const g=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),y=WASM_VECTOR_LEN,v=passStringToWasm0(a,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),S=WASM_VECTOR_LEN,A=passStringToWasm0(u,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),B=wasm.dictionaryitemidentifier_newFromContractInfo(g,y,v,S,A,WASM_VECTOR_LEN);if(B[2])throw takeFromExternrefTable0(B[1]);return DictionaryItemIdentifier.__wrap(B[0])}static newFromEntityInfo(s,a,u){const g=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),y=WASM_VECTOR_LEN,v=passStringToWasm0(a,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),S=WASM_VECTOR_LEN,A=passStringToWasm0(u,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),B=wasm.dictionaryitemidentifier_newFromEntityInfo(g,y,v,S,A,WASM_VECTOR_LEN);if(B[2])throw takeFromExternrefTable0(B[1]);return DictionaryItemIdentifier.__wrap(B[0])}static newFromSeedUref(s,a){const u=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),g=WASM_VECTOR_LEN,y=passStringToWasm0(a,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),S=wasm.dictionaryitemidentifier_newFromSeedUref(u,g,y,WASM_VECTOR_LEN);if(S[2])throw takeFromExternrefTable0(S[1]);return DictionaryItemIdentifier.__wrap(S[0])}static newFromDictionaryKey(s){const a=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),g=wasm.dictionaryitemidentifier_newFromDictionaryKey(a,WASM_VECTOR_LEN);if(g[2])throw takeFromExternrefTable0(g[1]);return DictionaryItemIdentifier.__wrap(g[0])}toJson(){return wasm.dictionaryitemidentifier_toJson(this.__wbg_ptr)}}const DictionaryItemStrParamsFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_dictionaryitemstrparams_free(f>>>0,1));class DictionaryItemStrParams{static __wrap(s){s>>>=0;const a=Object.create(DictionaryItemStrParams.prototype);return a.__wbg_ptr=s,DictionaryItemStrParamsFinalization.register(a,a.__wbg_ptr,a),a}__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,DictionaryItemStrParamsFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_dictionaryitemstrparams_free(s,0)}constructor(){const s=wasm.dictionaryitemstrparams_new();return this.__wbg_ptr=s>>>0,DictionaryItemStrParamsFinalization.register(this,this.__wbg_ptr,this),this}setAccountNamedKey(s,a,u){const g=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),y=WASM_VECTOR_LEN,v=passStringToWasm0(a,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),S=WASM_VECTOR_LEN,A=passStringToWasm0(u,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.dictionaryitemstrparams_setAccountNamedKey(this.__wbg_ptr,g,y,v,S,A,WASM_VECTOR_LEN)}setContractNamedKey(s,a,u){const g=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),y=WASM_VECTOR_LEN,v=passStringToWasm0(a,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),S=WASM_VECTOR_LEN,A=passStringToWasm0(u,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.dictionaryitemstrparams_setContractNamedKey(this.__wbg_ptr,g,y,v,S,A,WASM_VECTOR_LEN)}setEntityNamedKey(s,a,u){const g=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),y=WASM_VECTOR_LEN,v=passStringToWasm0(a,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),S=WASM_VECTOR_LEN,A=passStringToWasm0(u,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.dictionaryitemstrparams_setEntityNamedKey(this.__wbg_ptr,g,y,v,S,A,WASM_VECTOR_LEN)}setUref(s,a){const u=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),g=WASM_VECTOR_LEN,y=passStringToWasm0(a,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.dictionaryitemstrparams_setUref(this.__wbg_ptr,u,g,y,WASM_VECTOR_LEN)}setDictionary(s){const a=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.dictionaryitemstrparams_setDictionary(this.__wbg_ptr,a,WASM_VECTOR_LEN)}toJson(){return wasm.dictionaryitemstrparams_toJson(this.__wbg_ptr)}}const DigestFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_digest_free(f>>>0,1));class Digest{static __wrap(s){s>>>=0;const a=Object.create(Digest.prototype);return a.__wbg_ptr=s,DigestFinalization.register(a,a.__wbg_ptr,a),a}__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,DigestFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_digest_free(s,0)}constructor(s){const a=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),g=wasm.digest_new_js_alias(a,WASM_VECTOR_LEN);if(g[2])throw takeFromExternrefTable0(g[1]);return this.__wbg_ptr=g[0]>>>0,DigestFinalization.register(this,this.__wbg_ptr,this),this}static fromString(s){const a=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),g=wasm.digest_fromString(a,WASM_VECTOR_LEN);if(g[2])throw takeFromExternrefTable0(g[1]);return Digest.__wrap(g[0])}static fromRaw(s){const a=passArray8ToWasm0(s,wasm.__wbindgen_malloc),g=wasm.digest_fromRaw(a,WASM_VECTOR_LEN);if(g[2])throw takeFromExternrefTable0(g[1]);return Digest.__wrap(g[0])}toJson(){return wasm.digest_toJson(this.__wbg_ptr)}toString(){let s,a;try{const u=wasm.digest_toString(this.__wbg_ptr);return s=u[0],a=u[1],getStringFromWasm0(u[0],u[1])}finally{wasm.__wbindgen_free(s,a,1)}}}const EntityAddrFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_entityaddr_free(f>>>0,1));class EntityAddr{static __wrap(s){s>>>=0;const a=Object.create(EntityAddr.prototype);return a.__wbg_ptr=s,EntityAddrFinalization.register(a,a.__wbg_ptr,a),a}__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,EntityAddrFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_entityaddr_free(s,0)}static fromFormattedStr(s){const a=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),g=wasm.entityaddr_fromFormattedStr(a,WASM_VECTOR_LEN);if(g[2])throw takeFromExternrefTable0(g[1]);return EntityAddr.__wrap(g[0])}toFormattedString(){let s,a;try{const u=wasm.entityaddr_toFormattedString(this.__wbg_ptr);return s=u[0],a=u[1],getStringFromWasm0(u[0],u[1])}finally{wasm.__wbindgen_free(s,a,1)}}toHexString(){let s,a;try{const u=wasm.entityaddr_toHexString(this.__wbg_ptr);return s=u[0],a=u[1],getStringFromWasm0(u[0],u[1])}finally{wasm.__wbindgen_free(s,a,1)}}toJson(){return wasm.entityaddr_toJson(this.__wbg_ptr)}}const EntityIdentifierFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_entityidentifier_free(f>>>0,1));class EntityIdentifier{static __wrap(s){s>>>=0;const a=Object.create(EntityIdentifier.prototype);return a.__wbg_ptr=s,EntityIdentifierFinalization.register(a,a.__wbg_ptr,a),a}__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,EntityIdentifierFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_entityidentifier_free(s,0)}constructor(s){const a=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),g=wasm.entityidentifier_new_js_alias(a,WASM_VECTOR_LEN);if(g[2])throw takeFromExternrefTable0(g[1]);return this.__wbg_ptr=g[0]>>>0,EntityIdentifierFinalization.register(this,this.__wbg_ptr,this),this}static fromFormattedStr(s){const a=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),g=wasm.entityidentifier_fromFormattedStr(a,WASM_VECTOR_LEN);if(g[2])throw takeFromExternrefTable0(g[1]);return EntityIdentifier.__wrap(g[0])}static fromPublicKey(s){_assertClass(s,PublicKey);var a=s.__destroy_into_raw();const u=wasm.entityidentifier_fromPublicKey(a);return EntityIdentifier.__wrap(u)}static fromAccountHash(s){_assertClass(s,AccountHash);var a=s.__destroy_into_raw();const u=wasm.entityidentifier_fromAccountHash(a);return EntityIdentifier.__wrap(u)}static fromEntityAddr(s){_assertClass(s,EntityAddr);var a=s.__destroy_into_raw();const u=wasm.entityidentifier_fromEntityAddr(a);return EntityIdentifier.__wrap(u)}toJson(){return wasm.entityidentifier_toJson(this.__wbg_ptr)}}const EraIdFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_eraid_free(f>>>0,1));class EraId{__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,EraIdFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_eraid_free(s,0)}constructor(s){const a=wasm.eraid_new(s);return this.__wbg_ptr=a>>>0,EraIdFinalization.register(this,this.__wbg_ptr,this),this}value(){const s=wasm.eraid_value(this.__wbg_ptr);return BigInt.asUintN(64,s)}}const EventParseResultFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_eventparseresult_free(f>>>0,1));class EventParseResult{__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,EventParseResultFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_eventparseresult_free(s,0)}get err(){const s=wasm.__wbg_get_eventparseresult_err(this.__wbg_ptr);let a;return 0!==s[0]&&(a=getStringFromWasm0(s[0],s[1]).slice(),wasm.__wbindgen_free(s[0],1*s[1],1)),a}set err(s){var a=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.__wbg_set_eventparseresult_err(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get body(){const s=wasm.__wbg_get_eventparseresult_body(this.__wbg_ptr);return 0===s?void 0:Body.__wrap(s)}set body(s){let a=0;isLikeNone(s)||(_assertClass(s,Body),a=s.__destroy_into_raw()),wasm.__wbg_set_eventparseresult_body(this.__wbg_ptr,a)}}const ExecutionResultFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_executionresult_free(f>>>0,1));class ExecutionResult{static __wrap(s){s>>>=0;const a=Object.create(ExecutionResult.prototype);return a.__wbg_ptr=s,ExecutionResultFinalization.register(a,a.__wbg_ptr,a),a}__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,ExecutionResultFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_executionresult_free(s,0)}get Success(){const s=wasm.__wbg_get_executionresult_Success(this.__wbg_ptr);return 0===s?void 0:Version2.__wrap(s)}set Success(s){let a=0;isLikeNone(s)||(_assertClass(s,Version2),a=s.__destroy_into_raw()),wasm.__wbg_set_executionresult_Success(this.__wbg_ptr,a)}get Failure(){const s=wasm.__wbg_get_executionresult_Failure(this.__wbg_ptr);return 0===s?void 0:Failure.__wrap(s)}set Failure(s){let a=0;isLikeNone(s)||(_assertClass(s,Failure),a=s.__destroy_into_raw()),wasm.__wbg_set_executionresult_Failure(this.__wbg_ptr,a)}}const FailureFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_failure_free(f>>>0,1));class Failure{static __wrap(s){s>>>=0;const a=Object.create(Failure.prototype);return a.__wbg_ptr=s,FailureFinalization.register(a,a.__wbg_ptr,a),a}__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,FailureFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_failure_free(s,0)}get cost(){let s,a;try{const u=wasm.__wbg_get_failure_cost(this.__wbg_ptr);return s=u[0],a=u[1],getStringFromWasm0(u[0],u[1])}finally{wasm.__wbindgen_free(s,a,1)}}set cost(s){const a=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.__wbg_set_failure_cost(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get error_message(){let s,a;try{const u=wasm.__wbg_get_failure_error_message(this.__wbg_ptr);return s=u[0],a=u[1],getStringFromWasm0(u[0],u[1])}finally{wasm.__wbindgen_free(s,a,1)}}set error_message(s){const a=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.__wbg_set_failure_error_message(this.__wbg_ptr,a,WASM_VECTOR_LEN)}}const GetAccountResultFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_getaccountresult_free(f>>>0,1));class GetAccountResult{static __wrap(s){s>>>=0;const a=Object.create(GetAccountResult.prototype);return a.__wbg_ptr=s,GetAccountResultFinalization.register(a,a.__wbg_ptr,a),a}__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,GetAccountResultFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_getaccountresult_free(s,0)}get api_version(){return wasm.getaccountresult_api_version(this.__wbg_ptr)}get account(){return wasm.getaccountresult_account(this.__wbg_ptr)}get merkle_proof(){let s,a;try{const u=wasm.getaccountresult_merkle_proof(this.__wbg_ptr);return s=u[0],a=u[1],getStringFromWasm0(u[0],u[1])}finally{wasm.__wbindgen_free(s,a,1)}}toJson(){return wasm.getaccountresult_toJson(this.__wbg_ptr)}}const GetAddressableEntityResultFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_getaddressableentityresult_free(f>>>0,1));class GetAddressableEntityResult{static __wrap(s){s>>>=0;const a=Object.create(GetAddressableEntityResult.prototype);return a.__wbg_ptr=s,GetAddressableEntityResultFinalization.register(a,a.__wbg_ptr,a),a}__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,GetAddressableEntityResultFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_getaddressableentityresult_free(s,0)}get api_version(){return wasm.getaddressableentityresult_api_version(this.__wbg_ptr)}get entity_result(){return wasm.getaddressableentityresult_entity_result(this.__wbg_ptr)}get merkle_proof(){let s,a;try{const u=wasm.getaddressableentityresult_merkle_proof(this.__wbg_ptr);return s=u[0],a=u[1],getStringFromWasm0(u[0],u[1])}finally{wasm.__wbindgen_free(s,a,1)}}toJson(){return wasm.getaddressableentityresult_toJson(this.__wbg_ptr)}}const GetAuctionInfoResultFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_getauctioninforesult_free(f>>>0,1));class GetAuctionInfoResult{static __wrap(s){s>>>=0;const a=Object.create(GetAuctionInfoResult.prototype);return a.__wbg_ptr=s,GetAuctionInfoResultFinalization.register(a,a.__wbg_ptr,a),a}__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,GetAuctionInfoResultFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_getauctioninforesult_free(s,0)}get api_version(){return wasm.getauctioninforesult_api_version(this.__wbg_ptr)}get auction_state(){return wasm.getauctioninforesult_auction_state(this.__wbg_ptr)}toJson(){return wasm.getauctioninforesult_toJson(this.__wbg_ptr)}}const GetBalanceResultFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_getbalanceresult_free(f>>>0,1));class GetBalanceResult{static __wrap(s){s>>>=0;const a=Object.create(GetBalanceResult.prototype);return a.__wbg_ptr=s,GetBalanceResultFinalization.register(a,a.__wbg_ptr,a),a}__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,GetBalanceResultFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_getbalanceresult_free(s,0)}get api_version(){return wasm.getbalanceresult_api_version(this.__wbg_ptr)}get balance_value(){return wasm.getbalanceresult_balance_value(this.__wbg_ptr)}get merkle_proof(){let s,a;try{const u=wasm.getbalanceresult_merkle_proof(this.__wbg_ptr);return s=u[0],a=u[1],getStringFromWasm0(u[0],u[1])}finally{wasm.__wbindgen_free(s,a,1)}}toJson(){return wasm.getbalanceresult_toJson(this.__wbg_ptr)}}const GetBlockResultFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_getblockresult_free(f>>>0,1));class GetBlockResult{static __wrap(s){s>>>=0;const a=Object.create(GetBlockResult.prototype);return a.__wbg_ptr=s,GetBlockResultFinalization.register(a,a.__wbg_ptr,a),a}__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,GetBlockResultFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_getblockresult_free(s,0)}get api_version(){return wasm.getblockresult_api_version(this.__wbg_ptr)}get block(){return wasm.getblockresult_block(this.__wbg_ptr)}toJson(){return wasm.getblockresult_toJson(this.__wbg_ptr)}}const GetBlockTransfersResultFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_getblocktransfersresult_free(f>>>0,1));class GetBlockTransfersResult{static __wrap(s){s>>>=0;const a=Object.create(GetBlockTransfersResult.prototype);return a.__wbg_ptr=s,GetBlockTransfersResultFinalization.register(a,a.__wbg_ptr,a),a}__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,GetBlockTransfersResultFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_getblocktransfersresult_free(s,0)}get api_version(){return wasm.getblocktransfersresult_api_version(this.__wbg_ptr)}get block_hash(){const s=wasm.getblocktransfersresult_block_hash(this.__wbg_ptr);return 0===s?void 0:BlockHash.__wrap(s)}get transfers(){return wasm.getblocktransfersresult_transfers(this.__wbg_ptr)}toJson(){return wasm.getblocktransfersresult_toJson(this.__wbg_ptr)}}const GetChainspecResultFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_getchainspecresult_free(f>>>0,1));class GetChainspecResult{static __wrap(s){s>>>=0;const a=Object.create(GetChainspecResult.prototype);return a.__wbg_ptr=s,GetChainspecResultFinalization.register(a,a.__wbg_ptr,a),a}__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,GetChainspecResultFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_getchainspecresult_free(s,0)}get api_version(){return wasm.getchainspecresult_api_version(this.__wbg_ptr)}get chainspec_bytes(){return wasm.getchainspecresult_chainspec_bytes(this.__wbg_ptr)}toJson(){return wasm.getchainspecresult_toJson(this.__wbg_ptr)}}const GetDeployResultFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_getdeployresult_free(f>>>0,1));class GetDeployResult{static __wrap(s){s>>>=0;const a=Object.create(GetDeployResult.prototype);return a.__wbg_ptr=s,GetDeployResultFinalization.register(a,a.__wbg_ptr,a),a}__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,GetDeployResultFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_getdeployresult_free(s,0)}get api_version(){return wasm.getdeployresult_api_version(this.__wbg_ptr)}get deploy(){const s=wasm.getdeployresult_deploy(this.__wbg_ptr);return Deploy.__wrap(s)}get execution_info(){return wasm.getdeployresult_execution_info(this.__wbg_ptr)}toJson(){return wasm.getdeployresult_toJson(this.__wbg_ptr)}}const GetDictionaryItemResultFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_getdictionaryitemresult_free(f>>>0,1));class GetDictionaryItemResult{static __wrap(s){s>>>=0;const a=Object.create(GetDictionaryItemResult.prototype);return a.__wbg_ptr=s,GetDictionaryItemResultFinalization.register(a,a.__wbg_ptr,a),a}__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,GetDictionaryItemResultFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_getdictionaryitemresult_free(s,0)}get api_version(){return wasm.getdictionaryitemresult_api_version(this.__wbg_ptr)}get dictionary_key(){let s,a;try{const u=wasm.getdictionaryitemresult_dictionary_key(this.__wbg_ptr);return s=u[0],a=u[1],getStringFromWasm0(u[0],u[1])}finally{wasm.__wbindgen_free(s,a,1)}}get stored_value(){return wasm.getdictionaryitemresult_stored_value(this.__wbg_ptr)}get merkle_proof(){let s,a;try{const u=wasm.getdictionaryitemresult_merkle_proof(this.__wbg_ptr);return s=u[0],a=u[1],getStringFromWasm0(u[0],u[1])}finally{wasm.__wbindgen_free(s,a,1)}}toJson(){return wasm.getdictionaryitemresult_toJson(this.__wbg_ptr)}}const GetEraInfoResultFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_geterainforesult_free(f>>>0,1));class GetEraInfoResult{static __wrap(s){s>>>=0;const a=Object.create(GetEraInfoResult.prototype);return a.__wbg_ptr=s,GetEraInfoResultFinalization.register(a,a.__wbg_ptr,a),a}__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,GetEraInfoResultFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_geterainforesult_free(s,0)}get api_version(){return wasm.geterainforesult_api_version(this.__wbg_ptr)}get era_summary(){return wasm.geterainforesult_era_summary(this.__wbg_ptr)}toJson(){return wasm.geterainforesult_toJson(this.__wbg_ptr)}}const GetEraSummaryResultFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_geterasummaryresult_free(f>>>0,1));class GetEraSummaryResult{static __wrap(s){s>>>=0;const a=Object.create(GetEraSummaryResult.prototype);return a.__wbg_ptr=s,GetEraSummaryResultFinalization.register(a,a.__wbg_ptr,a),a}__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,GetEraSummaryResultFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_geterasummaryresult_free(s,0)}get api_version(){return wasm.geterasummaryresult_api_version(this.__wbg_ptr)}get era_summary(){return wasm.geterasummaryresult_era_summary(this.__wbg_ptr)}toJson(){return wasm.geterasummaryresult_toJson(this.__wbg_ptr)}}const GetNodeStatusResultFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_getnodestatusresult_free(f>>>0,1));class GetNodeStatusResult{static __wrap(s){s>>>=0;const a=Object.create(GetNodeStatusResult.prototype);return a.__wbg_ptr=s,GetNodeStatusResultFinalization.register(a,a.__wbg_ptr,a),a}__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,GetNodeStatusResultFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_getnodestatusresult_free(s,0)}get api_version(){return wasm.getnodestatusresult_api_version(this.__wbg_ptr)}get chainspec_name(){let s,a;try{const u=wasm.getnodestatusresult_chainspec_name(this.__wbg_ptr);return s=u[0],a=u[1],getStringFromWasm0(u[0],u[1])}finally{wasm.__wbindgen_free(s,a,1)}}get starting_state_root_hash(){const s=wasm.getnodestatusresult_starting_state_root_hash(this.__wbg_ptr);return Digest.__wrap(s)}get peers(){return wasm.getnodestatusresult_peers(this.__wbg_ptr)}get last_added_block_info(){return wasm.getnodestatusresult_last_added_block_info(this.__wbg_ptr)}get our_public_signing_key(){const s=wasm.getnodestatusresult_our_public_signing_key(this.__wbg_ptr);return 0===s?void 0:PublicKey.__wrap(s)}get round_length(){return wasm.getnodestatusresult_round_length(this.__wbg_ptr)}get next_upgrade(){return wasm.getnodestatusresult_next_upgrade(this.__wbg_ptr)}get build_version(){let s,a;try{const u=wasm.getnodestatusresult_build_version(this.__wbg_ptr);return s=u[0],a=u[1],getStringFromWasm0(u[0],u[1])}finally{wasm.__wbindgen_free(s,a,1)}}get uptime(){return wasm.getnodestatusresult_uptime(this.__wbg_ptr)}get reactor_state(){return wasm.getnodestatusresult_reactor_state(this.__wbg_ptr)}get last_progress(){return wasm.getnodestatusresult_last_progress(this.__wbg_ptr)}get available_block_range(){return wasm.getnodestatusresult_available_block_range(this.__wbg_ptr)}get block_sync(){return wasm.getnodestatusresult_block_sync(this.__wbg_ptr)}toJson(){return wasm.getnodestatusresult_toJson(this.__wbg_ptr)}}const GetPeersResultFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_getpeersresult_free(f>>>0,1));class GetPeersResult{static __wrap(s){s>>>=0;const a=Object.create(GetPeersResult.prototype);return a.__wbg_ptr=s,GetPeersResultFinalization.register(a,a.__wbg_ptr,a),a}__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,GetPeersResultFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_getpeersresult_free(s,0)}get api_version(){return wasm.getpeersresult_api_version(this.__wbg_ptr)}get peers(){return wasm.getpeersresult_peers(this.__wbg_ptr)}toJson(){return wasm.getpeersresult_toJson(this.__wbg_ptr)}}const GetStateRootHashResultFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_getstateroothashresult_free(f>>>0,1));class GetStateRootHashResult{static __wrap(s){s>>>=0;const a=Object.create(GetStateRootHashResult.prototype);return a.__wbg_ptr=s,GetStateRootHashResultFinalization.register(a,a.__wbg_ptr,a),a}__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,GetStateRootHashResultFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_getstateroothashresult_free(s,0)}get api_version(){return wasm.getstateroothashresult_api_version(this.__wbg_ptr)}get state_root_hash(){const s=wasm.getstateroothashresult_state_root_hash(this.__wbg_ptr);return 0===s?void 0:Digest.__wrap(s)}get state_root_hash_as_string(){let s,a;try{const u=wasm.getstateroothashresult_state_root_hash_as_string(this.__wbg_ptr);return s=u[0],a=u[1],getStringFromWasm0(u[0],u[1])}finally{wasm.__wbindgen_free(s,a,1)}}toString(){let s,a;try{const u=wasm.getstateroothashresult_toString(this.__wbg_ptr);return s=u[0],a=u[1],getStringFromWasm0(u[0],u[1])}finally{wasm.__wbindgen_free(s,a,1)}}toJson(){return wasm.getstateroothashresult_toJson(this.__wbg_ptr)}}const GetTransactionResultFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_gettransactionresult_free(f>>>0,1));class GetTransactionResult{static __wrap(s){s>>>=0;const a=Object.create(GetTransactionResult.prototype);return a.__wbg_ptr=s,GetTransactionResultFinalization.register(a,a.__wbg_ptr,a),a}__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,GetTransactionResultFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_gettransactionresult_free(s,0)}get api_version(){return wasm.gettransactionresult_api_version(this.__wbg_ptr)}get transaction(){const s=wasm.gettransactionresult_transaction(this.__wbg_ptr);return Transaction.__wrap(s)}get execution_info(){return wasm.gettransactionresult_execution_info(this.__wbg_ptr)}toJson(){return wasm.gettransactionresult_toJson(this.__wbg_ptr)}}const GetValidatorChangesResultFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_getvalidatorchangesresult_free(f>>>0,1));class GetValidatorChangesResult{static __wrap(s){s>>>=0;const a=Object.create(GetValidatorChangesResult.prototype);return a.__wbg_ptr=s,GetValidatorChangesResultFinalization.register(a,a.__wbg_ptr,a),a}__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,GetValidatorChangesResultFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_getvalidatorchangesresult_free(s,0)}get api_version(){return wasm.getvalidatorchangesresult_api_version(this.__wbg_ptr)}get changes(){return wasm.getvalidatorchangesresult_changes(this.__wbg_ptr)}toJson(){return wasm.getvalidatorchangesresult_toJson(this.__wbg_ptr)}}const GlobalStateIdentifierFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_globalstateidentifier_free(f>>>0,1));class GlobalStateIdentifier{static __wrap(s){s>>>=0;const a=Object.create(GlobalStateIdentifier.prototype);return a.__wbg_ptr=s,GlobalStateIdentifierFinalization.register(a,a.__wbg_ptr,a),a}__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,GlobalStateIdentifierFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_globalstateidentifier_free(s,0)}constructor(s){_assertClass(s,GlobalStateIdentifier);var a=s.__destroy_into_raw();const u=wasm.globalstateidentifier_new(a);return this.__wbg_ptr=u>>>0,GlobalStateIdentifierFinalization.register(this,this.__wbg_ptr,this),this}static fromBlockHash(s){_assertClass(s,BlockHash);var a=s.__destroy_into_raw();const u=wasm.globalstateidentifier_fromBlockHash(a);return GlobalStateIdentifier.__wrap(u)}static fromBlockHeight(s){const a=wasm.globalstateidentifier_fromBlockHeight(s);return GlobalStateIdentifier.__wrap(a)}static fromStateRootHash(s){_assertClass(s,Digest);var a=s.__destroy_into_raw();const u=wasm.globalstateidentifier_fromStateRootHash(a);return GlobalStateIdentifier.__wrap(u)}toJson(){return wasm.globalstateidentifier_toJson(this.__wbg_ptr)}}const HashAddrFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_hashaddr_free(f>>>0,1));class HashAddr{static __wrap(s){s>>>=0;const a=Object.create(HashAddr.prototype);return a.__wbg_ptr=s,HashAddrFinalization.register(a,a.__wbg_ptr,a),a}__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,HashAddrFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_hashaddr_free(s,0)}constructor(s){const a=passArray8ToWasm0(s,wasm.__wbindgen_malloc),g=wasm.hashaddr_new(a,WASM_VECTOR_LEN);if(g[2])throw takeFromExternrefTable0(g[1]);return this.__wbg_ptr=g[0]>>>0,HashAddrFinalization.register(this,this.__wbg_ptr,this),this}toBytes(){const s=wasm.hashaddr_toBytes(this.__wbg_ptr);var a=getArrayU8FromWasm0(s[0],s[1]).slice();return wasm.__wbindgen_free(s[0],1*s[1],1),a}toHexString(){let s,a;try{const u=wasm.hashaddr_toHexString(this.__wbg_ptr);return s=u[0],a=u[1],getStringFromWasm0(u[0],u[1])}finally{wasm.__wbindgen_free(s,a,1)}}}const HashStringFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_hashstring_free(f>>>0,1));class HashString{static __wrap(s){s>>>=0;const a=Object.create(HashString.prototype);return a.__wbg_ptr=s,HashStringFinalization.register(a,a.__wbg_ptr,a),a}__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,HashStringFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_hashstring_free(s,0)}get hash(){let s,a;try{const u=wasm.__wbg_get_hashstring_hash(this.__wbg_ptr);return s=u[0],a=u[1],getStringFromWasm0(u[0],u[1])}finally{wasm.__wbindgen_free(s,a,1)}}set hash(s){const a=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.__wbg_set_failure_cost(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get Deploy(){let s,a;try{const u=wasm.hashstring_Deploy(this.__wbg_ptr);return s=u[0],a=u[1],getStringFromWasm0(u[0],u[1])}finally{wasm.__wbindgen_free(s,a,1)}}get Version1(){let s,a;try{const u=wasm.hashstring_Version1(this.__wbg_ptr);return s=u[0],a=u[1],getStringFromWasm0(u[0],u[1])}finally{wasm.__wbindgen_free(s,a,1)}}toString(){let s,a;try{const u=wasm.hashstring_toString(this.__wbg_ptr);return s=u[0],a=u[1],getStringFromWasm0(u[0],u[1])}finally{wasm.__wbindgen_free(s,a,1)}}}const IntoUnderlyingByteSourceFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_intounderlyingbytesource_free(f>>>0,1));class IntoUnderlyingByteSource{__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,IntoUnderlyingByteSourceFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_intounderlyingbytesource_free(s,0)}get type(){const s=wasm.intounderlyingbytesource_type(this.__wbg_ptr);return __wbindgen_enum_ReadableStreamType[s]}get autoAllocateChunkSize(){return wasm.intounderlyingbytesource_autoAllocateChunkSize(this.__wbg_ptr)>>>0}start(s){wasm.intounderlyingbytesource_start(this.__wbg_ptr,s)}pull(s){return wasm.intounderlyingbytesource_pull(this.__wbg_ptr,s)}cancel(){const s=this.__destroy_into_raw();wasm.intounderlyingbytesource_cancel(s)}}const IntoUnderlyingSinkFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_intounderlyingsink_free(f>>>0,1));class IntoUnderlyingSink{__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,IntoUnderlyingSinkFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_intounderlyingsink_free(s,0)}write(s){return wasm.intounderlyingsink_write(this.__wbg_ptr,s)}close(){const s=this.__destroy_into_raw();return wasm.intounderlyingsink_close(s)}abort(s){const a=this.__destroy_into_raw();return wasm.intounderlyingsink_abort(a,s)}}const IntoUnderlyingSourceFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_intounderlyingsource_free(f>>>0,1));class IntoUnderlyingSource{__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,IntoUnderlyingSourceFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_intounderlyingsource_free(s,0)}pull(s){return wasm.intounderlyingsource_pull(this.__wbg_ptr,s)}cancel(){const s=this.__destroy_into_raw();wasm.intounderlyingsource_cancel(s)}}const KeyFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_key_free(f>>>0,1));class Key{static __wrap(s){s>>>=0;const a=Object.create(Key.prototype);return a.__wbg_ptr=s,KeyFinalization.register(a,a.__wbg_ptr,a),a}__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,KeyFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_key_free(s,0)}constructor(s){_assertClass(s,Key);var a=s.__destroy_into_raw();const u=wasm.key_new(a);if(u[2])throw takeFromExternrefTable0(u[1]);return this.__wbg_ptr=u[0]>>>0,KeyFinalization.register(this,this.__wbg_ptr,this),this}toJson(){return wasm.key_toJson(this.__wbg_ptr)}static fromURef(s){_assertClass(s,URef);var a=s.__destroy_into_raw();const u=wasm.key_fromURef(a);return Key.__wrap(u)}static fromDeployInfo(s){_assertClass(s,DeployHash);var a=s.__destroy_into_raw();const u=wasm.key_fromDeployInfo(a);return Key.__wrap(u)}static fromAccount(s){_assertClass(s,AccountHash);var a=s.__destroy_into_raw();const u=wasm.key_fromAccount(a);return Key.__wrap(u)}static fromHash(s){_assertClass(s,HashAddr);var a=s.__destroy_into_raw();const u=wasm.key_fromHash(a);return Key.__wrap(u)}static fromTransfer(s){const a=passArray8ToWasm0(s,wasm.__wbindgen_malloc),g=wasm.key_fromTransfer(a,WASM_VECTOR_LEN);return TransferAddr.__wrap(g)}static fromEraInfo(s){_assertClass(s,EraId);var a=s.__destroy_into_raw();const u=wasm.key_fromEraInfo(a);return Key.__wrap(u)}static fromBalance(s){_assertClass(s,URefAddr);var a=s.__destroy_into_raw();const u=wasm.key_fromBalance(a);return Key.__wrap(u)}static fromBid(s){_assertClass(s,AccountHash);var a=s.__destroy_into_raw();const u=wasm.key_fromBid(a);return Key.__wrap(u)}static fromWithdraw(s){_assertClass(s,AccountHash);var a=s.__destroy_into_raw();const u=wasm.key_fromWithdraw(a);return Key.__wrap(u)}static fromDictionaryAddr(s){_assertClass(s,DictionaryAddr);var a=s.__destroy_into_raw();const u=wasm.key_fromDictionaryAddr(a);return Key.__wrap(u)}asDictionaryAddr(){const s=wasm.key_asDictionaryAddr(this.__wbg_ptr);return 0===s?void 0:DictionaryAddr.__wrap(s)}static fromSystemEntityRegistry(){const s=wasm.key_fromSystemEntityRegistry();return Key.__wrap(s)}static fromEraSummary(){const s=wasm.key_fromEraSummary();return Key.__wrap(s)}static fromUnbond(s){_assertClass(s,AccountHash);var a=s.__destroy_into_raw();const u=wasm.key_fromUnbond(a);return Key.__wrap(u)}static fromChainspecRegistry(){const s=wasm.key_fromChainspecRegistry();return Key.__wrap(s)}static fromChecksumRegistry(){const s=wasm.key_fromChecksumRegistry();return Key.__wrap(s)}toFormattedString(){let s,a;try{const u=wasm.key_toFormattedString(this.__wbg_ptr);return s=u[0],a=u[1],getStringFromWasm0(u[0],u[1])}finally{wasm.__wbindgen_free(s,a,1)}}static fromFormattedString(s){const a=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),g=wasm.key_fromFormattedString(a,WASM_VECTOR_LEN);if(g[2])throw takeFromExternrefTable0(g[1]);return Key.__wrap(g[0])}static fromDictionaryKey(s,a){_assertClass(s,URef);var u=s.__destroy_into_raw();const g=passArray8ToWasm0(a,wasm.__wbindgen_malloc),v=wasm.key_fromDictionaryKey(u,g,WASM_VECTOR_LEN);return Key.__wrap(v)}isDictionaryKey(){return 0!==wasm.key_isDictionaryKey(this.__wbg_ptr)}intoAccount(){const s=this.__destroy_into_raw(),a=wasm.key_intoAccount(s);return 0===a?void 0:AccountHash.__wrap(a)}intoHash(){const s=this.__destroy_into_raw(),a=wasm.key_intoHash(s);return 0===a?void 0:HashAddr.__wrap(a)}asBalance(){const s=wasm.key_asBalance(this.__wbg_ptr);return 0===s?void 0:URefAddr.__wrap(s)}intoURef(){const s=this.__destroy_into_raw(),a=wasm.key_intoURef(s);return 0===a?void 0:URef.__wrap(a)}urefToHash(){const s=wasm.key_urefToHash(this.__wbg_ptr);return 0===s?void 0:Key.__wrap(s)}withdrawToUnbond(){const s=wasm.key_withdrawToUnbond(this.__wbg_ptr);return 0===s?void 0:Key.__wrap(s)}}const ListRpcsResultFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_listrpcsresult_free(f>>>0,1));class ListRpcsResult{static __wrap(s){s>>>=0;const a=Object.create(ListRpcsResult.prototype);return a.__wbg_ptr=s,ListRpcsResultFinalization.register(a,a.__wbg_ptr,a),a}__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,ListRpcsResultFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_listrpcsresult_free(s,0)}get api_version(){return wasm.listrpcsresult_api_version(this.__wbg_ptr)}get name(){let s,a;try{const u=wasm.listrpcsresult_name(this.__wbg_ptr);return s=u[0],a=u[1],getStringFromWasm0(u[0],u[1])}finally{wasm.__wbindgen_free(s,a,1)}}get schema(){return wasm.listrpcsresult_schema(this.__wbg_ptr)}toJson(){return wasm.listrpcsresult_toJson(this.__wbg_ptr)}}const MessageFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_message_free(f>>>0,1));class Message{static __wrap(s){s>>>=0;const a=Object.create(Message.prototype);return a.__wbg_ptr=s,MessageFinalization.register(a,a.__wbg_ptr,a),a}__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,MessageFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_message_free(s,0)}get String(){let s,a;try{const u=wasm.__wbg_get_message_String(this.__wbg_ptr);return s=u[0],a=u[1],getStringFromWasm0(u[0],u[1])}finally{wasm.__wbindgen_free(s,a,1)}}set String(s){const a=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.__wbg_set_failure_cost(this.__wbg_ptr,a,WASM_VECTOR_LEN)}}const MessagesFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_messages_free(f>>>0,1));class Messages{static __wrap(s){s>>>=0;const a=Object.create(Messages.prototype);return a.__wbg_ptr=s,MessagesFinalization.register(a,a.__wbg_ptr,a),a}static __unwrap(s){return s instanceof Messages?s.__destroy_into_raw():0}__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,MessagesFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_messages_free(s,0)}get entity_hash(){let s,a;try{const u=wasm.__wbg_get_messages_entity_hash(this.__wbg_ptr);return s=u[0],a=u[1],getStringFromWasm0(u[0],u[1])}finally{wasm.__wbindgen_free(s,a,1)}}set entity_hash(s){const a=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.__wbg_set_messages_entity_hash(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get message(){const s=wasm.__wbg_get_messages_message(this.__wbg_ptr);return Message.__wrap(s)}set message(s){_assertClass(s,Message);var a=s.__destroy_into_raw();wasm.__wbg_set_messages_message(this.__wbg_ptr,a)}get topic_name(){let s,a;try{const u=wasm.__wbg_get_messages_topic_name(this.__wbg_ptr);return s=u[0],a=u[1],getStringFromWasm0(u[0],u[1])}finally{wasm.__wbindgen_free(s,a,1)}}set topic_name(s){const a=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.__wbg_set_messages_topic_name(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get topic_name_hash(){let s,a;try{const u=wasm.__wbg_get_messages_topic_name_hash(this.__wbg_ptr);return s=u[0],a=u[1],getStringFromWasm0(u[0],u[1])}finally{wasm.__wbindgen_free(s,a,1)}}set topic_name_hash(s){const a=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.__wbg_set_messages_topic_name_hash(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get topic_index(){return wasm.__wbg_get_messages_topic_index(this.__wbg_ptr)>>>0}set topic_index(s){wasm.__wbg_set_messages_topic_index(this.__wbg_ptr,s)}get block_index(){const s=wasm.__wbg_get_messages_block_index(this.__wbg_ptr);return BigInt.asUintN(64,s)}set block_index(s){wasm.__wbg_set_messages_block_index(this.__wbg_ptr,s)}}const PackageHashFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_packagehash_free(f>>>0,1));class PackageHash{static __wrap(s){s>>>=0;const a=Object.create(PackageHash.prototype);return a.__wbg_ptr=s,PackageHashFinalization.register(a,a.__wbg_ptr,a),a}__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,PackageHashFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_packagehash_free(s,0)}constructor(s){const a=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),g=wasm.packagehash_new_js_alias(a,WASM_VECTOR_LEN);if(g[2])throw takeFromExternrefTable0(g[1]);return this.__wbg_ptr=g[0]>>>0,PackageHashFinalization.register(this,this.__wbg_ptr,this),this}static fromFormattedStr(s){const a=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),g=wasm.packagehash_fromFormattedStr(a,WASM_VECTOR_LEN);if(g[2])throw takeFromExternrefTable0(g[1]);return PackageHash.__wrap(g[0])}toFormattedString(){let s,a;try{const u=wasm.packagehash_toFormattedString(this.__wbg_ptr);return s=u[0],a=u[1],getStringFromWasm0(u[0],u[1])}finally{wasm.__wbindgen_free(s,a,1)}}static fromUint8Array(s){const a=passArray8ToWasm0(s,wasm.__wbindgen_malloc),g=wasm.packagehash_fromUint8Array(a,WASM_VECTOR_LEN);return PackageHash.__wrap(g)}}const PathFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_path_free(f>>>0,1));class Path{static __wrap(s){s>>>=0;const a=Object.create(Path.prototype);return a.__wbg_ptr=s,PathFinalization.register(a,a.__wbg_ptr,a),a}__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,PathFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_path_free(s,0)}constructor(s){const a=wasm.path_new(s);return this.__wbg_ptr=a>>>0,PathFinalization.register(this,this.__wbg_ptr,this),this}static fromArray(s){const a=wasm.path_fromArray(s);return Path.__wrap(a)}toJson(){return wasm.path_toJson(this.__wbg_ptr)}toString(){let s,a;try{const u=wasm.path_toString(this.__wbg_ptr);return s=u[0],a=u[1],getStringFromWasm0(u[0],u[1])}finally{wasm.__wbindgen_free(s,a,1)}}is_empty(){return 0!==wasm.path_is_empty(this.__wbg_ptr)}}const PaymentFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_payment_free(f>>>0,1));class Payment{__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,PaymentFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_payment_free(s,0)}get source(){let s,a;try{const u=wasm.__wbg_get_payment_source(this.__wbg_ptr);return s=u[0],a=u[1],getStringFromWasm0(u[0],u[1])}finally{wasm.__wbindgen_free(s,a,1)}}set source(s){const a=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.__wbg_set_failure_cost(this.__wbg_ptr,a,WASM_VECTOR_LEN)}}const PaymentStrParamsFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_paymentstrparams_free(f>>>0,1));class PaymentStrParams{__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,PaymentStrParamsFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_paymentstrparams_free(s,0)}constructor(s,a,u,g,y,v,S,A,M,B){var X=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),de=WASM_VECTOR_LEN,le=isLikeNone(a)?0:passStringToWasm0(a,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),ue=WASM_VECTOR_LEN,ot=isLikeNone(u)?0:passStringToWasm0(u,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),rt=WASM_VECTOR_LEN,st=isLikeNone(g)?0:passStringToWasm0(g,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),Ft=WASM_VECTOR_LEN,Dn=isLikeNone(y)?0:passStringToWasm0(y,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),Tn=WASM_VECTOR_LEN,Gn=isLikeNone(v)?0:passStringToWasm0(v,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),In=WASM_VECTOR_LEN,qn=isLikeNone(A)?0:passStringToWasm0(A,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),_r=WASM_VECTOR_LEN,Mn=isLikeNone(M)?0:passStringToWasm0(M,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),ln=WASM_VECTOR_LEN,Nn=isLikeNone(B)?0:passStringToWasm0(B,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),dr=WASM_VECTOR_LEN;const fr=wasm.paymentstrparams_new(X,de,le,ue,ot,rt,st,Ft,Dn,Tn,Gn,In,isLikeNone(S)?0:addToExternrefTable0(S),qn,_r,Mn,ln,Nn,dr);return this.__wbg_ptr=fr>>>0,PaymentStrParamsFinalization.register(this,this.__wbg_ptr,this),this}get payment_amount(){const s=wasm.paymentstrparams_payment_amount(this.__wbg_ptr);let a;return 0!==s[0]&&(a=getStringFromWasm0(s[0],s[1]).slice(),wasm.__wbindgen_free(s[0],1*s[1],1)),a}set payment_amount(s){const a=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.paymentstrparams_set_payment_amount(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get payment_hash(){const s=wasm.paymentstrparams_payment_hash(this.__wbg_ptr);let a;return 0!==s[0]&&(a=getStringFromWasm0(s[0],s[1]).slice(),wasm.__wbindgen_free(s[0],1*s[1],1)),a}set payment_hash(s){const a=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.paymentstrparams_set_payment_hash(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get payment_name(){const s=wasm.paymentstrparams_payment_name(this.__wbg_ptr);let a;return 0!==s[0]&&(a=getStringFromWasm0(s[0],s[1]).slice(),wasm.__wbindgen_free(s[0],1*s[1],1)),a}set payment_name(s){const a=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.paymentstrparams_set_payment_name(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get payment_package_hash(){const s=wasm.paymentstrparams_payment_package_hash(this.__wbg_ptr);let a;return 0!==s[0]&&(a=getStringFromWasm0(s[0],s[1]).slice(),wasm.__wbindgen_free(s[0],1*s[1],1)),a}set payment_package_hash(s){const a=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.paymentstrparams_set_payment_package_hash(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get payment_package_name(){const s=wasm.paymentstrparams_payment_package_name(this.__wbg_ptr);let a;return 0!==s[0]&&(a=getStringFromWasm0(s[0],s[1]).slice(),wasm.__wbindgen_free(s[0],1*s[1],1)),a}set payment_package_name(s){const a=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.paymentstrparams_set_payment_package_name(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get payment_path(){const s=wasm.paymentstrparams_payment_path(this.__wbg_ptr);let a;return 0!==s[0]&&(a=getStringFromWasm0(s[0],s[1]).slice(),wasm.__wbindgen_free(s[0],1*s[1],1)),a}set payment_path(s){const a=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.paymentstrparams_set_payment_path(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get payment_args_simple(){return wasm.paymentstrparams_payment_args_simple(this.__wbg_ptr)}set payment_args_simple(s){wasm.paymentstrparams_set_payment_args_simple(this.__wbg_ptr,s)}get payment_args_json(){const s=wasm.paymentstrparams_payment_args_json(this.__wbg_ptr);let a;return 0!==s[0]&&(a=getStringFromWasm0(s[0],s[1]).slice(),wasm.__wbindgen_free(s[0],1*s[1],1)),a}set payment_args_json(s){const a=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.paymentstrparams_set_payment_args_json(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get payment_version(){const s=wasm.paymentstrparams_payment_version(this.__wbg_ptr);let a;return 0!==s[0]&&(a=getStringFromWasm0(s[0],s[1]).slice(),wasm.__wbindgen_free(s[0],1*s[1],1)),a}set payment_version(s){const a=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.paymentstrparams_set_payment_version(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get payment_entry_point(){const s=wasm.paymentstrparams_payment_entry_point(this.__wbg_ptr);let a;return 0!==s[0]&&(a=getStringFromWasm0(s[0],s[1]).slice(),wasm.__wbindgen_free(s[0],1*s[1],1)),a}set payment_entry_point(s){const a=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.paymentstrparams_set_payment_entry_point(this.__wbg_ptr,a,WASM_VECTOR_LEN)}}const PeerEntryFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_peerentry_free(f>>>0,1));class PeerEntry{__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,PeerEntryFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_peerentry_free(s,0)}get node_id(){let s,a;try{const u=wasm.peerentry_node_id(this.__wbg_ptr);return s=u[0],a=u[1],getStringFromWasm0(u[0],u[1])}finally{wasm.__wbindgen_free(s,a,1)}}get address(){let s,a;try{const u=wasm.peerentry_address(this.__wbg_ptr);return s=u[0],a=u[1],getStringFromWasm0(u[0],u[1])}finally{wasm.__wbindgen_free(s,a,1)}}}const PublicKeyFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_publickey_free(f>>>0,1));class PublicKey{static __wrap(s){s>>>=0;const a=Object.create(PublicKey.prototype);return a.__wbg_ptr=s,PublicKeyFinalization.register(a,a.__wbg_ptr,a),a}__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,PublicKeyFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_publickey_free(s,0)}constructor(s){const a=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),g=wasm.publickey_new_js_alias(a,WASM_VECTOR_LEN);if(g[2])throw takeFromExternrefTable0(g[1]);return this.__wbg_ptr=g[0]>>>0,PublicKeyFinalization.register(this,this.__wbg_ptr,this),this}static fromUint8Array(s){const a=passArray8ToWasm0(s,wasm.__wbindgen_malloc),g=wasm.publickey_fromUint8Array(a,WASM_VECTOR_LEN);if(g[2])throw takeFromExternrefTable0(g[1]);return PublicKey.__wrap(g[0])}toAccountHash(){const s=wasm.publickey_toAccountHash(this.__wbg_ptr);return AccountHash.__wrap(s)}toPurseUref(){const s=wasm.publickey_toPurseUref(this.__wbg_ptr);return URef.__wrap(s)}toJson(){return wasm.publickey_toJson(this.__wbg_ptr)}}const PublicKeyStringFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_publickeystring_free(f>>>0,1));class PublicKeyString{static __wrap(s){s>>>=0;const a=Object.create(PublicKeyString.prototype);return a.__wbg_ptr=s,PublicKeyStringFinalization.register(a,a.__wbg_ptr,a),a}__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,PublicKeyStringFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_publickeystring_free(s,0)}get PublicKey(){let s,a;try{const u=wasm.__wbg_get_publickeystring_PublicKey(this.__wbg_ptr);return s=u[0],a=u[1],getStringFromWasm0(u[0],u[1])}finally{wasm.__wbindgen_free(s,a,1)}}set PublicKey(s){const a=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.__wbg_set_failure_cost(this.__wbg_ptr,a,WASM_VECTOR_LEN)}}const PurseIdentifierFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_purseidentifier_free(f>>>0,1));class PurseIdentifier{static __wrap(s){s>>>=0;const a=Object.create(PurseIdentifier.prototype);return a.__wbg_ptr=s,PurseIdentifierFinalization.register(a,a.__wbg_ptr,a),a}__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,PurseIdentifierFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_purseidentifier_free(s,0)}constructor(s){_assertClass(s,PublicKey);var a=s.__destroy_into_raw();const u=wasm.entityidentifier_fromPublicKey(a);return this.__wbg_ptr=u>>>0,PurseIdentifierFinalization.register(this,this.__wbg_ptr,this),this}static fromAccountHash(s){_assertClass(s,AccountHash);var a=s.__destroy_into_raw();const u=wasm.entityidentifier_fromAccountHash(a);return PurseIdentifier.__wrap(u)}static fromURef(s){_assertClass(s,URef);var a=s.__destroy_into_raw();const u=wasm.purseidentifier_fromURef(a);return PurseIdentifier.__wrap(u)}toJson(){return wasm.purseidentifier_toJson(this.__wbg_ptr)}}const PutDeployResultFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_putdeployresult_free(f>>>0,1));class PutDeployResult{static __wrap(s){s>>>=0;const a=Object.create(PutDeployResult.prototype);return a.__wbg_ptr=s,PutDeployResultFinalization.register(a,a.__wbg_ptr,a),a}__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,PutDeployResultFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_putdeployresult_free(s,0)}get api_version(){return wasm.putdeployresult_api_version(this.__wbg_ptr)}get deploy_hash(){const s=wasm.putdeployresult_deploy_hash(this.__wbg_ptr);return DeployHash.__wrap(s)}toJson(){return wasm.putdeployresult_toJson(this.__wbg_ptr)}}const PutTransactionResultFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_puttransactionresult_free(f>>>0,1));class PutTransactionResult{static __wrap(s){s>>>=0;const a=Object.create(PutTransactionResult.prototype);return a.__wbg_ptr=s,PutTransactionResultFinalization.register(a,a.__wbg_ptr,a),a}__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,PutTransactionResultFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_puttransactionresult_free(s,0)}get api_version(){return wasm.puttransactionresult_api_version(this.__wbg_ptr)}get transaction_hash(){const s=wasm.puttransactionresult_transaction_hash(this.__wbg_ptr);return TransactionHash.__wrap(s)}toJson(){return wasm.puttransactionresult_toJson(this.__wbg_ptr)}}const QueryBalanceDetailsResultFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_querybalancedetailsresult_free(f>>>0,1));class QueryBalanceDetailsResult{static __wrap(s){s>>>=0;const a=Object.create(QueryBalanceDetailsResult.prototype);return a.__wbg_ptr=s,QueryBalanceDetailsResultFinalization.register(a,a.__wbg_ptr,a),a}__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,QueryBalanceDetailsResultFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_querybalancedetailsresult_free(s,0)}get api_version(){return wasm.querybalancedetailsresult_api_version(this.__wbg_ptr)}get total_balance(){return wasm.querybalancedetailsresult_total_balance(this.__wbg_ptr)}get available_balance(){return wasm.querybalancedetailsresult_available_balance(this.__wbg_ptr)}get total_balance_proof(){return wasm.querybalancedetailsresult_total_balance_proof(this.__wbg_ptr)}get holds(){return wasm.querybalancedetailsresult_holds(this.__wbg_ptr)}toJson(){return wasm.querybalancedetailsresult_toJson(this.__wbg_ptr)}}const QueryBalanceResultFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_querybalanceresult_free(f>>>0,1));class QueryBalanceResult{static __wrap(s){s>>>=0;const a=Object.create(QueryBalanceResult.prototype);return a.__wbg_ptr=s,QueryBalanceResultFinalization.register(a,a.__wbg_ptr,a),a}__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,QueryBalanceResultFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_querybalanceresult_free(s,0)}get api_version(){return wasm.querybalanceresult_api_version(this.__wbg_ptr)}get balance(){return wasm.querybalanceresult_balance(this.__wbg_ptr)}toJson(){return wasm.querybalanceresult_toJson(this.__wbg_ptr)}}const QueryGlobalStateResultFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_queryglobalstateresult_free(f>>>0,1));class QueryGlobalStateResult{static __wrap(s){s>>>=0;const a=Object.create(QueryGlobalStateResult.prototype);return a.__wbg_ptr=s,QueryGlobalStateResultFinalization.register(a,a.__wbg_ptr,a),a}__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,QueryGlobalStateResultFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_queryglobalstateresult_free(s,0)}get api_version(){return wasm.queryglobalstateresult_api_version(this.__wbg_ptr)}get block_header(){return wasm.queryglobalstateresult_block_header(this.__wbg_ptr)}get stored_value(){return wasm.queryglobalstateresult_stored_value(this.__wbg_ptr)}get merkle_proof(){let s,a;try{const u=wasm.queryglobalstateresult_merkle_proof(this.__wbg_ptr);return s=u[0],a=u[1],getStringFromWasm0(u[0],u[1])}finally{wasm.__wbindgen_free(s,a,1)}}toJson(){return wasm.queryglobalstateresult_toJson(this.__wbg_ptr)}}const RecordIdFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_recordid_free(f>>>0,1));class RecordId{__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,RecordIdFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_recordid_free(s,0)}constructor(s){const a=wasm.recordid_new_js_alias(s);if(a[2])throw takeFromExternrefTable0(a[1]);return this.__wbg_ptr=a[0]>>>0,RecordIdFinalization.register(this,this.__wbg_ptr,this),this}}const SDKFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_sdk_free(f>>>0,1));class SDK{__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,SDKFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_sdk_free(s,0)}get_balance_options(s){const a=wasm.sdk_get_balance_options(this.__wbg_ptr,s);if(a[2])throw takeFromExternrefTable0(a[1]);return getBalanceOptions.__wrap(a[0])}get_balance(s){let a=0;return isLikeNone(s)||(_assertClass(s,getBalanceOptions),a=s.__destroy_into_raw()),wasm.sdk_get_balance(this.__wbg_ptr,a)}state_get_balance(s){let a=0;return isLikeNone(s)||(_assertClass(s,getBalanceOptions),a=s.__destroy_into_raw()),wasm.sdk_state_get_balance(this.__wbg_ptr,a)}get_dictionary_item_options(s){const a=wasm.sdk_get_dictionary_item_options(this.__wbg_ptr,s);if(a[2])throw takeFromExternrefTable0(a[1]);return getDictionaryItemOptions.__wrap(a[0])}get_dictionary_item(s){let a=0;return isLikeNone(s)||(_assertClass(s,getDictionaryItemOptions),a=s.__destroy_into_raw()),wasm.sdk_get_dictionary_item(this.__wbg_ptr,a)}state_get_dictionary_item(s){let a=0;return isLikeNone(s)||(_assertClass(s,getDictionaryItemOptions),a=s.__destroy_into_raw()),wasm.sdk_state_get_dictionary_item(this.__wbg_ptr,a)}transaction(s,a,u,g){_assertClass(s,TransactionBuilderParams);var y=s.__destroy_into_raw();_assertClass(a,TransactionStrParams);var v=a.__destroy_into_raw(),S=isLikeNone(g)?0:passStringToWasm0(g,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),A=WASM_VECTOR_LEN;return wasm.sdk_transaction(this.__wbg_ptr,y,v,isLikeNone(u)?3:u,S,A)}query_contract_dict_options(s){const a=wasm.sdk_query_contract_dict_options(this.__wbg_ptr,s);if(a[2])throw takeFromExternrefTable0(a[1]);return queryContractDictOptions.__wrap(a[0])}query_contract_dict(s){let a=0;return isLikeNone(s)||(_assertClass(s,queryContractDictOptions),a=s.__destroy_into_raw()),wasm.sdk_query_contract_dict(this.__wbg_ptr,a)}get_era_info_options(s){const a=wasm.sdk_get_era_info_options(this.__wbg_ptr,s);if(a[2])throw takeFromExternrefTable0(a[1]);return getEraInfoOptions.__wrap(a[0])}get_era_info(s){let a=0;return isLikeNone(s)||(_assertClass(s,getEraInfoOptions),a=s.__destroy_into_raw()),wasm.sdk_get_era_info(this.__wbg_ptr,a)}chain_get_era_info_by_switch_block(s){let a=0;return isLikeNone(s)||(_assertClass(s,getEraInfoOptions),a=s.__destroy_into_raw()),wasm.sdk_chain_get_era_info_by_switch_block(this.__wbg_ptr,a)}get_auction_info_options(s){const a=wasm.sdk_get_auction_info_options(this.__wbg_ptr,s);if(a[2])throw takeFromExternrefTable0(a[1]);return getAuctionInfoOptions.__wrap(a[0])}get_auction_info(s){let a=0;return isLikeNone(s)||(_assertClass(s,getAuctionInfoOptions),a=s.__destroy_into_raw()),wasm.sdk_get_auction_info(this.__wbg_ptr,a)}state_get_auction_info_js_alias(s){let a=0;return isLikeNone(s)||(_assertClass(s,getAuctionInfoOptions),a=s.__destroy_into_raw()),wasm.sdk_state_get_auction_info_js_alias(this.__wbg_ptr,a)}get_block_options(s){const a=wasm.sdk_get_block_options(this.__wbg_ptr,s);if(a[2])throw takeFromExternrefTable0(a[1]);return getBlockOptions.__wrap(a[0])}get_block(s){let a=0;return isLikeNone(s)||(_assertClass(s,getBlockOptions),a=s.__destroy_into_raw()),wasm.sdk_get_block(this.__wbg_ptr,a)}chain_get_block(s){let a=0;return isLikeNone(s)||(_assertClass(s,getBlockOptions),a=s.__destroy_into_raw()),wasm.sdk_chain_get_block(this.__wbg_ptr,a)}get_chainspec(s,a){var u=isLikeNone(a)?0:passStringToWasm0(a,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),g=WASM_VECTOR_LEN;return wasm.sdk_get_chainspec(this.__wbg_ptr,isLikeNone(s)?3:s,u,g)}info_get_chainspec(s,a){var u=isLikeNone(a)?0:passStringToWasm0(a,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),g=WASM_VECTOR_LEN;return wasm.sdk_info_get_chainspec(this.__wbg_ptr,isLikeNone(s)?3:s,u,g)}get_node_status(s,a){var u=isLikeNone(a)?0:passStringToWasm0(a,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),g=WASM_VECTOR_LEN;return wasm.sdk_get_node_status(this.__wbg_ptr,isLikeNone(s)?3:s,u,g)}info_get_status(s,a){var u=isLikeNone(a)?0:passStringToWasm0(a,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),g=WASM_VECTOR_LEN;return wasm.sdk_info_get_status(this.__wbg_ptr,isLikeNone(s)?3:s,u,g)}get_peers(s,a){var u=isLikeNone(a)?0:passStringToWasm0(a,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),g=WASM_VECTOR_LEN;return wasm.sdk_get_peers(this.__wbg_ptr,isLikeNone(s)?3:s,u,g)}info_get_peers(s,a){var u=isLikeNone(a)?0:passStringToWasm0(a,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),g=WASM_VECTOR_LEN;return wasm.sdk_info_get_peers(this.__wbg_ptr,isLikeNone(s)?3:s,u,g)}get_validator_changes(s,a){var u=isLikeNone(a)?0:passStringToWasm0(a,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),g=WASM_VECTOR_LEN;return wasm.sdk_get_validator_changes(this.__wbg_ptr,isLikeNone(s)?3:s,u,g)}info_get_validator_change(s,a){var u=isLikeNone(a)?0:passStringToWasm0(a,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),g=WASM_VECTOR_LEN;return wasm.sdk_info_get_validator_change(this.__wbg_ptr,isLikeNone(s)?3:s,u,g)}list_rpcs(s,a){var u=isLikeNone(a)?0:passStringToWasm0(a,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),g=WASM_VECTOR_LEN;return wasm.sdk_list_rpcs(this.__wbg_ptr,isLikeNone(s)?3:s,u,g)}make_deploy(s,a,u){_assertClass(s,DeployStrParams);var g=s.__destroy_into_raw();_assertClass(a,SessionStrParams);var y=a.__destroy_into_raw();_assertClass(u,PaymentStrParams);var v=u.__destroy_into_raw();const S=wasm.sdk_make_deploy(this.__wbg_ptr,g,y,v);if(S[2])throw takeFromExternrefTable0(S[1]);return Deploy.__wrap(S[0])}sign_deploy(s,a){_assertClass(s,Deploy);var u=s.__destroy_into_raw();const g=passStringToWasm0(a,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),v=wasm.sdk_sign_deploy(this.__wbg_ptr,u,g,WASM_VECTOR_LEN);return Deploy.__wrap(v)}make_transaction(s,a){_assertClass(s,TransactionBuilderParams);var u=s.__destroy_into_raw();_assertClass(a,TransactionStrParams);var g=a.__destroy_into_raw();const y=wasm.sdk_make_transaction(this.__wbg_ptr,u,g);if(y[2])throw takeFromExternrefTable0(y[1]);return Transaction.__wrap(y[0])}sign_transaction(s,a){_assertClass(s,Transaction);var u=s.__destroy_into_raw();const g=passStringToWasm0(a,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),v=wasm.sdk_sign_transaction(this.__wbg_ptr,u,g,WASM_VECTOR_LEN);return Transaction.__wrap(v)}query_contract_key_options(s){const a=wasm.sdk_query_contract_key_options(this.__wbg_ptr,s);if(a[2])throw takeFromExternrefTable0(a[1]);return queryContractKeyOptions.__wrap(a[0])}query_contract_key(s){let a=0;return isLikeNone(s)||(_assertClass(s,queryContractKeyOptions),a=s.__destroy_into_raw()),wasm.sdk_query_contract_key(this.__wbg_ptr,a)}get_state_root_hash_options(s){const a=wasm.sdk_get_state_root_hash_options(this.__wbg_ptr,s);if(a[2])throw takeFromExternrefTable0(a[1]);return getStateRootHashOptions.__wrap(a[0])}get_state_root_hash(s){let a=0;return isLikeNone(s)||(_assertClass(s,getStateRootHashOptions),a=s.__destroy_into_raw()),wasm.sdk_get_state_root_hash(this.__wbg_ptr,a)}chain_get_state_root_hash(s){let a=0;return isLikeNone(s)||(_assertClass(s,getStateRootHashOptions),a=s.__destroy_into_raw()),wasm.sdk_chain_get_state_root_hash(this.__wbg_ptr,a)}watchDeploy(s,a){const u=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),y=wasm.sdk_watchDeploy(this.__wbg_ptr,u,WASM_VECTOR_LEN,!isLikeNone(a),isLikeNone(a)?0:a);return Watcher.__wrap(y)}watchTransaction(s,a){const u=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),y=wasm.sdk_watchTransaction(this.__wbg_ptr,u,WASM_VECTOR_LEN,!isLikeNone(a),isLikeNone(a)?0:a);return Watcher.__wrap(y)}waitDeploy(s,a,u){const g=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),y=WASM_VECTOR_LEN,v=passStringToWasm0(a,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);return wasm.sdk_waitDeploy(this.__wbg_ptr,g,y,v,WASM_VECTOR_LEN,!isLikeNone(u),isLikeNone(u)?0:u)}waitTransaction(s,a,u){const g=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),y=WASM_VECTOR_LEN,v=passStringToWasm0(a,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);return wasm.sdk_waitTransaction(this.__wbg_ptr,g,y,v,WASM_VECTOR_LEN,!isLikeNone(u),isLikeNone(u)?0:u)}deploy(s,a,u,g,y){_assertClass(s,DeployStrParams);var v=s.__destroy_into_raw();_assertClass(a,SessionStrParams);var S=a.__destroy_into_raw();_assertClass(u,PaymentStrParams);var A=u.__destroy_into_raw(),M=isLikeNone(y)?0:passStringToWasm0(y,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),B=WASM_VECTOR_LEN;return wasm.sdk_deploy(this.__wbg_ptr,v,S,A,isLikeNone(g)?3:g,M,B)}speculative_transfer(s,a,u,g,y,v,S){const A=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),M=WASM_VECTOR_LEN,B=passStringToWasm0(a,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),X=WASM_VECTOR_LEN;var de=isLikeNone(u)?0:passStringToWasm0(u,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),le=WASM_VECTOR_LEN;_assertClass(g,DeployStrParams);var ue=g.__destroy_into_raw();_assertClass(y,PaymentStrParams);var ot=y.__destroy_into_raw(),rt=isLikeNone(S)?0:passStringToWasm0(S,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),st=WASM_VECTOR_LEN;return wasm.sdk_speculative_transfer(this.__wbg_ptr,A,M,B,X,de,le,ue,ot,isLikeNone(v)?3:v,rt,st)}get_deploy_options(s){const a=wasm.sdk_get_deploy_options(this.__wbg_ptr,s);if(a[2])throw takeFromExternrefTable0(a[1]);return getDeployOptions.__wrap(a[0])}get_deploy(s){let a=0;return isLikeNone(s)||(_assertClass(s,getDeployOptions),a=s.__destroy_into_raw()),wasm.sdk_get_deploy(this.__wbg_ptr,a)}info_get_deploy(s){let a=0;return isLikeNone(s)||(_assertClass(s,getDeployOptions),a=s.__destroy_into_raw()),wasm.sdk_info_get_deploy(this.__wbg_ptr,a)}get_transaction_options(s){const a=wasm.sdk_get_transaction_options(this.__wbg_ptr,s);if(a[2])throw takeFromExternrefTable0(a[1]);return getTransactionOptions.__wrap(a[0])}get_transaction(s){let a=0;return isLikeNone(s)||(_assertClass(s,getTransactionOptions),a=s.__destroy_into_raw()),wasm.sdk_get_transaction(this.__wbg_ptr,a)}info_get_transaction(s){let a=0;return isLikeNone(s)||(_assertClass(s,getTransactionOptions),a=s.__destroy_into_raw()),wasm.sdk_info_get_transaction(this.__wbg_ptr,a)}get_speculative_exec_options(s){const a=wasm.sdk_get_speculative_exec_options(this.__wbg_ptr,s);if(a[2])throw takeFromExternrefTable0(a[1]);return getSpeculativeExecTxnOptions.__wrap(a[0])}speculative_exec(s){let a=0;return isLikeNone(s)||(_assertClass(s,getSpeculativeExecTxnOptions),a=s.__destroy_into_raw()),wasm.sdk_speculative_exec(this.__wbg_ptr,a)}make_transfer(s,a,u,g,y){const v=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),S=WASM_VECTOR_LEN,A=passStringToWasm0(a,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),M=WASM_VECTOR_LEN;var B=isLikeNone(u)?0:passStringToWasm0(u,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),X=WASM_VECTOR_LEN;_assertClass(g,DeployStrParams);var de=g.__destroy_into_raw();_assertClass(y,PaymentStrParams);var le=y.__destroy_into_raw();const ue=wasm.sdk_make_transfer(this.__wbg_ptr,v,S,A,M,B,X,de,le);if(ue[2])throw takeFromExternrefTable0(ue[1]);return Deploy.__wrap(ue[0])}make_transfer_transaction(s,a,u,g,y){let v=0;isLikeNone(s)||(_assertClass(s,URef),v=s.__destroy_into_raw());const S=passStringToWasm0(a,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),A=WASM_VECTOR_LEN,M=passStringToWasm0(u,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),B=WASM_VECTOR_LEN;_assertClass(g,TransactionStrParams);var X=g.__destroy_into_raw(),de=isLikeNone(y)?0:passStringToWasm0(y,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);const ue=wasm.sdk_make_transfer_transaction(this.__wbg_ptr,v,S,A,M,B,X,de,WASM_VECTOR_LEN);if(ue[2])throw takeFromExternrefTable0(ue[1]);return Transaction.__wrap(ue[0])}call_entrypoint_deploy(s,a,u,g){_assertClass(s,DeployStrParams);var y=s.__destroy_into_raw();_assertClass(a,SessionStrParams);var v=a.__destroy_into_raw();const S=passStringToWasm0(u,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),A=WASM_VECTOR_LEN;var M=isLikeNone(g)?0:passStringToWasm0(g,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);return wasm.sdk_call_entrypoint_deploy(this.__wbg_ptr,y,v,S,A,M,WASM_VECTOR_LEN)}install(s,a,u){_assertClass(s,TransactionStrParams);var g=s.__destroy_into_raw();_assertClass(a,Bytes);var y=a.__destroy_into_raw(),v=isLikeNone(u)?0:passStringToWasm0(u,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);return wasm.sdk_install(this.__wbg_ptr,g,y,v,WASM_VECTOR_LEN)}get_account_options(s){const a=wasm.sdk_get_account_options(this.__wbg_ptr,s);if(a[2])throw takeFromExternrefTable0(a[1]);return getAccountOptions.__wrap(a[0])}get_account(s){let a=0;return isLikeNone(s)||(_assertClass(s,getAccountOptions),a=s.__destroy_into_raw()),wasm.sdk_get_account(this.__wbg_ptr,a)}state_get_account_info(s){let a=0;return isLikeNone(s)||(_assertClass(s,getAccountOptions),a=s.__destroy_into_raw()),wasm.sdk_state_get_account_info(this.__wbg_ptr,a)}get_era_summary_options(s){const a=wasm.sdk_get_era_summary_options(this.__wbg_ptr,s);if(a[2])throw takeFromExternrefTable0(a[1]);return getEraSummaryOptions.__wrap(a[0])}get_era_summary(s){let a=0;return isLikeNone(s)||(_assertClass(s,getEraSummaryOptions),a=s.__destroy_into_raw()),wasm.sdk_get_era_summary(this.__wbg_ptr,a)}chain_get_era_summary(s){let a=0;return isLikeNone(s)||(_assertClass(s,getEraSummaryOptions),a=s.__destroy_into_raw()),wasm.sdk_chain_get_era_summary(this.__wbg_ptr,a)}put_deploy(s,a,u){_assertClass(s,Deploy);var g=s.__destroy_into_raw(),y=isLikeNone(u)?0:passStringToWasm0(u,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),v=WASM_VECTOR_LEN;return wasm.sdk_put_deploy(this.__wbg_ptr,g,isLikeNone(a)?3:a,y,v)}account_put_deploy(s,a,u){_assertClass(s,Deploy);var g=s.__destroy_into_raw(),y=isLikeNone(u)?0:passStringToWasm0(u,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),v=WASM_VECTOR_LEN;return wasm.sdk_account_put_deploy(this.__wbg_ptr,g,isLikeNone(a)?3:a,y,v)}install_deploy(s,a,u,g){_assertClass(s,DeployStrParams);var y=s.__destroy_into_raw();_assertClass(a,SessionStrParams);var v=a.__destroy_into_raw();const S=passStringToWasm0(u,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),A=WASM_VECTOR_LEN;var M=isLikeNone(g)?0:passStringToWasm0(g,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);return wasm.sdk_install_deploy(this.__wbg_ptr,y,v,S,A,M,WASM_VECTOR_LEN)}get_block_transfers_options(s){const a=wasm.sdk_get_block_transfers_options(this.__wbg_ptr,s);if(a[2])throw takeFromExternrefTable0(a[1]);return getBlockTransfersOptions.__wrap(a[0])}get_block_transfers(s){let a=0;return isLikeNone(s)||(_assertClass(s,getBlockTransfersOptions),a=s.__destroy_into_raw()),wasm.sdk_get_block_transfers(this.__wbg_ptr,a)}chain_get_block_transfers(s){let a=0;return isLikeNone(s)||(_assertClass(s,getBlockTransfersOptions),a=s.__destroy_into_raw()),wasm.sdk_chain_get_block_transfers(this.__wbg_ptr,a)}query_balance_options(s){const a=wasm.sdk_query_balance_options(this.__wbg_ptr,s);if(a[2])throw takeFromExternrefTable0(a[1]);return queryBalanceOptions.__wrap(a[0])}query_balance(s){let a=0;return isLikeNone(s)||(_assertClass(s,queryBalanceOptions),a=s.__destroy_into_raw()),wasm.sdk_query_balance(this.__wbg_ptr,a)}get_speculative_exec_deploy_options(s){const a=wasm.sdk_get_speculative_exec_deploy_options(this.__wbg_ptr,s);if(a[2])throw takeFromExternrefTable0(a[1]);return getSpeculativeExecDeployOptions.__wrap(a[0])}speculative_exec_deploy(s){let a=0;return isLikeNone(s)||(_assertClass(s,getSpeculativeExecDeployOptions),a=s.__destroy_into_raw()),wasm.sdk_speculative_exec_deploy(this.__wbg_ptr,a)}transfer_transaction(s,a,u,g,y,v,S){let A=0;isLikeNone(s)||(_assertClass(s,URef),A=s.__destroy_into_raw());const M=passStringToWasm0(a,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),B=WASM_VECTOR_LEN,X=passStringToWasm0(u,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),de=WASM_VECTOR_LEN;_assertClass(g,TransactionStrParams);var le=g.__destroy_into_raw(),ue=isLikeNone(y)?0:passStringToWasm0(y,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),ot=WASM_VECTOR_LEN,rt=isLikeNone(S)?0:passStringToWasm0(S,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),st=WASM_VECTOR_LEN;return wasm.sdk_transfer_transaction(this.__wbg_ptr,A,M,B,X,de,le,ue,ot,isLikeNone(v)?3:v,rt,st)}constructor(s,a,u){var g=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),y=WASM_VECTOR_LEN,v=isLikeNone(a)?0:passStringToWasm0(a,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);const A=wasm.sdk_new(g,y,v,WASM_VECTOR_LEN,isLikeNone(u)?3:u);return this.__wbg_ptr=A>>>0,SDKFinalization.register(this,this.__wbg_ptr,this),this}getRPCAddress(s){let a,u;try{var g=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);const v=wasm.sdk_getRPCAddress(this.__wbg_ptr,g,WASM_VECTOR_LEN);return a=v[0],u=v[1],getStringFromWasm0(v[0],v[1])}finally{wasm.__wbindgen_free(a,u,1)}}setRPCAddress(s){var a=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);const g=wasm.sdk_setRPCAddress(this.__wbg_ptr,a,WASM_VECTOR_LEN);if(g[1])throw takeFromExternrefTable0(g[0])}getNodeAddress(s){let a,u;try{var g=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);const v=wasm.sdk_getNodeAddress(this.__wbg_ptr,g,WASM_VECTOR_LEN);return a=v[0],u=v[1],getStringFromWasm0(v[0],v[1])}finally{wasm.__wbindgen_free(a,u,1)}}setNodeAddress(s){var a=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);const g=wasm.sdk_setNodeAddress(this.__wbg_ptr,a,WASM_VECTOR_LEN);if(g[1])throw takeFromExternrefTable0(g[0])}getVerbosity(s){return wasm.sdk_getVerbosity(this.__wbg_ptr,isLikeNone(s)?3:s)}setVerbosity(s){const a=wasm.sdk_setVerbosity(this.__wbg_ptr,isLikeNone(s)?3:s);if(a[1])throw takeFromExternrefTable0(a[0])}transfer(s,a,u,g,y,v,S){const A=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),M=WASM_VECTOR_LEN,B=passStringToWasm0(a,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),X=WASM_VECTOR_LEN;var de=isLikeNone(u)?0:passStringToWasm0(u,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),le=WASM_VECTOR_LEN;_assertClass(g,DeployStrParams);var ue=g.__destroy_into_raw();_assertClass(y,PaymentStrParams);var ot=y.__destroy_into_raw(),rt=isLikeNone(S)?0:passStringToWasm0(S,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),st=WASM_VECTOR_LEN;return wasm.sdk_transfer(this.__wbg_ptr,A,M,B,X,de,le,ue,ot,isLikeNone(v)?3:v,rt,st)}get_entity_options(s){const a=wasm.sdk_get_entity_options(this.__wbg_ptr,s);if(a[2])throw takeFromExternrefTable0(a[1]);return getEntityOptions.__wrap(a[0])}get_entity(s){let a=0;return isLikeNone(s)||(_assertClass(s,getEntityOptions),a=s.__destroy_into_raw()),wasm.sdk_get_entity(this.__wbg_ptr,a)}state_get_entity(s){let a=0;return isLikeNone(s)||(_assertClass(s,getEntityOptions),a=s.__destroy_into_raw()),wasm.sdk_state_get_entity(this.__wbg_ptr,a)}put_transaction(s,a,u){_assertClass(s,Transaction);var g=s.__destroy_into_raw(),y=isLikeNone(u)?0:passStringToWasm0(u,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),v=WASM_VECTOR_LEN;return wasm.sdk_put_transaction(this.__wbg_ptr,g,isLikeNone(a)?3:a,y,v)}account_put_transaction(s,a,u){_assertClass(s,Transaction);var g=s.__destroy_into_raw(),y=isLikeNone(u)?0:passStringToWasm0(u,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),v=WASM_VECTOR_LEN;return wasm.sdk_account_put_transaction(this.__wbg_ptr,g,isLikeNone(a)?3:a,y,v)}query_balance_details_options(s){const a=wasm.sdk_query_balance_details_options(this.__wbg_ptr,s);if(a[2])throw takeFromExternrefTable0(a[1]);return queryBalanceDetailsOptions.__wrap(a[0])}query_balance_details(s){let a=0;return isLikeNone(s)||(_assertClass(s,queryBalanceDetailsOptions),a=s.__destroy_into_raw()),wasm.sdk_query_balance_details(this.__wbg_ptr,a)}query_global_state_options(s){const a=wasm.sdk_query_global_state_options(this.__wbg_ptr,s);if(a[2])throw takeFromExternrefTable0(a[1]);return queryGlobalStateOptions.__wrap(a[0])}query_global_state(s){let a=0;return isLikeNone(s)||(_assertClass(s,queryGlobalStateOptions),a=s.__destroy_into_raw()),wasm.sdk_query_global_state(this.__wbg_ptr,a)}speculative_transaction(s,a,u,g){_assertClass(s,TransactionBuilderParams);var y=s.__destroy_into_raw();_assertClass(a,TransactionStrParams);var v=a.__destroy_into_raw(),S=isLikeNone(g)?0:passStringToWasm0(g,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),A=WASM_VECTOR_LEN;return wasm.sdk_speculative_transaction(this.__wbg_ptr,y,v,isLikeNone(u)?3:u,S,A)}speculative_transfer_transaction(s,a,u,g,y,v,S){let A=0;isLikeNone(s)||(_assertClass(s,URef),A=s.__destroy_into_raw());const M=passStringToWasm0(a,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),B=WASM_VECTOR_LEN,X=passStringToWasm0(u,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),de=WASM_VECTOR_LEN;_assertClass(g,TransactionStrParams);var le=g.__destroy_into_raw(),ue=isLikeNone(y)?0:passStringToWasm0(y,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),ot=WASM_VECTOR_LEN,rt=isLikeNone(S)?0:passStringToWasm0(S,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),st=WASM_VECTOR_LEN;return wasm.sdk_speculative_transfer_transaction(this.__wbg_ptr,A,M,B,X,de,le,ue,ot,isLikeNone(v)?3:v,rt,st)}get_binary_latest_switch_block_header(s){var a=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);return wasm.sdk_get_binary_latest_switch_block_header(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get_binary_latest_block_header(s){var a=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);return wasm.sdk_get_binary_latest_block_header(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get_binary_block_header_by_height(s,a){var u=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);return wasm.sdk_get_binary_block_header_by_height(this.__wbg_ptr,u,WASM_VECTOR_LEN,a)}get_binary_block_header_by_hash(s,a){var u=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),g=WASM_VECTOR_LEN;_assertClass(a,BlockHash);var y=a.__destroy_into_raw();return wasm.sdk_get_binary_block_header_by_hash(this.__wbg_ptr,u,g,y)}get_binary_latest_signed_block(s){var a=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);return wasm.sdk_get_binary_latest_signed_block(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get_binary_signed_block_by_height(s,a){var u=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);return wasm.sdk_get_binary_signed_block_by_height(this.__wbg_ptr,u,WASM_VECTOR_LEN,a)}get_binary_signed_block_by_hash(s,a){var u=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),g=WASM_VECTOR_LEN;_assertClass(a,BlockHash);var y=a.__destroy_into_raw();return wasm.sdk_get_binary_signed_block_by_hash(this.__wbg_ptr,u,g,y)}get_binary_transaction_by_hash(s,a,u){var g=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),y=WASM_VECTOR_LEN;_assertClass(a,TransactionHash);var v=a.__destroy_into_raw();return wasm.sdk_get_binary_transaction_by_hash(this.__wbg_ptr,g,y,v,u)}get_binary_peers(s){var a=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);return wasm.sdk_get_binary_peers(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get_binary_uptime(s){var a=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);return wasm.sdk_get_binary_uptime(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get_binary_last_progress(s){var a=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);return wasm.sdk_get_binary_last_progress(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get_binary_reactor_state(s){var a=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);return wasm.sdk_get_binary_reactor_state(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get_binary_network_name(s){var a=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);return wasm.sdk_get_binary_network_name(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get_binary_consensus_validator_changes(s){var a=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);return wasm.sdk_get_binary_consensus_validator_changes(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get_binary_block_synchronizer_status(s){var a=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);return wasm.sdk_get_binary_block_synchronizer_status(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get_binary_available_block_range(s){var a=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);return wasm.sdk_get_binary_available_block_range(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get_binary_next_upgrade(s){var a=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);return wasm.sdk_get_binary_next_upgrade(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get_binary_consensus_status(s){var a=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);return wasm.sdk_get_binary_consensus_status(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get_binary_chainspec_raw_bytes(s){var a=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);return wasm.sdk_get_binary_chainspec_raw_bytes(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get_binary_node_status(s){var a=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);return wasm.sdk_get_binary_node_status(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get_binary_get_validator_reward_by_era(s,a,u){var g=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),y=WASM_VECTOR_LEN;_assertClass(a,PublicKey);var v=a.__destroy_into_raw();_assertClass(u,EraId);var S=u.__destroy_into_raw();return wasm.sdk_get_binary_get_validator_reward_by_era(this.__wbg_ptr,g,y,v,S)}get_binary_get_validator_reward_by_block_height(s,a,u){var g=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),y=WASM_VECTOR_LEN;_assertClass(a,PublicKey);var v=a.__destroy_into_raw();return wasm.sdk_get_binary_get_validator_reward_by_block_height(this.__wbg_ptr,g,y,v,u)}get_binary_get_validator_reward_by_block_hash(s,a,u){var g=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),y=WASM_VECTOR_LEN;_assertClass(a,PublicKey);var v=a.__destroy_into_raw();_assertClass(u,BlockHash);var S=u.__destroy_into_raw();return wasm.sdk_get_binary_get_validator_reward_by_block_hash(this.__wbg_ptr,g,y,v,S)}get_binary_get_delegator_reward_by_era(s,a,u,g){var y=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),v=WASM_VECTOR_LEN;_assertClass(a,PublicKey);var S=a.__destroy_into_raw();_assertClass(u,PublicKey);var A=u.__destroy_into_raw();_assertClass(g,EraId);var M=g.__destroy_into_raw();return wasm.sdk_get_binary_get_delegator_reward_by_era(this.__wbg_ptr,y,v,S,A,M)}get_binary_get_delegator_reward_by_block_height(s,a,u,g){var y=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),v=WASM_VECTOR_LEN;_assertClass(a,PublicKey);var S=a.__destroy_into_raw();_assertClass(u,PublicKey);var A=u.__destroy_into_raw();return wasm.sdk_get_binary_get_delegator_reward_by_block_height(this.__wbg_ptr,y,v,S,A,g)}get_binary_get_delegator_reward_by_block_hash(s,a,u,g){var y=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),v=WASM_VECTOR_LEN;_assertClass(a,PublicKey);var S=a.__destroy_into_raw();_assertClass(u,PublicKey);var A=u.__destroy_into_raw();_assertClass(g,BlockHash);var M=g.__destroy_into_raw();return wasm.sdk_get_binary_get_delegator_reward_by_block_hash(this.__wbg_ptr,y,v,S,A,M)}get_binary_read_record(s,a,u){var g=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),y=WASM_VECTOR_LEN;_assertClass(a,RecordId);var v=a.__destroy_into_raw();const S=passArray8ToWasm0(u,wasm.__wbindgen_malloc);return wasm.sdk_get_binary_read_record(this.__wbg_ptr,g,y,v,S,WASM_VECTOR_LEN)}get_binary_global_state_item(s,a,u){var g=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),y=WASM_VECTOR_LEN;_assertClass(a,Key);var v=a.__destroy_into_raw();const S=passArrayJsValueToWasm0(u,wasm.__wbindgen_malloc);return wasm.sdk_get_binary_global_state_item(this.__wbg_ptr,g,y,v,S,WASM_VECTOR_LEN)}get_binary_global_state_item_by_state_root_hash(s,a,u,g){var y=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),v=WASM_VECTOR_LEN;_assertClass(a,Digest);var S=a.__destroy_into_raw();_assertClass(u,Key);var A=u.__destroy_into_raw();const M=passArrayJsValueToWasm0(g,wasm.__wbindgen_malloc);return wasm.sdk_get_binary_global_state_item_by_state_root_hash(this.__wbg_ptr,y,v,S,A,M,WASM_VECTOR_LEN)}get_binary_global_state_item_by_block_hash(s,a,u,g){var y=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),v=WASM_VECTOR_LEN;_assertClass(a,BlockHash);var S=a.__destroy_into_raw();_assertClass(u,Key);var A=u.__destroy_into_raw();const M=passArrayJsValueToWasm0(g,wasm.__wbindgen_malloc);return wasm.sdk_get_binary_global_state_item_by_block_hash(this.__wbg_ptr,y,v,S,A,M,WASM_VECTOR_LEN)}get_binary_global_state_item_by_block_height(s,a,u,g){var y=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),v=WASM_VECTOR_LEN;_assertClass(u,Key);var S=u.__destroy_into_raw();const A=passArrayJsValueToWasm0(g,wasm.__wbindgen_malloc);return wasm.sdk_get_binary_global_state_item_by_block_height(this.__wbg_ptr,y,v,a,S,A,WASM_VECTOR_LEN)}get_binary_try_accept_transaction(s,a){var u=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),g=WASM_VECTOR_LEN;_assertClass(a,Transaction);var y=a.__destroy_into_raw();return wasm.sdk_get_binary_try_accept_transaction(this.__wbg_ptr,u,g,y)}get_binary_try_speculative_execution(s,a){var u=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),g=WASM_VECTOR_LEN;_assertClass(a,Transaction);var y=a.__destroy_into_raw();return wasm.sdk_get_binary_try_speculative_execution(this.__wbg_ptr,u,g,y)}get_binary_get_protocol_version(s){var a=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);return wasm.sdk_get_binary_get_protocol_version(this.__wbg_ptr,a,WASM_VECTOR_LEN)}speculative_deploy(s,a,u,g,y){_assertClass(s,DeployStrParams);var v=s.__destroy_into_raw();_assertClass(a,SessionStrParams);var S=a.__destroy_into_raw();_assertClass(u,PaymentStrParams);var A=u.__destroy_into_raw(),M=isLikeNone(y)?0:passStringToWasm0(y,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),B=WASM_VECTOR_LEN;return wasm.sdk_speculative_deploy(this.__wbg_ptr,v,S,A,isLikeNone(g)?3:g,M,B)}call_entrypoint(s,a,u){_assertClass(s,TransactionBuilderParams);var g=s.__destroy_into_raw();_assertClass(a,TransactionStrParams);var y=a.__destroy_into_raw(),v=isLikeNone(u)?0:passStringToWasm0(u,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);return wasm.sdk_call_entrypoint(this.__wbg_ptr,g,y,v,WASM_VECTOR_LEN)}}const SessionStrParamsFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_sessionstrparams_free(f>>>0,1));class SessionStrParams{__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,SessionStrParamsFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_sessionstrparams_free(s,0)}constructor(s,a,u,g,y,v,S,A,M,B,X){var de=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),le=WASM_VECTOR_LEN,ue=isLikeNone(a)?0:passStringToWasm0(a,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),ot=WASM_VECTOR_LEN,rt=isLikeNone(u)?0:passStringToWasm0(u,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),st=WASM_VECTOR_LEN,Ft=isLikeNone(g)?0:passStringToWasm0(g,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),Dn=WASM_VECTOR_LEN,Tn=isLikeNone(y)?0:passStringToWasm0(y,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),Gn=WASM_VECTOR_LEN;let In=0;isLikeNone(v)||(_assertClass(v,Bytes),In=v.__destroy_into_raw());var qn=isLikeNone(A)?0:passStringToWasm0(A,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),_r=WASM_VECTOR_LEN,Mn=isLikeNone(M)?0:passStringToWasm0(M,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),ln=WASM_VECTOR_LEN,Nn=isLikeNone(B)?0:passStringToWasm0(B,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),dr=WASM_VECTOR_LEN;const fr=wasm.sessionstrparams_new(de,le,ue,ot,rt,st,Ft,Dn,Tn,Gn,In,isLikeNone(S)?0:addToExternrefTable0(S),qn,_r,Mn,ln,Nn,dr,isLikeNone(X)?16777215:X?1:0);return this.__wbg_ptr=fr>>>0,SessionStrParamsFinalization.register(this,this.__wbg_ptr,this),this}get session_hash(){const s=wasm.sessionstrparams_session_hash(this.__wbg_ptr);let a;return 0!==s[0]&&(a=getStringFromWasm0(s[0],s[1]).slice(),wasm.__wbindgen_free(s[0],1*s[1],1)),a}set session_hash(s){const a=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.sessionstrparams_set_session_hash(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get session_name(){const s=wasm.sessionstrparams_session_name(this.__wbg_ptr);let a;return 0!==s[0]&&(a=getStringFromWasm0(s[0],s[1]).slice(),wasm.__wbindgen_free(s[0],1*s[1],1)),a}set session_name(s){const a=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.sessionstrparams_set_session_name(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get session_package_hash(){const s=wasm.sessionstrparams_session_package_hash(this.__wbg_ptr);let a;return 0!==s[0]&&(a=getStringFromWasm0(s[0],s[1]).slice(),wasm.__wbindgen_free(s[0],1*s[1],1)),a}set session_package_hash(s){const a=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.sessionstrparams_set_session_package_hash(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get session_package_name(){const s=wasm.sessionstrparams_session_package_name(this.__wbg_ptr);let a;return 0!==s[0]&&(a=getStringFromWasm0(s[0],s[1]).slice(),wasm.__wbindgen_free(s[0],1*s[1],1)),a}set session_package_name(s){const a=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.sessionstrparams_set_session_package_name(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get session_path(){const s=wasm.sessionstrparams_session_path(this.__wbg_ptr);let a;return 0!==s[0]&&(a=getStringFromWasm0(s[0],s[1]).slice(),wasm.__wbindgen_free(s[0],1*s[1],1)),a}set session_path(s){const a=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.sessionstrparams_set_session_path(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get session_bytes(){const s=wasm.sessionstrparams_session_bytes(this.__wbg_ptr);return 0===s?void 0:Bytes.__wrap(s)}set session_bytes(s){_assertClass(s,Bytes);var a=s.__destroy_into_raw();wasm.sessionstrparams_set_session_bytes(this.__wbg_ptr,a)}get session_args_simple(){const s=wasm.sessionstrparams_session_args_simple(this.__wbg_ptr);return 0===s?void 0:ArgsSimple.__wrap(s)}set session_args_simple(s){wasm.sessionstrparams_set_session_args_simple(this.__wbg_ptr,s)}get session_args_json(){const s=wasm.sessionstrparams_session_args_json(this.__wbg_ptr);let a;return 0!==s[0]&&(a=getStringFromWasm0(s[0],s[1]).slice(),wasm.__wbindgen_free(s[0],1*s[1],1)),a}set session_args_json(s){const a=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.sessionstrparams_set_session_args_json(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get session_version(){const s=wasm.sessionstrparams_session_version(this.__wbg_ptr);let a;return 0!==s[0]&&(a=getStringFromWasm0(s[0],s[1]).slice(),wasm.__wbindgen_free(s[0],1*s[1],1)),a}set session_version(s){const a=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.sessionstrparams_set_session_version(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get session_entry_point(){const s=wasm.sessionstrparams_session_entry_point(this.__wbg_ptr);let a;return 0!==s[0]&&(a=getStringFromWasm0(s[0],s[1]).slice(),wasm.__wbindgen_free(s[0],1*s[1],1)),a}set session_entry_point(s){const a=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.sessionstrparams_set_session_entry_point(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get is_session_transfer(){const s=wasm.sessionstrparams_is_session_transfer(this.__wbg_ptr);return 16777215===s?void 0:0!==s}set is_session_transfer(s){wasm.sessionstrparams_set_is_session_transfer(this.__wbg_ptr,s)}}const SignatureResponseFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_signatureresponse_free(f>>>0,1));class SignatureResponse{__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,SignatureResponseFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_signatureresponse_free(s,0)}is_cancelled(){return 0!==wasm.signatureresponse_is_cancelled(this.__wbg_ptr)}get_signature_hex(){let s,a;try{const u=wasm.signatureresponse_get_signature_hex(this.__wbg_ptr);return s=u[0],a=u[1],getStringFromWasm0(u[0],u[1])}finally{wasm.__wbindgen_free(s,a,1)}}get_signature(){const s=wasm.signatureresponse_get_signature(this.__wbg_ptr);var a=getArrayU8FromWasm0(s[0],s[1]).slice();return wasm.__wbindgen_free(s[0],1*s[1],1),a}}const SpeculativeExecResultFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_speculativeexecresult_free(f>>>0,1));class SpeculativeExecResult{static __wrap(s){s>>>=0;const a=Object.create(SpeculativeExecResult.prototype);return a.__wbg_ptr=s,SpeculativeExecResultFinalization.register(a,a.__wbg_ptr,a),a}__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,SpeculativeExecResultFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_speculativeexecresult_free(s,0)}get api_version(){return wasm.speculativeexecresult_api_version(this.__wbg_ptr)}get block_hash(){const s=wasm.speculativeexecresult_block_hash(this.__wbg_ptr);return BlockHash.__wrap(s)}get execution_result(){return wasm.speculativeexecresult_execution_result(this.__wbg_ptr)}toJson(){return wasm.speculativeexecresult_toJson(this.__wbg_ptr)}}const SpeculativeExecTxnResultFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_speculativeexectxnresult_free(f>>>0,1));class SpeculativeExecTxnResult{static __wrap(s){s>>>=0;const a=Object.create(SpeculativeExecTxnResult.prototype);return a.__wbg_ptr=s,SpeculativeExecTxnResultFinalization.register(a,a.__wbg_ptr,a),a}__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,SpeculativeExecTxnResultFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_speculativeexectxnresult_free(s,0)}get api_version(){return wasm.speculativeexectxnresult_api_version(this.__wbg_ptr)}get block_hash(){const s=wasm.speculativeexectxnresult_block_hash(this.__wbg_ptr);return BlockHash.__wrap(s)}get execution_result(){return wasm.speculativeexectxnresult_execution_result(this.__wbg_ptr)}toJson(){return wasm.speculativeexectxnresult_toJson(this.__wbg_ptr)}}const SubscriptionFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_subscription_free(f>>>0,1));class Subscription{static __unwrap(s){return s instanceof Subscription?s.__destroy_into_raw():0}__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,SubscriptionFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_subscription_free(s,0)}get targetHash(){let s,a;try{const u=wasm.__wbg_get_subscription_targetHash(this.__wbg_ptr);return s=u[0],a=u[1],getStringFromWasm0(u[0],u[1])}finally{wasm.__wbindgen_free(s,a,1)}}set targetHash(s){const a=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.__wbg_set_failure_cost(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get eventHandlerFn(){return wasm.__wbg_get_subscription_eventHandlerFn(this.__wbg_ptr)}set eventHandlerFn(s){wasm.__wbg_set_subscription_eventHandlerFn(this.__wbg_ptr,s)}constructor(s,a){const u=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),y=wasm.subscription_new(u,WASM_VECTOR_LEN,a);return this.__wbg_ptr=y>>>0,SubscriptionFinalization.register(this,this.__wbg_ptr,this),this}}const TransactionFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_transaction_free(f>>>0,1));class Transaction{static __wrap(s){s>>>=0;const a=Object.create(Transaction.prototype);return a.__wbg_ptr=s,TransactionFinalization.register(a,a.__wbg_ptr,a),a}__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,TransactionFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_transaction_free(s,0)}constructor(s){const a=wasm.transaction_new(s);return this.__wbg_ptr=a>>>0,TransactionFinalization.register(this,this.__wbg_ptr,this),this}toJson(){return wasm.transaction_toJson(this.__wbg_ptr)}static newSession(s,a){_assertClass(s,TransactionBuilderParams);var u=s.__destroy_into_raw();_assertClass(a,TransactionStrParams);var g=a.__destroy_into_raw();const y=wasm.transaction_newSession(u,g);if(y[2])throw takeFromExternrefTable0(y[1]);return Transaction.__wrap(y[0])}static newTransfer(s,a,u,g,y){let v=0;isLikeNone(s)||(_assertClass(s,URef),v=s.__destroy_into_raw());const S=passStringToWasm0(a,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),A=WASM_VECTOR_LEN,M=passStringToWasm0(u,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),B=WASM_VECTOR_LEN;_assertClass(g,TransactionStrParams);var X=g.__destroy_into_raw(),de=isLikeNone(y)?0:passStringToWasm0(y,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);const ue=wasm.transaction_newTransfer(v,S,A,M,B,X,de,WASM_VECTOR_LEN);if(ue[2])throw takeFromExternrefTable0(ue[1]);return Transaction.__wrap(ue[0])}withTTL(s,a){const u=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),g=WASM_VECTOR_LEN;var y=isLikeNone(a)?0:passStringToWasm0(a,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);const S=wasm.transaction_withTTL(this.__wbg_ptr,u,g,y,WASM_VECTOR_LEN);return Transaction.__wrap(S)}withTimestamp(s,a){const u=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),g=WASM_VECTOR_LEN;var y=isLikeNone(a)?0:passStringToWasm0(a,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);const S=wasm.transaction_withTimestamp(this.__wbg_ptr,u,g,y,WASM_VECTOR_LEN);return Transaction.__wrap(S)}withChainName(s,a){const u=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),g=WASM_VECTOR_LEN;var y=isLikeNone(a)?0:passStringToWasm0(a,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);const S=wasm.transaction_withChainName(this.__wbg_ptr,u,g,y,WASM_VECTOR_LEN);return Transaction.__wrap(S)}withPublicKey(s,a){_assertClass(s,PublicKey);var u=s.__destroy_into_raw(),g=isLikeNone(a)?0:passStringToWasm0(a,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);const v=wasm.transaction_withPublicKey(this.__wbg_ptr,u,g,WASM_VECTOR_LEN);return Transaction.__wrap(v)}withAccountHash(s,a){_assertClass(s,AccountHash);var u=s.__destroy_into_raw(),g=isLikeNone(a)?0:passStringToWasm0(a,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);const v=wasm.transaction_withAccountHash(this.__wbg_ptr,u,g,WASM_VECTOR_LEN);return Transaction.__wrap(v)}withEntryPoint(s,a){const u=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),g=WASM_VECTOR_LEN;var y=isLikeNone(a)?0:passStringToWasm0(a,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);const S=wasm.transaction_withEntryPoint(this.__wbg_ptr,u,g,y,WASM_VECTOR_LEN);return Transaction.__wrap(S)}withEntityHash(s,a){_assertClass(s,AddressableEntityHash);var u=s.__destroy_into_raw(),g=isLikeNone(a)?0:passStringToWasm0(a,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);const v=wasm.transaction_withEntityHash(this.__wbg_ptr,u,g,WASM_VECTOR_LEN);return Transaction.__wrap(v)}withPackageHash(s,a){_assertClass(s,PackageHash);var u=s.__destroy_into_raw(),g=isLikeNone(a)?0:passStringToWasm0(a,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);const v=wasm.transaction_withPackageHash(this.__wbg_ptr,u,g,WASM_VECTOR_LEN);return Transaction.__wrap(v)}withTransactionBytes(s,a,u){_assertClass(s,Bytes);var g=s.__destroy_into_raw(),y=isLikeNone(u)?0:passStringToWasm0(u,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),v=WASM_VECTOR_LEN;const S=wasm.transaction_withTransactionBytes(this.__wbg_ptr,g,isLikeNone(a)?16777215:a?1:0,y,v);return Transaction.__wrap(S)}withSecretKey(s){var a=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);const g=wasm.transaction_withSecretKey(this.__wbg_ptr,a,WASM_VECTOR_LEN);return Transaction.__wrap(g)}verify(){return 0!==wasm.transaction_verify(this.__wbg_ptr)}get hash(){const s=wasm.transaction_hash(this.__wbg_ptr);return TransactionHash.__wrap(s)}get expired(){return 0!==wasm.transaction_expired(this.__wbg_ptr)}get expires(){return wasm.transaction_expires(this.__wbg_ptr)}get signers(){return wasm.transaction_signers(this.__wbg_ptr)}get authorization_keys(){return wasm.transaction_authorization_keys(this.__wbg_ptr)}sign(s){const a=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),g=wasm.transaction_sign(this.__wbg_ptr,a,WASM_VECTOR_LEN);return Transaction.__wrap(g)}approvalsHash(){return wasm.transaction_approvalsHash(this.__wbg_ptr)}get approvals(){return wasm.transaction_approvals(this.__wbg_ptr)}get is_native(){return 0!==wasm.transaction_is_native(this.__wbg_ptr)}get target(){return wasm.transaction_target(this.__wbg_ptr)}get is_standard_payment(){return 0!==wasm.transaction_is_standard_payment(this.__wbg_ptr)}session_args(){return wasm.transaction_session_args(this.__wbg_ptr)}addSignature(s,a){const u=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),g=WASM_VECTOR_LEN,y=passStringToWasm0(a,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),S=wasm.transaction_addSignature(this.__wbg_ptr,u,g,y,WASM_VECTOR_LEN);return Transaction.__wrap(S)}get entry_point(){let s,a;try{const u=wasm.transaction_entry_point(this.__wbg_ptr);return s=u[0],a=u[1],getStringFromWasm0(u[0],u[1])}finally{wasm.__wbindgen_free(s,a,1)}}get ttl(){let s,a;try{const u=wasm.transaction_ttl(this.__wbg_ptr);return s=u[0],a=u[1],getStringFromWasm0(u[0],u[1])}finally{wasm.__wbindgen_free(s,a,1)}}get timestamp(){let s,a;try{const u=wasm.transaction_timestamp(this.__wbg_ptr);return s=u[0],a=u[1],getStringFromWasm0(u[0],u[1])}finally{wasm.__wbindgen_free(s,a,1)}}get size_estimate(){return wasm.transaction_size_estimate(this.__wbg_ptr)>>>0}get chain_name(){let s,a;try{const u=wasm.transaction_chain_name(this.__wbg_ptr);return s=u[0],a=u[1],getStringFromWasm0(u[0],u[1])}finally{wasm.__wbindgen_free(s,a,1)}}get initiator_addr(){let s,a;try{const u=wasm.transaction_initiator_addr(this.__wbg_ptr);return s=u[0],a=u[1],getStringFromWasm0(u[0],u[1])}finally{wasm.__wbindgen_free(s,a,1)}}get pricing_mode(){return wasm.transaction_pricing_mode(this.__wbg_ptr)}get additional_computation_factor(){return wasm.transaction_additional_computation_factor(this.__wbg_ptr)}get receipt(){const s=wasm.transaction_receipt(this.__wbg_ptr);return Digest.__wrap(s)}get gas_price_tolerance(){return wasm.transaction_gas_price_tolerance(this.__wbg_ptr)}get account_hash(){const s=wasm.transaction_account_hash(this.__wbg_ptr);return AccountHash.__wrap(s)}addArg(s,a){var u=isLikeNone(a)?0:passStringToWasm0(a,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);const y=wasm.transaction_addArg(this.__wbg_ptr,s,u,WASM_VECTOR_LEN);if(y[2])throw takeFromExternrefTable0(y[1]);return Transaction.__wrap(y[0])}}const TransactionBuilderParamsFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_transactionbuilderparams_free(f>>>0,1));class TransactionBuilderParams{static __wrap(s){s>>>=0;const a=Object.create(TransactionBuilderParams.prototype);return a.__wbg_ptr=s,TransactionBuilderParamsFinalization.register(a,a.__wbg_ptr,a),a}__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,TransactionBuilderParamsFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_transactionbuilderparams_free(s,0)}static newSession(s,a){let u=0;isLikeNone(s)||(_assertClass(s,Bytes),u=s.__destroy_into_raw());const g=wasm.transactionbuilderparams_newSession(u,isLikeNone(a)?16777215:a?1:0);return TransactionBuilderParams.__wrap(g)}static newTransfer(s,a,u,g){let y=0;isLikeNone(s)||(_assertClass(s,URef),y=s.__destroy_into_raw()),_assertClass(a,TransferTarget);var v=a.__destroy_into_raw();const S=passStringToWasm0(u,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),M=wasm.transactionbuilderparams_newTransfer(y,v,S,WASM_VECTOR_LEN,!isLikeNone(g),isLikeNone(g)?BigInt(0):g);return TransactionBuilderParams.__wrap(M)}static newInvocableEntity(s,a){_assertClass(s,AddressableEntityHash);var u=s.__destroy_into_raw();const g=passStringToWasm0(a,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),v=wasm.transactionbuilderparams_newInvocableEntity(u,g,WASM_VECTOR_LEN);return TransactionBuilderParams.__wrap(v)}static newInvocableEntityAlias(s,a){const u=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),g=WASM_VECTOR_LEN,y=passStringToWasm0(a,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),S=wasm.transactionbuilderparams_newInvocableEntityAlias(u,g,y,WASM_VECTOR_LEN);return TransactionBuilderParams.__wrap(S)}static newPackage(s,a,u){_assertClass(s,PackageHash);var g=s.__destroy_into_raw();const y=passStringToWasm0(a,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),v=WASM_VECTOR_LEN;var S=isLikeNone(u)?0:passStringToWasm0(u,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);const M=wasm.transactionbuilderparams_newPackage(g,y,v,S,WASM_VECTOR_LEN);return TransactionBuilderParams.__wrap(M)}static newPackageAlias(s,a,u){const g=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),y=WASM_VECTOR_LEN,v=passStringToWasm0(a,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),S=WASM_VECTOR_LEN;var A=isLikeNone(u)?0:passStringToWasm0(u,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);const B=wasm.transactionbuilderparams_newPackageAlias(g,y,v,S,A,WASM_VECTOR_LEN);return TransactionBuilderParams.__wrap(B)}static newAddBid(s,a,u,g,y){_assertClass(s,PublicKey);var v=s.__destroy_into_raw();const S=passStringToWasm0(u,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),M=wasm.transactionbuilderparams_newAddBid(v,a,S,WASM_VECTOR_LEN,g,y);return TransactionBuilderParams.__wrap(M)}static newDelegate(s,a,u){_assertClass(s,PublicKey);var g=s.__destroy_into_raw();_assertClass(a,PublicKey);var y=a.__destroy_into_raw();const v=passStringToWasm0(u,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),A=wasm.transactionbuilderparams_newDelegate(g,y,v,WASM_VECTOR_LEN);return TransactionBuilderParams.__wrap(A)}static newUndelegate(s,a,u){_assertClass(s,PublicKey);var g=s.__destroy_into_raw();_assertClass(a,PublicKey);var y=a.__destroy_into_raw();const v=passStringToWasm0(u,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),A=wasm.transactionbuilderparams_newUndelegate(g,y,v,WASM_VECTOR_LEN);return TransactionBuilderParams.__wrap(A)}static newRedelegate(s,a,u,g){_assertClass(s,PublicKey);var y=s.__destroy_into_raw();_assertClass(a,PublicKey);var v=a.__destroy_into_raw();_assertClass(u,PublicKey);var S=u.__destroy_into_raw();const A=passStringToWasm0(g,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),B=wasm.transactionbuilderparams_newRedelegate(y,v,S,A,WASM_VECTOR_LEN);return TransactionBuilderParams.__wrap(B)}static newWithdrawBid(s,a){_assertClass(s,PublicKey);var u=s.__destroy_into_raw();const g=passStringToWasm0(a,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),v=wasm.transactionbuilderparams_newWithdrawBid(u,g,WASM_VECTOR_LEN);return TransactionBuilderParams.__wrap(v)}get kind(){return wasm.transactionbuilderparams_kind(this.__wbg_ptr)}set kind(s){wasm.transactionbuilderparams_set_kind(this.__wbg_ptr,s)}get transaction_bytes(){const s=wasm.transactionbuilderparams_transaction_bytes(this.__wbg_ptr);return 0===s?void 0:Bytes.__wrap(s)}set transaction_bytes(s){_assertClass(s,Bytes);var a=s.__destroy_into_raw();wasm.transactionbuilderparams_set_transaction_bytes(this.__wbg_ptr,a)}get maybe_source(){const s=wasm.transactionbuilderparams_maybe_source(this.__wbg_ptr);return 0===s?void 0:URef.__wrap(s)}set maybe_source(s){_assertClass(s,URef);var a=s.__destroy_into_raw();wasm.transactionbuilderparams_set_maybe_source(this.__wbg_ptr,a)}get target(){const s=wasm.transactionbuilderparams_target(this.__wbg_ptr);return 0===s?void 0:TransferTarget.__wrap(s)}set target(s){_assertClass(s,TransferTarget);var a=s.__destroy_into_raw();wasm.transactionbuilderparams_set_target(this.__wbg_ptr,a)}get amount(){const s=wasm.transactionbuilderparams_amount(this.__wbg_ptr);let a;return 0!==s[0]&&(a=getStringFromWasm0(s[0],s[1]).slice(),wasm.__wbindgen_free(s[0],1*s[1],1)),a}set amount(s){const a=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.transactionbuilderparams_set_amount(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get maybe_id(){const s=wasm.transactionbuilderparams_maybe_id(this.__wbg_ptr);return 0===s[0]?void 0:BigInt.asUintN(64,s[1])}set maybe_id(s){wasm.transactionbuilderparams_set_maybe_id(this.__wbg_ptr,s)}get entity_hash(){const s=wasm.transactionbuilderparams_entity_hash(this.__wbg_ptr);return 0===s?void 0:AddressableEntityHash.__wrap(s)}set entity_hash(s){_assertClass(s,AddressableEntityHash);var a=s.__destroy_into_raw();wasm.transactionbuilderparams_set_entity_hash(this.__wbg_ptr,a)}get entity_alias(){const s=wasm.transactionbuilderparams_entity_alias(this.__wbg_ptr);let a;return 0!==s[0]&&(a=getStringFromWasm0(s[0],s[1]).slice(),wasm.__wbindgen_free(s[0],1*s[1],1)),a}set entity_alias(s){const a=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.transactionbuilderparams_set_entity_alias(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get entry_point(){const s=wasm.transactionbuilderparams_entry_point(this.__wbg_ptr);let a;return 0!==s[0]&&(a=getStringFromWasm0(s[0],s[1]).slice(),wasm.__wbindgen_free(s[0],1*s[1],1)),a}set entry_point(s){const a=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.transactionbuilderparams_set_entry_point(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get package_hash(){const s=wasm.transactionbuilderparams_package_hash(this.__wbg_ptr);return 0===s?void 0:PackageHash.__wrap(s)}set package_hash(s){_assertClass(s,PackageHash);var a=s.__destroy_into_raw();wasm.transactionbuilderparams_set_package_hash(this.__wbg_ptr,a)}get package_alias(){const s=wasm.transactionbuilderparams_package_alias(this.__wbg_ptr);let a;return 0!==s[0]&&(a=getStringFromWasm0(s[0],s[1]).slice(),wasm.__wbindgen_free(s[0],1*s[1],1)),a}set package_alias(s){const a=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.transactionbuilderparams_set_package_alias(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get public_key(){const s=wasm.transactionbuilderparams_public_key(this.__wbg_ptr);return 0===s?void 0:PublicKey.__wrap(s)}set public_key(s){_assertClass(s,PublicKey);var a=s.__destroy_into_raw();wasm.transactionbuilderparams_set_public_key(this.__wbg_ptr,a)}get delegation_rate(){const s=wasm.transactionbuilderparams_delegation_rate(this.__wbg_ptr);return 16777215===s?void 0:s}set delegation_rate(s){wasm.transactionbuilderparams_set_delegation_rate(this.__wbg_ptr,s)}get delegator(){const s=wasm.transactionbuilderparams_delegator(this.__wbg_ptr);return 0===s?void 0:PublicKey.__wrap(s)}set delegator(s){_assertClass(s,PublicKey);var a=s.__destroy_into_raw();wasm.transactionbuilderparams_set_delegator(this.__wbg_ptr,a)}get validator(){const s=wasm.transactionbuilderparams_validator(this.__wbg_ptr);return 0===s?void 0:PublicKey.__wrap(s)}set validator(s){_assertClass(s,PublicKey);var a=s.__destroy_into_raw();wasm.transactionbuilderparams_set_validator(this.__wbg_ptr,a)}get new_validator(){const s=wasm.transactionbuilderparams_new_validator(this.__wbg_ptr);return 0===s?void 0:PublicKey.__wrap(s)}set new_validator(s){_assertClass(s,PublicKey);var a=s.__destroy_into_raw();wasm.transactionbuilderparams_set_new_validator(this.__wbg_ptr,a)}get minimum_delegation_amount(){const s=wasm.transactionbuilderparams_minimum_delegation_amount(this.__wbg_ptr);return 0===s[0]?void 0:BigInt.asUintN(64,s[1])}set minimum_delegation_amount(s){wasm.transactionbuilderparams_set_minimum_delegation_amount(this.__wbg_ptr,s)}get maximum_delegation_amount(){const s=wasm.transactionbuilderparams_maximum_delegation_amount(this.__wbg_ptr);return 0===s[0]?void 0:BigInt.asUintN(64,s[1])}set maximum_delegation_amount(s){wasm.transactionbuilderparams_set_maximum_delegation_amount(this.__wbg_ptr,s)}get is_install_upgrade(){const s=wasm.transactionbuilderparams_is_install_upgrade(this.__wbg_ptr);return 16777215===s?void 0:0!==s}set is_install_upgrade(s){wasm.transactionbuilderparams_set_is_install_upgrade(this.__wbg_ptr,s)}}const TransactionHashFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_transactionhash_free(f>>>0,1));class TransactionHash{static __wrap(s){s>>>=0;const a=Object.create(TransactionHash.prototype);return a.__wbg_ptr=s,TransactionHashFinalization.register(a,a.__wbg_ptr,a),a}__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,TransactionHashFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_transactionhash_free(s,0)}constructor(s){const a=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),g=wasm.transactionhash_new_js_alias(a,WASM_VECTOR_LEN);if(g[2])throw takeFromExternrefTable0(g[1]);return this.__wbg_ptr=g[0]>>>0,TransactionHashFinalization.register(this,this.__wbg_ptr,this),this}static fromRaw(s){const a=passArray8ToWasm0(s,wasm.__wbindgen_malloc),g=wasm.transactionhash_fromRaw(a,WASM_VECTOR_LEN);if(g[2])throw takeFromExternrefTable0(g[1]);return TransactionHash.__wrap(g[0])}digest(){const s=wasm.transactionhash_digest(this.__wbg_ptr);if(s[2])throw takeFromExternrefTable0(s[1]);return Digest.__wrap(s[0])}toJson(){return wasm.transactionhash_toJson(this.__wbg_ptr)}toString(){let s,a;try{const u=wasm.transactionhash_toString(this.__wbg_ptr);return s=u[0],a=u[1],getStringFromWasm0(u[0],u[1])}finally{wasm.__wbindgen_free(s,a,1)}}}const TransactionProcessedFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_transactionprocessed_free(f>>>0,1));class TransactionProcessed{static __wrap(s){s>>>=0;const a=Object.create(TransactionProcessed.prototype);return a.__wbg_ptr=s,TransactionProcessedFinalization.register(a,a.__wbg_ptr,a),a}__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,TransactionProcessedFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_transactionprocessed_free(s,0)}get hash(){const s=wasm.__wbg_get_transactionprocessed_hash(this.__wbg_ptr);return HashString.__wrap(s)}set hash(s){_assertClass(s,HashString);var a=s.__destroy_into_raw();wasm.__wbg_set_transactionprocessed_hash(this.__wbg_ptr,a)}get initiator_addr(){const s=wasm.__wbg_get_transactionprocessed_initiator_addr(this.__wbg_ptr);return PublicKeyString.__wrap(s)}set initiator_addr(s){_assertClass(s,PublicKeyString);var a=s.__destroy_into_raw();wasm.__wbg_set_transactionprocessed_initiator_addr(this.__wbg_ptr,a)}get timestamp(){let s,a;try{const u=wasm.__wbg_get_transactionprocessed_timestamp(this.__wbg_ptr);return s=u[0],a=u[1],getStringFromWasm0(u[0],u[1])}finally{wasm.__wbindgen_free(s,a,1)}}set timestamp(s){const a=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.__wbg_set_transactionprocessed_timestamp(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get ttl(){let s,a;try{const u=wasm.__wbg_get_transactionprocessed_ttl(this.__wbg_ptr);return s=u[0],a=u[1],getStringFromWasm0(u[0],u[1])}finally{wasm.__wbindgen_free(s,a,1)}}set ttl(s){const a=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.__wbg_set_transactionprocessed_ttl(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get block_hash(){let s,a;try{const u=wasm.__wbg_get_transactionprocessed_block_hash(this.__wbg_ptr);return s=u[0],a=u[1],getStringFromWasm0(u[0],u[1])}finally{wasm.__wbindgen_free(s,a,1)}}set block_hash(s){const a=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.__wbg_set_messages_topic_name_hash(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get execution_result(){const s=wasm.__wbg_get_transactionprocessed_execution_result(this.__wbg_ptr);return ExecutionResult.__wrap(s)}set execution_result(s){_assertClass(s,ExecutionResult);var a=s.__destroy_into_raw();wasm.__wbg_set_transactionprocessed_execution_result(this.__wbg_ptr,a)}get messages(){const s=wasm.__wbg_get_transactionprocessed_messages(this.__wbg_ptr);var a=getArrayJsValueFromWasm0(s[0],s[1]).slice();return wasm.__wbindgen_free(s[0],4*s[1],4),a}set messages(s){const a=passArrayJsValueToWasm0(s,wasm.__wbindgen_malloc);wasm.__wbg_set_transactionprocessed_messages(this.__wbg_ptr,a,WASM_VECTOR_LEN)}}const TransactionStrParamsFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_transactionstrparams_free(f>>>0,1));class TransactionStrParams{static __wrap(s){s>>>=0;const a=Object.create(TransactionStrParams.prototype);return a.__wbg_ptr=s,TransactionStrParamsFinalization.register(a,a.__wbg_ptr,a),a}__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,TransactionStrParamsFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_transactionstrparams_free(s,0)}constructor(s,a,u,g,y,v,S,A,M,B,X,de,le){const ue=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),ot=WASM_VECTOR_LEN;var rt=isLikeNone(a)?0:passStringToWasm0(a,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),st=WASM_VECTOR_LEN,Ft=isLikeNone(u)?0:passStringToWasm0(u,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),Dn=WASM_VECTOR_LEN,Tn=isLikeNone(g)?0:passStringToWasm0(g,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),Gn=WASM_VECTOR_LEN,In=isLikeNone(y)?0:passStringToWasm0(y,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),qn=WASM_VECTOR_LEN,_r=isLikeNone(v)?0:passArrayJsValueToWasm0(v,wasm.__wbindgen_malloc),Mn=WASM_VECTOR_LEN,ln=isLikeNone(S)?0:passStringToWasm0(S,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),Nn=WASM_VECTOR_LEN,dr=isLikeNone(M)?0:passStringToWasm0(M,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),fr=WASM_VECTOR_LEN,bu=isLikeNone(B)?0:passStringToWasm0(B,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),Pi=WASM_VECTOR_LEN,Vi=isLikeNone(X)?0:passStringToWasm0(X,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),Ts=WASM_VECTOR_LEN,vu=isLikeNone(de)?0:passStringToWasm0(de,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),Eu=WASM_VECTOR_LEN;const Ma=wasm.transactionstrparams_new(ue,ot,rt,st,Ft,Dn,Tn,Gn,In,qn,_r,Mn,ln,Nn,isLikeNone(A)?3:A,dr,fr,bu,Pi,Vi,Ts,vu,Eu,isLikeNone(le)?16777215:le?1:0);return this.__wbg_ptr=Ma>>>0,TransactionStrParamsFinalization.register(this,this.__wbg_ptr,this),this}static new_with_defaults(s,a,u,g){const y=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),v=WASM_VECTOR_LEN;var S=isLikeNone(a)?0:passStringToWasm0(a,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),A=WASM_VECTOR_LEN,M=isLikeNone(u)?0:passStringToWasm0(u,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),B=WASM_VECTOR_LEN,X=isLikeNone(g)?0:passStringToWasm0(g,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);const le=wasm.transactionstrparams_new_with_defaults(y,v,S,A,M,B,X,WASM_VECTOR_LEN);return TransactionStrParams.__wrap(le)}get secret_key(){const s=wasm.transactionstrparams_secret_key(this.__wbg_ptr);let a;return 0!==s[0]&&(a=getStringFromWasm0(s[0],s[1]).slice(),wasm.__wbindgen_free(s[0],1*s[1],1)),a}set secret_key(s){const a=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.transactionstrparams_set_secret_key(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get timestamp(){const s=wasm.transactionstrparams_timestamp(this.__wbg_ptr);let a;return 0!==s[0]&&(a=getStringFromWasm0(s[0],s[1]).slice(),wasm.__wbindgen_free(s[0],1*s[1],1)),a}set timestamp(s){var a=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.transactionstrparams_set_timestamp(this.__wbg_ptr,a,WASM_VECTOR_LEN)}setDefaultTimestamp(){wasm.transactionstrparams_setDefaultTimestamp(this.__wbg_ptr)}get ttl(){const s=wasm.transactionstrparams_ttl(this.__wbg_ptr);let a;return 0!==s[0]&&(a=getStringFromWasm0(s[0],s[1]).slice(),wasm.__wbindgen_free(s[0],1*s[1],1)),a}set ttl(s){var a=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.transactionstrparams_set_ttl(this.__wbg_ptr,a,WASM_VECTOR_LEN)}setDefaultTTL(){wasm.transactionstrparams_setDefaultTTL(this.__wbg_ptr)}get chain_name(){const s=wasm.transactionstrparams_chain_name(this.__wbg_ptr);let a;return 0!==s[0]&&(a=getStringFromWasm0(s[0],s[1]).slice(),wasm.__wbindgen_free(s[0],1*s[1],1)),a}set chain_name(s){const a=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.transactionstrparams_set_chain_name(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get initiator_addr(){const s=wasm.transactionstrparams_initiator_addr(this.__wbg_ptr);let a;return 0!==s[0]&&(a=getStringFromWasm0(s[0],s[1]).slice(),wasm.__wbindgen_free(s[0],1*s[1],1)),a}set initiator_addr(s){const a=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.transactionstrparams_set_initiator_addr(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get session_args_simple(){const s=wasm.transactionstrparams_session_args_simple(this.__wbg_ptr);return 0===s?void 0:ArgsSimple.__wrap(s)}set session_args_simple(s){const a=passArrayJsValueToWasm0(s,wasm.__wbindgen_malloc);wasm.transactionstrparams_set_session_args_simple(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get session_args_json(){const s=wasm.transactionstrparams_session_args_json(this.__wbg_ptr);let a;return 0!==s[0]&&(a=getStringFromWasm0(s[0],s[1]).slice(),wasm.__wbindgen_free(s[0],1*s[1],1)),a}set session_args_json(s){const a=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.transactionstrparams_set_session_args_json(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get pricing_mode(){const s=wasm.transactionstrparams_pricing_mode(this.__wbg_ptr);return 3===s?void 0:s}set pricing_mode(s){wasm.transactionstrparams_set_pricing_mode(this.__wbg_ptr,s)}get additional_computation_factor(){const s=wasm.transactionstrparams_additional_computation_factor(this.__wbg_ptr);let a;return 0!==s[0]&&(a=getStringFromWasm0(s[0],s[1]).slice(),wasm.__wbindgen_free(s[0],1*s[1],1)),a}set additional_computation_factor(s){const a=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.transactionstrparams_set_additional_computation_factor(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get payment_amount(){const s=wasm.transactionstrparams_payment_amount(this.__wbg_ptr);let a;return 0!==s[0]&&(a=getStringFromWasm0(s[0],s[1]).slice(),wasm.__wbindgen_free(s[0],1*s[1],1)),a}set payment_amount(s){const a=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.transactionstrparams_set_payment_amount(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get gas_price_tolerance(){const s=wasm.transactionstrparams_gas_price_tolerance(this.__wbg_ptr);let a;return 0!==s[0]&&(a=getStringFromWasm0(s[0],s[1]).slice(),wasm.__wbindgen_free(s[0],1*s[1],1)),a}set gas_price_tolerance(s){const a=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.transactionstrparams_set_gas_price_tolerance(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get receipt(){const s=wasm.transactionstrparams_receipt(this.__wbg_ptr);let a;return 0!==s[0]&&(a=getStringFromWasm0(s[0],s[1]).slice(),wasm.__wbindgen_free(s[0],1*s[1],1)),a}set receipt(s){const a=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.transactionstrparams_set_receipt(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get standard_payment(){const s=wasm.transactionstrparams_standard_payment(this.__wbg_ptr);return 16777215===s?void 0:0!==s}set standard_payment(s){wasm.transactionstrparams_set_standard_payment(this.__wbg_ptr,s)}}const TransferAddrFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_transferaddr_free(f>>>0,1));class TransferAddr{static __wrap(s){s>>>=0;const a=Object.create(TransferAddr.prototype);return a.__wbg_ptr=s,TransferAddrFinalization.register(a,a.__wbg_ptr,a),a}__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,TransferAddrFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_transferaddr_free(s,0)}constructor(s){const a=passArray8ToWasm0(s,wasm.__wbindgen_malloc),g=wasm.transferaddr_new(a,WASM_VECTOR_LEN);if(g[2])throw takeFromExternrefTable0(g[1]);return this.__wbg_ptr=g[0]>>>0,TransferAddrFinalization.register(this,this.__wbg_ptr,this),this}}const TransferTargetFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_transfertarget_free(f>>>0,1));class TransferTarget{static __wrap(s){s>>>=0;const a=Object.create(TransferTarget.prototype);return a.__wbg_ptr=s,TransferTargetFinalization.register(a,a.__wbg_ptr,a),a}__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,TransferTargetFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_transfertarget_free(s,0)}constructor(s,a,u,g){let y=0;isLikeNone(a)||(_assertClass(a,PublicKey),y=a.__destroy_into_raw());let v=0;isLikeNone(u)||(_assertClass(u,AccountHash),v=u.__destroy_into_raw());let S=0;isLikeNone(g)||(_assertClass(g,URef),S=g.__destroy_into_raw());const A=wasm.transfertarget_new(s,y,v,S);return this.__wbg_ptr=A>>>0,TransferTargetFinalization.register(this,this.__wbg_ptr,this),this}}const URefFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_uref_free(f>>>0,1));class URef{static __wrap(s){s>>>=0;const a=Object.create(URef.prototype);return a.__wbg_ptr=s,URefFinalization.register(a,a.__wbg_ptr,a),a}__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,URefFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_uref_free(s,0)}constructor(s,a){const u=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),y=wasm.uref_new_js_alias(u,WASM_VECTOR_LEN,a);if(y[2])throw takeFromExternrefTable0(y[1]);return this.__wbg_ptr=y[0]>>>0,URefFinalization.register(this,this.__wbg_ptr,this),this}static fromFormattedStr(s){const a=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),g=wasm.uref_fromFormattedStr(a,WASM_VECTOR_LEN);if(g[2])throw takeFromExternrefTable0(g[1]);return URef.__wrap(g[0])}static fromUint8Array(s,a){const u=passArray8ToWasm0(s,wasm.__wbindgen_malloc),y=wasm.uref_fromUint8Array(u,WASM_VECTOR_LEN,a);return URef.__wrap(y)}toFormattedString(){let s,a;try{const u=wasm.uref_toFormattedString(this.__wbg_ptr);return s=u[0],a=u[1],getStringFromWasm0(u[0],u[1])}finally{wasm.__wbindgen_free(s,a,1)}}toJson(){return wasm.uref_toJson(this.__wbg_ptr)}}const URefAddrFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_urefaddr_free(f>>>0,1));class URefAddr{static __wrap(s){s>>>=0;const a=Object.create(URefAddr.prototype);return a.__wbg_ptr=s,URefAddrFinalization.register(a,a.__wbg_ptr,a),a}__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,URefAddrFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_urefaddr_free(s,0)}constructor(s){const a=passArray8ToWasm0(s,wasm.__wbindgen_malloc),g=wasm.urefaddr_new(a,WASM_VECTOR_LEN);if(g[2])throw takeFromExternrefTable0(g[1]);return this.__wbg_ptr=g[0]>>>0,URefAddrFinalization.register(this,this.__wbg_ptr,this),this}}const Version2Finalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_version2_free(f>>>0,1));class Version2{static __wrap(s){s>>>=0;const a=Object.create(Version2.prototype);return a.__wbg_ptr=s,Version2Finalization.register(a,a.__wbg_ptr,a),a}__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,Version2Finalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_version2_free(s,0)}get initiator(){const s=wasm.__wbg_get_transactionprocessed_hash(this.__wbg_ptr);return PublicKeyString.__wrap(s)}set initiator(s){_assertClass(s,PublicKeyString);var a=s.__destroy_into_raw();wasm.__wbg_set_transactionprocessed_hash(this.__wbg_ptr,a)}get error_message(){const s=wasm.__wbg_get_version2_error_message(this.__wbg_ptr);let a;return 0!==s[0]&&(a=getStringFromWasm0(s[0],s[1]).slice(),wasm.__wbindgen_free(s[0],1*s[1],1)),a}set error_message(s){var a=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.__wbg_set_version2_error_message(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get limit(){let s,a;try{const u=wasm.__wbg_get_version2_limit(this.__wbg_ptr);return s=u[0],a=u[1],getStringFromWasm0(u[0],u[1])}finally{wasm.__wbindgen_free(s,a,1)}}set limit(s){const a=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.__wbg_set_failure_error_message(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get consumed(){let s,a;try{const u=wasm.__wbg_get_version2_consumed(this.__wbg_ptr);return s=u[0],a=u[1],getStringFromWasm0(u[0],u[1])}finally{wasm.__wbindgen_free(s,a,1)}}set consumed(s){const a=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.__wbg_set_transactionprocessed_timestamp(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get cost(){let s,a;try{const u=wasm.__wbg_get_version2_cost(this.__wbg_ptr);return s=u[0],a=u[1],getStringFromWasm0(u[0],u[1])}finally{wasm.__wbindgen_free(s,a,1)}}set cost(s){const a=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.__wbg_set_transactionprocessed_ttl(this.__wbg_ptr,a,WASM_VECTOR_LEN)}}const WatcherFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_watcher_free(f>>>0,1));class Watcher{static __wrap(s){s>>>=0;const a=Object.create(Watcher.prototype);return a.__wbg_ptr=s,WatcherFinalization.register(a,a.__wbg_ptr,a),a}__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,WatcherFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_watcher_free(s,0)}constructor(s,a){const u=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),y=wasm.watcher_new(u,WASM_VECTOR_LEN,!isLikeNone(a),isLikeNone(a)?BigInt(0):a);return this.__wbg_ptr=y>>>0,WatcherFinalization.register(this,this.__wbg_ptr,this),this}subscribe(s){const a=passArrayJsValueToWasm0(s,wasm.__wbindgen_malloc),g=wasm.watcher_subscribe(this.__wbg_ptr,a,WASM_VECTOR_LEN);if(g[1])throw takeFromExternrefTable0(g[0])}unsubscribe(s){const a=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.watcher_unsubscribe(this.__wbg_ptr,a,WASM_VECTOR_LEN)}start(){return wasm.watcher_start(this.__wbg_ptr)}stop(){wasm.watcher_stop(this.__wbg_ptr)}}const getAccountOptionsFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_getaccountoptions_free(f>>>0,1));class getAccountOptions{static __wrap(s){s>>>=0;const a=Object.create(getAccountOptions.prototype);return a.__wbg_ptr=s,getAccountOptionsFinalization.register(a,a.__wbg_ptr,a),a}__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,getAccountOptionsFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_getaccountoptions_free(s,0)}get account_identifier(){const s=wasm.__wbg_get_getaccountoptions_account_identifier(this.__wbg_ptr);return 0===s?void 0:AccountIdentifier.__wrap(s)}set account_identifier(s){let a=0;isLikeNone(s)||(_assertClass(s,AccountIdentifier),a=s.__destroy_into_raw()),wasm.__wbg_set_getaccountoptions_account_identifier(this.__wbg_ptr,a)}get account_identifier_as_string(){const s=wasm.__wbg_get_getaccountoptions_account_identifier_as_string(this.__wbg_ptr);let a;return 0!==s[0]&&(a=getStringFromWasm0(s[0],s[1]).slice(),wasm.__wbindgen_free(s[0],1*s[1],1)),a}set account_identifier_as_string(s){var a=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.__wbg_set_getaccountoptions_account_identifier_as_string(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get maybe_block_id_as_string(){const s=wasm.__wbg_get_getaccountoptions_maybe_block_id_as_string(this.__wbg_ptr);let a;return 0!==s[0]&&(a=getStringFromWasm0(s[0],s[1]).slice(),wasm.__wbindgen_free(s[0],1*s[1],1)),a}set maybe_block_id_as_string(s){var a=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.__wbg_set_getaccountoptions_maybe_block_id_as_string(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get maybe_block_identifier(){const s=wasm.__wbg_get_getaccountoptions_maybe_block_identifier(this.__wbg_ptr);return 0===s?void 0:BlockIdentifier.__wrap(s)}set maybe_block_identifier(s){let a=0;isLikeNone(s)||(_assertClass(s,BlockIdentifier),a=s.__destroy_into_raw()),wasm.__wbg_set_getaccountoptions_maybe_block_identifier(this.__wbg_ptr,a)}get rpc_address(){const s=wasm.__wbg_get_getaccountoptions_rpc_address(this.__wbg_ptr);let a;return 0!==s[0]&&(a=getStringFromWasm0(s[0],s[1]).slice(),wasm.__wbindgen_free(s[0],1*s[1],1)),a}set rpc_address(s){var a=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.__wbg_set_getaccountoptions_rpc_address(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get verbosity(){const s=wasm.__wbg_get_getaccountoptions_verbosity(this.__wbg_ptr);return 3===s?void 0:s}set verbosity(s){wasm.__wbg_set_getaccountoptions_verbosity(this.__wbg_ptr,isLikeNone(s)?3:s)}}const getAuctionInfoOptionsFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_getauctioninfooptions_free(f>>>0,1));class getAuctionInfoOptions{static __wrap(s){s>>>=0;const a=Object.create(getAuctionInfoOptions.prototype);return a.__wbg_ptr=s,getAuctionInfoOptionsFinalization.register(a,a.__wbg_ptr,a),a}__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,getAuctionInfoOptionsFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_getauctioninfooptions_free(s,0)}get maybe_block_id_as_string(){const s=wasm.__wbg_get_getauctioninfooptions_maybe_block_id_as_string(this.__wbg_ptr);let a;return 0!==s[0]&&(a=getStringFromWasm0(s[0],s[1]).slice(),wasm.__wbindgen_free(s[0],1*s[1],1)),a}set maybe_block_id_as_string(s){var a=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.__wbg_set_getauctioninfooptions_maybe_block_id_as_string(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get maybe_block_identifier(){const s=wasm.__wbg_get_getauctioninfooptions_maybe_block_identifier(this.__wbg_ptr);return 0===s?void 0:BlockIdentifier.__wrap(s)}set maybe_block_identifier(s){let a=0;isLikeNone(s)||(_assertClass(s,BlockIdentifier),a=s.__destroy_into_raw()),wasm.__wbg_set_getauctioninfooptions_maybe_block_identifier(this.__wbg_ptr,a)}get rpc_address(){const s=wasm.__wbg_get_getauctioninfooptions_rpc_address(this.__wbg_ptr);let a;return 0!==s[0]&&(a=getStringFromWasm0(s[0],s[1]).slice(),wasm.__wbindgen_free(s[0],1*s[1],1)),a}set rpc_address(s){var a=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.__wbg_set_getauctioninfooptions_rpc_address(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get verbosity(){const s=wasm.__wbg_get_getauctioninfooptions_verbosity(this.__wbg_ptr);return 3===s?void 0:s}set verbosity(s){wasm.__wbg_set_getauctioninfooptions_verbosity(this.__wbg_ptr,isLikeNone(s)?3:s)}}const getBalanceOptionsFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_getbalanceoptions_free(f>>>0,1));class getBalanceOptions{static __wrap(s){s>>>=0;const a=Object.create(getBalanceOptions.prototype);return a.__wbg_ptr=s,getBalanceOptionsFinalization.register(a,a.__wbg_ptr,a),a}__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,getBalanceOptionsFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_getbalanceoptions_free(s,0)}get state_root_hash_as_string(){const s=wasm.__wbg_get_getbalanceoptions_state_root_hash_as_string(this.__wbg_ptr);let a;return 0!==s[0]&&(a=getStringFromWasm0(s[0],s[1]).slice(),wasm.__wbindgen_free(s[0],1*s[1],1)),a}set state_root_hash_as_string(s){var a=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.__wbg_set_getbalanceoptions_state_root_hash_as_string(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get state_root_hash(){const s=wasm.__wbg_get_getbalanceoptions_state_root_hash(this.__wbg_ptr);return 0===s?void 0:Digest.__wrap(s)}set state_root_hash(s){let a=0;isLikeNone(s)||(_assertClass(s,Digest),a=s.__destroy_into_raw()),wasm.__wbg_set_getbalanceoptions_state_root_hash(this.__wbg_ptr,a)}get purse_uref_as_string(){const s=wasm.__wbg_get_getbalanceoptions_purse_uref_as_string(this.__wbg_ptr);let a;return 0!==s[0]&&(a=getStringFromWasm0(s[0],s[1]).slice(),wasm.__wbindgen_free(s[0],1*s[1],1)),a}set purse_uref_as_string(s){var a=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.__wbg_set_getbalanceoptions_purse_uref_as_string(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get purse_uref(){const s=wasm.__wbg_get_getbalanceoptions_purse_uref(this.__wbg_ptr);return 0===s?void 0:URef.__wrap(s)}set purse_uref(s){let a=0;isLikeNone(s)||(_assertClass(s,URef),a=s.__destroy_into_raw()),wasm.__wbg_set_getbalanceoptions_purse_uref(this.__wbg_ptr,a)}get rpc_address(){const s=wasm.__wbg_get_getbalanceoptions_rpc_address(this.__wbg_ptr);let a;return 0!==s[0]&&(a=getStringFromWasm0(s[0],s[1]).slice(),wasm.__wbindgen_free(s[0],1*s[1],1)),a}set rpc_address(s){var a=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.__wbg_set_getbalanceoptions_rpc_address(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get verbosity(){const s=wasm.__wbg_get_getbalanceoptions_verbosity(this.__wbg_ptr);return 3===s?void 0:s}set verbosity(s){wasm.__wbg_set_getbalanceoptions_verbosity(this.__wbg_ptr,isLikeNone(s)?3:s)}}const getBlockOptionsFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_getblockoptions_free(f>>>0,1));class getBlockOptions{static __wrap(s){s>>>=0;const a=Object.create(getBlockOptions.prototype);return a.__wbg_ptr=s,getBlockOptionsFinalization.register(a,a.__wbg_ptr,a),a}__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,getBlockOptionsFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_getblockoptions_free(s,0)}get maybe_block_id_as_string(){const s=wasm.__wbg_get_getblockoptions_maybe_block_id_as_string(this.__wbg_ptr);let a;return 0!==s[0]&&(a=getStringFromWasm0(s[0],s[1]).slice(),wasm.__wbindgen_free(s[0],1*s[1],1)),a}set maybe_block_id_as_string(s){var a=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.__wbg_set_getauctioninfooptions_maybe_block_id_as_string(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get maybe_block_identifier(){const s=wasm.__wbg_get_getauctioninfooptions_maybe_block_identifier(this.__wbg_ptr);return 0===s?void 0:BlockIdentifier.__wrap(s)}set maybe_block_identifier(s){let a=0;isLikeNone(s)||(_assertClass(s,BlockIdentifier),a=s.__destroy_into_raw()),wasm.__wbg_set_getauctioninfooptions_maybe_block_identifier(this.__wbg_ptr,a)}get rpc_address(){const s=wasm.__wbg_get_getblockoptions_rpc_address(this.__wbg_ptr);let a;return 0!==s[0]&&(a=getStringFromWasm0(s[0],s[1]).slice(),wasm.__wbindgen_free(s[0],1*s[1],1)),a}set rpc_address(s){var a=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.__wbg_set_getauctioninfooptions_rpc_address(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get verbosity(){const s=wasm.__wbg_get_getauctioninfooptions_verbosity(this.__wbg_ptr);return 3===s?void 0:s}set verbosity(s){wasm.__wbg_set_getauctioninfooptions_verbosity(this.__wbg_ptr,isLikeNone(s)?3:s)}}const getBlockTransfersOptionsFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_getblocktransfersoptions_free(f>>>0,1));class getBlockTransfersOptions{static __wrap(s){s>>>=0;const a=Object.create(getBlockTransfersOptions.prototype);return a.__wbg_ptr=s,getBlockTransfersOptionsFinalization.register(a,a.__wbg_ptr,a),a}__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,getBlockTransfersOptionsFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_getblocktransfersoptions_free(s,0)}get maybe_block_id_as_string(){const s=wasm.__wbg_get_getblocktransfersoptions_maybe_block_id_as_string(this.__wbg_ptr);let a;return 0!==s[0]&&(a=getStringFromWasm0(s[0],s[1]).slice(),wasm.__wbindgen_free(s[0],1*s[1],1)),a}set maybe_block_id_as_string(s){var a=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.__wbg_set_getblocktransfersoptions_maybe_block_id_as_string(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get maybe_block_identifier(){const s=wasm.__wbg_get_getblocktransfersoptions_maybe_block_identifier(this.__wbg_ptr);return 0===s?void 0:BlockIdentifier.__wrap(s)}set maybe_block_identifier(s){let a=0;isLikeNone(s)||(_assertClass(s,BlockIdentifier),a=s.__destroy_into_raw()),wasm.__wbg_set_getblocktransfersoptions_maybe_block_identifier(this.__wbg_ptr,a)}get verbosity(){const s=wasm.__wbg_get_getblocktransfersoptions_verbosity(this.__wbg_ptr);return 3===s?void 0:s}set verbosity(s){wasm.__wbg_set_getblocktransfersoptions_verbosity(this.__wbg_ptr,isLikeNone(s)?3:s)}get rpc_address(){const s=wasm.__wbg_get_getblocktransfersoptions_rpc_address(this.__wbg_ptr);let a;return 0!==s[0]&&(a=getStringFromWasm0(s[0],s[1]).slice(),wasm.__wbindgen_free(s[0],1*s[1],1)),a}set rpc_address(s){var a=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.__wbg_set_getblocktransfersoptions_rpc_address(this.__wbg_ptr,a,WASM_VECTOR_LEN)}}const getDeployOptionsFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_getdeployoptions_free(f>>>0,1));class getDeployOptions{static __wrap(s){s>>>=0;const a=Object.create(getDeployOptions.prototype);return a.__wbg_ptr=s,getDeployOptionsFinalization.register(a,a.__wbg_ptr,a),a}__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,getDeployOptionsFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_getdeployoptions_free(s,0)}get deploy_hash_as_string(){const s=wasm.__wbg_get_getdeployoptions_deploy_hash_as_string(this.__wbg_ptr);let a;return 0!==s[0]&&(a=getStringFromWasm0(s[0],s[1]).slice(),wasm.__wbindgen_free(s[0],1*s[1],1)),a}set deploy_hash_as_string(s){var a=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.__wbg_set_getdeployoptions_deploy_hash_as_string(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get deploy_hash(){const s=wasm.__wbg_get_getdeployoptions_deploy_hash(this.__wbg_ptr);return 0===s?void 0:DeployHash.__wrap(s)}set deploy_hash(s){let a=0;isLikeNone(s)||(_assertClass(s,DeployHash),a=s.__destroy_into_raw()),wasm.__wbg_set_getdeployoptions_deploy_hash(this.__wbg_ptr,a)}get finalized_approvals(){const s=wasm.__wbg_get_getdeployoptions_finalized_approvals(this.__wbg_ptr);return 16777215===s?void 0:0!==s}set finalized_approvals(s){wasm.__wbg_set_getdeployoptions_finalized_approvals(this.__wbg_ptr,isLikeNone(s)?16777215:s?1:0)}get rpc_address(){const s=wasm.__wbg_get_getdeployoptions_rpc_address(this.__wbg_ptr);let a;return 0!==s[0]&&(a=getStringFromWasm0(s[0],s[1]).slice(),wasm.__wbindgen_free(s[0],1*s[1],1)),a}set rpc_address(s){var a=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.__wbg_set_getdeployoptions_rpc_address(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get verbosity(){const s=wasm.__wbg_get_getdeployoptions_verbosity(this.__wbg_ptr);return 3===s?void 0:s}set verbosity(s){wasm.__wbg_set_getdeployoptions_verbosity(this.__wbg_ptr,isLikeNone(s)?3:s)}}const getDictionaryItemOptionsFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_getdictionaryitemoptions_free(f>>>0,1));class getDictionaryItemOptions{static __wrap(s){s>>>=0;const a=Object.create(getDictionaryItemOptions.prototype);return a.__wbg_ptr=s,getDictionaryItemOptionsFinalization.register(a,a.__wbg_ptr,a),a}__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,getDictionaryItemOptionsFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_getdictionaryitemoptions_free(s,0)}get state_root_hash_as_string(){const s=wasm.__wbg_get_getdictionaryitemoptions_state_root_hash_as_string(this.__wbg_ptr);let a;return 0!==s[0]&&(a=getStringFromWasm0(s[0],s[1]).slice(),wasm.__wbindgen_free(s[0],1*s[1],1)),a}set state_root_hash_as_string(s){var a=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.__wbg_set_getdictionaryitemoptions_state_root_hash_as_string(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get state_root_hash(){const s=wasm.__wbg_get_getdictionaryitemoptions_state_root_hash(this.__wbg_ptr);return 0===s?void 0:Digest.__wrap(s)}set state_root_hash(s){let a=0;isLikeNone(s)||(_assertClass(s,Digest),a=s.__destroy_into_raw()),wasm.__wbg_set_getdictionaryitemoptions_state_root_hash(this.__wbg_ptr,a)}get dictionary_item_params(){const s=wasm.__wbg_get_getdictionaryitemoptions_dictionary_item_params(this.__wbg_ptr);return 0===s?void 0:DictionaryItemStrParams.__wrap(s)}set dictionary_item_params(s){let a=0;isLikeNone(s)||(_assertClass(s,DictionaryItemStrParams),a=s.__destroy_into_raw()),wasm.__wbg_set_getdictionaryitemoptions_dictionary_item_params(this.__wbg_ptr,a)}get dictionary_item_identifier(){const s=wasm.__wbg_get_getdictionaryitemoptions_dictionary_item_identifier(this.__wbg_ptr);return 0===s?void 0:DictionaryItemIdentifier.__wrap(s)}set dictionary_item_identifier(s){let a=0;isLikeNone(s)||(_assertClass(s,DictionaryItemIdentifier),a=s.__destroy_into_raw()),wasm.__wbg_set_getdictionaryitemoptions_dictionary_item_identifier(this.__wbg_ptr,a)}get rpc_address(){const s=wasm.__wbg_get_getdictionaryitemoptions_rpc_address(this.__wbg_ptr);let a;return 0!==s[0]&&(a=getStringFromWasm0(s[0],s[1]).slice(),wasm.__wbindgen_free(s[0],1*s[1],1)),a}set rpc_address(s){var a=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.__wbg_set_getdictionaryitemoptions_rpc_address(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get verbosity(){const s=wasm.__wbg_get_getdictionaryitemoptions_verbosity(this.__wbg_ptr);return 3===s?void 0:s}set verbosity(s){wasm.__wbg_set_getdictionaryitemoptions_verbosity(this.__wbg_ptr,isLikeNone(s)?3:s)}}const getEntityOptionsFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_getentityoptions_free(f>>>0,1));class getEntityOptions{static __wrap(s){s>>>=0;const a=Object.create(getEntityOptions.prototype);return a.__wbg_ptr=s,getEntityOptionsFinalization.register(a,a.__wbg_ptr,a),a}__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,getEntityOptionsFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_getentityoptions_free(s,0)}get entity_identifier(){const s=wasm.__wbg_get_getentityoptions_entity_identifier(this.__wbg_ptr);return 0===s?void 0:EntityIdentifier.__wrap(s)}set entity_identifier(s){let a=0;isLikeNone(s)||(_assertClass(s,EntityIdentifier),a=s.__destroy_into_raw()),wasm.__wbg_set_getentityoptions_entity_identifier(this.__wbg_ptr,a)}get entity_identifier_as_string(){const s=wasm.__wbg_get_getentityoptions_entity_identifier_as_string(this.__wbg_ptr);let a;return 0!==s[0]&&(a=getStringFromWasm0(s[0],s[1]).slice(),wasm.__wbindgen_free(s[0],1*s[1],1)),a}set entity_identifier_as_string(s){var a=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.__wbg_set_getentityoptions_entity_identifier_as_string(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get maybe_block_id_as_string(){const s=wasm.__wbg_get_getentityoptions_maybe_block_id_as_string(this.__wbg_ptr);let a;return 0!==s[0]&&(a=getStringFromWasm0(s[0],s[1]).slice(),wasm.__wbindgen_free(s[0],1*s[1],1)),a}set maybe_block_id_as_string(s){var a=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.__wbg_set_getentityoptions_maybe_block_id_as_string(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get maybe_block_identifier(){const s=wasm.__wbg_get_getentityoptions_maybe_block_identifier(this.__wbg_ptr);return 0===s?void 0:BlockIdentifier.__wrap(s)}set maybe_block_identifier(s){let a=0;isLikeNone(s)||(_assertClass(s,BlockIdentifier),a=s.__destroy_into_raw()),wasm.__wbg_set_getentityoptions_maybe_block_identifier(this.__wbg_ptr,a)}get rpc_address(){const s=wasm.__wbg_get_getentityoptions_rpc_address(this.__wbg_ptr);let a;return 0!==s[0]&&(a=getStringFromWasm0(s[0],s[1]).slice(),wasm.__wbindgen_free(s[0],1*s[1],1)),a}set rpc_address(s){var a=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.__wbg_set_getentityoptions_rpc_address(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get verbosity(){const s=wasm.__wbg_get_getentityoptions_verbosity(this.__wbg_ptr);return 3===s?void 0:s}set verbosity(s){wasm.__wbg_set_getentityoptions_verbosity(this.__wbg_ptr,isLikeNone(s)?3:s)}}const getEraInfoOptionsFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_geterainfooptions_free(f>>>0,1));class getEraInfoOptions{static __wrap(s){s>>>=0;const a=Object.create(getEraInfoOptions.prototype);return a.__wbg_ptr=s,getEraInfoOptionsFinalization.register(a,a.__wbg_ptr,a),a}__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,getEraInfoOptionsFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_geterainfooptions_free(s,0)}get maybe_block_id_as_string(){const s=wasm.__wbg_get_geterainfooptions_maybe_block_id_as_string(this.__wbg_ptr);let a;return 0!==s[0]&&(a=getStringFromWasm0(s[0],s[1]).slice(),wasm.__wbindgen_free(s[0],1*s[1],1)),a}set maybe_block_id_as_string(s){var a=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.__wbg_set_geterainfooptions_maybe_block_id_as_string(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get maybe_block_identifier(){const s=wasm.__wbg_get_geterainfooptions_maybe_block_identifier(this.__wbg_ptr);return 0===s?void 0:BlockIdentifier.__wrap(s)}set maybe_block_identifier(s){let a=0;isLikeNone(s)||(_assertClass(s,BlockIdentifier),a=s.__destroy_into_raw()),wasm.__wbg_set_geterainfooptions_maybe_block_identifier(this.__wbg_ptr,a)}get rpc_address(){const s=wasm.__wbg_get_geterainfooptions_rpc_address(this.__wbg_ptr);let a;return 0!==s[0]&&(a=getStringFromWasm0(s[0],s[1]).slice(),wasm.__wbindgen_free(s[0],1*s[1],1)),a}set rpc_address(s){var a=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.__wbg_set_geterainfooptions_rpc_address(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get verbosity(){const s=wasm.__wbg_get_geterainfooptions_verbosity(this.__wbg_ptr);return 3===s?void 0:s}set verbosity(s){wasm.__wbg_set_geterainfooptions_verbosity(this.__wbg_ptr,isLikeNone(s)?3:s)}}const getEraSummaryOptionsFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_geterasummaryoptions_free(f>>>0,1));class getEraSummaryOptions{static __wrap(s){s>>>=0;const a=Object.create(getEraSummaryOptions.prototype);return a.__wbg_ptr=s,getEraSummaryOptionsFinalization.register(a,a.__wbg_ptr,a),a}__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,getEraSummaryOptionsFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_geterasummaryoptions_free(s,0)}get maybe_block_id_as_string(){const s=wasm.__wbg_get_geterasummaryoptions_maybe_block_id_as_string(this.__wbg_ptr);let a;return 0!==s[0]&&(a=getStringFromWasm0(s[0],s[1]).slice(),wasm.__wbindgen_free(s[0],1*s[1],1)),a}set maybe_block_id_as_string(s){var a=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.__wbg_set_geterasummaryoptions_maybe_block_id_as_string(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get maybe_block_identifier(){const s=wasm.__wbg_get_getaccountoptions_maybe_block_identifier(this.__wbg_ptr);return 0===s?void 0:BlockIdentifier.__wrap(s)}set maybe_block_identifier(s){let a=0;isLikeNone(s)||(_assertClass(s,BlockIdentifier),a=s.__destroy_into_raw()),wasm.__wbg_set_getaccountoptions_maybe_block_identifier(this.__wbg_ptr,a)}get rpc_address(){const s=wasm.__wbg_get_geterasummaryoptions_rpc_address(this.__wbg_ptr);let a;return 0!==s[0]&&(a=getStringFromWasm0(s[0],s[1]).slice(),wasm.__wbindgen_free(s[0],1*s[1],1)),a}set rpc_address(s){var a=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.__wbg_set_geterasummaryoptions_rpc_address(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get verbosity(){const s=wasm.__wbg_get_geterasummaryoptions_verbosity(this.__wbg_ptr);return 3===s?void 0:s}set verbosity(s){wasm.__wbg_set_geterasummaryoptions_verbosity(this.__wbg_ptr,isLikeNone(s)?3:s)}}const getSpeculativeExecDeployOptionsFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_getspeculativeexecdeployoptions_free(f>>>0,1));class getSpeculativeExecDeployOptions{static __wrap(s){s>>>=0;const a=Object.create(getSpeculativeExecDeployOptions.prototype);return a.__wbg_ptr=s,getSpeculativeExecDeployOptionsFinalization.register(a,a.__wbg_ptr,a),a}__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,getSpeculativeExecDeployOptionsFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_getspeculativeexecdeployoptions_free(s,0)}get deploy_as_string(){const s=wasm.__wbg_get_getspeculativeexecdeployoptions_deploy_as_string(this.__wbg_ptr);let a;return 0!==s[0]&&(a=getStringFromWasm0(s[0],s[1]).slice(),wasm.__wbindgen_free(s[0],1*s[1],1)),a}set deploy_as_string(s){var a=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.__wbg_set_getspeculativeexecdeployoptions_deploy_as_string(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get deploy(){const s=wasm.__wbg_get_getspeculativeexecdeployoptions_deploy(this.__wbg_ptr);return 0===s?void 0:Deploy.__wrap(s)}set deploy(s){let a=0;isLikeNone(s)||(_assertClass(s,Deploy),a=s.__destroy_into_raw()),wasm.__wbg_set_getspeculativeexecdeployoptions_deploy(this.__wbg_ptr,a)}get rpc_address(){const s=wasm.__wbg_get_getspeculativeexecdeployoptions_rpc_address(this.__wbg_ptr);let a;return 0!==s[0]&&(a=getStringFromWasm0(s[0],s[1]).slice(),wasm.__wbindgen_free(s[0],1*s[1],1)),a}set rpc_address(s){var a=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.__wbg_set_getspeculativeexecdeployoptions_rpc_address(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get verbosity(){const s=wasm.__wbg_get_getspeculativeexecdeployoptions_verbosity(this.__wbg_ptr);return 3===s?void 0:s}set verbosity(s){wasm.__wbg_set_getspeculativeexecdeployoptions_verbosity(this.__wbg_ptr,isLikeNone(s)?3:s)}}const getSpeculativeExecTxnOptionsFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_getspeculativeexectxnoptions_free(f>>>0,1));class getSpeculativeExecTxnOptions{static __wrap(s){s>>>=0;const a=Object.create(getSpeculativeExecTxnOptions.prototype);return a.__wbg_ptr=s,getSpeculativeExecTxnOptionsFinalization.register(a,a.__wbg_ptr,a),a}__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,getSpeculativeExecTxnOptionsFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_getspeculativeexectxnoptions_free(s,0)}get transaction_as_string(){const s=wasm.__wbg_get_getspeculativeexectxnoptions_transaction_as_string(this.__wbg_ptr);let a;return 0!==s[0]&&(a=getStringFromWasm0(s[0],s[1]).slice(),wasm.__wbindgen_free(s[0],1*s[1],1)),a}set transaction_as_string(s){var a=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.__wbg_set_getspeculativeexectxnoptions_transaction_as_string(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get transaction(){const s=wasm.__wbg_get_getspeculativeexectxnoptions_transaction(this.__wbg_ptr);return 0===s?void 0:Transaction.__wrap(s)}set transaction(s){let a=0;isLikeNone(s)||(_assertClass(s,Transaction),a=s.__destroy_into_raw()),wasm.__wbg_set_getspeculativeexectxnoptions_transaction(this.__wbg_ptr,a)}get rpc_address(){const s=wasm.__wbg_get_getspeculativeexectxnoptions_rpc_address(this.__wbg_ptr);let a;return 0!==s[0]&&(a=getStringFromWasm0(s[0],s[1]).slice(),wasm.__wbindgen_free(s[0],1*s[1],1)),a}set rpc_address(s){var a=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.__wbg_set_getspeculativeexectxnoptions_rpc_address(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get verbosity(){const s=wasm.__wbg_get_getspeculativeexectxnoptions_verbosity(this.__wbg_ptr);return 3===s?void 0:s}set verbosity(s){wasm.__wbg_set_getspeculativeexectxnoptions_verbosity(this.__wbg_ptr,isLikeNone(s)?3:s)}}const getStateRootHashOptionsFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_getstateroothashoptions_free(f>>>0,1));class getStateRootHashOptions{static __wrap(s){s>>>=0;const a=Object.create(getStateRootHashOptions.prototype);return a.__wbg_ptr=s,getStateRootHashOptionsFinalization.register(a,a.__wbg_ptr,a),a}__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,getStateRootHashOptionsFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_getstateroothashoptions_free(s,0)}get maybe_block_id_as_string(){const s=wasm.__wbg_get_getstateroothashoptions_maybe_block_id_as_string(this.__wbg_ptr);let a;return 0!==s[0]&&(a=getStringFromWasm0(s[0],s[1]).slice(),wasm.__wbindgen_free(s[0],1*s[1],1)),a}set maybe_block_id_as_string(s){var a=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.__wbg_set_getstateroothashoptions_maybe_block_id_as_string(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get maybe_block_identifier(){const s=wasm.__wbg_get_getstateroothashoptions_maybe_block_identifier(this.__wbg_ptr);return 0===s?void 0:BlockIdentifier.__wrap(s)}set maybe_block_identifier(s){let a=0;isLikeNone(s)||(_assertClass(s,BlockIdentifier),a=s.__destroy_into_raw()),wasm.__wbg_set_getstateroothashoptions_maybe_block_identifier(this.__wbg_ptr,a)}get rpc_address(){const s=wasm.__wbg_get_getstateroothashoptions_rpc_address(this.__wbg_ptr);let a;return 0!==s[0]&&(a=getStringFromWasm0(s[0],s[1]).slice(),wasm.__wbindgen_free(s[0],1*s[1],1)),a}set rpc_address(s){var a=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.__wbg_set_getstateroothashoptions_rpc_address(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get verbosity(){const s=wasm.__wbg_get_getstateroothashoptions_verbosity(this.__wbg_ptr);return 3===s?void 0:s}set verbosity(s){wasm.__wbg_set_getstateroothashoptions_verbosity(this.__wbg_ptr,isLikeNone(s)?3:s)}}const getTransactionOptionsFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_gettransactionoptions_free(f>>>0,1));class getTransactionOptions{static __wrap(s){s>>>=0;const a=Object.create(getTransactionOptions.prototype);return a.__wbg_ptr=s,getTransactionOptionsFinalization.register(a,a.__wbg_ptr,a),a}__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,getTransactionOptionsFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_gettransactionoptions_free(s,0)}get transaction_hash_as_string(){const s=wasm.__wbg_get_gettransactionoptions_transaction_hash_as_string(this.__wbg_ptr);let a;return 0!==s[0]&&(a=getStringFromWasm0(s[0],s[1]).slice(),wasm.__wbindgen_free(s[0],1*s[1],1)),a}set transaction_hash_as_string(s){var a=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.__wbg_set_getdeployoptions_deploy_hash_as_string(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get transaction_hash(){const s=wasm.__wbg_get_gettransactionoptions_transaction_hash(this.__wbg_ptr);return 0===s?void 0:TransactionHash.__wrap(s)}set transaction_hash(s){let a=0;isLikeNone(s)||(_assertClass(s,TransactionHash),a=s.__destroy_into_raw()),wasm.__wbg_set_gettransactionoptions_transaction_hash(this.__wbg_ptr,a)}get finalized_approvals(){const s=wasm.__wbg_get_getdeployoptions_finalized_approvals(this.__wbg_ptr);return 16777215===s?void 0:0!==s}set finalized_approvals(s){wasm.__wbg_set_getdeployoptions_finalized_approvals(this.__wbg_ptr,isLikeNone(s)?16777215:s?1:0)}get rpc_address(){const s=wasm.__wbg_get_gettransactionoptions_rpc_address(this.__wbg_ptr);let a;return 0!==s[0]&&(a=getStringFromWasm0(s[0],s[1]).slice(),wasm.__wbindgen_free(s[0],1*s[1],1)),a}set rpc_address(s){var a=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.__wbg_set_getdeployoptions_rpc_address(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get verbosity(){const s=wasm.__wbg_get_getdeployoptions_verbosity(this.__wbg_ptr);return 3===s?void 0:s}set verbosity(s){wasm.__wbg_set_getdeployoptions_verbosity(this.__wbg_ptr,isLikeNone(s)?3:s)}}const queryBalanceDetailsOptionsFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_querybalancedetailsoptions_free(f>>>0,1));class queryBalanceDetailsOptions{static __wrap(s){s>>>=0;const a=Object.create(queryBalanceDetailsOptions.prototype);return a.__wbg_ptr=s,queryBalanceDetailsOptionsFinalization.register(a,a.__wbg_ptr,a),a}__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,queryBalanceDetailsOptionsFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_querybalancedetailsoptions_free(s,0)}get purse_identifier_as_string(){const s=wasm.__wbg_get_querybalancedetailsoptions_purse_identifier_as_string(this.__wbg_ptr);let a;return 0!==s[0]&&(a=getStringFromWasm0(s[0],s[1]).slice(),wasm.__wbindgen_free(s[0],1*s[1],1)),a}set purse_identifier_as_string(s){var a=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.__wbg_set_getentityoptions_entity_identifier_as_string(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get purse_identifier(){const s=wasm.__wbg_get_querybalancedetailsoptions_purse_identifier(this.__wbg_ptr);return 0===s?void 0:PurseIdentifier.__wrap(s)}set purse_identifier(s){let a=0;isLikeNone(s)||(_assertClass(s,PurseIdentifier),a=s.__destroy_into_raw()),wasm.__wbg_set_querybalancedetailsoptions_purse_identifier(this.__wbg_ptr,a)}get global_state_identifier(){const s=wasm.__wbg_get_querybalancedetailsoptions_global_state_identifier(this.__wbg_ptr);return 0===s?void 0:GlobalStateIdentifier.__wrap(s)}set global_state_identifier(s){let a=0;isLikeNone(s)||(_assertClass(s,GlobalStateIdentifier),a=s.__destroy_into_raw()),wasm.__wbg_set_querybalancedetailsoptions_global_state_identifier(this.__wbg_ptr,a)}get state_root_hash_as_string(){const s=wasm.__wbg_get_querybalancedetailsoptions_state_root_hash_as_string(this.__wbg_ptr);let a;return 0!==s[0]&&(a=getStringFromWasm0(s[0],s[1]).slice(),wasm.__wbindgen_free(s[0],1*s[1],1)),a}set state_root_hash_as_string(s){var a=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.__wbg_set_getentityoptions_maybe_block_id_as_string(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get state_root_hash(){const s=wasm.__wbg_get_querybalancedetailsoptions_state_root_hash(this.__wbg_ptr);return 0===s?void 0:Digest.__wrap(s)}set state_root_hash(s){let a=0;isLikeNone(s)||(_assertClass(s,Digest),a=s.__destroy_into_raw()),wasm.__wbg_set_querybalancedetailsoptions_state_root_hash(this.__wbg_ptr,a)}get maybe_block_id_as_string(){const s=wasm.__wbg_get_querybalancedetailsoptions_maybe_block_id_as_string(this.__wbg_ptr);let a;return 0!==s[0]&&(a=getStringFromWasm0(s[0],s[1]).slice(),wasm.__wbindgen_free(s[0],1*s[1],1)),a}set maybe_block_id_as_string(s){var a=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.__wbg_set_getentityoptions_rpc_address(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get rpc_address(){const s=wasm.__wbg_get_querybalancedetailsoptions_rpc_address(this.__wbg_ptr);let a;return 0!==s[0]&&(a=getStringFromWasm0(s[0],s[1]).slice(),wasm.__wbindgen_free(s[0],1*s[1],1)),a}set rpc_address(s){var a=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.__wbg_set_querybalancedetailsoptions_rpc_address(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get verbosity(){const s=wasm.__wbg_get_querybalancedetailsoptions_verbosity(this.__wbg_ptr);return 3===s?void 0:s}set verbosity(s){wasm.__wbg_set_querybalancedetailsoptions_verbosity(this.__wbg_ptr,isLikeNone(s)?3:s)}}const queryBalanceOptionsFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_querybalanceoptions_free(f>>>0,1));class queryBalanceOptions{static __wrap(s){s>>>=0;const a=Object.create(queryBalanceOptions.prototype);return a.__wbg_ptr=s,queryBalanceOptionsFinalization.register(a,a.__wbg_ptr,a),a}__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,queryBalanceOptionsFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_querybalanceoptions_free(s,0)}get purse_identifier_as_string(){const s=wasm.__wbg_get_querybalanceoptions_purse_identifier_as_string(this.__wbg_ptr);let a;return 0!==s[0]&&(a=getStringFromWasm0(s[0],s[1]).slice(),wasm.__wbindgen_free(s[0],1*s[1],1)),a}set purse_identifier_as_string(s){var a=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.__wbg_set_querybalanceoptions_purse_identifier_as_string(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get purse_identifier(){const s=wasm.__wbg_get_querybalanceoptions_purse_identifier(this.__wbg_ptr);return 0===s?void 0:PurseIdentifier.__wrap(s)}set purse_identifier(s){let a=0;isLikeNone(s)||(_assertClass(s,PurseIdentifier),a=s.__destroy_into_raw()),wasm.__wbg_set_querybalanceoptions_purse_identifier(this.__wbg_ptr,a)}get global_state_identifier(){const s=wasm.__wbg_get_querybalanceoptions_global_state_identifier(this.__wbg_ptr);return 0===s?void 0:GlobalStateIdentifier.__wrap(s)}set global_state_identifier(s){let a=0;isLikeNone(s)||(_assertClass(s,GlobalStateIdentifier),a=s.__destroy_into_raw()),wasm.__wbg_set_querybalanceoptions_global_state_identifier(this.__wbg_ptr,a)}get state_root_hash_as_string(){const s=wasm.__wbg_get_querybalanceoptions_state_root_hash_as_string(this.__wbg_ptr);let a;return 0!==s[0]&&(a=getStringFromWasm0(s[0],s[1]).slice(),wasm.__wbindgen_free(s[0],1*s[1],1)),a}set state_root_hash_as_string(s){var a=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.__wbg_set_querybalanceoptions_state_root_hash_as_string(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get state_root_hash(){const s=wasm.__wbg_get_querybalanceoptions_state_root_hash(this.__wbg_ptr);return 0===s?void 0:Digest.__wrap(s)}set state_root_hash(s){let a=0;isLikeNone(s)||(_assertClass(s,Digest),a=s.__destroy_into_raw()),wasm.__wbg_set_querybalanceoptions_state_root_hash(this.__wbg_ptr,a)}get maybe_block_id_as_string(){const s=wasm.__wbg_get_querybalanceoptions_maybe_block_id_as_string(this.__wbg_ptr);let a;return 0!==s[0]&&(a=getStringFromWasm0(s[0],s[1]).slice(),wasm.__wbindgen_free(s[0],1*s[1],1)),a}set maybe_block_id_as_string(s){var a=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.__wbg_set_querybalanceoptions_maybe_block_id_as_string(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get rpc_address(){const s=wasm.__wbg_get_querybalanceoptions_rpc_address(this.__wbg_ptr);let a;return 0!==s[0]&&(a=getStringFromWasm0(s[0],s[1]).slice(),wasm.__wbindgen_free(s[0],1*s[1],1)),a}set rpc_address(s){var a=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.__wbg_set_querybalanceoptions_rpc_address(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get verbosity(){const s=wasm.__wbg_get_querybalanceoptions_verbosity(this.__wbg_ptr);return 3===s?void 0:s}set verbosity(s){wasm.__wbg_set_querybalanceoptions_verbosity(this.__wbg_ptr,isLikeNone(s)?3:s)}}const queryContractDictOptionsFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_querycontractdictoptions_free(f>>>0,1));class queryContractDictOptions{static __wrap(s){s>>>=0;const a=Object.create(queryContractDictOptions.prototype);return a.__wbg_ptr=s,queryContractDictOptionsFinalization.register(a,a.__wbg_ptr,a),a}__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,queryContractDictOptionsFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_querycontractdictoptions_free(s,0)}get state_root_hash_as_string(){const s=wasm.__wbg_get_querycontractdictoptions_state_root_hash_as_string(this.__wbg_ptr);let a;return 0!==s[0]&&(a=getStringFromWasm0(s[0],s[1]).slice(),wasm.__wbindgen_free(s[0],1*s[1],1)),a}set state_root_hash_as_string(s){var a=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.__wbg_set_getdictionaryitemoptions_state_root_hash_as_string(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get state_root_hash(){const s=wasm.__wbg_get_getdictionaryitemoptions_state_root_hash(this.__wbg_ptr);return 0===s?void 0:Digest.__wrap(s)}set state_root_hash(s){let a=0;isLikeNone(s)||(_assertClass(s,Digest),a=s.__destroy_into_raw()),wasm.__wbg_set_getdictionaryitemoptions_state_root_hash(this.__wbg_ptr,a)}get dictionary_item_params(){const s=wasm.__wbg_get_getdictionaryitemoptions_dictionary_item_params(this.__wbg_ptr);return 0===s?void 0:DictionaryItemStrParams.__wrap(s)}set dictionary_item_params(s){let a=0;isLikeNone(s)||(_assertClass(s,DictionaryItemStrParams),a=s.__destroy_into_raw()),wasm.__wbg_set_getdictionaryitemoptions_dictionary_item_params(this.__wbg_ptr,a)}get dictionary_item_identifier(){const s=wasm.__wbg_get_getdictionaryitemoptions_dictionary_item_identifier(this.__wbg_ptr);return 0===s?void 0:DictionaryItemIdentifier.__wrap(s)}set dictionary_item_identifier(s){let a=0;isLikeNone(s)||(_assertClass(s,DictionaryItemIdentifier),a=s.__destroy_into_raw()),wasm.__wbg_set_getdictionaryitemoptions_dictionary_item_identifier(this.__wbg_ptr,a)}get rpc_address(){const s=wasm.__wbg_get_querycontractdictoptions_rpc_address(this.__wbg_ptr);let a;return 0!==s[0]&&(a=getStringFromWasm0(s[0],s[1]).slice(),wasm.__wbindgen_free(s[0],1*s[1],1)),a}set rpc_address(s){var a=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.__wbg_set_getdictionaryitemoptions_rpc_address(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get verbosity(){const s=wasm.__wbg_get_getdictionaryitemoptions_verbosity(this.__wbg_ptr);return 3===s?void 0:s}set verbosity(s){wasm.__wbg_set_getdictionaryitemoptions_verbosity(this.__wbg_ptr,isLikeNone(s)?3:s)}}const queryContractKeyOptionsFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_querycontractkeyoptions_free(f>>>0,1));class queryContractKeyOptions{static __wrap(s){s>>>=0;const a=Object.create(queryContractKeyOptions.prototype);return a.__wbg_ptr=s,queryContractKeyOptionsFinalization.register(a,a.__wbg_ptr,a),a}__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,queryContractKeyOptionsFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_querycontractkeyoptions_free(s,0)}get entity_identifier(){const s=wasm.__wbg_get_querycontractkeyoptions_entity_identifier(this.__wbg_ptr);return 0===s?void 0:EntityIdentifier.__wrap(s)}set entity_identifier(s){let a=0;isLikeNone(s)||(_assertClass(s,EntityIdentifier),a=s.__destroy_into_raw()),wasm.__wbg_set_querycontractkeyoptions_entity_identifier(this.__wbg_ptr,a)}get entity_identifier_as_string(){const s=wasm.__wbg_get_querycontractkeyoptions_entity_identifier_as_string(this.__wbg_ptr);let a;return 0!==s[0]&&(a=getStringFromWasm0(s[0],s[1]).slice(),wasm.__wbindgen_free(s[0],1*s[1],1)),a}set entity_identifier_as_string(s){var a=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.__wbg_set_querycontractkeyoptions_entity_identifier_as_string(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get maybe_block_identifier(){const s=wasm.__wbg_get_getauctioninfooptions_maybe_block_identifier(this.__wbg_ptr);return 0===s?void 0:BlockIdentifier.__wrap(s)}set maybe_block_identifier(s){let a=0;isLikeNone(s)||(_assertClass(s,BlockIdentifier),a=s.__destroy_into_raw()),wasm.__wbg_set_getauctioninfooptions_maybe_block_identifier(this.__wbg_ptr,a)}get maybe_block_id_as_string(){const s=wasm.__wbg_get_querycontractkeyoptions_maybe_block_id_as_string(this.__wbg_ptr);let a;return 0!==s[0]&&(a=getStringFromWasm0(s[0],s[1]).slice(),wasm.__wbindgen_free(s[0],1*s[1],1)),a}set maybe_block_id_as_string(s){var a=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.__wbg_set_querycontractkeyoptions_maybe_block_id_as_string(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get path_as_string(){const s=wasm.__wbg_get_querycontractkeyoptions_path_as_string(this.__wbg_ptr);let a;return 0!==s[0]&&(a=getStringFromWasm0(s[0],s[1]).slice(),wasm.__wbindgen_free(s[0],1*s[1],1)),a}set path_as_string(s){var a=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.__wbg_set_querycontractkeyoptions_path_as_string(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get path(){const s=wasm.__wbg_get_querycontractkeyoptions_path(this.__wbg_ptr);return 0===s?void 0:Path.__wrap(s)}set path(s){let a=0;isLikeNone(s)||(_assertClass(s,Path),a=s.__destroy_into_raw()),wasm.__wbg_set_querycontractkeyoptions_path(this.__wbg_ptr,a)}get rpc_address(){const s=wasm.__wbg_get_querycontractkeyoptions_rpc_address(this.__wbg_ptr);let a;return 0!==s[0]&&(a=getStringFromWasm0(s[0],s[1]).slice(),wasm.__wbindgen_free(s[0],1*s[1],1)),a}set rpc_address(s){var a=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.__wbg_set_querycontractkeyoptions_rpc_address(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get verbosity(){const s=wasm.__wbg_get_querycontractkeyoptions_verbosity(this.__wbg_ptr);return 3===s?void 0:s}set verbosity(s){wasm.__wbg_set_querycontractkeyoptions_verbosity(this.__wbg_ptr,isLikeNone(s)?3:s)}}const queryGlobalStateOptionsFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_queryglobalstateoptions_free(f>>>0,1));class queryGlobalStateOptions{static __wrap(s){s>>>=0;const a=Object.create(queryGlobalStateOptions.prototype);return a.__wbg_ptr=s,queryGlobalStateOptionsFinalization.register(a,a.__wbg_ptr,a),a}__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,queryGlobalStateOptionsFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_queryglobalstateoptions_free(s,0)}get global_state_identifier(){const s=wasm.__wbg_get_queryglobalstateoptions_global_state_identifier(this.__wbg_ptr);return 0===s?void 0:GlobalStateIdentifier.__wrap(s)}set global_state_identifier(s){let a=0;isLikeNone(s)||(_assertClass(s,GlobalStateIdentifier),a=s.__destroy_into_raw()),wasm.__wbg_set_queryglobalstateoptions_global_state_identifier(this.__wbg_ptr,a)}get state_root_hash_as_string(){const s=wasm.__wbg_get_queryglobalstateoptions_state_root_hash_as_string(this.__wbg_ptr);let a;return 0!==s[0]&&(a=getStringFromWasm0(s[0],s[1]).slice(),wasm.__wbindgen_free(s[0],1*s[1],1)),a}set state_root_hash_as_string(s){var a=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.__wbg_set_queryglobalstateoptions_state_root_hash_as_string(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get state_root_hash(){const s=wasm.__wbg_get_queryglobalstateoptions_state_root_hash(this.__wbg_ptr);return 0===s?void 0:Digest.__wrap(s)}set state_root_hash(s){let a=0;isLikeNone(s)||(_assertClass(s,Digest),a=s.__destroy_into_raw()),wasm.__wbg_set_queryglobalstateoptions_state_root_hash(this.__wbg_ptr,a)}get maybe_block_id_as_string(){const s=wasm.__wbg_get_queryglobalstateoptions_maybe_block_id_as_string(this.__wbg_ptr);let a;return 0!==s[0]&&(a=getStringFromWasm0(s[0],s[1]).slice(),wasm.__wbindgen_free(s[0],1*s[1],1)),a}set maybe_block_id_as_string(s){var a=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.__wbg_set_queryglobalstateoptions_maybe_block_id_as_string(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get key_as_string(){const s=wasm.__wbg_get_queryglobalstateoptions_key_as_string(this.__wbg_ptr);let a;return 0!==s[0]&&(a=getStringFromWasm0(s[0],s[1]).slice(),wasm.__wbindgen_free(s[0],1*s[1],1)),a}set key_as_string(s){var a=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.__wbg_set_queryglobalstateoptions_key_as_string(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get key(){const s=wasm.__wbg_get_queryglobalstateoptions_key(this.__wbg_ptr);return 0===s?void 0:Key.__wrap(s)}set key(s){let a=0;isLikeNone(s)||(_assertClass(s,Key),a=s.__destroy_into_raw()),wasm.__wbg_set_queryglobalstateoptions_key(this.__wbg_ptr,a)}get path_as_string(){const s=wasm.__wbg_get_queryglobalstateoptions_path_as_string(this.__wbg_ptr);let a;return 0!==s[0]&&(a=getStringFromWasm0(s[0],s[1]).slice(),wasm.__wbindgen_free(s[0],1*s[1],1)),a}set path_as_string(s){var a=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.__wbg_set_queryglobalstateoptions_path_as_string(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get path(){const s=wasm.__wbg_get_queryglobalstateoptions_path(this.__wbg_ptr);return 0===s?void 0:Path.__wrap(s)}set path(s){let a=0;isLikeNone(s)||(_assertClass(s,Path),a=s.__destroy_into_raw()),wasm.__wbg_set_queryglobalstateoptions_path(this.__wbg_ptr,a)}get rpc_address(){const s=wasm.__wbg_get_queryglobalstateoptions_rpc_address(this.__wbg_ptr);let a;return 0!==s[0]&&(a=getStringFromWasm0(s[0],s[1]).slice(),wasm.__wbindgen_free(s[0],1*s[1],1)),a}set rpc_address(s){var a=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.__wbg_set_queryglobalstateoptions_rpc_address(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get verbosity(){const s=wasm.__wbg_get_queryglobalstateoptions_verbosity(this.__wbg_ptr);return 3===s?void 0:s}set verbosity(s){wasm.__wbg_set_queryglobalstateoptions_verbosity(this.__wbg_ptr,isLikeNone(s)?3:s)}}function __wbg_load(f,s){return _wbg_load.apply(this,arguments)}function _wbg_load(){return(_wbg_load=(0,_opt2_casper_rustSDK_examples_frontend_angular_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__.A)(function*(f,s){if("function"==typeof Response&&f instanceof Response){if("function"==typeof WebAssembly.instantiateStreaming)try{return yield WebAssembly.instantiateStreaming(f,s)}catch(u){if("application/wasm"==f.headers.get("Content-Type"))throw u;console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n",u)}const a=yield f.arrayBuffer();return yield WebAssembly.instantiate(a,s)}{const a=yield WebAssembly.instantiate(f,s);return a instanceof WebAssembly.Instance?{instance:a,module:f}:a}})).apply(this,arguments)}function __wbg_get_imports(){const imports={wbg:{}};return imports.wbg.__wbindgen_string_new=function(f,s){return getStringFromWasm0(f,s)},imports.wbg.__wbindgen_error_new=function(f,s){return new Error(getStringFromWasm0(f,s))},imports.wbg.__wbg_getdictionaryitemresult_new=function(f){return GetDictionaryItemResult.__wrap(f)},imports.wbg.__wbg_puttransactionresult_new=function(f){return PutTransactionResult.__wrap(f)},imports.wbg.__wbg_getbalanceresult_new=function(f){return GetBalanceResult.__wrap(f)},imports.wbg.__wbg_listrpcsresult_new=function(f){return ListRpcsResult.__wrap(f)},imports.wbg.__wbg_getstateroothashresult_new=function(f){return GetStateRootHashResult.__wrap(f)},imports.wbg.__wbg_speculativeexectxnresult_new=function(f){return SpeculativeExecTxnResult.__wrap(f)},imports.wbg.__wbg_putdeployresult_new=function(f){return PutDeployResult.__wrap(f)},imports.wbg.__wbg_speculativeexecresult_new=function(f){return SpeculativeExecResult.__wrap(f)},imports.wbg.__wbg_geterasummaryresult_new=function(f){return GetEraSummaryResult.__wrap(f)},imports.wbg.__wbg_getblockresult_new=function(f){return GetBlockResult.__wrap(f)},imports.wbg.__wbg_getvalidatorchangesresult_new=function(f){return GetValidatorChangesResult.__wrap(f)},imports.wbg.__wbg_deploy_new=function(f){return Deploy.__wrap(f)},imports.wbg.__wbg_querybalancedetailsresult_new=function(f){return QueryBalanceDetailsResult.__wrap(f)},imports.wbg.__wbg_gettransactionresult_new=function(f){return GetTransactionResult.__wrap(f)},imports.wbg.__wbg_queryglobalstateresult_new=function(f){return QueryGlobalStateResult.__wrap(f)},imports.wbg.__wbg_geterainforesult_new=function(f){return GetEraInfoResult.__wrap(f)},imports.wbg.__wbg_getchainspecresult_new=function(f){return GetChainspecResult.__wrap(f)},imports.wbg.__wbg_getdeployresult_new=function(f){return GetDeployResult.__wrap(f)},imports.wbg.__wbg_getaccountresult_new=function(f){return GetAccountResult.__wrap(f)},imports.wbg.__wbg_getaddressableentityresult_new=function(f){return GetAddressableEntityResult.__wrap(f)},imports.wbg.__wbg_requestSwitchAccount_0e44115ee2041c5e=function(){return handleError(function(f){return f.requestSwitchAccount()},arguments)},imports.wbg.__wbindgen_boolean_get=function(f){return"boolean"==typeof f?f?1:0:2},imports.wbg.__wbg_transaction_new=function(f){return Transaction.__wrap(f)},imports.wbg.__wbg_querybalanceresult_new=function(f){return QueryBalanceResult.__wrap(f)},imports.wbg.__wbg_disconnectFromSite_2d2501f4e00e57c8=function(){return handleError(function(f){return f.disconnectFromSite()},arguments)},imports.wbg.__wbg_getVersion_821280958b37ff1f=function(){return handleError(function(f){return f.getVersion()},arguments)},imports.wbg.__wbindgen_string_get=function(f,s){const u="string"==typeof s?s:void 0;var g=isLikeNone(u)?0:passStringToWasm0(u,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),y=WASM_VECTOR_LEN;getDataViewMemory0().setInt32(f+4,y,!0),getDataViewMemory0().setInt32(f+0,g,!0)},imports.wbg.__wbg_getauctioninforesult_new=function(f){return GetAuctionInfoResult.__wrap(f)},imports.wbg.__wbg_getblocktransfersresult_new=function(f){return GetBlockTransfersResult.__wrap(f)},imports.wbg.__wbg_getnodestatusresult_new=function(f){return GetNodeStatusResult.__wrap(f)},imports.wbg.__wbg_getpeersresult_new=function(f){return GetPeersResult.__wrap(f)},imports.wbg.__wbg_isConnected_f84ffbccb9898623=function(){return handleError(function(f){return f.isConnected()},arguments)},imports.wbg.__wbindgen_is_function=function(f){return"function"==typeof f},imports.wbg.__wbg_signMessage_c2bf40612e99c084=function(){return handleError(function(f,s,a,u,g){return f.signMessage(getStringFromWasm0(s,a),getStringFromWasm0(u,g))},arguments)},imports.wbg.__wbg_requestConnection_df909ec1fae47c86=function(){return handleError(function(f){return f.requestConnection()},arguments)},imports.wbg.__wbg_getActivePublicKey_7cd2af2b4a2b810f=function(){return handleError(function(f){return f.getActivePublicKey()},arguments)},imports.wbg.__wbg_messages_new=function(f){return Messages.__wrap(f)},imports.wbg.__wbindgen_number_get=function(f,s){const u="number"==typeof s?s:void 0;getDataViewMemory0().setFloat64(f+8,isLikeNone(u)?0:u,!0),getDataViewMemory0().setInt32(f+0,!isLikeNone(u),!0)},imports.wbg.__wbg_messages_unwrap=function(f){return Messages.__unwrap(f)},imports.wbg.__wbg_subscription_unwrap=function(f){return Subscription.__unwrap(f)},imports.wbg.__wbindgen_cb_drop=function(f){const s=f.original;return 1==s.cnt--&&(s.a=0,!0)},imports.wbg.__wbg_error_d52bf4e1868fa715=function(f,s){console.error(getStringFromWasm0(f,s))},imports.wbg.__wbg_log_5199e4d2d51afa95=function(f,s){console.log(getStringFromWasm0(f,s))},imports.wbg.__wbg_CasperWalletProvider_e342cf6a96cfbb6c="function"==typeof CasperWalletProvider?CasperWalletProvider:notDefined("CasperWalletProvider"),imports.wbg.__wbg_sign_5740ada8ba2ef8c3=function(){return handleError(function(f,s,a,u,g){return f.sign(getStringFromWasm0(s,a),getStringFromWasm0(u,g))},arguments)},imports.wbg.__wbindgen_is_undefined=function(f){return void 0===f},imports.wbg.__wbindgen_is_null=function(f){return null===f},imports.wbg.__wbindgen_jsval_eq=function(f,s){return f===s},imports.wbg.__wbg_log_a4ea4344db098de3=function(f,s){console.log(getStringFromWasm0(f,s))},imports.wbg.__wbg_fetch_f8d735ba6fe1b719="function"==typeof fetch?fetch:notDefined("fetch"),imports.wbg.__wbg_getReader_7a604d2d7b2f6e3e=function(){return handleError(function(f){return f.getReader()},arguments)},imports.wbg.__wbg_queueMicrotask_848aa4969108a57e=function(f){return f.queueMicrotask},imports.wbg.__wbg_queueMicrotask_c5419c06eab41e73="function"==typeof queueMicrotask?queueMicrotask:notDefined("queueMicrotask"),imports.wbg.__wbg_fetch_1fdc4448ed9eec00=function(f,s){return f.fetch(s)},imports.wbg.__wbg_newwithstrandinit_4b92c89af0a8e383=function(){return handleError(function(f,s,a){return new Request(getStringFromWasm0(f,s),a)},arguments)},imports.wbg.__wbg_instanceof_Response_3c0e210a57ff751d=function(f){let s;try{s=f instanceof Response}catch{s=!1}return s},imports.wbg.__wbg_url_58af972663531d16=function(f,s){const u=passStringToWasm0(s.url,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),g=WASM_VECTOR_LEN;getDataViewMemory0().setInt32(f+4,g,!0),getDataViewMemory0().setInt32(f+0,u,!0)},imports.wbg.__wbg_status_5f4e900d22140a18=function(f){return f.status},imports.wbg.__wbg_headers_1b9bf90c73fae600=function(f){return f.headers},imports.wbg.__wbg_body_06c4eb578a55c1d4=function(f){const s=f.body;return isLikeNone(s)?0:addToExternrefTable0(s)},imports.wbg.__wbg_arrayBuffer_144729e09879650e=function(){return handleError(function(f){return f.arrayBuffer()},arguments)},imports.wbg.__wbg_setbody_aa8b691bec428bf4=function(f,s){f.body=s},imports.wbg.__wbg_setcredentials_a4e661320cdb9738=function(f,s){f.credentials=__wbindgen_enum_RequestCredentials[s]},imports.wbg.__wbg_setheaders_f5205d36e423a544=function(f,s){f.headers=s},imports.wbg.__wbg_setmethod_ce2da76000b02f6a=function(f,s,a){f.method=getStringFromWasm0(s,a)},imports.wbg.__wbg_setmode_4919fd636102c586=function(f,s){f.mode=__wbindgen_enum_RequestMode[s]},imports.wbg.__wbg_setsignal_812ccb8269a7fd90=function(f,s){f.signal=s},imports.wbg.__wbg_signal_9acfcec9e7dffc22=function(f){return f.signal},imports.wbg.__wbg_new_75169ae5a9683c55=function(){return handleError(function(){return new AbortController},arguments)},imports.wbg.__wbg_abort_c57daab47a6c1215=function(f){f.abort()},imports.wbg.__wbg_new_a9ae04a5200606a5=function(){return handleError(function(){return new Headers},arguments)},imports.wbg.__wbg_append_8b3e7f74a47ea7d5=function(){return handleError(function(f,s,a,u,g){f.append(getStringFromWasm0(s,a),getStringFromWasm0(u,g))},arguments)},imports.wbg.__wbg_byobRequest_86ac467c94924d3c=function(f){const s=f.byobRequest;return isLikeNone(s)?0:addToExternrefTable0(s)},imports.wbg.__wbg_close_7cda9dd901230214=function(){return handleError(function(f){f.close()},arguments)},imports.wbg.__wbg_getdone_38a59a1c17131633=function(f){const s=f.done;return isLikeNone(s)?16777215:s?1:0},imports.wbg.__wbg_getvalue_674bb48c8380247b=function(f){return f.value},imports.wbg.__wbg_result_5cc84600fc64bf35=function(){return handleError(function(f){return f.result},arguments)},imports.wbg.__wbg_setonload_0e9d43ec0cbb3987=function(f,s){f.onload=s},imports.wbg.__wbg_new_e282c42c5fc7a7b1=function(){return handleError(function(){return new FileReader},arguments)},imports.wbg.__wbg_readAsArrayBuffer_467dfea5cb42f85c=function(){return handleError(function(f,s){f.readAsArrayBuffer(s)},arguments)},imports.wbg.__wbg_setonopen_c0e1464e3ea28727=function(f,s){f.onopen=s},imports.wbg.__wbg_setonerror_e16deca7fd15a59c=function(f,s){f.onerror=s},imports.wbg.__wbg_setonmessage_84cd941c1df08da7=function(f,s){f.onmessage=s},imports.wbg.__wbg_new_d550f7a7120dd942=function(){return handleError(function(f,s){return new WebSocket(getStringFromWasm0(f,s))},arguments)},imports.wbg.__wbg_instanceof_Blob_702ee3ea790162e1=function(f){let s;try{s=f instanceof Blob}catch{s=!1}return s},imports.wbg.__wbg_read_08d62388e7870059=function(f){return f.read()},imports.wbg.__wbg_releaseLock_32c310d7be334e1c=function(f){f.releaseLock()},imports.wbg.__wbg_cancel_2a3c2f3c115ac7e0=function(f){return f.cancel()},imports.wbg.__wbg_data_134d3a704b9fca32=function(f){return f.data},imports.wbg.__wbg_view_de0e81c5c00d2129=function(f){const s=f.view;return isLikeNone(s)?0:addToExternrefTable0(s)},imports.wbg.__wbg_respond_ffb6928cd9b79c32=function(){return handleError(function(f,s){f.respond(s>>>0)},arguments)},imports.wbg.__wbg_close_cfd08d9cf9f36856=function(){return handleError(function(f){f.close()},arguments)},imports.wbg.__wbg_enqueue_e693a6fb4f3261c1=function(){return handleError(function(f,s){f.enqueue(s)},arguments)},imports.wbg.__wbg_crypto_1d1f22824a6a080c=function(f){return f.crypto},imports.wbg.__wbindgen_is_object=function(f){return"object"==typeof f&&null!==f},imports.wbg.__wbg_process_4a72847cc503995b=function(f){return f.process},imports.wbg.__wbg_versions_f686565e586dd935=function(f){return f.versions},imports.wbg.__wbg_node_104a2ff8d6ea03a2=function(f){return f.node},imports.wbg.__wbindgen_is_string=function(f){return"string"==typeof f},imports.wbg.__wbg_require_cca90b1a94a0255b=function(){return handleError(function(){return module.require},arguments)},imports.wbg.__wbg_msCrypto_eb05e62b530a1508=function(f){return f.msCrypto},imports.wbg.__wbg_randomFillSync_5c9c955aa56b6049=function(){return handleError(function(f,s){f.randomFillSync(s)},arguments)},imports.wbg.__wbg_getRandomValues_3aa56aa6edec874c=function(){return handleError(function(f,s){f.getRandomValues(s)},arguments)},imports.wbg.__wbg_get_5419cf6b954aa11d=function(f,s){return f[s>>>0]},imports.wbg.__wbg_length_f217bbbf7e8e4df4=function(f){return f.length},imports.wbg.__wbg_new_034f913e7636e987=function(){return new Array},imports.wbg.__wbg_newnoargs_1ede4bf2ebbaaf43=function(f,s){return new Function(getStringFromWasm0(f,s))},imports.wbg.__wbg_next_13b477da1eaa3897=function(f){return f.next},imports.wbg.__wbg_next_b06e115d1b01e10b=function(){return handleError(function(f){return f.next()},arguments)},imports.wbg.__wbg_done_983b5ffcaec8c583=function(f){return f.done},imports.wbg.__wbg_value_2ab8a198c834c26a=function(f){return f.value},imports.wbg.__wbg_iterator_695d699a44d6234c=function(){return Symbol.iterator},imports.wbg.__wbg_get_ef828680c64da212=function(){return handleError(function(f,s){return Reflect.get(f,s)},arguments)},imports.wbg.__wbg_call_a9ef466721e824f2=function(){return handleError(function(f,s){return f.call(s)},arguments)},imports.wbg.__wbg_new_e69b5f66fda8f13c=function(){return new Object},imports.wbg.__wbg_self_bf91bf94d9e04084=function(){return handleError(function(){return self.self},arguments)},imports.wbg.__wbg_window_52dd9f07d03fd5f8=function(){return handleError(function(){return window.window},arguments)},imports.wbg.__wbg_globalThis_05c129bf37fcf1be=function(){return handleError(function(){return globalThis.globalThis},arguments)},imports.wbg.__wbg_global_3eca19bb09e9c484=function(){return handleError(function(){return global.global},arguments)},imports.wbg.__wbg_eval_1bab7c4fbae3b3d6=function(){return handleError(function(arg0,arg1){const ret=eval(getStringFromWasm0(arg0,arg1));return ret},arguments)},imports.wbg.__wbg_isArray_6f3b47f09adb61b5=function(f){return Array.isArray(f)},imports.wbg.__wbg_push_36cf4d81d7da33d1=function(f,s){return f.push(s)},imports.wbg.__wbg_instanceof_ArrayBuffer_74945570b4a62ec7=function(f){let s;try{s=f instanceof ArrayBuffer}catch{s=!1}return s},imports.wbg.__wbg_new_70a2f23d1565c04c=function(f,s){return new Error(getStringFromWasm0(f,s))},imports.wbg.__wbg_apply_c37b42ff44b0469d=function(){return handleError(function(f,s,a){return f.apply(s,a)},arguments)},imports.wbg.__wbg_call_3bfa248576352471=function(){return handleError(function(f,s,a){return f.call(s,a)},arguments)},imports.wbg.__wbg_getTime_41225036a0393d63=function(f){return f.getTime()},imports.wbg.__wbg_new0_218ada33b570be35=function(){return new Date},imports.wbg.__wbg_instanceof_Object_4bbac482eda9b711=function(f){let s;try{s=f instanceof Object}catch{s=!1}return s},imports.wbg.__wbg_instanceof_Promise_f3fd1bcac3157f0c=function(f){let s;try{s=f instanceof Promise}catch{s=!1}return s},imports.wbg.__wbg_new_1073970097e5a420=function(f,s){try{var a={a:f,b:s};return new Promise((y,v)=>{const S=a.a;a.a=0;try{return __wbg_adapter_1203(S,a.b,y,v)}finally{a.a=S}})}finally{a.a=a.b=0}},imports.wbg.__wbg_resolve_0aad7c1484731c99=function(f){return Promise.resolve(f)},imports.wbg.__wbg_catch_8097da4375a5dd1b=function(f,s){return f.catch(s)},imports.wbg.__wbg_then_748f75edfb032440=function(f,s){return f.then(s)},imports.wbg.__wbg_then_4866a7d9f55d8f3e=function(f,s,a){return f.then(s,a)},imports.wbg.__wbg_buffer_ccaed51a635d8a2d=function(f){return f.buffer},imports.wbg.__wbg_newwithbyteoffsetandlength_7e3eb787208af730=function(f,s,a){return new Uint8Array(f,s>>>0,a>>>0)},imports.wbg.__wbg_new_fec2611eb9180f95=function(f){return new Uint8Array(f)},imports.wbg.__wbg_set_ec2fcf81bc573fd9=function(f,s,a){f.set(s,a>>>0)},imports.wbg.__wbg_length_9254c4bd3b9f23c4=function(f){return f.length},imports.wbg.__wbg_newwithlength_76462a666eca145f=function(f){return new Uint8Array(f>>>0)},imports.wbg.__wbg_buffer_95102df5554646dc=function(f){return f.buffer},imports.wbg.__wbg_subarray_975a06f9dbd16995=function(f,s,a){return f.subarray(s>>>0,a>>>0)},imports.wbg.__wbg_byteLength_5d623ba3d92a3a9c=function(f){return f.byteLength},imports.wbg.__wbg_byteOffset_ec0928143c619cd7=function(f){return f.byteOffset},imports.wbg.__wbg_getindex_146612fa21bd6845=function(f,s){return f[s>>>0]},imports.wbg.__wbg_parse_51ee5409072379d3=function(){return handleError(function(f,s){return JSON.parse(getStringFromWasm0(f,s))},arguments)},imports.wbg.__wbg_stringify_eead5648c09faaf8=function(){return handleError(function(f){return JSON.stringify(f)},arguments)},imports.wbg.__wbg_has_bd717f25f195f23d=function(){return handleError(function(f,s){return Reflect.has(f,s)},arguments)},imports.wbg.__wbindgen_debug_string=function(f,s){const u=passStringToWasm0(debugString(s),wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),g=WASM_VECTOR_LEN;getDataViewMemory0().setInt32(f+4,g,!0),getDataViewMemory0().setInt32(f+0,u,!0)},imports.wbg.__wbindgen_throw=function(f,s){throw new Error(getStringFromWasm0(f,s))},imports.wbg.__wbindgen_memory=function(){return wasm.memory},imports.wbg.__wbindgen_closure_wrapper3777=function(f,s,a){return makeMutClosure(f,s,821,__wbg_adapter_38)},imports.wbg.__wbindgen_closure_wrapper3779=function(f,s,a){return makeMutClosure(f,s,821,__wbg_adapter_38)},imports.wbg.__wbindgen_closure_wrapper3781=function(f,s,a){return makeMutClosure(f,s,821,__wbg_adapter_38)},imports.wbg.__wbindgen_closure_wrapper3783=function(f,s,a){return makeMutClosure(f,s,821,__wbg_adapter_45)},imports.wbg.__wbindgen_closure_wrapper6007=function(f,s,a){return makeMutClosure(f,s,1142,__wbg_adapter_48)},imports.wbg.__wbindgen_closure_wrapper6059=function(f,s,a){return makeMutClosure(f,s,1156,__wbg_adapter_51)},imports.wbg.__wbindgen_init_externref_table=function(){const f=wasm.__wbindgen_export_2,s=f.grow(4);f.set(0,void 0),f.set(s+0,void 0),f.set(s+1,null),f.set(s+2,!0),f.set(s+3,!1)},imports}function __wbg_init_memory(f,s){}function __wbg_finalize_init(f,s){return wasm=f.exports,__wbg_init.__wbindgen_wasm_module=s,cachedDataViewMemory0=null,cachedUint8ArrayMemory0=null,wasm.__wbindgen_start(),wasm}function initSync(f){if(void 0!==wasm)return wasm;typeof f<"u"&&(Object.getPrototypeOf(f)===Object.prototype?({module:f}=f):console.warn("using deprecated parameters for `initSync()`; pass a single object instead"));const s=__wbg_get_imports();return f instanceof WebAssembly.Module||(f=new WebAssembly.Module(f)),__wbg_finalize_init(new WebAssembly.Instance(f,s),f)}function __wbg_init(f){return _wbg_init.apply(this,arguments)}function _wbg_init(){return(_wbg_init=(0,_opt2_casper_rustSDK_examples_frontend_angular_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__.A)(function*(f){if(void 0!==wasm)return wasm;typeof f<"u"&&(Object.getPrototypeOf(f)===Object.prototype?({module_or_path:f}=f):console.warn("using deprecated parameters for the initialization function; pass a single object instead")),typeof f>"u"&&(f=new URL("casper_rust_wasm_sdk_bg.wasm","file:///opt2/casper/rustSDK/pkg/casper_rust_wasm_sdk.js"));const s=__wbg_get_imports();("string"==typeof f||"function"==typeof Request&&f instanceof Request||"function"==typeof URL&&f instanceof URL)&&(f=fetch(f));const{instance:a,module:u}=yield __wbg_load(yield f,s);return __wbg_finalize_init(a,u)})).apply(this,arguments)}const __WEBPACK_DEFAULT_EXPORT__=__wbg_init},467:(f,s,a)=>{function u(y,v,S,A,M,B,X){try{var de=y[B](X),le=de.value}catch(ue){return void S(ue)}de.done?v(le):Promise.resolve(le).then(A,M)}function g(y){return function(){var v=this,S=arguments;return new Promise(function(A,M){var B=y.apply(v,S);function X(le){u(B,A,M,X,de,"next",le)}function de(le){u(B,A,M,X,de,"throw",le)}X(void 0)})}}a.d(s,{A:()=>g})}},f=>{f(f.s=3435)}]); \ No newline at end of file +"use strict";(self.webpackChunkcasper=self.webpackChunkcasper||[]).push([[792],{3435:(f,s,a)=>{var u=a(467);function g(e,n){return Object.is(e,n)}let y=null,v=!1,S=1;const A=Symbol("SIGNAL");function M(e){const n=y;return y=e,n}const le={version:0,lastCleanEpoch:0,dirty:!1,producerNode:void 0,producerLastReadVersion:void 0,producerIndexOfThis:void 0,nextProducerIndex:0,liveConsumerNode:void 0,liveConsumerIndexOfThis:void 0,consumerAllowSignalWrites:!1,consumerIsAlwaysLive:!1,producerMustRecompute:()=>!1,producerRecomputeValue:()=>{},consumerMarkedDirty:()=>{},consumerOnSignalRead:()=>{}};function ue(e){if(v)throw new Error("");if(null===y)return;y.consumerOnSignalRead(e);const n=y.nextProducerIndex++;Nn(y),ne.nextProducerIndex;)e.producerNode.pop(),e.producerLastReadVersion.pop(),e.producerIndexOfThis.pop()}}function In(e){Nn(e);for(let n=0;n0}function Nn(e){e.producerNode??=[],e.producerIndexOfThis??=[],e.producerLastReadVersion??=[]}function dr(e){e.liveConsumerNode??=[],e.liveConsumerIndexOfThis??=[]}function fr(e){return void 0!==e.producerNode}const Pi=Symbol("UNSET"),Vi=Symbol("COMPUTING"),Ts=Symbol("ERRORED"),vu={...le,value:Pi,dirty:!0,error:null,equal:g,producerMustRecompute:e=>e.value===Pi||e.value===Vi,producerRecomputeValue(e){if(e.value===Vi)throw new Error("Detected cycle in computations.");const n=e.value;e.value=Vi;const t=Tn(e);let r;try{r=e.computation()}catch(i){r=Ts,e.error=i}finally{Gn(e,t)}n!==Pi&&n!==Ts&&r!==Ts&&e.equal(n,r)?e.value=n:(e.value=r,e.version++)}};let Ma=function Eu(){throw new Error};function Tg(){Ma()}let Na=null;function Ig(e,n){Ft()||Tg(),e.equal(e.value,n)||(e.value=n,function DT(e){e.version++,function ot(){S++}(),st(e),Na?.()}(e))}const CT={...le,equal:g,value:void 0};function Ve(e){return"function"==typeof e}function Ng(e){const t=e(r=>{Error.call(r),r.stack=(new Error).stack});return t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t}const Su=Ng(e=>function(t){e(this),this.message=t?`${t.length} errors occurred during unsubscription:\n${t.map((r,i)=>`${i+1}) ${r.toString()}`).join("\n ")}`:"",this.name="UnsubscriptionError",this.errors=t});function Cu(e,n){if(e){const t=e.indexOf(n);0<=t&&e.splice(t,1)}}class Qt{constructor(n){this.initialTeardown=n,this.closed=!1,this._parentage=null,this._finalizers=null}unsubscribe(){let n;if(!this.closed){this.closed=!0;const{_parentage:t}=this;if(t)if(this._parentage=null,Array.isArray(t))for(const o of t)o.remove(this);else t.remove(this);const{initialTeardown:r}=this;if(Ve(r))try{r()}catch(o){n=o instanceof Su?o.errors:[o]}const{_finalizers:i}=this;if(i){this._finalizers=null;for(const o of i)try{Fg(o)}catch(c){n=n??[],c instanceof Su?n=[...n,...c.errors]:n.push(c)}}if(n)throw new Su(n)}}add(n){var t;if(n&&n!==this)if(this.closed)Fg(n);else{if(n instanceof Qt){if(n.closed||n._hasParent(this))return;n._addParent(this)}(this._finalizers=null!==(t=this._finalizers)&&void 0!==t?t:[]).push(n)}}_hasParent(n){const{_parentage:t}=this;return t===n||Array.isArray(t)&&t.includes(n)}_addParent(n){const{_parentage:t}=this;this._parentage=Array.isArray(t)?(t.push(n),t):t?[t,n]:n}_removeParent(n){const{_parentage:t}=this;t===n?this._parentage=null:Array.isArray(t)&&Cu(t,n)}remove(n){const{_finalizers:t}=this;t&&Cu(t,n),n instanceof Qt&&n._removeParent(this)}}Qt.EMPTY=(()=>{const e=new Qt;return e.closed=!0,e})();const Ag=Qt.EMPTY;function kg(e){return e instanceof Qt||e&&"closed"in e&&Ve(e.remove)&&Ve(e.add)&&Ve(e.unsubscribe)}function Fg(e){Ve(e)?e():e.unsubscribe()}const Pr={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},Aa={setTimeout(e,n,...t){const{delegate:r}=Aa;return r?.setTimeout?r.setTimeout(e,n,...t):setTimeout(e,n,...t)},clearTimeout(e){const{delegate:n}=Aa;return(n?.clearTimeout||clearTimeout)(e)},delegate:void 0};function Rg(e){Aa.setTimeout(()=>{const{onUnhandledError:n}=Pr;if(!n)throw e;n(e)})}function Og(){}const IT=Du("C",void 0,void 0);function Du(e,n,t){return{kind:e,value:n,error:t}}let Vr=null;function ka(e){if(Pr.useDeprecatedSynchronousErrorHandling){const n=!Vr;if(n&&(Vr={errorThrown:!1,error:null}),e(),n){const{errorThrown:t,error:r}=Vr;if(Vr=null,t)throw r}}else e()}class Tu extends Qt{constructor(n){super(),this.isStopped=!1,n?(this.destination=n,kg(n)&&n.add(this)):this.destination=OT}static create(n,t,r){return new Mu(n,t,r)}next(n){this.isStopped?Nu(function NT(e){return Du("N",e,void 0)}(n),this):this._next(n)}error(n){this.isStopped?Nu(function MT(e){return Du("E",void 0,e)}(n),this):(this.isStopped=!0,this._error(n))}complete(){this.isStopped?Nu(IT,this):(this.isStopped=!0,this._complete())}unsubscribe(){this.closed||(this.isStopped=!0,super.unsubscribe(),this.destination=null)}_next(n){this.destination.next(n)}_error(n){try{this.destination.error(n)}finally{this.unsubscribe()}}_complete(){try{this.destination.complete()}finally{this.unsubscribe()}}}const kT=Function.prototype.bind;function Iu(e,n){return kT.call(e,n)}class FT{constructor(n){this.partialObserver=n}next(n){const{partialObserver:t}=this;if(t.next)try{t.next(n)}catch(r){Fa(r)}}error(n){const{partialObserver:t}=this;if(t.error)try{t.error(n)}catch(r){Fa(r)}else Fa(n)}complete(){const{partialObserver:n}=this;if(n.complete)try{n.complete()}catch(t){Fa(t)}}}class Mu extends Tu{constructor(n,t,r){let i;if(super(),Ve(n)||!n)i={next:n??void 0,error:t??void 0,complete:r??void 0};else{let o;this&&Pr.useDeprecatedNextContext?(o=Object.create(n),o.unsubscribe=()=>this.unsubscribe(),i={next:n.next&&Iu(n.next,o),error:n.error&&Iu(n.error,o),complete:n.complete&&Iu(n.complete,o)}):i=n}this.destination=new FT(i)}}function Fa(e){Pr.useDeprecatedSynchronousErrorHandling?function AT(e){Pr.useDeprecatedSynchronousErrorHandling&&Vr&&(Vr.errorThrown=!0,Vr.error=e)}(e):Rg(e)}function Nu(e,n){const{onStoppedNotification:t}=Pr;t&&Aa.setTimeout(()=>t(e,n))}const OT={closed:!0,next:Og,error:function RT(e){throw e},complete:Og},Au="function"==typeof Symbol&&Symbol.observable||"@@observable";function xT(e){return e}let Rt=(()=>{class e{constructor(t){t&&(this._subscribe=t)}lift(t){const r=new e;return r.source=this,r.operator=t,r}subscribe(t,r,i){const o=function PT(e){return e&&e instanceof Tu||function LT(e){return e&&Ve(e.next)&&Ve(e.error)&&Ve(e.complete)}(e)&&kg(e)}(t)?t:new Mu(t,r,i);return ka(()=>{const{operator:c,source:l}=this;o.add(c?c.call(o,l):l?this._subscribe(o):this._trySubscribe(o))}),o}_trySubscribe(t){try{return this._subscribe(t)}catch(r){t.error(r)}}forEach(t,r){return new(r=Lg(r))((i,o)=>{const c=new Mu({next:l=>{try{t(l)}catch(_){o(_),c.unsubscribe()}},error:o,complete:i});this.subscribe(c)})}_subscribe(t){var r;return null===(r=this.source)||void 0===r?void 0:r.subscribe(t)}[Au](){return this}pipe(...t){return function xg(e){return 0===e.length?xT:1===e.length?e[0]:function(t){return e.reduce((r,i)=>i(r),t)}}(t)(this)}toPromise(t){return new(t=Lg(t))((r,i)=>{let o;this.subscribe(c=>o=c,c=>i(c),()=>r(o))})}}return e.create=n=>new e(n),e})();function Lg(e){var n;return null!==(n=e??Pr.Promise)&&void 0!==n?n:Promise}const VT=Ng(e=>function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"});let Wr=(()=>{class e extends Rt{constructor(){super(),this.closed=!1,this.currentObservers=null,this.observers=[],this.isStopped=!1,this.hasError=!1,this.thrownError=null}lift(t){const r=new Pg(this,this);return r.operator=t,r}_throwIfClosed(){if(this.closed)throw new VT}next(t){ka(()=>{if(this._throwIfClosed(),!this.isStopped){this.currentObservers||(this.currentObservers=Array.from(this.observers));for(const r of this.currentObservers)r.next(t)}})}error(t){ka(()=>{if(this._throwIfClosed(),!this.isStopped){this.hasError=this.isStopped=!0,this.thrownError=t;const{observers:r}=this;for(;r.length;)r.shift().error(t)}})}complete(){ka(()=>{if(this._throwIfClosed(),!this.isStopped){this.isStopped=!0;const{observers:t}=this;for(;t.length;)t.shift().complete()}})}unsubscribe(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null}get observed(){var t;return(null===(t=this.observers)||void 0===t?void 0:t.length)>0}_trySubscribe(t){return this._throwIfClosed(),super._trySubscribe(t)}_subscribe(t){return this._throwIfClosed(),this._checkFinalizedStatuses(t),this._innerSubscribe(t)}_innerSubscribe(t){const{hasError:r,isStopped:i,observers:o}=this;return r||i?Ag:(this.currentObservers=null,o.push(t),new Qt(()=>{this.currentObservers=null,Cu(o,t)}))}_checkFinalizedStatuses(t){const{hasError:r,thrownError:i,isStopped:o}=this;r?t.error(i):o&&t.complete()}asObservable(){const t=new Rt;return t.source=this,t}}return e.create=(n,t)=>new Pg(n,t),e})();class Pg extends Wr{constructor(n,t){super(),this.destination=n,this.source=t}next(n){var t,r;null===(r=null===(t=this.destination)||void 0===t?void 0:t.next)||void 0===r||r.call(t,n)}error(n){var t,r;null===(r=null===(t=this.destination)||void 0===t?void 0:t.error)||void 0===r||r.call(t,n)}complete(){var n,t;null===(t=null===(n=this.destination)||void 0===n?void 0:n.complete)||void 0===t||t.call(n)}_subscribe(n){var t,r;return null!==(r=null===(t=this.source)||void 0===t?void 0:t.subscribe(n))&&void 0!==r?r:Ag}}class ku extends Wr{constructor(n){super(),this._value=n}get value(){return this.getValue()}_subscribe(n){const t=super._subscribe(n);return!t.closed&&n.next(this._value),t}getValue(){const{hasError:n,thrownError:t,_value:r}=this;if(n)throw t;return this._throwIfClosed(),r}next(n){super.next(this._value=n)}}function jr(e){return n=>{if(function WT(e){return Ve(e?.lift)}(n))return n.lift(function(t){try{return e(t,this)}catch(r){this.error(r)}});throw new TypeError("Unable to lift unknown Observable type")}}function pr(e,n,t,r,i){return new jT(e,n,t,r,i)}class jT extends Tu{constructor(n,t,r,i,o,c){super(n),this.onFinalize=o,this.shouldUnsubscribe=c,this._next=t?function(l){try{t(l)}catch(_){n.error(_)}}:super._next,this._error=i?function(l){try{i(l)}catch(_){n.error(_)}finally{this.unsubscribe()}}:super._error,this._complete=r?function(){try{r()}catch(l){n.error(l)}finally{this.unsubscribe()}}:super._complete}unsubscribe(){var n;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){const{closed:t}=this;super.unsubscribe(),!t&&(null===(n=this.onFinalize)||void 0===n||n.call(this))}}}function gr(e,n){return jr((t,r)=>{let i=0;t.subscribe(pr(r,o=>{r.next(e.call(n,o,i++))}))})}typeof navigator<"u"&&navigator,typeof navigator<"u"&&!/Opera/.test(navigator.userAgent)&&navigator,typeof navigator<"u"&&(/MSIE/.test(navigator.userAgent)||navigator),typeof navigator<"u"&&!/Opera|WebKit/.test(navigator.userAgent)&&navigator,typeof navigator<"u"&&navigator;const nh="https://g.co/ng/security#xss";class k extends Error{constructor(n,t){super(function Is(e,n){return`NG0${Math.abs(e)}${n?": "+n:""}`}(n,t)),this.code=n}}function Kn(e){return{toString:e}.toString()}const Ns="__parameters__";function ks(e,n,t){return Kn(()=>{const r=function Wu(e){return function(...t){if(e){const r=e(...t);for(const i in r)this[i]=r[i]}}}(n);function i(...o){if(this instanceof i)return r.apply(this,o),this;const c=new i(...o);return l.annotation=c,l;function l(_,d,p){const h=_.hasOwnProperty(Ns)?_[Ns]:Object.defineProperty(_,Ns,{value:[]})[Ns];for(;h.length<=p;)h.push(null);return(h[p]=h[p]||[]).push(c),_}}return t&&(i.prototype=Object.create(t.prototype)),i.prototype.ngMetadataName=e,i.annotationCls=i,i})}const Fe=globalThis;function Ee(e){for(let n in e)if(e[n]===Ee)return n;throw Error("Could not find renamed property on target object.")}function B1(e,n){for(const t in n)n.hasOwnProperty(t)&&!e.hasOwnProperty(t)&&(e[t]=n[t])}function Je(e){if("string"==typeof e)return e;if(Array.isArray(e))return"["+e.map(Je).join(", ")+"]";if(null==e)return""+e;if(e.overriddenName)return`${e.overriddenName}`;if(e.name)return`${e.name}`;const n=e.toString();if(null==n)return""+n;const t=n.indexOf("\n");return-1===t?n:n.substring(0,t)}function ju(e,n){return null==e||""===e?null===n?"":n:null==n||""===n?e:e+" "+n}const H1=Ee({__forward_ref__:Ee});function Ie(e){return e.__forward_ref__=Ie,e.toString=function(){return Je(this())},e}function J(e){return Pa(e)?e():e}function Pa(e){return"function"==typeof e&&e.hasOwnProperty(H1)&&e.__forward_ref__===Ie}function Z(e){return{token:e.token,providedIn:e.providedIn||null,factory:e.factory,value:void 0}}function An(e){return{providers:e.providers||[],imports:e.imports||[]}}function Va(e){return oh(e,ja)||oh(e,ah)}function oh(e,n){return e.hasOwnProperty(n)?e[n]:null}function Wa(e){return e&&(e.hasOwnProperty(Bu)||e.hasOwnProperty(q1))?e[Bu]:null}const ja=Ee({\u0275prov:Ee}),Bu=Ee({\u0275inj:Ee}),ah=Ee({ngInjectableDef:Ee}),q1=Ee({ngInjectorDef:Ee});class W{constructor(n,t){this._desc=n,this.ngMetadataName="InjectionToken",this.\u0275prov=void 0,"number"==typeof t?this.__NG_ELEMENT_ID__=t:void 0!==t&&(this.\u0275prov=Z({token:this,providedIn:t.providedIn||"root",factory:t.factory}))}get multi(){return this}toString(){return`InjectionToken ${this._desc}`}}function Gu(e){return e&&!!e.\u0275providers}const ji=Ee({\u0275cmp:Ee}),qu=Ee({\u0275dir:Ee}),Ku=Ee({\u0275pipe:Ee}),Jn=Ee({\u0275fac:Ee}),Bi=Ee({__NG_ELEMENT_ID__:Ee}),uh=Ee({__NG_ENV_ID__:Ee});function ee(e){return"string"==typeof e?e:null==e?"":String(e)}function Ju(e,n){throw new k(-201,!1)}var _e=function(e){return e[e.Default=0]="Default",e[e.Host=1]="Host",e[e.Self=2]="Self",e[e.SkipSelf=4]="SkipSelf",e[e.Optional=8]="Optional",e}(_e||{});let Zu;function _h(){return Zu}function Ot(e){const n=Zu;return Zu=e,n}function dh(e,n,t){const r=Va(e);return r&&"root"==r.providedIn?void 0===r.value?r.value=r.factory():r.value:t&_e.Optional?null:void 0!==n?n:void Ju()}const Hi={},Qu="__NG_DI_FLAG__",Ba="ngTempTokenPath",X1=/\n/gm,fh="__source";let Fs;function wr(e){const n=Fs;return Fs=e,n}function nI(e,n=_e.Default){if(void 0===Fs)throw new k(-203,!1);return null===Fs?dh(e,void 0,n):Fs.get(e,n&_e.Optional?null:void 0,n)}function U(e,n=_e.Default){return(_h()||nI)(J(e),n)}function j(e,n=_e.Default){return U(e,Ha(n))}function Ha(e){return typeof e>"u"||"number"==typeof e?e:(e.optional&&8)|(e.host&&1)|(e.self&&2)|(e.skipSelf&&4)}function Yu(e){const n=[];for(let t=0;tArray.isArray(t)?Rs(t,n):n(t))}function gh(e,n,t){n>=e.length?e.push(t):e.splice(n,0,t)}function za(e,n){return n>=e.length-1?e.pop():e.splice(n,1)[0]}function zt(e,n,t){let r=Os(e,n);return r>=0?e[1|r]=t:(r=~r,function hh(e,n,t,r){let i=e.length;if(i==n)e.push(t,r);else if(1===i)e.push(r,e[0]),e[0]=t;else{for(i--,e.push(e[i-1],e[i]);i>n;)e[i]=e[i-2],i--;e[n]=t,e[n+1]=r}}(e,r,n,t)),r}function n_(e,n){const t=Os(e,n);if(t>=0)return e[1|t]}function Os(e,n){return function mh(e,n,t){let r=0,i=e.length>>t;for(;i!==r;){const o=r+(i-r>>1),c=e[o<n?i=o:r=o+1}return~(i<n){c=o-1;break}}}for(;o-1){let o;for(;++io?"":i[p+1].toLowerCase(),2&r&&d!==h){if(_n(r))return!1;c=!0}}}}else{if(!c&&!_n(r)&&!_n(_))return!1;if(c&&_n(_))continue;c=!1,r=_|1&r}}return _n(r)||c}function _n(e){return!(1&e)}function pI(e,n,t,r){if(null===n)return-1;let i=0;if(r||!t){let o=!1;for(;i-1)for(t++;t0?'="'+l+'"':"")+"]"}else 8&r?i+="."+c:4&r&&(i+=" "+c);else""!==i&&!_n(c)&&(n+=Ch(o,i),i=""),r=c,o=o||!_n(r);t++}return""!==i&&(n+=Ch(o,i)),n}function ut(e){return Kn(()=>{const n=Th(e),t={...n,decls:e.decls,vars:e.vars,template:e.template,consts:e.consts||null,ngContentSelectors:e.ngContentSelectors,onPush:e.changeDetection===Ga.OnPush,directiveDefs:null,pipeDefs:null,dependencies:n.standalone&&e.dependencies||null,getStandaloneInjector:null,signals:e.signals??!1,data:e.data||{},encapsulation:e.encapsulation||un.Emulated,styles:e.styles||fe,_:null,schemas:e.schemas||null,tView:null,id:""};Ih(t);const r=e.dependencies;return t.directiveDefs=qa(r,!1),t.pipeDefs=qa(r,!0),t.id=function DI(e){let n=0;const t=[e.selectors,e.ngContentSelectors,e.hostVars,e.hostAttrs,e.consts,e.vars,e.decls,e.encapsulation,e.standalone,e.signals,e.exportAs,JSON.stringify(e.inputs),JSON.stringify(e.outputs),Object.getOwnPropertyNames(e.type.prototype),!!e.contentQueries,!!e.viewQuery].join("|");for(const i of t)n=Math.imul(31,n)+i.charCodeAt(0)|0;return n+=2147483648,"c"+n}(t),t})}function EI(e){return oe(e)||Ze(e)}function SI(e){return null!==e}function Zn(e){return Kn(()=>({type:e.type,bootstrap:e.bootstrap||fe,declarations:e.declarations||fe,imports:e.imports||fe,exports:e.exports||fe,transitiveCompileScopes:null,schemas:e.schemas||null,id:e.id||null}))}function Dh(e,n){if(null==e)return kn;const t={};for(const r in e)if(e.hasOwnProperty(r)){const i=e[r];let o,c,l=yr.None;Array.isArray(i)?(l=i[0],o=i[1],c=i[2]??o):(o=i,c=i),n?(t[o]=l!==yr.None?[r,l]:r,n[o]=c):t[o]=r}return t}function ne(e){return Kn(()=>{const n=Th(e);return Ih(n),n})}function oe(e){return e[ji]||null}function Ze(e){return e[qu]||null}function at(e){return e[Ku]||null}function Th(e){const n={};return{type:e.type,providersResolver:null,factory:null,hostBindings:e.hostBindings||null,hostVars:e.hostVars||0,hostAttrs:e.hostAttrs||null,contentQueries:e.contentQueries||null,declaredInputs:n,inputTransforms:null,inputConfig:e.inputs||kn,exportAs:e.exportAs||null,standalone:!0===e.standalone,signals:!0===e.signals,selectors:e.selectors||fe,viewQuery:e.viewQuery||null,features:e.features||null,setInput:null,findHostDirectiveDefs:null,hostDirectives:null,inputs:Dh(e.inputs,n),outputs:Dh(e.outputs),debugInfo:null}}function Ih(e){e.features?.forEach(n=>n(e))}function qa(e,n){if(!e)return null;const t=n?at:EI;return()=>("function"==typeof e?e():e).map(r=>t(r)).filter(SI)}function Mh(...e){return{\u0275providers:o_(0,e),\u0275fromNgModule:!0}}function o_(e,...n){const t=[],r=new Set;let i;const o=c=>{t.push(c)};return Rs(n,c=>{const l=c;Ka(l,o,[],r)&&(i||=[],i.push(l))}),void 0!==i&&Nh(i,o),t}function Nh(e,n){for(let t=0;t{n(o,r)})}}function Ka(e,n,t,r){if(!(e=J(e)))return!1;let i=null,o=Wa(e);const c=!o&&oe(e);if(o||c){if(c&&!c.standalone)return!1;i=e}else{const _=e.ngModule;if(o=Wa(_),!o)return!1;i=_}const l=r.has(i);if(c){if(l)return!1;if(r.add(i),c.dependencies){const _="function"==typeof c.dependencies?c.dependencies():c.dependencies;for(const d of _)Ka(d,n,t,r)}}else{if(!o)return!1;{if(null!=o.imports&&!l){let d;r.add(i);try{Rs(o.imports,p=>{Ka(p,n,t,r)&&(d||=[],d.push(p))})}finally{}void 0!==d&&Nh(d,n)}if(!l){const d=Hr(i)||(()=>new i);n({provide:i,useFactory:d,deps:fe},i),n({provide:r_,useValue:i,multi:!0},i),n({provide:Fn,useValue:()=>U(i),multi:!0},i)}const _=o.providers;if(null!=_&&!l){const d=e;a_(_,p=>{n(p,d)})}}}return i!==e&&void 0!==e.providers}function a_(e,n){for(let t of e)Gu(t)&&(t=t.\u0275providers),Array.isArray(t)?a_(t,n):n(t)}const TI=Ee({provide:String,useValue:Ee});function c_(e){return null!==e&&"object"==typeof e&&TI in e}function Ur(e){return"function"==typeof e}const l_=new W(""),Ja={},MI={};let u_;function Za(){return void 0===u_&&(u_=new $a),u_}class Yt{}class xs extends Yt{get destroyed(){return this._destroyed}constructor(n,t,r,i){super(),this.parent=t,this.source=r,this.scopes=i,this.records=new Map,this._ngOnDestroyHooks=new Set,this._onDestroyHooks=[],this._destroyed=!1,d_(n,c=>this.processProvider(c)),this.records.set(wh,Ls(void 0,this)),i.has("environment")&&this.records.set(Yt,Ls(void 0,this));const o=this.records.get(l_);null!=o&&"string"==typeof o.value&&this.scopes.add(o.value),this.injectorDefTypes=new Set(this.get(r_,fe,_e.Self))}destroy(){this.assertNotDestroyed(),this._destroyed=!0;const n=M(null);try{for(const r of this._ngOnDestroyHooks)r.ngOnDestroy();const t=this._onDestroyHooks;this._onDestroyHooks=[];for(const r of t)r()}finally{this.records.clear(),this._ngOnDestroyHooks.clear(),this.injectorDefTypes.clear(),M(n)}}onDestroy(n){return this.assertNotDestroyed(),this._onDestroyHooks.push(n),()=>this.removeOnDestroy(n)}runInContext(n){this.assertNotDestroyed();const t=wr(this),r=Ot(void 0);try{return n()}finally{wr(t),Ot(r)}}get(n,t=Hi,r=_e.Default){if(this.assertNotDestroyed(),n.hasOwnProperty(uh))return n[uh](this);r=Ha(r);const o=wr(this),c=Ot(void 0);try{if(!(r&_e.SkipSelf)){let _=this.records.get(n);if(void 0===_){const d=function RI(e){return"function"==typeof e||"object"==typeof e&&e instanceof W}(n)&&Va(n);_=d&&this.injectableDefInScope(d)?Ls(__(n),Ja):null,this.records.set(n,_)}if(null!=_)return this.hydrate(n,_)}return(r&_e.Self?Za():this.parent).get(n,t=r&_e.Optional&&t===Hi?null:t)}catch(l){if("NullInjectorError"===l.name){if((l[Ba]=l[Ba]||[]).unshift(Je(n)),o)throw l;return function sI(e,n,t,r){const i=e[Ba];throw n[fh]&&i.unshift(n[fh]),e.message=function iI(e,n,t,r=null){e=e&&"\n"===e.charAt(0)&&"\u0275"==e.charAt(1)?e.slice(2):e;let i=Je(n);if(Array.isArray(n))i=n.map(Je).join(" -> ");else if("object"==typeof n){let o=[];for(let c in n)if(n.hasOwnProperty(c)){let l=n[c];o.push(c+":"+("string"==typeof l?JSON.stringify(l):Je(l)))}i=`{${o.join(", ")}}`}return`${t}${r?"("+r+")":""}[${i}]: ${e.replace(X1,"\n ")}`}("\n"+e.message,i,t,r),e.ngTokenPath=i,e[Ba]=null,e}(l,n,"R3InjectorError",this.source)}throw l}finally{Ot(c),wr(o)}}resolveInjectorInitializers(){const n=M(null),t=wr(this),r=Ot(void 0);try{const o=this.get(Fn,fe,_e.Self);for(const c of o)c()}finally{wr(t),Ot(r),M(n)}}toString(){const n=[],t=this.records;for(const r of t.keys())n.push(Je(r));return`R3Injector[${n.join(", ")}]`}assertNotDestroyed(){if(this._destroyed)throw new k(205,!1)}processProvider(n){let t=Ur(n=J(n))?n:J(n&&n.provide);const r=function AI(e){return c_(e)?Ls(void 0,e.useValue):Ls(Fh(e),Ja)}(n);if(!Ur(n)&&!0===n.multi){let i=this.records.get(t);i||(i=Ls(void 0,Ja,!0),i.factory=()=>Yu(i.multi),this.records.set(t,i)),t=n,i.multi.push(n)}this.records.set(t,r)}hydrate(n,t){const r=M(null);try{return t.value===Ja&&(t.value=MI,t.value=t.factory()),"object"==typeof t.value&&t.value&&function FI(e){return null!==e&&"object"==typeof e&&"function"==typeof e.ngOnDestroy}(t.value)&&this._ngOnDestroyHooks.add(t.value),t.value}finally{M(r)}}injectableDefInScope(n){if(!n.providedIn)return!1;const t=J(n.providedIn);return"string"==typeof t?"any"===t||this.scopes.has(t):this.injectorDefTypes.has(t)}removeOnDestroy(n){const t=this._onDestroyHooks.indexOf(n);-1!==t&&this._onDestroyHooks.splice(t,1)}}function __(e){const n=Va(e),t=null!==n?n.factory:Hr(e);if(null!==t)return t;if(e instanceof W)throw new k(204,!1);if(e instanceof Function)return function NI(e){if(e.length>0)throw new k(204,!1);const t=function G1(e){return e&&(e[ja]||e[ah])||null}(e);return null!==t?()=>t.factory(e):()=>new e}(e);throw new k(204,!1)}function Fh(e,n,t){let r;if(Ur(e)){const i=J(e);return Hr(i)||__(i)}if(c_(e))r=()=>J(e.useValue);else if(function kh(e){return!(!e||!e.useFactory)}(e))r=()=>e.useFactory(...Yu(e.deps||[]));else if(function Ah(e){return!(!e||!e.useExisting)}(e))r=()=>U(J(e.useExisting));else{const i=J(e&&(e.useClass||e.provide));if(!function kI(e){return!!e.deps}(e))return Hr(i)||__(i);r=()=>new i(...Yu(e.deps))}return r}function Ls(e,n,t=!1){return{factory:e,value:n,multi:t?[]:void 0}}function d_(e,n){for(const t of e)Array.isArray(t)?d_(t,n):t&&Gu(t)?d_(t.\u0275providers,n):n(t)}const Oe=0,F=1,$=2,Ue=3,dn=4,ct=5,yt=6,Vs=7,Me=8,$e=9,Rn=10,Q=11,qi=12,Lh=13,Ws=14,xe=15,$r=16,js=17,Qn=18,Bs=19,Ph=20,br=21,Xa=22,Xt=23,z=25,p_=1,On=7,Hs=9,We=10;var tc=function(e){return e[e.None=0]="None",e[e.HasTransplantedViews=2]="HasTransplantedViews",e}(tc||{});function Ye(e){return Array.isArray(e)&&"object"==typeof e[p_]}function dt(e){return Array.isArray(e)&&!0===e[p_]}function g_(e){return!!(4&e.flags)}function Gr(e){return e.componentOffset>-1}function nc(e){return!(1&~e.flags)}function fn(e){return!!e.template}function Ji(e){return!!(512&e[$])}class GI{constructor(n,t,r){this.previousValue=n,this.currentValue=t,this.firstChange=r}isFirstChange(){return this.firstChange}}function Bh(e,n,t,r){null!==n?n.applyValueToInputSignal(n,r):e[t]=r}function Yn(){return Hh}function Hh(e){return e.type.prototype.ngOnChanges&&(e.setInput=KI),qI}function qI(){const e=Uh(this),n=e?.current;if(n){const t=e.previous;if(t===kn)e.previous=n;else for(let r in n)t[r]=n[r];e.current=null,this.ngOnChanges(n)}}function KI(e,n,t,r,i){const o=this.declaredInputs[r],c=Uh(e)||function JI(e,n){return e[zh]=n}(e,{previous:kn,current:null}),l=c.current||(c.current={}),_=c.previous,d=_[o];l[o]=new GI(d&&d.currentValue,t,_===kn),Bh(e,n,i,t)}Yn.ngInherit=!0;const zh="__ngSimpleChanges__";function Uh(e){return e[zh]||null}const xn=function(e,n,t){},$h="svg";function pe(e){for(;Array.isArray(e);)e=e[Oe];return e}function Zi(e,n){return pe(n[e])}function bt(e,n){return pe(n[e.index])}function Qi(e,n){return e.data[n]}function Ut(e,n){const t=n[e];return Ye(t)?t:t[Oe]}function b_(e){return!(128&~e[$])}function en(e,n){return null==n?null:e[n]}function qh(e){e[js]=0}function Kh(e){1024&e[$]||(e[$]|=1024,b_(e)&&rc(e))}function Yi(e){return!!(9216&e[$]||e[Xt]?.dirty)}function v_(e){e[Rn].changeDetectionScheduler?.notify(7),64&e[$]&&(e[$]|=1024),Yi(e)&&rc(e)}function rc(e){e[Rn].changeDetectionScheduler?.notify(0);let n=Xn(e);for(;null!==n&&!(8192&n[$])&&(n[$]|=8192,b_(n));)n=Xn(n)}function sc(e,n){if(!(256&~e[$]))throw new k(911,!1);null===e[br]&&(e[br]=[]),e[br].push(n)}function Xn(e){const n=e[Ue];return dt(n)?n[Ue]:n}const Y={lFrame:am(null),bindingsEnabled:!0,skipHydrationRootTNode:null};let Zh=!1;function Qh(){return Y.bindingsEnabled}function Kr(){return null!==Y.skipHydrationRootTNode}function I(){return Y.lFrame.lView}function se(){return Y.lFrame.tView}function ge(e){return Y.lFrame.contextLView=e,e[Me]}function he(e){return Y.lFrame.contextLView=null,e}function Se(){let e=Yh();for(;null!==e&&64===e.type;)e=e.parent;return e}function Yh(){return Y.lFrame.currentTNode}function pn(e,n){const t=Y.lFrame;t.currentTNode=e,t.isParent=n}function C_(){return Y.lFrame.isParent}function D_(){Y.lFrame.isParent=!1}function tm(){return Zh}function nm(e){Zh=e}function vt(){const e=Y.lFrame;let n=e.bindingRootIndex;return-1===n&&(n=e.bindingRootIndex=e.tView.bindingStartIndex),n}function gn(){return Y.lFrame.bindingIndex++}function tr(e){const n=Y.lFrame,t=n.bindingIndex;return n.bindingIndex=n.bindingIndex+e,t}function lM(e,n){const t=Y.lFrame;t.bindingIndex=t.bindingRootIndex=e,T_(n)}function T_(e){Y.lFrame.currentDirectiveIndex=e}function M_(){return Y.lFrame.currentQueryIndex}function oc(e){Y.lFrame.currentQueryIndex=e}function _M(e){const n=e[F];return 2===n.type?n.declTNode:1===n.type?e[ct]:null}function im(e,n,t){if(t&_e.SkipSelf){let i=n,o=e;for(;!(i=i.parent,null!==i||t&_e.Host||(i=_M(o),null===i||(o=o[Ws],10&i.type))););if(null===i)return!1;n=i,e=o}const r=Y.lFrame=om();return r.currentTNode=n,r.lView=e,!0}function N_(e){const n=om(),t=e[F];Y.lFrame=n,n.currentTNode=t.firstChild,n.lView=e,n.tView=t,n.contextLView=e,n.bindingIndex=t.bindingStartIndex,n.inI18n=!1}function om(){const e=Y.lFrame,n=null===e?null:e.child;return null===n?am(e):n}function am(e){const n={currentTNode:null,isParent:!0,lView:null,tView:null,selectedIndex:-1,contextLView:null,elementDepthCount:0,currentNamespace:null,currentDirectiveIndex:-1,bindingRootIndex:-1,bindingIndex:-1,currentQueryIndex:0,parent:e,child:null,inI18n:!1};return null!==e&&(e.child=n),n}function cm(){const e=Y.lFrame;return Y.lFrame=e.parent,e.currentTNode=null,e.lView=null,e}const lm=cm;function A_(){const e=cm();e.isParent=!0,e.tView=null,e.selectedIndex=-1,e.contextLView=null,e.elementDepthCount=0,e.currentDirectiveIndex=-1,e.currentNamespace=null,e.bindingRootIndex=-1,e.bindingIndex=-1,e.currentQueryIndex=0}function lt(){return Y.lFrame.selectedIndex}function Jr(e){Y.lFrame.selectedIndex=e}function Ne(){const e=Y.lFrame;return Qi(e.tView,e.selectedIndex)}function ac(){Y.lFrame.currentNamespace=$h}let dm=!0;function eo(){return dm}function Ln(e){dm=e}function cc(e,n){for(let t=n.directiveStart,r=n.directiveEnd;t=r)break}else n[_]<0&&(e[js]+=65536),(l>14>16&&(3&e[$])===n&&(e[$]+=16384,pm(l,o)):pm(l,o)}const zs=-1;class to{constructor(n,t,r){this.factory=n,this.resolving=!1,this.canSeeViewProviders=t,this.injectImpl=r}}const R_={};class Zr{constructor(n,t){this.injector=n,this.parentInjector=t}get(n,t,r){r=Ha(r);const i=this.injector.get(n,R_,r);return i!==R_||t===R_?i:this.parentInjector.get(n,t,r)}}function O_(e){return e!==zs}function no(e){return 32767&e}function ro(e,n){let t=function bM(e){return e>>16}(e),r=n;for(;t>0;)r=r[Ws],t--;return r}let x_=!0;function _c(e){const n=x_;return x_=e,n}const hm=255,mm=5;let EM=0;const Pn={};function dc(e,n){const t=wm(e,n);if(-1!==t)return t;const r=n[F];r.firstCreatePass&&(e.injectorIndex=n.length,L_(r.data,e),L_(n,null),L_(r.blueprint,null));const i=fc(e,n),o=e.injectorIndex;if(O_(i)){const c=no(i),l=ro(i,n),_=l[F].data;for(let d=0;d<8;d++)n[o+d]=l[c+d]|_[c+d]}return n[o+8]=i,o}function L_(e,n){e.push(0,0,0,0,0,0,0,0,n)}function wm(e,n){return-1===e.injectorIndex||e.parent&&e.parent.injectorIndex===e.injectorIndex||null===n[e.injectorIndex+8]?-1:e.injectorIndex}function fc(e,n){if(e.parent&&-1!==e.parent.injectorIndex)return e.parent.injectorIndex;let t=0,r=null,i=n;for(;null!==i;){if(r=Dm(i),null===r)return zs;if(t++,i=i[Ws],-1!==r.injectorIndex)return r.injectorIndex|t<<16}return zs}function P_(e,n,t){!function SM(e,n,t){let r;"string"==typeof t?r=t.charCodeAt(0)||0:t.hasOwnProperty(Bi)&&(r=t[Bi]),null==r&&(r=t[Bi]=EM++);const i=r&hm;n.data[e+(i>>mm)]|=1<=0?n&hm:IM:n}(t);if("function"==typeof o){if(!im(n,e,r))return r&_e.Host?ym(i,0,r):bm(n,t,r,i);try{let c;if(c=o(r),null!=c||r&_e.Optional)return c;Ju()}finally{lm()}}else if("number"==typeof o){let c=null,l=wm(e,n),_=zs,d=r&_e.Host?n[xe][ct]:null;for((-1===l||r&_e.SkipSelf)&&(_=-1===l?fc(e,n):n[l+8],_!==zs&&Cm(r,!1)?(c=n[F],l=no(_),n=ro(_,n)):l=-1);-1!==l;){const p=n[F];if(Sm(o,l,p.data)){const h=DM(l,n,t,c,r,d);if(h!==Pn)return h}_=n[l+8],_!==zs&&Cm(r,n[F].data[l+8]===d)&&Sm(o,l,n)?(c=p,l=no(_),n=ro(_,n)):l=-1}}return i}function DM(e,n,t,r,i,o){const c=n[F],l=c.data[e+8],p=pc(l,c,t,null==r?Gr(l)&&x_:r!=c&&!!(3&l.type),i&_e.Host&&o===l);return null!==p?Qr(n,c,p,l):Pn}function pc(e,n,t,r,i){const o=e.providerIndexes,c=n.data,l=1048575&o,_=e.directiveStart,p=o>>20,m=i?l+p:e.directiveEnd;for(let w=r?l:l+p;w=_&&b.type===t)return w}if(i){const w=c[_];if(w&&fn(w)&&w.type===t)return _}return null}function Qr(e,n,t,r){let i=e[t];const o=n.data;if(function mM(e){return e instanceof to}(i)){const c=i;c.resolving&&function Z1(e,n){throw n&&n.join(" > "),new k(-200,e)}(function me(e){return"function"==typeof e?e.name||e.toString():"object"==typeof e&&null!=e&&"function"==typeof e.type?e.type.name||e.type.toString():ee(e)}(o[t]));const l=_c(c.canSeeViewProviders);c.resolving=!0;const d=c.injectImpl?Ot(c.injectImpl):null;im(e,r,_e.Default);try{i=e[t]=c.factory(void 0,o,e,r),n.firstCreatePass&&t>=r.directiveStart&&function gM(e,n,t){const{ngOnChanges:r,ngOnInit:i,ngDoCheck:o}=n.type.prototype;if(r){const c=Hh(n);(t.preOrderHooks??=[]).push(e,c),(t.preOrderCheckHooks??=[]).push(e,c)}i&&(t.preOrderHooks??=[]).push(0-e,i),o&&((t.preOrderHooks??=[]).push(e,o),(t.preOrderCheckHooks??=[]).push(e,o))}(t,o[t],n)}finally{null!==d&&Ot(d),_c(l),c.resolving=!1,lm()}}return i}function Sm(e,n,t){return!!(t[n+(e>>mm)]&1<{const n=e.prototype.constructor,t=n[Jn]||V_(n),r=Object.prototype;let i=Object.getPrototypeOf(e.prototype).constructor;for(;i&&i!==r;){const o=i[Jn]||V_(i);if(o&&o!==t)return o;i=Object.getPrototypeOf(i)}return o=>new o})}function V_(e){return Pa(e)?()=>{const n=V_(J(e));return n&&n()}:Hr(e)}function Dm(e){const n=e[F],t=n.type;return 2===t?n.declTNode:1===t?e[ct]:null}function Am(e,n=null,t=null,r){const i=function km(e,n=null,t=null,r,i=new Set){const o=[t||fe,Mh(e)];return r=r||("object"==typeof e?void 0:Je(e)),new xs(o,n||Za(),r||null,i)}(e,n,t,r);return i.resolveInjectorInitializers(),i}class et{static{this.THROW_IF_NOT_FOUND=Hi}static{this.NULL=new $a}static create(n,t){if(Array.isArray(n))return Am({name:""},t,n,"");{const r=n.name??"";return Am({name:r},n.parent,n.providers,r)}}static{this.\u0275prov=Z({token:et,providedIn:"any",factory:()=>U(wh)})}static{this.__NG_ELEMENT_ID__=-1}}new W("").__NG_ELEMENT_ID__=e=>{const n=Se();if(null===n)throw new k(204,!1);if(2&n.type)return n.value;if(e&_e.Optional)return null;throw new k(204,!1)};function j_(e){return e.ngOriginalError}let so=(()=>{class e{static{this.__NG_ELEMENT_ID__=VM}static{this.__NG_ENV_ID__=t=>t}}return e})();class PM extends so{constructor(n){super(),this._lView=n}onDestroy(n){return sc(this._lView,n),()=>function E_(e,n){if(null===e[br])return;const t=e[br].indexOf(n);-1!==t&&e[br].splice(t,1)}(this._lView,n)}}function VM(){return new PM(I())}let vr=(()=>{class e{constructor(){this.taskId=0,this.pendingTasks=new Set,this.hasPendingTasks=new ku(!1)}get _hasPendingTasks(){return this.hasPendingTasks.value}add(){this._hasPendingTasks||this.hasPendingTasks.next(!0);const t=this.taskId++;return this.pendingTasks.add(t),t}remove(t){this.pendingTasks.delete(t),0===this.pendingTasks.size&&this._hasPendingTasks&&this.hasPendingTasks.next(!1)}ngOnDestroy(){this.pendingTasks.clear(),this._hasPendingTasks&&this.hasPendingTasks.next(!1)}static{this.\u0275prov=Z({token:e,providedIn:"root",factory:()=>new e})}}return e})();const Re=class WM extends Wr{constructor(n=!1){super(),this.destroyRef=void 0,this.pendingTasks=void 0,this.__isAsync=n,function Oh(){return void 0!==_h()||null!=function tI(){return Fs}()}()&&(this.destroyRef=j(so,{optional:!0})??void 0,this.pendingTasks=j(vr,{optional:!0})??void 0)}emit(n){const t=M(null);try{super.next(n)}finally{M(t)}}subscribe(n,t,r){let i=n,o=t||(()=>null),c=r;if(n&&"object"==typeof n){const _=n;i=_.next?.bind(_),o=_.error?.bind(_),c=_.complete?.bind(_)}this.__isAsync&&(o=this.wrapInTimeout(o),i&&(i=this.wrapInTimeout(i)),c&&(c=this.wrapInTimeout(c)));const l=super.subscribe({next:i,error:o,complete:c});return n instanceof Qt&&n.add(l),l}wrapInTimeout(n){return t=>{const r=this.pendingTasks?.add();setTimeout(()=>{n(t),void 0!==r&&this.pendingTasks?.remove(r)})}}};function mc(...e){}function Rm(e){let n,t;function r(){e=mc;try{void 0!==t&&"function"==typeof cancelAnimationFrame&&cancelAnimationFrame(t),void 0!==n&&clearTimeout(n)}catch{}}return n=setTimeout(()=>{e(),r()}),"function"==typeof requestAnimationFrame&&(t=requestAnimationFrame(()=>{e(),r()})),()=>r()}function Om(e){return queueMicrotask(()=>e()),()=>{e=mc}}class ve{constructor({enableLongStackTrace:n=!1,shouldCoalesceEventChangeDetection:t=!1,shouldCoalesceRunChangeDetection:r=!1}){if(this.hasPendingMacrotasks=!1,this.hasPendingMicrotasks=!1,this.isStable=!0,this.onUnstable=new Re(!1),this.onMicrotaskEmpty=new Re(!1),this.onStable=new Re(!1),this.onError=new Re(!1),typeof Zone>"u")throw new k(908,!1);Zone.assertZonePatched();const i=this;i._nesting=0,i._outer=i._inner=Zone.current,Zone.TaskTrackingZoneSpec&&(i._inner=i._inner.fork(new Zone.TaskTrackingZoneSpec)),n&&Zone.longStackTraceZoneSpec&&(i._inner=i._inner.fork(Zone.longStackTraceZoneSpec)),i.shouldCoalesceEventChangeDetection=!r&&t,i.shouldCoalesceRunChangeDetection=r,i.callbackScheduled=!1,function HM(e){const n=()=>{!function BM(e){e.isCheckStableRunning||e.callbackScheduled||(e.callbackScheduled=!0,Zone.root.run(()=>{Rm(()=>{e.callbackScheduled=!1,H_(e),e.isCheckStableRunning=!0,B_(e),e.isCheckStableRunning=!1})}),H_(e))}(e)};e._inner=e._inner.fork({name:"angular",properties:{isAngularZone:!0},onInvokeTask:(t,r,i,o,c,l)=>{if(function zM(e){return Pm(e,"__ignore_ng_zone__")}(l))return t.invokeTask(i,o,c,l);try{return xm(e),t.invokeTask(i,o,c,l)}finally{(e.shouldCoalesceEventChangeDetection&&"eventTask"===o.type||e.shouldCoalesceRunChangeDetection)&&n(),Lm(e)}},onInvoke:(t,r,i,o,c,l,_)=>{try{return xm(e),t.invoke(i,o,c,l,_)}finally{e.shouldCoalesceRunChangeDetection&&!e.callbackScheduled&&!function UM(e){return Pm(e,"__scheduler_tick__")}(l)&&n(),Lm(e)}},onHasTask:(t,r,i,o)=>{t.hasTask(i,o),r===i&&("microTask"==o.change?(e._hasPendingMicrotasks=o.microTask,H_(e),B_(e)):"macroTask"==o.change&&(e.hasPendingMacrotasks=o.macroTask))},onHandleError:(t,r,i,o)=>(t.handleError(i,o),e.runOutsideAngular(()=>e.onError.emit(o)),!1)})}(i)}static isInAngularZone(){return typeof Zone<"u"&&!0===Zone.current.get("isAngularZone")}static assertInAngularZone(){if(!ve.isInAngularZone())throw new k(909,!1)}static assertNotInAngularZone(){if(ve.isInAngularZone())throw new k(909,!1)}run(n,t,r){return this._inner.run(n,t,r)}runTask(n,t,r,i){const o=this._inner,c=o.scheduleEventTask("NgZoneEvent: "+i,n,jM,mc,mc);try{return o.runTask(c,t,r)}finally{o.cancelTask(c)}}runGuarded(n,t,r){return this._inner.runGuarded(n,t,r)}runOutsideAngular(n){return this._outer.run(n)}}const jM={};function B_(e){if(0==e._nesting&&!e.hasPendingMicrotasks&&!e.isStable)try{e._nesting++,e.onMicrotaskEmpty.emit(null)}finally{if(e._nesting--,!e.hasPendingMicrotasks)try{e.runOutsideAngular(()=>e.onStable.emit(null))}finally{e.isStable=!0}}}function H_(e){e.hasPendingMicrotasks=!!(e._hasPendingMicrotasks||(e.shouldCoalesceEventChangeDetection||e.shouldCoalesceRunChangeDetection)&&!0===e.callbackScheduled)}function xm(e){e._nesting++,e.isStable&&(e.isStable=!1,e.onUnstable.emit(null))}function Lm(e){e._nesting--,B_(e)}class z_{constructor(){this.hasPendingMicrotasks=!1,this.hasPendingMacrotasks=!1,this.isStable=!0,this.onUnstable=new Re,this.onMicrotaskEmpty=new Re,this.onStable=new Re,this.onError=new Re}run(n,t,r){return n.apply(t,r)}runGuarded(n,t,r){return n.apply(t,r)}runOutsideAngular(n){return n()}runTask(n,t,r,i){return n.apply(t,r)}}function Pm(e,n){return!(!Array.isArray(e)||1!==e.length)&&!0===e[0]?.data?.[n]}class hn{constructor(){this._console=console}handleError(n){const t=this._findOriginalError(n);this._console.error("ERROR",n),t&&this._console.error("ORIGINAL ERROR",t)}_findOriginalError(n){let t=n&&j_(n);for(;t&&j_(t);)t=j_(t);return t||null}}const GM=new W("",{providedIn:"root",factory:()=>{const e=j(ve),n=j(hn);return t=>e.runOutsideAngular(()=>n.handleError(t))}});function qM(){return Gs(Se(),I())}function Gs(e,n){return new tn(bt(e,n))}let tn=(()=>{class e{constructor(t){this.nativeElement=t}static{this.__NG_ELEMENT_ID__=qM}}return e})();function Wm(e){return e instanceof tn?e.nativeElement:e}function KM(){return this._results[Symbol.iterator]()}class U_{get changes(){return this._changes??=new Re}constructor(n=!1){this._emitDistinctChangesOnly=n,this.dirty=!0,this._onDirty=void 0,this._results=[],this._changesDetected=!1,this._changes=void 0,this.length=0,this.first=void 0,this.last=void 0;const t=U_.prototype;t[Symbol.iterator]||(t[Symbol.iterator]=KM)}get(n){return this._results[n]}map(n){return this._results.map(n)}filter(n){return this._results.filter(n)}find(n){return this._results.find(n)}reduce(n,t){return this._results.reduce(n,t)}forEach(n){this._results.forEach(n)}some(n){return this._results.some(n)}toArray(){return this._results.slice()}toString(){return this._results.toString()}reset(n,t){this.dirty=!1;const r=function xt(e){return e.flat(Number.POSITIVE_INFINITY)}(n);(this._changesDetected=!function lI(e,n,t){if(e.length!==n.length)return!1;for(let r=0;rhN}),hN="ng",iw=new W(""),Yr=new W("",{providedIn:"platform",factory:()=>"unknown"}),ow=new W("",{providedIn:"root",factory:()=>Er().body?.querySelector("[ngCspNonce]")?.getAttribute("ngCspNonce")||null});let aw=()=>null;function td(e,n,t=!1){return aw(e,n,t)}const gw=new W("",{providedIn:"root",factory:()=>!1});let Ic,Mc;function Zs(e){return function od(){if(void 0===Ic&&(Ic=null,Fe.trustedTypes))try{Ic=Fe.trustedTypes.createPolicy("angular",{createHTML:e=>e,createScript:e=>e,createScriptURL:e=>e})}catch{}return Ic}()?.createHTML(e)||e}function ww(e){return function ad(){if(void 0===Mc&&(Mc=null,Fe.trustedTypes))try{Mc=Fe.trustedTypes.createPolicy("angular#unsafe-bypass",{createHTML:e=>e,createScript:e=>e,createScriptURL:e=>e})}catch{}return Mc}()?.createHTML(e)||e}class vw{constructor(n){this.changingThisBreaksApplicationSecurity=n}toString(){return`SafeValue must use [property]=binding: ${this.changingThisBreaksApplicationSecurity} (see ${nh})`}}function Sr(e){return e instanceof vw?e.changingThisBreaksApplicationSecurity:e}class LN{constructor(n){this.inertDocumentHelper=n}getInertBodyElement(n){n=""+n;try{const t=(new window.DOMParser).parseFromString(Zs(n),"text/html").body;return null===t?this.inertDocumentHelper.getInertBodyElement(n):(t.firstChild?.remove(),t)}catch{return null}}}class PN{constructor(n){this.defaultDoc=n,this.inertDocument=this.defaultDoc.implementation.createHTMLDocument("sanitization-inert")}getInertBodyElement(n){const t=this.inertDocument.createElement("template");return t.innerHTML=Zs(n),t}}const WN=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:\/?#]*(?:[\/?#]|$))/i;function nr(e){const n={};for(const t of e.split(","))n[t]=!0;return n}function ho(...e){const n={};for(const t of e)for(const r in t)t.hasOwnProperty(r)&&(n[r]=!0);return n}const Sw=nr("area,br,col,hr,img,wbr"),Cw=nr("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),Dw=nr("rp,rt"),ld=ho(Sw,ho(Cw,nr("address,article,aside,blockquote,caption,center,del,details,dialog,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,h6,header,hgroup,hr,ins,main,map,menu,nav,ol,pre,section,summary,table,ul")),ho(Dw,nr("a,abbr,acronym,audio,b,bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,picture,q,ruby,rp,rt,s,samp,small,source,span,strike,strong,sub,sup,time,track,tt,u,var,video")),ho(Dw,Cw)),ud=nr("background,cite,href,itemtype,longdesc,poster,src,xlink:href"),Tw=ho(ud,nr("abbr,accesskey,align,alt,autoplay,axis,bgcolor,border,cellpadding,cellspacing,class,clear,color,cols,colspan,compact,controls,coords,datetime,default,dir,download,face,headers,height,hidden,hreflang,hspace,ismap,itemscope,itemprop,kind,label,lang,language,loop,media,muted,nohref,nowrap,open,preload,rel,rev,role,rows,rowspan,rules,scope,scrolling,shape,size,sizes,span,srclang,srcset,start,summary,tabindex,target,title,translate,type,usemap,valign,value,vspace,width"),nr("aria-activedescendant,aria-atomic,aria-autocomplete,aria-busy,aria-checked,aria-colcount,aria-colindex,aria-colspan,aria-controls,aria-current,aria-describedby,aria-details,aria-disabled,aria-dropeffect,aria-errormessage,aria-expanded,aria-flowto,aria-grabbed,aria-haspopup,aria-hidden,aria-invalid,aria-keyshortcuts,aria-label,aria-labelledby,aria-level,aria-live,aria-modal,aria-multiline,aria-multiselectable,aria-orientation,aria-owns,aria-placeholder,aria-posinset,aria-pressed,aria-readonly,aria-relevant,aria-required,aria-roledescription,aria-rowcount,aria-rowindex,aria-rowspan,aria-selected,aria-setsize,aria-sort,aria-valuemax,aria-valuemin,aria-valuenow,aria-valuetext")),jN=nr("script,style,template");class BN{constructor(){this.sanitizedSomething=!1,this.buf=[]}sanitizeChildren(n){let t=n.firstChild,r=!0,i=[];for(;t;)if(t.nodeType===Node.ELEMENT_NODE?r=this.startElement(t):t.nodeType===Node.TEXT_NODE?this.chars(t.nodeValue):this.sanitizedSomething=!0,r&&t.firstChild)i.push(t),t=UN(t);else for(;t;){t.nodeType===Node.ELEMENT_NODE&&this.endElement(t);let o=zN(t);if(o){t=o;break}t=i.pop()}return this.buf.join("")}startElement(n){const t=Iw(n).toLowerCase();if(!ld.hasOwnProperty(t))return this.sanitizedSomething=!0,!jN.hasOwnProperty(t);this.buf.push("<"),this.buf.push(t);const r=n.attributes;for(let i=0;i"),!0}endElement(n){const t=Iw(n).toLowerCase();ld.hasOwnProperty(t)&&!Sw.hasOwnProperty(t)&&(this.buf.push(""))}chars(n){this.buf.push(Nw(n))}}function zN(e){const n=e.nextSibling;if(n&&e!==n.previousSibling)throw Mw(n);return n}function UN(e){const n=e.firstChild;if(n&&function HN(e,n){return(e.compareDocumentPosition(n)&Node.DOCUMENT_POSITION_CONTAINED_BY)!==Node.DOCUMENT_POSITION_CONTAINED_BY}(e,n))throw Mw(n);return n}function Iw(e){const n=e.nodeName;return"string"==typeof n?n:"FORM"}function Mw(e){return new Error(`Failed to sanitize html because the element is clobbered: ${e.outerHTML}`)}const $N=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,GN=/([^\#-~ |!])/g;function Nw(e){return e.replace(/&/g,"&").replace($N,function(n){return"&#"+(1024*(n.charCodeAt(0)-55296)+(n.charCodeAt(1)-56320)+65536)+";"}).replace(GN,function(n){return"&#"+n.charCodeAt(0)+";"}).replace(//g,">")}let Nc;function _d(e){return"content"in e&&function KN(e){return e.nodeType===Node.ELEMENT_NODE&&"TEMPLATE"===e.nodeName}(e)?e.content:null}var Qs=function(e){return e[e.NONE=0]="NONE",e[e.HTML=1]="HTML",e[e.STYLE=2]="STYLE",e[e.SCRIPT=3]="SCRIPT",e[e.URL=4]="URL",e[e.RESOURCE_URL=5]="RESOURCE_URL",e}(Qs||{});function Aw(e){const n=function mo(){const e=I();return e&&e[Rn].sanitizer}();return n?ww(n.sanitize(Qs.HTML,e)||""):function go(e,n){const t=function xN(e){return e instanceof vw&&e.getTypeName()||null}(e);if(null!=t&&t!==n){if("ResourceURL"===t&&"URL"===n)return!0;throw new Error(`Required a safe ${n}, got a ${t} (see ${nh})`)}return t===n}(e,"HTML")?ww(Sr(e)):function qN(e,n){let t=null;try{Nc=Nc||function Ew(e){const n=new PN(e);return function VN(){try{return!!(new window.DOMParser).parseFromString(Zs(""),"text/html")}catch{return!1}}()?new LN(n):n}(e);let r=n?String(n):"";t=Nc.getInertBodyElement(r);let i=5,o=r;do{if(0===i)throw new Error("Failed to sanitize html because the input is unstable");i--,r=o,o=t.innerHTML,t=Nc.getInertBodyElement(r)}while(r!==o);return Zs((new BN).sanitizeChildren(_d(t)||t))}finally{if(t){const r=_d(t)||t;for(;r.firstChild;)r.firstChild.remove()}}}(Er(),ee(e))}const tA=/^>|^->||--!>|)/g,rA="\u200b$1\u200b";var Cr=function(e){return e[e.Important=1]="Important",e[e.DashCase=2]="DashCase",e}(Cr||{});let pd;function gd(e,n){return pd(e,n)}function Xs(e,n,t,r,i){if(null!=r){let o,c=!1;dt(r)?o=r:Ye(r)&&(c=!0,r=r[Oe]);const l=pe(r);0===e&&null!==t?null==i?$w(n,t,l):es(n,t,l,i||null,!0):1===e&&null!==t?es(n,t,l,i||null,!0):2===e?function yo(e,n,t){e.removeChild(null,n,t)}(n,l,c):3===e&&n.destroyNode(l),null!=o&&function SA(e,n,t,r,i){const o=t[On];o!==pe(t)&&Xs(n,e,r,o,i);for(let l=We;ln.replace(nA,rA))}(n))}function Fc(e,n,t){return e.createElement(n,t)}function Hw(e,n){n[Rn].changeDetectionScheduler?.notify(8),xc(e,n,n[Q],2,null,null)}function zw(e,n){const t=e[Hs],r=n[Ue];(Ye(r)||n[xe]!==r[Ue][xe])&&(e[$]|=tc.HasTransplantedViews),null===t?e[Hs]=[n]:t.push(n)}function wd(e,n){const t=e[Hs],r=t.indexOf(n);t.splice(r,1)}function wo(e,n){if(e.length<=We)return;const t=We+n,r=e[t];if(r){const i=r[$r];null!==i&&i!==e&&wd(i,r),n>0&&(e[t-1][dn]=r[dn]);const o=za(e,We+n);!function gA(e,n){Hw(e,n),n[Oe]=null,n[ct]=null}(r[F],r);const c=o[Qn];null!==c&&c.detachView(o[F]),r[Ue]=null,r[dn]=null,r[$]&=-129}return r}function Rc(e,n){if(!(256&n[$])){const t=n[Q];t.destroyNode&&xc(e,n,t,3,null,null),function mA(e){let n=e[qi];if(!n)return yd(e[F],e);for(;n;){let t=null;if(Ye(n))t=n[qi];else{const r=n[We];r&&(t=r)}if(!t){for(;n&&!n[dn]&&n!==e;)Ye(n)&&yd(n[F],n),n=n[Ue];null===n&&(n=e),Ye(n)&&yd(n[F],n),t=n&&n[dn]}n=t}}(n)}}function yd(e,n){if(256&n[$])return;const t=M(null);try{n[$]&=-129,n[$]|=256,n[Xt]&&qn(n[Xt]),function bA(e,n){let t;if(null!=e&&null!=(t=e.destroyHooks))for(let r=0;r=0?r[c]():r[-c].unsubscribe(),o+=2}else t[o].call(r[t[o+1]]);null!==r&&(n[Vs]=null);const i=n[br];if(null!==i){n[br]=null;for(let o=0;o-1){const{encapsulation:o}=e.data[r.directiveStart+i];if(o===un.None||o===un.Emulated)return null}return bt(r,t)}}(e,n.parent,t)}function es(e,n,t,r,i){e.insertBefore(n,t,r,i)}function $w(e,n,t){e.appendChild(n,t)}function Gw(e,n,t,r,i){null!==r?es(e,n,t,r,i):$w(e,n,t)}function vd(e,n){return e.parentNode(n)}function qw(e,n,t){return Jw(e,n,t)}let Ed,Jw=function Kw(e,n,t){return 40&e.type?bt(e,t):null};function Oc(e,n,t,r){const i=bd(e,r,n),o=n[Q],l=qw(r.parent||n[ct],r,n);if(null!=i)if(Array.isArray(t))for(let _=0;_z&&ny(e,n,z,!1),xn(c?2:0,i),t(r,i)}finally{Jr(o),xn(c?3:1,i)}}function Td(e,n,t){if(g_(n)){const r=M(null);try{const o=n.directiveEnd;for(let c=n.directiveStart;cnull;function ay(e,n,t,r,i){for(let o in n){if(!n.hasOwnProperty(o))continue;const c=n[o];if(void 0===c)continue;r??={};let l,_=yr.None;Array.isArray(c)?(l=c[0],_=c[1]):l=c;let d=o;if(null!==i){if(!i.hasOwnProperty(o))continue;d=i[o]}0===e?cy(r,t,d,l,_):cy(r,t,d,l)}return r}function cy(e,n,t,r,i){let o;e.hasOwnProperty(t)?(o=e[t]).push(n,r):o=e[t]=[n,r],void 0!==i&&o.push(i)}function Wt(e,n,t,r,i,o,c,l){const _=bt(n,t);let p,d=n.inputs;!l&&null!=d&&(p=d[r])?(Od(e,t,p,r,i),Gr(n)&&function PA(e,n){const t=Ut(n,e);16&t[$]||(t[$]|=64)}(t,n.index)):3&n.type&&(r=function LA(e){return"class"===e?"className":"for"===e?"htmlFor":"formaction"===e?"formAction":"innerHtml"===e?"innerHTML":"readonly"===e?"readOnly":"tabindex"===e?"tabIndex":e}(r),i=null!=c?c(i,n.value||"",r):i,o.setProperty(_,r,i))}function Ad(e,n,t,r){if(Qh()){const i=null===r?null:{"":-1},o=function zA(e,n){const t=e.directiveRegistry;let r=null,i=null;if(t)for(let o=0;o0;){const t=e[--n];if("number"==typeof t&&t<0)return t}return 0})(c)!=l&&c.push(l),c.push(t,r,o)}}(e,n,r,bo(e,t,i.hostVars,te),i)}function Vn(e,n,t,r,i,o){const c=bt(e,n);!function Fd(e,n,t,r,i,o,c){if(null==o)e.removeAttribute(n,i,t);else{const l=null==c?ee(o):c(o,r||"",i);e.setAttribute(n,i,l,t)}}(n[Q],c,o,e.value,t,r,i)}function JA(e,n,t,r,i,o){const c=o[n];if(null!==c)for(let l=0;l0&&(t[i-1][dn]=n),r{rc(e.lView)},consumerOnSignalRead(){this.lView[Xt]=this}},ik={...le,consumerIsAlwaysLive:!0,consumerMarkedDirty:e=>{let n=Xn(e.lView);for(;n&&!yy(n[F]);)n=Xn(n);n&&Kh(n)},consumerOnSignalRead(){this.lView[Xt]=this}};function yy(e){return 2!==e.type}const ok=100;function Wc(e,n=!0,t=0){const r=e[Rn],i=r.rendererFactory;i.begin?.();try{!function ak(e,n){const t=tm();try{nm(!0),Pd(e,n);let r=0;for(;Yi(e);){if(r===ok)throw new k(103,!1);r++,Pd(e,1)}}finally{nm(t)}}(e,t)}catch(c){throw n&&Vc(e,c),c}finally{i.end?.(),r.inlineEffectRunner?.flush()}}function ck(e,n,t,r){const i=n[$];if(!(256&~i))return;n[Rn].inlineEffectRunner?.flush(),N_(n);let l=!0,_=null,d=null;yy(e)?(d=function ek(e){return e[Xt]??function tk(e){const n=wy.pop()??Object.create(rk);return n.lView=e,n}(e)}(n),_=Tn(d)):null===function B(){return y}()?(l=!1,d=function sk(e){const n=e[Xt]??Object.create(ik);return n.lView=e,n}(n),_=Tn(d)):n[Xt]&&(qn(n[Xt]),n[Xt]=null);try{qh(n),function rm(e){return Y.lFrame.bindingIndex=e}(e.bindingStartIndex),null!==t&&sy(e,n,t,2,r);const p=!(3&~i);if(p){const w=e.preOrderCheckHooks;null!==w&&lc(n,w,null)}else{const w=e.preOrderHooks;null!==w&&uc(n,w,0,null),k_(n,0)}if(function lk(e){for(let n=Jm(e);null!==n;n=Zm(n)){if(!(n[$]&tc.HasTransplantedViews))continue;const t=n[Hs];for(let r=0;r-1&&(wo(n,r),za(t,r))}this._attachedToViewContainer=!1}Rc(this._lView[F],this._lView)}onDestroy(n){sc(this._lView,n)}markForCheck(){Eo(this._cdRefInjectingView||this._lView,4)}detach(){this._lView[$]&=-129}reattach(){v_(this._lView),this._lView[$]|=128}detectChanges(){this._lView[$]|=1024,Wc(this._lView,this.notifyErrorHandler)}checkNoChanges(){}attachToViewContainerRef(){if(this._appRef)throw new k(902,!1);this._attachedToViewContainer=!0}detachFromAppRef(){this._appRef=null;const n=Ji(this._lView),t=this._lView[$r];null!==t&&!n&&wd(t,this._lView),Hw(this._lView[F],this._lView)}attachToAppRef(n){if(this._attachedToViewContainer)throw new k(902,!1);this._appRef=n;const t=Ji(this._lView),r=this._lView[$r];null!==r&&!t&&zw(r,this._lView),v_(this._lView)}}let sr=(()=>{class e{static{this.__NG_ELEMENT_ID__=fk}}return e})();const _k=sr,dk=class extends _k{constructor(n,t,r){super(),this._declarationLView=n,this._declarationTContainer=t,this.elementRef=r}get ssrId(){return this._declarationTContainer.tView?.ssrId||null}createEmbeddedView(n,t){return this.createEmbeddedViewImpl(n,t)}createEmbeddedViewImpl(n,t,r){const i=ei(this._declarationLView,this._declarationTContainer,n,{embeddedViewInjector:t,dehydratedView:r});return new So(i)}};function fk(){return jc(Se(),I())}function jc(e,n){return 4&e.type?new dk(n,e,Gs(e,n)):null}let Uy=()=>null;function is(e,n){return Uy(e,n)}class ri{}const ko=new W("",{providedIn:"root",factory:()=>!1}),$y=new W("");class iF{}class Gy{}class aF{resolveComponentFactory(n){throw function oF(e){const n=Error(`No component factory found for ${Je(e)}.`);return n.ngComponent=e,n}(n)}}class Gc{static{this.NULL=new aF}}class Kd{}let os=(()=>{class e{constructor(){this.destroyNode=null}static{this.__NG_ELEMENT_ID__=()=>function cF(){const e=I(),t=Ut(Se().index,e);return(Ye(t)?t:e)[Q]}()}}return e})(),lF=(()=>{class e{static{this.\u0275prov=Z({token:e,providedIn:"root",factory:()=>null})}}return e})();const Ky=new Set;function Et(e){Ky.has(e)||(Ky.add(e),performance?.mark?.("mark_feature_usage",{detail:{feature:e}}))}let qc=(()=>{class e{constructor(){this.handler=null,this.internalCallbacks=[]}execute(){this.executeInternalCallbacks(),this.handler?.execute()}executeInternalCallbacks(){const t=[...this.internalCallbacks];this.internalCallbacks.length=0;for(const r of t)r()}ngOnDestroy(){this.handler?.destroy(),this.handler=null,this.internalCallbacks.length=0}static{this.\u0275prov=Z({token:e,providedIn:"root",factory:()=>new e})}}return e})();function Jc(e,n,t){let r=t?e.styles:null,i=t?e.classes:null,o=0;if(null!==n)for(let c=0;c0&&ey(e,t,o.join(" "))}}(w,be,E,r),void 0!==t&&function CF(e,n,t){const r=e.projection=[];for(let i=0;i{class e{static{this.__NG_ELEMENT_ID__=TF}}return e})();function TF(){return rb(Se(),I())}const IF=Wn,tb=class extends IF{constructor(n,t,r){super(),this._lContainer=n,this._hostTNode=t,this._hostLView=r}get element(){return Gs(this._hostTNode,this._hostLView)}get injector(){return new Xe(this._hostTNode,this._hostLView)}get parentInjector(){const n=fc(this._hostTNode,this._hostLView);if(O_(n)){const t=ro(n,this._hostLView),r=no(n);return new Xe(t[F].data[r+8],t)}return new Xe(null,this._hostLView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(n){const t=nb(this._lContainer);return null!==t&&t[n]||null}get length(){return this._lContainer.length-We}createEmbeddedView(n,t,r){let i,o;"number"==typeof r?i=r:null!=r&&(i=r.index,o=r.injector);const c=is(this._lContainer,n.ssrId),l=n.createEmbeddedViewImpl(t||{},o,c);return this.insertImpl(l,i,rs(this._hostTNode,c)),l}createComponent(n,t,r,i,o){const c=n&&!function Gi(e){return"function"==typeof e}(n);let l;if(c)l=t;else{const b=t||{};l=b.index,r=b.injector,i=b.projectableNodes,o=b.environmentInjector||b.ngModuleRef}const _=c?n:new Oo(oe(n)),d=r||this.parentInjector;if(!o&&null==_.ngModule){const E=(c?d:this.parentInjector).get(Yt,null);E&&(o=E)}const p=oe(_.componentType??{}),h=is(this._lContainer,p?.id??null),w=_.create(d,i,h?.firstChild??null,o);return this.insertImpl(w.hostView,l,rs(this._hostTNode,h)),w}insert(n,t){return this.insertImpl(n,t,!0)}insertImpl(n,t,r){const i=n._lView;if(function XI(e){return dt(e[Ue])}(i)){const l=this.indexOf(n);if(-1!==l)this.detach(l);else{const _=i[Ue],d=new tb(_,_[ct],_[Ue]);d.detach(d.indexOf(n))}}const o=this._adjustIndex(t),c=this._lContainer;return ti(c,i,o,r),n.attachToViewContainerRef(),gh(Yd(c),o,n),n}move(n,t){return this.insert(n,t)}indexOf(n){const t=nb(this._lContainer);return null!==t?t.indexOf(n):-1}remove(n){const t=this._adjustIndex(n,-1),r=wo(this._lContainer,t);r&&(za(Yd(this._lContainer),t),Rc(r[F],r))}detach(n){const t=this._adjustIndex(n,-1),r=wo(this._lContainer,t);return r&&null!=za(Yd(this._lContainer),t)?new So(r):null}_adjustIndex(n,t=0){return n??this.length+t}};function nb(e){return e[8]}function Yd(e){return e[8]||(e[8]=[])}function rb(e,n){let t;const r=n[e.index];return dt(r)?t=r:(t=_y(r,n,null,e),n[e.index]=t,Pc(n,t)),sb(t,n,e,r),new tb(t,e,n)}let sb=function ob(e,n,t,r){if(e[On])return;let i;i=8&t.type?pe(r):function MF(e,n){const t=e[Q],r=t.createComment(""),i=bt(n,e);return es(t,vd(t,i),r,function vA(e,n){return e.nextSibling(n)}(t,i),!1),r}(n,t),e[On]=i},Xd=()=>!1;class ef{constructor(n){this.queryList=n,this.matches=null}clone(){return new ef(this.queryList)}setDirty(){this.queryList.setDirty()}}class tf{constructor(n=[]){this.queries=n}createEmbeddedView(n){const t=n.queries;if(null!==t){const r=null!==n.contentQueries?n.contentQueries[0]:t.length,i=[];for(let o=0;on.trim())}(n):n}}class nf{constructor(n=[]){this.queries=n}elementStart(n,t){for(let r=0;r0)r.push(c[l/2]);else{const d=o[l+1],p=n[-_];for(let h=We;h(ue(n),n.value);return t[A]=n,t}(e),r=t[A];return n?.equal&&(r.equal=n.equal),t.set=i=>Ig(r,i),t.update=i=>function ST(e,n){Ft()||Tg(),Ig(e,n(e.value))}(r,i),t.asReadonly=gb.bind(t),t}function gb(){const e=this[A];if(void 0===e.readonlyFn){const n=()=>this();n[A]=e,e.readonlyFn=n}return e.readonlyFn}function Ce(e){let n=function Ib(e){return Object.getPrototypeOf(e.prototype).constructor}(e.type),t=!0;const r=[e];for(;n;){let i;if(fn(e))i=n.\u0275cmp||n.\u0275dir;else{if(n.\u0275cmp)throw new k(903,!1);i=n.\u0275dir}if(i){if(t){r.push(i);const c=e;c.inputs=Qc(e.inputs),c.inputTransforms=Qc(e.inputTransforms),c.declaredInputs=Qc(e.declaredInputs),c.outputs=Qc(e.outputs);const l=i.hostBindings;l&&QF(e,l);const _=i.viewQuery,d=i.contentQueries;if(_&&JF(e,_),d&&ZF(e,d),qF(e,i),B1(e.outputs,i.outputs),fn(i)&&i.data.animation){const p=e.data;p.animation=(p.animation||[]).concat(i.data.animation)}}const o=i.features;if(o)for(let c=0;c=0;r--){const i=e[r];i.hostVars=n+=i.hostVars,i.hostAttrs=Ui(i.hostAttrs,t=Ui(t,i.hostAttrs))}}(r)}function qF(e,n){for(const t in n.inputs){if(!n.inputs.hasOwnProperty(t)||e.inputs.hasOwnProperty(t))continue;const r=n.inputs[t];if(void 0!==r&&(e.inputs[t]=r,e.declaredInputs[t]=n.declaredInputs[t],null!==n.inputTransforms)){const i=Array.isArray(r)?r[0]:r;if(!n.inputTransforms.hasOwnProperty(i))continue;e.inputTransforms??={},e.inputTransforms[i]=n.inputTransforms[i]}}}function Qc(e){return e===kn?{}:e===fe?[]:e}function JF(e,n){const t=e.viewQuery;e.viewQuery=t?(r,i)=>{n(r,i),t(r,i)}:n}function ZF(e,n){const t=e.contentQueries;e.contentQueries=t?(r,i,o)=>{n(r,i,o),t(r,i,o)}:n}function QF(e,n){const t=e.hostBindings;e.hostBindings=t?(r,i)=>{n(r,i),t(r,i)}:n}class cs{}class kb extends cs{constructor(n){super(),this.componentFactoryResolver=new Xy(this),this.instance=null;const t=new xs([...n.providers,{provide:cs,useValue:this},{provide:Gc,useValue:this.componentFactoryResolver}],n.parent||Za(),n.debugName,new Set(["environment"]));this.injector=t,n.runEnvironmentInitializers&&t.resolveInjectorInitializers()}destroy(){this.injector.destroy()}onDestroy(n){this.injector.onDestroy(n)}}function Yc(e){return!!function df(e){return null!==e&&("function"==typeof e||"object"==typeof e)}(e)&&(Array.isArray(e)||!(e instanceof Map)&&Symbol.iterator in e)}function jn(e,n,t){return e[n]=t}function je(e,n,t){return!Object.is(e[n],t)&&(e[n]=t,!0)}function ls(e,n,t,r){const i=je(e,n,t);return je(e,n+1,r)||i}function Po(e,n,t,r,i,o,c,l,_,d){const p=t+z,h=n.firstCreatePass?function _R(e,n,t,r,i,o,c,l,_){const d=n.consts,p=ns(n,e,4,c||null,l||null);Ad(n,t,p,en(d,_)),cc(n,p);const h=p.tView=Nd(2,p,r,i,o,n.directiveRegistry,n.pipeRegistry,null,n.schemas,d,null);return null!==n.queries&&(n.queries.template(n,p),h.queries=n.queries.embeddedTView(p)),p}(p,n,e,r,i,o,c,l,_):n.data[p];pn(h,!1);const m=Rb(n,e,h,t);eo()&&Oc(n,e,m,h),pt(m,e);const w=_y(m,e,m,h);return e[p]=w,Pc(e,w),function ib(e,n,t){return Xd(e,n,t)}(w,h,e),nc(h)&&Id(n,e,h),null!=_&&Md(e,h,d),h}function ae(e,n,t,r,i,o,c,l){const _=I(),d=se();return Po(_,d,e,n,t,r,i,en(d.consts,o),c,l),ae}let Rb=function Ob(e,n,t,r){return Ln(!0),n[Q].createComment("")};function Ct(e,n,t,r){const i=I();return je(i,gn(),n)&&(se(),Vn(Ne(),i,e,n,t,r)),Ct}function pi(e,n,t,r){return je(e,gn(),t)?n+ee(t)+r:te}function gi(e,n,t,r,i,o){const l=ls(e,function er(){return Y.lFrame.bindingIndex}(),t,i);return tr(2),l?n+ee(t)+r+ee(i)+o:te}function il(e,n){return e<<17|n<<2}function Ir(e){return e>>17&32767}function Sf(e){return 2|e}function _s(e){return(131068&e)>>2}function Cf(e,n){return-131069&e|n<<2}function Df(e){return 1|e}function _v(e,n,t,r){const i=e[t+1],o=null===n;let c=r?Ir(i):_s(i),l=!1;for(;0!==c&&(!1===l||o);){const d=e[c+1];ZR(e[c],n)&&(l=!0,e[c+1]=r?Df(d):Sf(d)),c=r?Ir(d):_s(d)}l&&(e[t+1]=r?Sf(i):Df(i))}function ZR(e,n){return null===e||null==n||(Array.isArray(e)?e[1]:e)===n||!(!Array.isArray(e)||"string"!=typeof n)&&Os(e,n)>=0}const tt={textEnd:0,key:0,keyEnd:0,value:0,valueEnd:0};function dv(e){return e.substring(tt.key,tt.keyEnd)}function fv(e,n){const t=tt.textEnd;return t===n?-1:(n=tt.keyEnd=function eO(e,n,t){for(;n32;)n++;return n}(e,tt.key=n,t),Ei(e,n,t))}function Ei(e,n,t){for(;n=0;t=fv(n,t))zt(e,dv(n),!0)}function yv(e,n){return n>=e.expandoStartIndex}function bv(e,n,t,r){const i=e.data;if(null===i[t+1]){const o=i[lt()],c=yv(e,t);Cv(o,r)&&null===n&&!c&&(n=!1),n=function sO(e,n,t,r){const i=function I_(e){const n=Y.lFrame.currentDirectiveIndex;return-1===n?null:e[n]}(e);let o=r?n.residualClasses:n.residualStyles;if(null===i)0===(r?n.classBindings:n.styleBindings)&&(t=Bo(t=If(null,e,n,t,r),n.attrs,r),o=null);else{const c=n.directiveStylingLast;if(-1===c||e[c]!==i)if(t=If(i,e,n,t,r),null===o){let _=function iO(e,n,t){const r=t?n.classBindings:n.styleBindings;if(0!==_s(r))return e[Ir(r)]}(e,n,r);void 0!==_&&Array.isArray(_)&&(_=If(null,e,n,_[1],r),_=Bo(_,n.attrs,r),function oO(e,n,t,r){e[Ir(t?n.classBindings:n.styleBindings)]=r}(e,n,r,_))}else o=function aO(e,n,t){let r;const i=n.directiveEnd;for(let o=1+n.directiveStylingLast;o0)&&(d=!0)):p=t,i)if(0!==_){const m=Ir(e[l+1]);e[r+1]=il(m,l),0!==m&&(e[m+1]=Cf(e[m+1],r)),e[l+1]=function GR(e,n){return 131071&e|n<<17}(e[l+1],r)}else e[r+1]=il(l,0),0!==l&&(e[l+1]=Cf(e[l+1],r)),l=r;else e[r+1]=il(_,0),0===l?l=r:e[_+1]=Cf(e[_+1],r),_=r;d&&(e[r+1]=Sf(e[r+1])),_v(e,p,r,!0),_v(e,p,r,!1),function JR(e,n,t,r,i){const o=i?e.residualClasses:e.residualStyles;null!=o&&"string"==typeof n&&Os(o,n)>=0&&(t[r+1]=Df(t[r+1]))}(n,p,e,r,o),c=il(l,_),o?n.classBindings=c:n.styleBindings=c}(i,o,n,t,c,r)}}function If(e,n,t,r,i){let o=null;const c=t.directiveEnd;let l=t.directiveStylingLast;for(-1===l?l=t.directiveStart:l++;l0;){const _=e[i],d=Array.isArray(_),p=d?_[1]:_,h=null===p;let m=t[i+1];m===te&&(m=h?fe:void 0);let w=h?n_(m,r):p===r?m:void 0;if(d&&!cl(w)&&(w=n_(_,r)),cl(w)&&(l=w,c))return l;const b=e[i+1];i=c?Ir(b):_s(b)}if(null!==n){let _=o?n.residualClasses:n.residualStyles;null!=_&&(l=n_(_,r))}return l}function cl(e){return void 0!==e}function Cv(e,n){return!!(e.flags&(n?8:16))}function O(e,n,t,r){const i=I(),o=se(),c=z+e,l=i[Q],_=o.firstCreatePass?function OO(e,n,t,r,i,o){const c=n.consts,_=ns(n,e,2,r,en(c,i));return Ad(n,t,_,en(c,o)),null!==_.attrs&&Jc(_,_.attrs,!1),null!==_.mergedAttrs&&Jc(_,_.mergedAttrs,!0),null!==n.queries&&n.queries.elementStart(n,_),_}(c,o,i,n,t,r):o.data[c],d=Mv(o,i,_,l,n,e);i[c]=d;const p=nc(_);return pn(_,!0),ty(l,d,_),!function oi(e){return!(32&~e.flags)}(_)&&eo()&&Oc(o,i,d,_),0===function eM(){return Y.lFrame.elementDepthCount}()&&pt(d,i),function tM(){Y.lFrame.elementDepthCount++}(),p&&(Id(o,i,_),Td(o,_,i)),null!==r&&Md(i,_),O}function x(){let e=Se();C_()?D_():(e=e.parent,pn(e,!1));const n=e;(function rM(e){return Y.skipHydrationRootTNode===e})(n)&&function aM(){Y.skipHydrationRootTNode=null}(),function nM(){Y.lFrame.elementDepthCount--}();const t=se();return t.firstCreatePass&&(cc(t,e),g_(e)&&t.queries.elementEnd(e)),null!=n.classesWithoutHost&&function wM(e){return!!(8&e.flags)}(n)&&Tf(t,n,I(),n.classesWithoutHost,!0),null!=n.stylesWithoutHost&&function yM(e){return!!(16&e.flags)}(n)&&Tf(t,n,I(),n.stylesWithoutHost,!1),x}function gt(e,n,t,r){return O(e,n,t,r),x(),gt}let Mv=(e,n,t,r,i,o)=>(Ln(!0),Fc(r,i,function _m(){return Y.lFrame.currentNamespace}()));function qt(e,n,t){const r=I(),i=se(),o=e+z,c=i.firstCreatePass?function PO(e,n,t,r,i){const o=n.consts,c=en(o,r),l=ns(n,e,8,"ng-container",c);return null!==c&&Jc(l,c,!0),Ad(n,t,l,en(o,i)),null!==n.queries&&n.queries.elementStart(n,l),l}(o,i,r,n,t):i.data[o];pn(c,!0);const l=Nv(i,r,c,e);return r[o]=l,eo()&&Oc(i,r,l,c),pt(l,r),nc(c)&&(Id(i,r,c),Td(i,c,r)),null!=t&&Md(r,c),qt}function Kt(){let e=Se();const n=se();return C_()?D_():(e=e.parent,pn(e,!1)),n.firstCreatePass&&(cc(n,e),g_(e)&&n.queries.elementEnd(e)),Kt}function ds(e,n,t){return qt(e,n,t),Kt(),ds}let Nv=(e,n,t,r)=>(Ln(!0),md(n[Q],""));function Le(){return I()}const Ci="en-US";let Ov=Ci;let Xv=(e,n,t)=>{};function re(e,n,t,r){const i=I(),o=se(),c=Se();return function Rf(e,n,t,r,i,o,c){const l=nc(r),d=e.firstCreatePass&&py(e),p=n[Me],h=fy(n);let m=!0;if(3&r.type||c){const E=bt(r,n),C=c?c(E):E,N=h.length,D=c?q=>c(pe(q[r.index])):r.index;let V=null;if(!c&&l&&(V=function Nx(e,n,t,r){const i=e.cleanup;if(null!=i)for(let o=0;o_?l[_]:null}"string"==typeof c&&(o+=2)}return null}(e,n,i,r.index)),null!==V)(V.__ngLastListenerFn__||V).__ngNextListenerFn__=o,V.__ngLastListenerFn__=o,m=!1;else{o=r0(r,n,p,o),Xv(E,i,o);const q=t.listen(C,i,o);h.push(o,q),d&&d.push(i,D,N,N+1)}}else o=r0(r,n,p,o);const w=r.outputs;let b;if(m&&null!==w&&(b=w[i])){const E=b.length;if(E)for(let C=0;C-1?Ut(e.index,n):n,5);let l=n0(n,t,r,o),_=i.__ngNextListenerFn__;for(;_;)l=n0(n,t,_,o)&&l,_=_.__ngNextListenerFn__;return l}}function H(e=1){return function dM(e){return(Y.lFrame.contextLView=function Jh(e,n){for(;e>0;)n=n[Ws],e--;return n}(e,Y.lFrame.contextLView))[Me]}(e)}function Ax(e,n){let t=null;const r=function gI(e){const n=e.attrs;if(null!=n){const t=n.indexOf(5);if(!(1&t))return n[t+1]}return null}(e);for(let i=0;i(Ln(!0),function hd(e,n){return e.createText(n)}(n[Q],r));function gs(e){return ht("",e,""),gs}function ht(e,n,t){const r=I(),i=pi(r,e,n,t);return i!==te&&rr(r,lt(),i),ht}function qo(e,n,t,r,i){const o=I(),c=gi(o,e,n,t,r,i);return c!==te&&rr(o,lt(),c),qo}function Pf(e,n,t,r,i){if(e=J(e),Array.isArray(e))for(let o=0;o>20;if(Ur(e)||!e.multi){const w=new to(d,i,T),b=Wf(_,n,i?p:p+m,h);-1===b?(P_(dc(l,c),o,_),Vf(o,e,n.length),n.push(_),l.directiveStart++,l.directiveEnd++,i&&(l.providerIndexes+=1048576),t.push(w),c.push(w)):(t[b]=w,c[b]=w)}else{const w=Wf(_,n,p+m,h),b=Wf(_,n,p,p+m),C=b>=0&&t[b];if(i&&!C||!i&&!(w>=0&&t[w])){P_(dc(l,c),o,_);const N=function Xx(e,n,t,r,i){const o=new to(e,t,T);return o.multi=[],o.index=n,o.componentProviders=0,L0(o,i,r&&!t),o}(i?Yx:Qx,t.length,i,r,d);!i&&C&&(t[b].providerFactory=N),Vf(o,e,n.length,0),n.push(_),l.directiveStart++,l.directiveEnd++,i&&(l.providerIndexes+=1048576),t.push(N),c.push(N)}else Vf(o,e,w>-1?w:b,L0(t[i?b:w],d,!i&&r));!i&&r&&C&&t[b].componentProviders++}}}function Vf(e,n,t,r){const i=Ur(n),o=function II(e){return!!e.useClass}(n);if(i||o){const _=(o?J(n.useClass):n).prototype.ngOnDestroy;if(_){const d=e.destroyHooks||(e.destroyHooks=[]);if(!i&&n.multi){const p=d.indexOf(t);-1===p?d.push(t,[r,_]):d[p+1].push(r,_)}else d.push(t,_)}}}function L0(e,n,t){return t&&e.componentProviders++,e.multi.push(n)-1}function Wf(e,n,t,r){for(let i=t;i{t.providersResolver=(r,i)=>function Zx(e,n,t){const r=se();if(r.firstCreatePass){const i=fn(e);Pf(t,r.data,r.blueprint,i,!0),Pf(n,r.data,r.blueprint,i,!1)}}(r,i?i(e):e,n)}}let eL=(()=>{class e{constructor(t){this._injector=t,this.cachedInjectors=new Map}getOrCreateStandaloneInjector(t){if(!t.standalone)return null;if(!this.cachedInjectors.has(t)){const r=o_(0,t.type),i=r.length>0?function Fb(e,n,t=null){return new kb({providers:e,parent:n,debugName:t,runEnvironmentInitializers:!0}).injector}([r],this._injector,`Standalone[${t.type.name}]`):null;this.cachedInjectors.set(t,i)}return this.cachedInjectors.get(t)}ngOnDestroy(){try{for(const t of this.cachedInjectors.values())null!==t&&t.destroy()}finally{this.cachedInjectors.clear()}}static{this.\u0275prov=Z({token:e,providedIn:"environment",factory:()=>new e(U(Yt))})}}return e})();function mt(e){Et("NgStandalone"),e.getStandaloneInjector=n=>n.get(eL).getOrCreateStandaloneInjector(e)}function gl(e,n,t){const r=vt()+e,i=I();return i[r]===te?jn(i,r,t?n.call(t):n()):function Lo(e,n){return e[n]}(i,r)}function yn(e,n,t,r){return function j0(e,n,t,r,i,o){const c=n+t;return je(e,c,i)?jn(e,c+1,o?r.call(o,i):r(i)):Ko(e,c+1)}(I(),vt(),e,n,t,r)}function Di(e,n,t,r,i){return function B0(e,n,t,r,i,o,c){const l=n+t;return ls(e,l,i,o)?jn(e,l+2,c?r.call(c,i,o):r(i,o)):Ko(e,l+2)}(I(),vt(),e,n,t,r,i)}function W0(e,n,t,r,i,o){return function H0(e,n,t,r,i,o,c,l){const _=n+t;return function Xc(e,n,t,r,i){const o=ls(e,n,t,r);return je(e,n+2,i)||o}(e,_,i,o,c)?jn(e,_+3,l?r.call(l,i,o,c):r(i,o,c)):Ko(e,_+3)}(I(),vt(),e,n,t,r,i,o)}function Ko(e,n){const t=e[n];return t===te?void 0:t}function hs(e,n){return jc(e,n)}const uE=new W("");function bl(e){return!!e&&"function"==typeof e.then}function _E(e){return!!e&&"function"==typeof e.subscribe}const dE=new W("");let vl=(()=>{class e{constructor(){this.initialized=!1,this.done=!1,this.donePromise=new Promise((t,r)=>{this.resolve=t,this.reject=r}),this.appInits=j(dE,{optional:!0})??[]}runInitializers(){if(this.initialized)return;const t=[];for(const i of this.appInits){const o=i();if(bl(o))t.push(o);else if(_E(o)){const c=new Promise((l,_)=>{o.subscribe({complete:l,error:_})});t.push(c)}}const r=()=>{this.done=!0,this.resolve()};Promise.all(t).then(()=>{r()}).catch(i=>{this.reject(i)}),0===t.length&&r(),this.initialized=!0}static{this.\u0275fac=function(r){return new(r||e)}}static{this.\u0275prov=Z({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();const Jf=new W("");let zn=(()=>{class e{constructor(){this._bootstrapListeners=[],this._runningTick=!1,this._destroyed=!1,this._destroyListeners=[],this._views=[],this.internalErrorHandler=j(GM),this.afterRenderEffectManager=j(qc),this.zonelessEnabled=j(ko),this.externalTestViews=new Set,this.beforeRender=new Wr,this.afterTick=new Wr,this.componentTypes=[],this.components=[],this.isStable=j(vr).hasPendingTasks.pipe(gr(t=>!t)),this._injector=j(Yt)}get allViews(){return[...this.externalTestViews.keys(),...this._views]}get destroyed(){return this._destroyed}get injector(){return this._injector}bootstrap(t,r){const i=t instanceof Gy;if(!this._injector.get(vl).done)throw!i&&function zr(e){const n=oe(e)||Ze(e)||at(e);return null!==n&&n.standalone}(t),new k(405,!1);let c;c=i?t:this._injector.get(Gc).resolveComponentFactory(t),this.componentTypes.push(c.componentType);const l=function _P(e){return e.isBoundToModule}(c)?void 0:this._injector.get(cs),d=c.create(et.NULL,[],r||c.selector,l),p=d.location.nativeElement,h=d.injector.get(uE,null);return h?.registerApplication(p),d.onDestroy(()=>{this.detachView(d.hostView),El(this.components,d),h?.unregisterApplication(p)}),this._loadComponent(d),d}tick(){this._tick(!0)}_tick(t){if(this._runningTick)throw new k(101,!1);const r=M(null);try{this._runningTick=!0,this.detectChangesInAttachedViews(t)}catch(i){this.internalErrorHandler(i)}finally{this._runningTick=!1,M(r),this.afterTick.next()}}detectChangesInAttachedViews(t){let r=null;this._injector.destroyed||(r=this._injector.get(Kd,null,{optional:!0}));let i=0;const o=this.afterRenderEffectManager;for(;i<10;){const c=0===i;if(t||!c){this.beforeRender.next(c);for(let{_lView:l,notifyErrorHandler:_}of this._views)fP(l,_,c,this.zonelessEnabled)}else r?.begin?.(),r?.end?.();if(i++,o.executeInternalCallbacks(),!this.allViews.some(({_lView:l})=>Yi(l))&&(o.execute(),!this.allViews.some(({_lView:l})=>Yi(l))))break}}attachView(t){const r=t;this._views.push(r),r.attachToAppRef(this)}detachView(t){const r=t;El(this._views,r),r.detachFromAppRef()}_loadComponent(t){this.attachView(t.hostView),this.tick(),this.components.push(t);const r=this._injector.get(Jf,[]);[...this._bootstrapListeners,...r].forEach(i=>i(t))}ngOnDestroy(){if(!this._destroyed)try{this._destroyListeners.forEach(t=>t()),this._views.slice().forEach(t=>t.destroy())}finally{this._destroyed=!0,this._views=[],this._bootstrapListeners=[],this._destroyListeners=[]}}onDestroy(t){return this._destroyListeners.push(t),()=>El(this._destroyListeners,t)}destroy(){if(this._destroyed)throw new k(406,!1);const t=this._injector;t.destroy&&!t.destroyed&&t.destroy()}get viewCount(){return this._views.length}warnIfDestroyed(){}static{this.\u0275fac=function(r){return new(r||e)}}static{this.\u0275prov=Z({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();function El(e,n){const t=e.indexOf(n);t>-1&&e.splice(t,1)}function fP(e,n,t,r){(t||Yi(e))&&Wc(e,n,t&&!r?0:1)}let mP=(()=>{class e{constructor(){this.zone=j(ve),this.changeDetectionScheduler=j(ri),this.applicationRef=j(zn)}initialize(){this._onMicrotaskEmptySubscription||(this._onMicrotaskEmptySubscription=this.zone.onMicrotaskEmpty.subscribe({next:()=>{this.changeDetectionScheduler.runningTick||this.zone.run(()=>{this.applicationRef.tick()})}}))}ngOnDestroy(){this._onMicrotaskEmptySubscription?.unsubscribe()}static{this.\u0275fac=function(r){return new(r||e)}}static{this.\u0275prov=Z({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();function Zf({ngZoneFactory:e,ignoreChangesOutsideZone:n}){return e??=()=>new ve(function Qf(e){return{enableLongStackTrace:!1,shouldCoalesceEventChangeDetection:e?.eventCoalescing??!1,shouldCoalesceRunChangeDetection:e?.runCoalescing??!1}}()),[{provide:ve,useFactory:e},{provide:Fn,multi:!0,useFactory:()=>{const t=j(mP,{optional:!0});return()=>t.initialize()}},{provide:Fn,multi:!0,useFactory:()=>{const t=j(yP);return()=>{t.initialize()}}},!0===n?{provide:$y,useValue:!0}:[]]}let yP=(()=>{class e{constructor(){this.subscription=new Qt,this.initialized=!1,this.zone=j(ve),this.pendingTasks=j(vr)}initialize(){if(this.initialized)return;this.initialized=!0;let t=null;!this.zone.isStable&&!this.zone.hasPendingMacrotasks&&!this.zone.hasPendingMicrotasks&&(t=this.pendingTasks.add()),this.zone.runOutsideAngular(()=>{this.subscription.add(this.zone.onStable.subscribe(()=>{ve.assertNotInAngularZone(),queueMicrotask(()=>{null!==t&&!this.zone.hasPendingMacrotasks&&!this.zone.hasPendingMicrotasks&&(this.pendingTasks.remove(t),t=null)})}))}),this.subscription.add(this.zone.onUnstable.subscribe(()=>{ve.assertInAngularZone(),t??=this.pendingTasks.add()}))}ngOnDestroy(){this.subscription.unsubscribe()}static{this.\u0275fac=function(r){return new(r||e)}}static{this.\u0275prov=Z({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})(),Yo=(()=>{class e{constructor(){this.appRef=j(zn),this.taskService=j(vr),this.ngZone=j(ve),this.zonelessEnabled=j(ko),this.disableScheduling=j($y,{optional:!0})??!1,this.zoneIsDefined=typeof Zone<"u"&&!!Zone.root.run,this.schedulerTickApplyArgs=[{data:{__scheduler_tick__:!0}}],this.subscriptions=new Qt,this.cancelScheduledCallback=null,this.shouldRefreshViews=!1,this.useMicrotaskScheduler=!1,this.runningTick=!1,this.pendingRenderTaskId=null,this.subscriptions.add(this.appRef.afterTick.subscribe(()=>{this.runningTick||this.cleanup()})),this.subscriptions.add(this.ngZone.onUnstable.subscribe(()=>{this.runningTick||this.cleanup()})),this.disableScheduling||=!this.zonelessEnabled&&(this.ngZone instanceof z_||!this.zoneIsDefined)}notify(t){if(!this.zonelessEnabled&&5===t)return;switch(t){case 3:case 2:case 0:case 4:case 5:case 1:this.shouldRefreshViews=!0}if(!this.shouldScheduleTick())return;const r=this.useMicrotaskScheduler?Om:Rm;this.pendingRenderTaskId=this.taskService.add(),this.zoneIsDefined?Zone.root.run(()=>{this.cancelScheduledCallback=r(()=>{this.tick(this.shouldRefreshViews)})}):this.cancelScheduledCallback=r(()=>{this.tick(this.shouldRefreshViews)})}shouldScheduleTick(){return!(this.disableScheduling||null!==this.pendingRenderTaskId||this.runningTick||this.appRef._runningTick||!this.zonelessEnabled&&this.zoneIsDefined&&ve.isInAngularZone())}tick(t){if(this.runningTick||this.appRef.destroyed)return;const r=this.taskService.add();try{this.ngZone.run(()=>{this.runningTick=!0,this.appRef._tick(t)},void 0,this.schedulerTickApplyArgs)}catch(i){throw this.taskService.remove(r),i}finally{this.cleanup()}this.useMicrotaskScheduler=!0,Om(()=>{this.useMicrotaskScheduler=!1,this.taskService.remove(r)})}ngOnDestroy(){this.subscriptions.unsubscribe(),this.cleanup()}cleanup(){if(this.shouldRefreshViews=!1,this.runningTick=!1,this.cancelScheduledCallback?.(),this.cancelScheduledCallback=null,null!==this.pendingRenderTaskId){const t=this.pendingRenderTaskId;this.pendingRenderTaskId=null,this.taskService.remove(t)}}static{this.\u0275fac=function(r){return new(r||e)}}static{this.\u0275prov=Z({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();const ir=new W("",{providedIn:"root",factory:()=>j(ir,_e.Optional|_e.SkipSelf)||function bP(){return typeof $localize<"u"&&$localize.locale||Ci}()}),Xf=new W("");let Mr=null;let Jt=(()=>{class e{static{this.__NG_ELEMENT_ID__=TP}}return e})();function TP(e){return function IP(e,n,t){if(Gr(e)&&!t){const r=Ut(e.index,n);return new So(r,r)}return 175&e.type?new So(n[xe],n):null}(Se(),I(),!(16&~e))}class ME{constructor(){}supports(n){return Yc(n)}create(n){return new FP(n)}}const kP=(e,n)=>n;class FP{constructor(n){this.length=0,this._linkedRecords=null,this._unlinkedRecords=null,this._previousItHead=null,this._itHead=null,this._itTail=null,this._additionsHead=null,this._additionsTail=null,this._movesHead=null,this._movesTail=null,this._removalsHead=null,this._removalsTail=null,this._identityChangesHead=null,this._identityChangesTail=null,this._trackByFn=n||kP}forEachItem(n){let t;for(t=this._itHead;null!==t;t=t._next)n(t)}forEachOperation(n){let t=this._itHead,r=this._removalsHead,i=0,o=null;for(;t||r;){const c=!r||t&&t.currentIndex{c=this._trackByFn(i,l),null!==t&&Object.is(t.trackById,c)?(r&&(t=this._verifyReinsertion(t,l,c,i)),Object.is(t.item,l)||this._addIdentityChange(t,l)):(t=this._mismatch(t,l,c,i),r=!0),t=t._next,i++}),this.length=i;return this._truncate(t),this.collection=n,this.isDirty}get isDirty(){return null!==this._additionsHead||null!==this._movesHead||null!==this._removalsHead||null!==this._identityChangesHead}_reset(){if(this.isDirty){let n;for(n=this._previousItHead=this._itHead;null!==n;n=n._next)n._nextPrevious=n._next;for(n=this._additionsHead;null!==n;n=n._nextAdded)n.previousIndex=n.currentIndex;for(this._additionsHead=this._additionsTail=null,n=this._movesHead;null!==n;n=n._nextMoved)n.previousIndex=n.currentIndex;this._movesHead=this._movesTail=null,this._removalsHead=this._removalsTail=null,this._identityChangesHead=this._identityChangesTail=null}}_mismatch(n,t,r,i){let o;return null===n?o=this._itTail:(o=n._prev,this._remove(n)),null!==(n=null===this._unlinkedRecords?null:this._unlinkedRecords.get(r,null))?(Object.is(n.item,t)||this._addIdentityChange(n,t),this._reinsertAfter(n,o,i)):null!==(n=null===this._linkedRecords?null:this._linkedRecords.get(r,i))?(Object.is(n.item,t)||this._addIdentityChange(n,t),this._moveAfter(n,o,i)):n=this._addAfter(new RP(t,r),o,i),n}_verifyReinsertion(n,t,r,i){let o=null===this._unlinkedRecords?null:this._unlinkedRecords.get(r,null);return null!==o?n=this._reinsertAfter(o,n._prev,i):n.currentIndex!=i&&(n.currentIndex=i,this._addToMoves(n,i)),n}_truncate(n){for(;null!==n;){const t=n._next;this._addToRemovals(this._unlink(n)),n=t}null!==this._unlinkedRecords&&this._unlinkedRecords.clear(),null!==this._additionsTail&&(this._additionsTail._nextAdded=null),null!==this._movesTail&&(this._movesTail._nextMoved=null),null!==this._itTail&&(this._itTail._next=null),null!==this._removalsTail&&(this._removalsTail._nextRemoved=null),null!==this._identityChangesTail&&(this._identityChangesTail._nextIdentityChange=null)}_reinsertAfter(n,t,r){null!==this._unlinkedRecords&&this._unlinkedRecords.remove(n);const i=n._prevRemoved,o=n._nextRemoved;return null===i?this._removalsHead=o:i._nextRemoved=o,null===o?this._removalsTail=i:o._prevRemoved=i,this._insertAfter(n,t,r),this._addToMoves(n,r),n}_moveAfter(n,t,r){return this._unlink(n),this._insertAfter(n,t,r),this._addToMoves(n,r),n}_addAfter(n,t,r){return this._insertAfter(n,t,r),this._additionsTail=null===this._additionsTail?this._additionsHead=n:this._additionsTail._nextAdded=n,n}_insertAfter(n,t,r){const i=null===t?this._itHead:t._next;return n._next=i,n._prev=t,null===i?this._itTail=n:i._prev=n,null===t?this._itHead=n:t._next=n,null===this._linkedRecords&&(this._linkedRecords=new NE),this._linkedRecords.put(n),n.currentIndex=r,n}_remove(n){return this._addToRemovals(this._unlink(n))}_unlink(n){null!==this._linkedRecords&&this._linkedRecords.remove(n);const t=n._prev,r=n._next;return null===t?this._itHead=r:t._next=r,null===r?this._itTail=t:r._prev=t,n}_addToMoves(n,t){return n.previousIndex===t||(this._movesTail=null===this._movesTail?this._movesHead=n:this._movesTail._nextMoved=n),n}_addToRemovals(n){return null===this._unlinkedRecords&&(this._unlinkedRecords=new NE),this._unlinkedRecords.put(n),n.currentIndex=null,n._nextRemoved=null,null===this._removalsTail?(this._removalsTail=this._removalsHead=n,n._prevRemoved=null):(n._prevRemoved=this._removalsTail,this._removalsTail=this._removalsTail._nextRemoved=n),n}_addIdentityChange(n,t){return n.item=t,this._identityChangesTail=null===this._identityChangesTail?this._identityChangesHead=n:this._identityChangesTail._nextIdentityChange=n,n}}class RP{constructor(n,t){this.item=n,this.trackById=t,this.currentIndex=null,this.previousIndex=null,this._nextPrevious=null,this._prev=null,this._next=null,this._prevDup=null,this._nextDup=null,this._prevRemoved=null,this._nextRemoved=null,this._nextAdded=null,this._nextMoved=null,this._nextIdentityChange=null}}class OP{constructor(){this._head=null,this._tail=null}add(n){null===this._head?(this._head=this._tail=n,n._nextDup=null,n._prevDup=null):(this._tail._nextDup=n,n._prevDup=this._tail,n._nextDup=null,this._tail=n)}get(n,t){let r;for(r=this._head;null!==r;r=r._nextDup)if((null===t||t<=r.currentIndex)&&Object.is(r.trackById,n))return r;return null}remove(n){const t=n._prevDup,r=n._nextDup;return null===t?this._head=r:t._nextDup=r,null===r?this._tail=t:r._prevDup=t,null===this._head}}class NE{constructor(){this.map=new Map}put(n){const t=n.trackById;let r=this.map.get(t);r||(r=new OP,this.map.set(t,r)),r.add(n)}get(n,t){const i=this.map.get(n);return i?i.get(n,t):null}remove(n){const t=n.trackById;return this.map.get(t).remove(n)&&this.map.delete(t),n}get isEmpty(){return 0===this.map.size}clear(){this.map.clear()}}function AE(e,n,t){const r=e.previousIndex;if(null===r)return r;let i=0;return t&&r{class e{static{this.\u0275prov=Z({token:e,providedIn:"root",factory:FE})}constructor(t){this.factories=t}static create(t,r){if(null!=r){const i=r.factories.slice();t=t.concat(i)}return new e(t)}static extend(t){return{provide:e,useFactory:r=>e.create(t,r||FE()),deps:[[e,new e_,new Xu]]}}find(t){const r=this.factories.find(i=>i.supports(t));if(null!=r)return r;throw new k(901,!1)}}return e})();function XP(e){try{const{rootComponent:n,appProviders:t,platformProviders:r}=e,i=function DP(e=[]){if(Mr)return Mr;const n=function EE(e=[],n){return et.create({name:n,providers:[{provide:l_,useValue:"platform"},{provide:Xf,useValue:new Set([()=>Mr=null])},...e]})}(e);return Mr=n,function fE(){!function vT(e){Ma=e}(()=>{throw new k(600,!1)})}(),function SE(e){e.get(iw,null)?.forEach(t=>t())}(n),n}(r),o=[Zf({}),{provide:ri,useExisting:Yo},...t||[]],l=new kb({providers:o,parent:i,debugName:"",runEnvironmentInitializers:!1}).injector,_=l.get(ve);return _.run(()=>{l.resolveInjectorInitializers();const d=l.get(hn,null);let p;_.runOutsideAngular(()=>{p=_.onError.subscribe({next:w=>{d.handleError(w)}})});const h=()=>l.destroy(),m=i.get(Xf);return m.add(h),l.onDestroy(()=>{p.unsubscribe(),m.delete(h)}),function pE(e,n,t){try{const r=t();return bl(r)?r.catch(i=>{throw n.runOutsideAngular(()=>e.handleError(i)),i}):r}catch(r){throw n.runOutsideAngular(()=>e.handleError(r)),r}}(d,_,()=>{const w=l.get(vl);return w.runInitializers(),w.donePromise.then(()=>{!function xv(e){"string"==typeof e&&(Ov=e.toLowerCase().replace(/_/g,"-"))}(l.get(ir,Ci)||Ci);const E=l.get(zn);return void 0!==n&&E.bootstrap(n),E})})})}catch(n){return Promise.reject(n)}}const ZE=new W("");function na(e,n){Et("NgSignals");const t=function bu(e){const n=Object.create(vu);n.computation=e;const t=()=>{if(rt(n),ue(n),n.value===Ts)throw n.error;return n.value};return t[A]=n,t}(e);return n?.equal&&(t[A].equal=n.equal),t}function Un(e){const n=M(null);try{return e()}finally{M(n)}}function up(e){return e[e.length-1]}function Nr(e){return this instanceof Nr?(this.v=e,this):new Nr(e)}function lS(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=function pp(e){var n="function"==typeof Symbol&&Symbol.iterator,t=n&&e[n],r=0;if(t)return t.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(n?"Object is not iterable.":"Symbol.iterator is not defined.")}(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(o){t[o]=e[o]&&function(c){return new Promise(function(l,_){!function i(o,c,l,_){Promise.resolve(_).then(function(d){o({value:d,done:l})},c)}(l,_,(c=e[o](c)).done,c.value)})}}}"function"==typeof SuppressedError&&SuppressedError;const uS=e=>e&&"number"==typeof e.length&&"function"!=typeof e;function _S(e){return Ve(e?.then)}function dS(e){return Ve(e[Au])}function fS(e){return Symbol.asyncIterator&&Ve(e?.[Symbol.asyncIterator])}function pS(e){return new TypeError(`You provided ${null!==e&&"object"==typeof e?"an invalid object":`'${e}'`} where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.`)}const gS=function t2(){return"function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"}();function hS(e){return Ve(e?.[gS])}function mS(e){return function cS(e,n,t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var i,r=t.apply(e,n||[]),o=[];return i=Object.create(("function"==typeof AsyncIterator?AsyncIterator:Object).prototype),l("next"),l("throw"),l("return",function c(w){return function(b){return Promise.resolve(b).then(w,h)}}),i[Symbol.asyncIterator]=function(){return this},i;function l(w,b){r[w]&&(i[w]=function(E){return new Promise(function(C,N){o.push([w,E,C,N])>1||_(w,E)})},b&&(i[w]=b(i[w])))}function _(w,b){try{!function d(w){w.value instanceof Nr?Promise.resolve(w.value.v).then(p,h):m(o[0][2],w)}(r[w](b))}catch(E){m(o[0][3],E)}}function p(w){_("next",w)}function h(w){_("throw",w)}function m(w,b){w(b),o.shift(),o.length&&_(o[0][0],o[0][1])}}(this,arguments,function*(){const t=e.getReader();try{for(;;){const{value:r,done:i}=yield Nr(t.read());if(i)return yield Nr(void 0);yield yield Nr(r)}}finally{t.releaseLock()}})}function wS(e){return Ve(e?.getReader)}function ws(e){if(e instanceof Rt)return e;if(null!=e){if(dS(e))return function n2(e){return new Rt(n=>{const t=e[Au]();if(Ve(t.subscribe))return t.subscribe(n);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}(e);if(uS(e))return function r2(e){return new Rt(n=>{for(let t=0;t{e.then(t=>{n.closed||(n.next(t),n.complete())},t=>n.error(t)).then(null,Rg)})}(e);if(fS(e))return yS(e);if(hS(e))return function i2(e){return new Rt(n=>{for(const t of e)if(n.next(t),n.closed)return;n.complete()})}(e);if(wS(e))return function o2(e){return yS(mS(e))}(e)}throw pS(e)}function yS(e){return new Rt(n=>{(function a2(e,n){var t,r,i,o;return function oS(e,n,t,r){return new(t||(t=Promise))(function(o,c){function l(p){try{d(r.next(p))}catch(h){c(h)}}function _(p){try{d(r.throw(p))}catch(h){c(h)}}function d(p){p.done?o(p.value):function i(o){return o instanceof t?o:new t(function(c){c(o)})}(p.value).then(l,_)}d((r=r.apply(e,n||[])).next())})}(this,void 0,void 0,function*(){try{for(t=lS(e);!(r=yield t.next()).done;)if(n.next(r.value),n.closed)return}catch(c){i={error:c}}finally{try{r&&!r.done&&(o=t.return)&&(yield o.call(t))}finally{if(i)throw i.error}}n.complete()})})(e,n).catch(t=>n.error(t))})}function Ar(e,n,t,r=0,i=!1){const o=n.schedule(function(){t(),i?e.add(this.schedule(null,r)):this.unsubscribe()},r);if(e.add(o),!i)return o}function bS(e,n=0){return jr((t,r)=>{t.subscribe(pr(r,i=>Ar(r,e,()=>r.next(i),n),()=>Ar(r,e,()=>r.complete(),n),i=>Ar(r,e,()=>r.error(i),n)))})}function vS(e,n=0){return jr((t,r)=>{r.add(e.schedule(()=>t.subscribe(r),n))})}function ES(e,n){if(!e)throw new Error("Iterable cannot be null");return new Rt(t=>{Ar(t,n,()=>{const r=e[Symbol.asyncIterator]();Ar(t,n,()=>{r.next().then(i=>{i.done?t.complete():t.next(i.value)})},0,!0)})})}function gp(e,n){return n?function f2(e,n){if(null!=e){if(dS(e))return function c2(e,n){return ws(e).pipe(vS(n),bS(n))}(e,n);if(uS(e))return function u2(e,n){return new Rt(t=>{let r=0;return n.schedule(function(){r===e.length?t.complete():(t.next(e[r++]),t.closed||this.schedule())})})}(e,n);if(_S(e))return function l2(e,n){return ws(e).pipe(vS(n),bS(n))}(e,n);if(fS(e))return ES(e,n);if(hS(e))return function _2(e,n){return new Rt(t=>{let r;return Ar(t,n,()=>{r=e[gS](),Ar(t,n,()=>{let i,o;try{({value:i,done:o}=r.next())}catch(c){return void t.error(c)}o?t.complete():t.next(i)},0,!0)}),()=>Ve(r?.return)&&r.return()})}(e,n);if(wS(e))return function d2(e,n){return ES(mS(e),n)}(e,n)}throw pS(e)}(e,n):ws(e)}function SS(...e){return gp(e,function MV(e){return function TV(e){return e&&Ve(e.schedule)}(up(e))?e.pop():void 0}(e))}function hp(e,n,t=1/0){return Ve(n)?hp((r,i)=>gr((o,c)=>n(r,o,i,c))(ws(e(r,i))),t):("number"==typeof n&&(t=n),jr((r,i)=>function p2(e,n,t,r,i,o,c,l){const _=[];let d=0,p=0,h=!1;const m=()=>{h&&!_.length&&!d&&n.complete()},w=E=>d{o&&n.next(E),d++;let C=!1;ws(t(E,p++)).subscribe(pr(n,N=>{i?.(N),o?w(N):n.next(N)},()=>{C=!0},void 0,()=>{if(C)try{for(d--;_.length&&db(N)):b(N)}m()}catch(N){n.error(N)}}))};return e.subscribe(pr(n,w,()=>{h=!0,m()})),()=>{l?.()}}(r,i,e,t)))}function CS(e){return jr((n,t)=>{try{n.subscribe(t)}finally{t.add(e)}})}let DS=null;function ra(){return DS}class y2{}const rn=new W("");function OS(e,n){n=encodeURIComponent(n);for(const t of e.split(";")){const r=t.indexOf("="),[i,o]=-1==r?[t,""]:[t.slice(0,r),t.slice(r+1)];if(i.trim()===n)return decodeURIComponent(o)}return null}const Tp=/\s+/,xS=[];let cr=(()=>{class e{constructor(t,r){this._ngEl=t,this._renderer=r,this.initialClasses=xS,this.stateMap=new Map}set klass(t){this.initialClasses=null!=t?t.trim().split(Tp):xS}set ngClass(t){this.rawClass="string"==typeof t?t.trim().split(Tp):t}ngDoCheck(){for(const r of this.initialClasses)this._updateState(r,!0);const t=this.rawClass;if(Array.isArray(t)||t instanceof Set)for(const r of t)this._updateState(r,!0);else if(null!=t)for(const r of Object.keys(t))this._updateState(r,!!t[r]);this._applyStateDiff()}_updateState(t,r){const i=this.stateMap.get(t);void 0!==i?(i.enabled!==r&&(i.changed=!0,i.enabled=r),i.touched=!0):this.stateMap.set(t,{enabled:r,changed:!0,touched:!0})}_applyStateDiff(){for(const t of this.stateMap){const r=t[0],i=t[1];i.changed?(this._toggleClass(r,i.enabled),i.changed=!1):i.touched||(i.enabled&&this._toggleClass(r,!1),this.stateMap.delete(r)),i.touched=!1}}_toggleClass(t,r){(t=t.trim()).length>0&&t.split(Tp).forEach(i=>{r?this._renderer.addClass(this._ngEl.nativeElement,i):this._renderer.removeClass(this._ngEl.nativeElement,i)})}static{this.\u0275fac=function(r){return new(r||e)(T(tn),T(os))}}static{this.\u0275dir=ne({type:e,selectors:[["","ngClass",""]],inputs:{klass:[0,"class","klass"],ngClass:"ngClass"},standalone:!0})}}return e})();class oW{constructor(n,t,r,i){this.$implicit=n,this.ngForOf=t,this.index=r,this.count=i}get first(){return 0===this.index}get last(){return this.index===this.count-1}get even(){return this.index%2==0}get odd(){return!this.even}}let ia=(()=>{class e{set ngForOf(t){this._ngForOf=t,this._ngForOfDirty=!0}set ngForTrackBy(t){this._trackByFn=t}get ngForTrackBy(){return this._trackByFn}constructor(t,r,i){this._viewContainer=t,this._template=r,this._differs=i,this._ngForOf=null,this._ngForOfDirty=!0,this._differ=null}set ngForTemplate(t){t&&(this._template=t)}ngDoCheck(){if(this._ngForOfDirty){this._ngForOfDirty=!1;const t=this._ngForOf;!this._differ&&t&&(this._differ=this._differs.find(t).create(this.ngForTrackBy))}if(this._differ){const t=this._differ.diff(this._ngForOf);t&&this._applyChanges(t)}}_applyChanges(t){const r=this._viewContainer;t.forEachOperation((i,o,c)=>{if(null==i.previousIndex)r.createEmbeddedView(this._template,new oW(i.item,this._ngForOf,-1,-1),null===c?void 0:c);else if(null==c)r.remove(null===o?void 0:o);else if(null!==o){const l=r.get(o);r.move(l,c),PS(l,i)}});for(let i=0,o=r.length;i{PS(r.get(i.currentIndex),i)})}static ngTemplateContextGuard(t,r){return!0}static{this.\u0275fac=function(r){return new(r||e)(T(Wn),T(sr),T(ip))}}static{this.\u0275dir=ne({type:e,selectors:[["","ngFor","","ngForOf",""]],inputs:{ngForOf:"ngForOf",ngForTrackBy:"ngForTrackBy",ngForTemplate:"ngForTemplate"},standalone:!0})}}return e})();function PS(e,n){e.context.$implicit=n.item}let an=(()=>{class e{constructor(t,r){this._viewContainer=t,this._context=new aW,this._thenTemplateRef=null,this._elseTemplateRef=null,this._thenViewRef=null,this._elseViewRef=null,this._thenTemplateRef=r}set ngIf(t){this._context.$implicit=this._context.ngIf=t,this._updateView()}set ngIfThen(t){VS("ngIfThen",t),this._thenTemplateRef=t,this._thenViewRef=null,this._updateView()}set ngIfElse(t){VS("ngIfElse",t),this._elseTemplateRef=t,this._elseViewRef=null,this._updateView()}_updateView(){this._context.$implicit?this._thenViewRef||(this._viewContainer.clear(),this._elseViewRef=null,this._thenTemplateRef&&(this._thenViewRef=this._viewContainer.createEmbeddedView(this._thenTemplateRef,this._context))):this._elseViewRef||(this._viewContainer.clear(),this._thenViewRef=null,this._elseTemplateRef&&(this._elseViewRef=this._viewContainer.createEmbeddedView(this._elseTemplateRef,this._context)))}static ngTemplateContextGuard(t,r){return!0}static{this.\u0275fac=function(r){return new(r||e)(T(Wn),T(sr))}}static{this.\u0275dir=ne({type:e,selectors:[["","ngIf",""]],inputs:{ngIf:"ngIf",ngIfThen:"ngIfThen",ngIfElse:"ngIfElse"},standalone:!0})}}return e})();class aW{constructor(){this.$implicit=null,this.ngIf=null}}function VS(e,n){if(n&&!n.createEmbeddedView)throw new Error(`${e} must be a TemplateRef, but received '${Je(n)}'.`)}let jS=(()=>{class e{constructor(t){this._viewContainerRef=t,this._viewRef=null,this.ngTemplateOutletContext=null,this.ngTemplateOutlet=null,this.ngTemplateOutletInjector=null}ngOnChanges(t){if(this._shouldRecreateView(t)){const r=this._viewContainerRef;if(this._viewRef&&r.remove(r.indexOf(this._viewRef)),!this.ngTemplateOutlet)return void(this._viewRef=null);const i=this._createContextForwardProxy();this._viewRef=r.createEmbeddedView(this.ngTemplateOutlet,i,{injector:this.ngTemplateOutletInjector??void 0})}}_shouldRecreateView(t){return!!t.ngTemplateOutlet||!!t.ngTemplateOutletInjector}_createContextForwardProxy(){return new Proxy({},{set:(t,r,i)=>!!this.ngTemplateOutletContext&&Reflect.set(this.ngTemplateOutletContext,r,i),get:(t,r,i)=>{if(this.ngTemplateOutletContext)return Reflect.get(this.ngTemplateOutletContext,r,i)}})}static{this.\u0275fac=function(r){return new(r||e)(T(Wn))}}static{this.\u0275dir=ne({type:e,selectors:[["","ngTemplateOutlet",""]],inputs:{ngTemplateOutletContext:"ngTemplateOutletContext",ngTemplateOutlet:"ngTemplateOutlet",ngTemplateOutletInjector:"ngTemplateOutletInjector"},standalone:!0,features:[Yn]})}}return e})(),Ke=(()=>{class e{static{this.\u0275fac=function(r){return new(r||e)}}static{this.\u0275mod=Zn({type:e})}static{this.\u0275inj=An({})}}return e})();function zS(e){return"server"===e}class US{}class ql{}class Kl{}class cn{constructor(n){this.normalizedNames=new Map,this.lazyUpdate=null,n?"string"==typeof n?this.lazyInit=()=>{this.headers=new Map,n.split("\n").forEach(t=>{const r=t.indexOf(":");if(r>0){const i=t.slice(0,r),o=i.toLowerCase(),c=t.slice(r+1).trim();this.maybeSetNormalizedName(i,o),this.headers.has(o)?this.headers.get(o).push(c):this.headers.set(o,[c])}})}:typeof Headers<"u"&&n instanceof Headers?(this.headers=new Map,n.forEach((t,r)=>{this.setHeaderEntries(r,t)})):this.lazyInit=()=>{this.headers=new Map,Object.entries(n).forEach(([t,r])=>{this.setHeaderEntries(t,r)})}:this.headers=new Map}has(n){return this.init(),this.headers.has(n.toLowerCase())}get(n){this.init();const t=this.headers.get(n.toLowerCase());return t&&t.length>0?t[0]:null}keys(){return this.init(),Array.from(this.normalizedNames.values())}getAll(n){return this.init(),this.headers.get(n.toLowerCase())||null}append(n,t){return this.clone({name:n,value:t,op:"a"})}set(n,t){return this.clone({name:n,value:t,op:"s"})}delete(n,t){return this.clone({name:n,value:t,op:"d"})}maybeSetNormalizedName(n,t){this.normalizedNames.has(t)||this.normalizedNames.set(t,n)}init(){this.lazyInit&&(this.lazyInit instanceof cn?this.copyFrom(this.lazyInit):this.lazyInit(),this.lazyInit=null,this.lazyUpdate&&(this.lazyUpdate.forEach(n=>this.applyUpdate(n)),this.lazyUpdate=null))}copyFrom(n){n.init(),Array.from(n.headers.keys()).forEach(t=>{this.headers.set(t,n.headers.get(t)),this.normalizedNames.set(t,n.normalizedNames.get(t))})}clone(n){const t=new cn;return t.lazyInit=this.lazyInit&&this.lazyInit instanceof cn?this.lazyInit:this,t.lazyUpdate=(this.lazyUpdate||[]).concat([n]),t}applyUpdate(n){const t=n.name.toLowerCase();switch(n.op){case"a":case"s":let r=n.value;if("string"==typeof r&&(r=[r]),0===r.length)return;this.maybeSetNormalizedName(n.name,t);const i=("a"===n.op?this.headers.get(t):void 0)||[];i.push(...r),this.headers.set(t,i);break;case"d":const o=n.value;if(o){let c=this.headers.get(t);if(!c)return;c=c.filter(l=>-1===o.indexOf(l)),0===c.length?(this.headers.delete(t),this.normalizedNames.delete(t)):this.headers.set(t,c)}else this.headers.delete(t),this.normalizedNames.delete(t)}}setHeaderEntries(n,t){const r=(Array.isArray(t)?t:[t]).map(o=>o.toString()),i=n.toLowerCase();this.headers.set(i,r),this.maybeSetNormalizedName(n,i)}forEach(n){this.init(),Array.from(this.normalizedNames.keys()).forEach(t=>n(this.normalizedNames.get(t),this.headers.get(t)))}}class lj{encodeKey(n){return eC(n)}encodeValue(n){return eC(n)}decodeKey(n){return decodeURIComponent(n)}decodeValue(n){return decodeURIComponent(n)}}const _j=/%(\d[a-f0-9])/gi,dj={40:"@","3A":":",24:"$","2C":",","3B":";","3D":"=","3F":"?","2F":"/"};function eC(e){return encodeURIComponent(e).replace(_j,(n,t)=>dj[t]??n)}function Jl(e){return`${e}`}class kr{constructor(n={}){if(this.updates=null,this.cloneFrom=null,this.encoder=n.encoder||new lj,n.fromString){if(n.fromObject)throw new Error("Cannot specify both fromString and fromObject.");this.map=function uj(e,n){const t=new Map;return e.length>0&&e.replace(/^\?/,"").split("&").forEach(i=>{const o=i.indexOf("="),[c,l]=-1==o?[n.decodeKey(i),""]:[n.decodeKey(i.slice(0,o)),n.decodeValue(i.slice(o+1))],_=t.get(c)||[];_.push(l),t.set(c,_)}),t}(n.fromString,this.encoder)}else n.fromObject?(this.map=new Map,Object.keys(n.fromObject).forEach(t=>{const r=n.fromObject[t],i=Array.isArray(r)?r.map(Jl):[Jl(r)];this.map.set(t,i)})):this.map=null}has(n){return this.init(),this.map.has(n)}get(n){this.init();const t=this.map.get(n);return t?t[0]:null}getAll(n){return this.init(),this.map.get(n)||null}keys(){return this.init(),Array.from(this.map.keys())}append(n,t){return this.clone({param:n,value:t,op:"a"})}appendAll(n){const t=[];return Object.keys(n).forEach(r=>{const i=n[r];Array.isArray(i)?i.forEach(o=>{t.push({param:r,value:o,op:"a"})}):t.push({param:r,value:i,op:"a"})}),this.clone(t)}set(n,t){return this.clone({param:n,value:t,op:"s"})}delete(n,t){return this.clone({param:n,value:t,op:"d"})}toString(){return this.init(),this.keys().map(n=>{const t=this.encoder.encodeKey(n);return this.map.get(n).map(r=>t+"="+this.encoder.encodeValue(r)).join("&")}).filter(n=>""!==n).join("&")}clone(n){const t=new kr({encoder:this.encoder});return t.cloneFrom=this.cloneFrom||this,t.updates=(this.updates||[]).concat(n),t}init(){null===this.map&&(this.map=new Map),null!==this.cloneFrom&&(this.cloneFrom.init(),this.cloneFrom.keys().forEach(n=>this.map.set(n,this.cloneFrom.map.get(n))),this.updates.forEach(n=>{switch(n.op){case"a":case"s":const t=("a"===n.op?this.map.get(n.param):void 0)||[];t.push(Jl(n.value)),this.map.set(n.param,t);break;case"d":if(void 0===n.value){this.map.delete(n.param);break}{let r=this.map.get(n.param)||[];const i=r.indexOf(Jl(n.value));-1!==i&&r.splice(i,1),r.length>0?this.map.set(n.param,r):this.map.delete(n.param)}}}),this.cloneFrom=this.updates=null)}}class fj{constructor(){this.map=new Map}set(n,t){return this.map.set(n,t),this}get(n){return this.map.has(n)||this.map.set(n,n.defaultValue()),this.map.get(n)}delete(n){return this.map.delete(n),this}has(n){return this.map.has(n)}keys(){return this.map.keys()}}function tC(e){return typeof ArrayBuffer<"u"&&e instanceof ArrayBuffer}function nC(e){return typeof Blob<"u"&&e instanceof Blob}function rC(e){return typeof FormData<"u"&&e instanceof FormData}class ca{constructor(n,t,r,i){let o;if(this.url=t,this.body=null,this.reportProgress=!1,this.withCredentials=!1,this.responseType="json",this.method=n.toUpperCase(),function pj(e){switch(e){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"JSONP":return!1;default:return!0}}(this.method)||i?(this.body=void 0!==r?r:null,o=i):o=r,o&&(this.reportProgress=!!o.reportProgress,this.withCredentials=!!o.withCredentials,o.responseType&&(this.responseType=o.responseType),o.headers&&(this.headers=o.headers),o.context&&(this.context=o.context),o.params&&(this.params=o.params),this.transferCache=o.transferCache),this.headers??=new cn,this.context??=new fj,this.params){const c=this.params.toString();if(0===c.length)this.urlWithParams=t;else{const l=t.indexOf("?");this.urlWithParams=t+(-1===l?"?":lm.set(w,n.setHeaders[w]),d)),n.setParams&&(p=Object.keys(n.setParams).reduce((m,w)=>m.set(w,n.setParams[w]),p)),new ca(t,r,c,{params:p,headers:d,context:h,reportProgress:_,responseType:i,withCredentials:l,transferCache:o})}}var Fr=function(e){return e[e.Sent=0]="Sent",e[e.UploadProgress=1]="UploadProgress",e[e.ResponseHeader=2]="ResponseHeader",e[e.DownloadProgress=3]="DownloadProgress",e[e.Response=4]="Response",e[e.User=5]="User",e}(Fr||{});class Op{constructor(n,t=200,r="OK"){this.headers=n.headers||new cn,this.status=void 0!==n.status?n.status:t,this.statusText=n.statusText||r,this.url=n.url||null,this.ok=this.status>=200&&this.status<300}}class Zl extends Op{constructor(n={}){super(n),this.type=Fr.ResponseHeader}clone(n={}){return new Zl({headers:n.headers||this.headers,status:void 0!==n.status?n.status:this.status,statusText:n.statusText||this.statusText,url:n.url||this.url||void 0})}}class ys extends Op{constructor(n={}){super(n),this.type=Fr.Response,this.body=void 0!==n.body?n.body:null}clone(n={}){return new ys({body:void 0!==n.body?n.body:this.body,headers:n.headers||this.headers,status:void 0!==n.status?n.status:this.status,statusText:n.statusText||this.statusText,url:n.url||this.url||void 0})}}class Ai extends Op{constructor(n){super(n,0,"Unknown Error"),this.name="HttpErrorResponse",this.ok=!1,this.message=this.status>=200&&this.status<300?`Http failure during parsing for ${n.url||"(unknown url)"}`:`Http failure response for ${n.url||"(unknown url)"}: ${n.status} ${n.statusText}`,this.error=n.error||null}}function xp(e,n){return{body:n,headers:e.headers,context:e.context,observe:e.observe,params:e.params,reportProgress:e.reportProgress,responseType:e.responseType,withCredentials:e.withCredentials,transferCache:e.transferCache}}let wj=(()=>{class e{constructor(t){this.handler=t}request(t,r,i={}){let o;if(t instanceof ca)o=t;else{let _,d;_=i.headers instanceof cn?i.headers:new cn(i.headers),i.params&&(d=i.params instanceof kr?i.params:new kr({fromObject:i.params})),o=new ca(t,r,void 0!==i.body?i.body:null,{headers:_,context:i.context,params:d,reportProgress:i.reportProgress,responseType:i.responseType||"json",withCredentials:i.withCredentials,transferCache:i.transferCache})}const c=SS(o).pipe(function g2(e,n){return Ve(n)?hp(e,n,1):hp(e,1)}(_=>this.handler.handle(_)));if(t instanceof ca||"events"===i.observe)return c;const l=c.pipe(function h2(e,n){return jr((t,r)=>{let i=0;t.subscribe(pr(r,o=>e.call(n,o,i++)&&r.next(o)))})}(_=>_ instanceof ys));switch(i.observe||"body"){case"body":switch(o.responseType){case"arraybuffer":return l.pipe(gr(_=>{if(null!==_.body&&!(_.body instanceof ArrayBuffer))throw new Error("Response is not an ArrayBuffer.");return _.body}));case"blob":return l.pipe(gr(_=>{if(null!==_.body&&!(_.body instanceof Blob))throw new Error("Response is not a Blob.");return _.body}));case"text":return l.pipe(gr(_=>{if(null!==_.body&&"string"!=typeof _.body)throw new Error("Response is not a string.");return _.body}));default:return l.pipe(gr(_=>_.body))}case"response":return l;default:throw new Error(`Unreachable: unhandled observe type ${i.observe}}`)}}delete(t,r={}){return this.request("DELETE",t,r)}get(t,r={}){return this.request("GET",t,r)}head(t,r={}){return this.request("HEAD",t,r)}jsonp(t,r){return this.request("JSONP",t,{params:(new kr).append(r,"JSONP_CALLBACK"),observe:"body",responseType:"json"})}options(t,r={}){return this.request("OPTIONS",t,r)}patch(t,r,i={}){return this.request("PATCH",t,xp(i,r))}post(t,r,i={}){return this.request("POST",t,xp(i,r))}put(t,r,i={}){return this.request("PUT",t,xp(i,r))}static{this.\u0275fac=function(r){return new(r||e)(U(ql))}}static{this.\u0275prov=Z({token:e,factory:e.\u0275fac})}}return e})();const yj=/^\)\]\}',?\n/;function iC(e){if(e.url)return e.url;const n="X-Request-URL".toLocaleLowerCase();return e.headers.get(n)}let Lp=(()=>{class e{constructor(){this.fetchImpl=j(vj,{optional:!0})?.fetch??fetch.bind(globalThis),this.ngZone=j(ve)}handle(t){return new Rt(r=>{const i=new AbortController;return this.doRequest(t,i.signal,r).then(Pp,o=>r.error(new Ai({error:o}))),()=>i.abort()})}doRequest(t,r,i){var o=this;return(0,u.A)(function*(){const c=o.createRequestInit(t);let l;try{const b=o.ngZone.runOutsideAngular(()=>o.fetchImpl(t.urlWithParams,{signal:r,...c}));(function Ej(e){e.then(Pp,Pp)})(b),i.next({type:Fr.Sent}),l=yield b}catch(b){return void i.error(new Ai({error:b,status:b.status??0,statusText:b.statusText,url:t.urlWithParams,headers:b.headers}))}const _=new cn(l.headers),d=l.statusText,p=iC(l)??t.urlWithParams;let h=l.status,m=null;if(t.reportProgress&&i.next(new Zl({headers:_,status:h,statusText:d,url:p})),l.body){const b=l.headers.get("content-length"),E=[],C=l.body.getReader();let D,V,N=0;const q=typeof Zone<"u"&&Zone.current;yield o.ngZone.runOutsideAngular((0,u.A)(function*(){for(;;){const{done:be,value:it}=yield C.read();if(be)break;if(E.push(it),N+=it.length,t.reportProgress){V="text"===t.responseType?(V??"")+(D??=new TextDecoder).decode(it,{stream:!0}):void 0;const ur=()=>i.next({type:Fr.DownloadProgress,total:b?+b:void 0,loaded:N,partialText:V});q?q.run(ur):ur()}}}));const ce=o.concatChunks(E,N);try{const be=l.headers.get("Content-Type")??"";m=o.parseBody(t,ce,be)}catch(be){return void i.error(new Ai({error:be,headers:new cn(l.headers),status:l.status,statusText:l.statusText,url:iC(l)??t.urlWithParams}))}}0===h&&(h=m?200:0),h>=200&&h<300?(i.next(new ys({body:m,headers:_,status:h,statusText:d,url:p})),i.complete()):i.error(new Ai({error:m,headers:_,status:h,statusText:d,url:p}))})()}parseBody(t,r,i){switch(t.responseType){case"json":const o=(new TextDecoder).decode(r).replace(yj,"");return""===o?null:JSON.parse(o);case"text":return(new TextDecoder).decode(r);case"blob":return new Blob([r],{type:i});case"arraybuffer":return r.buffer}}createRequestInit(t){const r={},i=t.withCredentials?"include":void 0;if(t.headers.forEach((o,c)=>r[o]=c.join(",")),t.headers.has("Accept")||(r.Accept="application/json, text/plain, */*"),!t.headers.has("Content-Type")){const o=t.detectContentTypeHeader();null!==o&&(r["Content-Type"]=o)}return{body:t.serializeBody(),method:t.method,headers:r,credentials:i}}concatChunks(t,r){const i=new Uint8Array(r);let o=0;for(const c of t)i.set(c,o),o+=c.length;return i}static{this.\u0275fac=function(r){return new(r||e)}}static{this.\u0275prov=Z({token:e,factory:e.\u0275fac})}}return e})();class vj{}function Pp(){}function oC(e,n){return n(e)}function Sj(e,n){return(t,r)=>n.intercept(t,{handle:i=>e(i,r)})}const Dj=new W(""),la=new W(""),aC=new W(""),cC=new W("",{providedIn:"root",factory:()=>!0});function Tj(){let e=null;return(n,t)=>{null===e&&(e=(j(Dj,{optional:!0})??[]).reduceRight(Sj,oC));const r=j(vr);if(j(cC)){const o=r.add();return e(n,t).pipe(CS(()=>r.remove(o)))}return e(n,t)}}let lC=(()=>{class e extends ql{constructor(t,r){super(),this.backend=t,this.injector=r,this.chain=null,this.pendingTasks=j(vr),this.contributeToStability=j(cC)}handle(t){if(null===this.chain){const r=Array.from(new Set([...this.injector.get(la),...this.injector.get(aC,[])]));this.chain=r.reduceRight((i,o)=>function Cj(e,n,t){return(r,i)=>function Rh(e,n){e instanceof xs&&e.assertNotDestroyed();const r=wr(e),i=Ot(void 0);try{return n()}finally{wr(r),Ot(i)}}(t,()=>n(r,o=>e(o,i)))}(i,o,this.injector),oC)}if(this.contributeToStability){const r=this.pendingTasks.add();return this.chain(t,i=>this.backend.handle(i)).pipe(CS(()=>this.pendingTasks.remove(r)))}return this.chain(t,r=>this.backend.handle(r))}static{this.\u0275fac=function(r){return new(r||e)(U(Kl),U(Yt))}}static{this.\u0275prov=Z({token:e,factory:e.\u0275fac})}}return e})();const kj=/^\)\]\}',?\n/;let _C=(()=>{class e{constructor(t){this.xhrFactory=t}handle(t){if("JSONP"===t.method)throw new k(-2800,!1);const r=this.xhrFactory;return(r.\u0275loadImpl?gp(r.\u0275loadImpl()):SS(null)).pipe(function m2(e,n){return jr((t,r)=>{let i=null,o=0,c=!1;const l=()=>c&&!i&&r.complete();t.subscribe(pr(r,_=>{i?.unsubscribe();let d=0;const p=o++;ws(e(_,p)).subscribe(i=pr(r,h=>r.next(n?n(_,h,p,d++):h),()=>{i=null,l()}))},()=>{c=!0,l()}))})}(()=>new Rt(o=>{const c=r.build();if(c.open(t.method,t.urlWithParams),t.withCredentials&&(c.withCredentials=!0),t.headers.forEach((E,C)=>c.setRequestHeader(E,C.join(","))),t.headers.has("Accept")||c.setRequestHeader("Accept","application/json, text/plain, */*"),!t.headers.has("Content-Type")){const E=t.detectContentTypeHeader();null!==E&&c.setRequestHeader("Content-Type",E)}if(t.responseType){const E=t.responseType.toLowerCase();c.responseType="json"!==E?E:"text"}const l=t.serializeBody();let _=null;const d=()=>{if(null!==_)return _;const E=c.statusText||"OK",C=new cn(c.getAllResponseHeaders()),N=function Fj(e){return"responseURL"in e&&e.responseURL?e.responseURL:/^X-Request-URL:/m.test(e.getAllResponseHeaders())?e.getResponseHeader("X-Request-URL"):null}(c)||t.url;return _=new Zl({headers:C,status:c.status,statusText:E,url:N}),_},p=()=>{let{headers:E,status:C,statusText:N,url:D}=d(),V=null;204!==C&&(V=typeof c.response>"u"?c.responseText:c.response),0===C&&(C=V?200:0);let q=C>=200&&C<300;if("json"===t.responseType&&"string"==typeof V){const ce=V;V=V.replace(kj,"");try{V=""!==V?JSON.parse(V):null}catch(be){V=ce,q&&(q=!1,V={error:be,text:V})}}q?(o.next(new ys({body:V,headers:E,status:C,statusText:N,url:D||void 0})),o.complete()):o.error(new Ai({error:V,headers:E,status:C,statusText:N,url:D||void 0}))},h=E=>{const{url:C}=d(),N=new Ai({error:E,status:c.status||0,statusText:c.statusText||"Unknown Error",url:C||void 0});o.error(N)};let m=!1;const w=E=>{m||(o.next(d()),m=!0);let C={type:Fr.DownloadProgress,loaded:E.loaded};E.lengthComputable&&(C.total=E.total),"text"===t.responseType&&c.responseText&&(C.partialText=c.responseText),o.next(C)},b=E=>{let C={type:Fr.UploadProgress,loaded:E.loaded};E.lengthComputable&&(C.total=E.total),o.next(C)};return c.addEventListener("load",p),c.addEventListener("error",h),c.addEventListener("timeout",h),c.addEventListener("abort",h),t.reportProgress&&(c.addEventListener("progress",w),null!==l&&c.upload&&c.upload.addEventListener("progress",b)),c.send(l),o.next({type:Fr.Sent}),()=>{c.removeEventListener("error",h),c.removeEventListener("abort",h),c.removeEventListener("load",p),c.removeEventListener("timeout",h),t.reportProgress&&(c.removeEventListener("progress",w),null!==l&&c.upload&&c.upload.removeEventListener("progress",b)),c.readyState!==c.DONE&&c.abort()}})))}static{this.\u0275fac=function(r){return new(r||e)(U(US))}}static{this.\u0275prov=Z({token:e,factory:e.\u0275fac})}}return e})();const Vp=new W(""),dC=new W("",{providedIn:"root",factory:()=>"XSRF-TOKEN"}),fC=new W("",{providedIn:"root",factory:()=>"X-XSRF-TOKEN"});class pC{}let xj=(()=>{class e{constructor(t,r,i){this.doc=t,this.platform=r,this.cookieName=i,this.lastCookieString="",this.lastToken=null,this.parseCount=0}getToken(){if("server"===this.platform)return null;const t=this.doc.cookie||"";return t!==this.lastCookieString&&(this.parseCount++,this.lastToken=OS(t,this.cookieName),this.lastCookieString=t),this.lastToken}static{this.\u0275fac=function(r){return new(r||e)(U(rn),U(Yr),U(dC))}}static{this.\u0275prov=Z({token:e,factory:e.\u0275fac})}}return e})();function Lj(e,n){const t=e.url.toLowerCase();if(!j(Vp)||"GET"===e.method||"HEAD"===e.method||t.startsWith("http://")||t.startsWith("https://"))return n(e);const r=j(pC).getToken(),i=j(fC);return null!=r&&!e.headers.has(i)&&(e=e.clone({headers:e.headers.set(i,r)})),n(e)}var Rr=function(e){return e[e.Interceptors=0]="Interceptors",e[e.LegacyInterceptors=1]="LegacyInterceptors",e[e.CustomXsrfConfiguration=2]="CustomXsrfConfiguration",e[e.NoXsrfProtection=3]="NoXsrfProtection",e[e.JsonpSupport=4]="JsonpSupport",e[e.RequestsMadeViaParent=5]="RequestsMadeViaParent",e[e.Fetch=6]="Fetch",e}(Rr||{});function bs(e,n){return{\u0275kind:e,\u0275providers:n}}function Pj(...e){const n=[wj,_C,lC,{provide:ql,useExisting:lC},{provide:Kl,useFactory:()=>j(Lp,{optional:!0})??j(_C)},{provide:la,useValue:Lj,multi:!0},{provide:Vp,useValue:!0},{provide:pC,useClass:xj}];for(const t of e)n.push(...t.\u0275providers);return function $i(e){return{\u0275providers:e}}(n)}const gC=new W("");let Wj=(()=>{class e{static{this.\u0275fac=function(r){return new(r||e)}}static{this.\u0275mod=Zn({type:e})}static{this.\u0275inj=An({providers:[Pj(bs(Rr.LegacyInterceptors,[{provide:gC,useFactory:Tj},{provide:la,useExisting:gC,multi:!0}]))]})}}return e})();class Kj extends y2{constructor(){super(...arguments),this.supportsDOMEvents=!0}}class Wp extends Kj{static makeCurrent(){!function w2(e){DS??=e}(new Wp)}onAndCancel(n,t,r){return n.addEventListener(t,r),()=>{n.removeEventListener(t,r)}}dispatchEvent(n,t){n.dispatchEvent(t)}remove(n){n.remove()}createElement(n,t){return(t=t||this.getDefaultDocument()).createElement(n)}createHtmlDocument(){return document.implementation.createHTMLDocument("fakeTitle")}getDefaultDocument(){return document}isElementNode(n){return n.nodeType===Node.ELEMENT_NODE}isShadowRoot(n){return n instanceof DocumentFragment}getGlobalEventTarget(n,t){return"window"===t?window:"document"===t?n:"body"===t?n.body:null}getBaseHref(n){const t=function Jj(){return ua=ua||document.querySelector("base"),ua?ua.getAttribute("href"):null}();return null==t?null:function Zj(e){return new URL(e,document.baseURI).pathname}(t)}resetBaseElement(){ua=null}getUserAgent(){return window.navigator.userAgent}getCookie(n){return OS(document.cookie,n)}}let ua=null,Yj=(()=>{class e{build(){return new XMLHttpRequest}static{this.\u0275fac=function(r){return new(r||e)}}static{this.\u0275prov=Z({token:e,factory:e.\u0275fac})}}return e})();const Yl=new W("");let SC=(()=>{class e{constructor(t,r){this._zone=r,this._eventNameToPlugin=new Map,t.forEach(i=>{i.manager=this}),this._plugins=t.slice().reverse()}addEventListener(t,r,i){return this._findPluginFor(r).addEventListener(t,r,i)}getZone(){return this._zone}_findPluginFor(t){let r=this._eventNameToPlugin.get(t);if(r)return r;if(r=this._plugins.find(o=>o.supports(t)),!r)throw new k(5101,!1);return this._eventNameToPlugin.set(t,r),r}static{this.\u0275fac=function(r){return new(r||e)(U(Yl),U(ve))}}static{this.\u0275prov=Z({token:e,factory:e.\u0275fac})}}return e})();class jp{constructor(n){this._doc=n}}const Bp="ng-app-id";let CC=(()=>{class e{constructor(t,r,i,o={}){this.doc=t,this.appId=r,this.nonce=i,this.platformId=o,this.styleRef=new Map,this.hostNodes=new Set,this.styleNodesInDOM=this.collectServerRenderedStyles(),this.platformIsServer=zS(o),this.resetHostNodes()}addStyles(t){for(const r of t)1===this.changeUsageCount(r,1)&&this.onStyleAdded(r)}removeStyles(t){for(const r of t)this.changeUsageCount(r,-1)<=0&&this.onStyleRemoved(r)}ngOnDestroy(){const t=this.styleNodesInDOM;t&&(t.forEach(r=>r.remove()),t.clear());for(const r of this.getAllStyles())this.onStyleRemoved(r);this.resetHostNodes()}addHost(t){this.hostNodes.add(t);for(const r of this.getAllStyles())this.addStyleToHost(t,r)}removeHost(t){this.hostNodes.delete(t)}getAllStyles(){return this.styleRef.keys()}onStyleAdded(t){for(const r of this.hostNodes)this.addStyleToHost(r,t)}onStyleRemoved(t){const r=this.styleRef;r.get(t)?.elements?.forEach(i=>i.remove()),r.delete(t)}collectServerRenderedStyles(){const t=this.doc.head?.querySelectorAll(`style[${Bp}="${this.appId}"]`);if(t?.length){const r=new Map;return t.forEach(i=>{null!=i.textContent&&r.set(i.textContent,i)}),r}return null}changeUsageCount(t,r){const i=this.styleRef;if(i.has(t)){const o=i.get(t);return o.usage+=r,o.usage}return i.set(t,{usage:r,elements:[]}),r}getStyleElement(t,r){const i=this.styleNodesInDOM,o=i?.get(r);if(o?.parentNode===t)return i.delete(r),o.removeAttribute(Bp),o;{const c=this.doc.createElement("style");return this.nonce&&c.setAttribute("nonce",this.nonce),c.textContent=r,this.platformIsServer&&c.setAttribute(Bp,this.appId),t.appendChild(c),c}}addStyleToHost(t,r){const i=this.getStyleElement(t,r),o=this.styleRef,c=o.get(r)?.elements;c?c.push(i):o.set(r,{elements:[i],usage:1})}resetHostNodes(){const t=this.hostNodes;t.clear(),t.add(this.doc.head)}static{this.\u0275fac=function(r){return new(r||e)(U(rn),U(co),U(ow,8),U(Yr))}}static{this.\u0275prov=Z({token:e,factory:e.\u0275fac})}}return e})();const Hp={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/",math:"http://www.w3.org/1998/Math/MathML"},zp=/%COMP%/g,nB=new W("",{providedIn:"root",factory:()=>!0});function TC(e,n){return n.map(t=>t.replace(zp,e))}let IC=(()=>{class e{constructor(t,r,i,o,c,l,_,d=null){this.eventManager=t,this.sharedStylesHost=r,this.appId=i,this.removeStylesOnCompDestroy=o,this.doc=c,this.platformId=l,this.ngZone=_,this.nonce=d,this.rendererByCompId=new Map,this.platformIsServer=zS(l),this.defaultRenderer=new Up(t,c,_,this.platformIsServer)}createRenderer(t,r){if(!t||!r)return this.defaultRenderer;this.platformIsServer&&r.encapsulation===un.ShadowDom&&(r={...r,encapsulation:un.Emulated});const i=this.getOrCreateRenderer(t,r);return i instanceof NC?i.applyToHost(t):i instanceof $p&&i.applyStyles(),i}getOrCreateRenderer(t,r){const i=this.rendererByCompId;let o=i.get(r.id);if(!o){const c=this.doc,l=this.ngZone,_=this.eventManager,d=this.sharedStylesHost,p=this.removeStylesOnCompDestroy,h=this.platformIsServer;switch(r.encapsulation){case un.Emulated:o=new NC(_,d,r,this.appId,p,c,l,h);break;case un.ShadowDom:return new oB(_,d,t,r,c,l,this.nonce,h);default:o=new $p(_,d,r,p,c,l,h)}i.set(r.id,o)}return o}ngOnDestroy(){this.rendererByCompId.clear()}static{this.\u0275fac=function(r){return new(r||e)(U(SC),U(CC),U(co),U(nB),U(rn),U(Yr),U(ve),U(ow))}}static{this.\u0275prov=Z({token:e,factory:e.\u0275fac})}}return e})();class Up{constructor(n,t,r,i){this.eventManager=n,this.doc=t,this.ngZone=r,this.platformIsServer=i,this.data=Object.create(null),this.throwOnSyntheticProps=!0,this.destroyNode=null}destroy(){}createElement(n,t){return t?this.doc.createElementNS(Hp[t]||t,n):this.doc.createElement(n)}createComment(n){return this.doc.createComment(n)}createText(n){return this.doc.createTextNode(n)}appendChild(n,t){(MC(n)?n.content:n).appendChild(t)}insertBefore(n,t,r){n&&(MC(n)?n.content:n).insertBefore(t,r)}removeChild(n,t){t.remove()}selectRootElement(n,t){let r="string"==typeof n?this.doc.querySelector(n):n;if(!r)throw new k(-5104,!1);return t||(r.textContent=""),r}parentNode(n){return n.parentNode}nextSibling(n){return n.nextSibling}setAttribute(n,t,r,i){if(i){t=i+":"+t;const o=Hp[i];o?n.setAttributeNS(o,t,r):n.setAttribute(t,r)}else n.setAttribute(t,r)}removeAttribute(n,t,r){if(r){const i=Hp[r];i?n.removeAttributeNS(i,t):n.removeAttribute(`${r}:${t}`)}else n.removeAttribute(t)}addClass(n,t){n.classList.add(t)}removeClass(n,t){n.classList.remove(t)}setStyle(n,t,r,i){i&(Cr.DashCase|Cr.Important)?n.style.setProperty(t,r,i&Cr.Important?"important":""):n.style[t]=r}removeStyle(n,t,r){r&Cr.DashCase?n.style.removeProperty(t):n.style[t]=""}setProperty(n,t,r){null!=n&&(n[t]=r)}setValue(n,t){n.nodeValue=t}listen(n,t,r){if("string"==typeof n&&!(n=ra().getGlobalEventTarget(this.doc,n)))throw new Error(`Unsupported event target ${n} for event ${t}`);return this.eventManager.addEventListener(n,t,this.decoratePreventDefault(r))}decoratePreventDefault(n){return t=>{if("__ngUnwrap__"===t)return n;!1===(this.platformIsServer?this.ngZone.runGuarded(()=>n(t)):n(t))&&t.preventDefault()}}}function MC(e){return"TEMPLATE"===e.tagName&&void 0!==e.content}class oB extends Up{constructor(n,t,r,i,o,c,l,_){super(n,o,c,_),this.sharedStylesHost=t,this.hostEl=r,this.shadowRoot=r.attachShadow({mode:"open"}),this.sharedStylesHost.addHost(this.shadowRoot);const d=TC(i.id,i.styles);for(const p of d){const h=document.createElement("style");l&&h.setAttribute("nonce",l),h.textContent=p,this.shadowRoot.appendChild(h)}}nodeOrShadowRoot(n){return n===this.hostEl?this.shadowRoot:n}appendChild(n,t){return super.appendChild(this.nodeOrShadowRoot(n),t)}insertBefore(n,t,r){return super.insertBefore(this.nodeOrShadowRoot(n),t,r)}removeChild(n,t){return super.removeChild(null,t)}parentNode(n){return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(n)))}destroy(){this.sharedStylesHost.removeHost(this.shadowRoot)}}class $p extends Up{constructor(n,t,r,i,o,c,l,_){super(n,o,c,l),this.sharedStylesHost=t,this.removeStylesOnCompDestroy=i,this.styles=_?TC(_,r.styles):r.styles}applyStyles(){this.sharedStylesHost.addStyles(this.styles)}destroy(){this.removeStylesOnCompDestroy&&this.sharedStylesHost.removeStyles(this.styles)}}class NC extends $p{constructor(n,t,r,i,o,c,l,_){const d=i+"-"+r.id;super(n,t,r,o,c,l,_,d),this.contentAttr=function rB(e){return"_ngcontent-%COMP%".replace(zp,e)}(d),this.hostAttr=function sB(e){return"_nghost-%COMP%".replace(zp,e)}(d)}applyToHost(n){this.applyStyles(),this.setAttribute(n,this.hostAttr,"")}createElement(n,t){const r=super.createElement(n,t);return super.setAttribute(r,this.contentAttr,""),r}}let aB=(()=>{class e extends jp{constructor(t){super(t)}supports(t){return!0}addEventListener(t,r,i){return t.addEventListener(r,i,!1),()=>this.removeEventListener(t,r,i)}removeEventListener(t,r,i){return t.removeEventListener(r,i)}static{this.\u0275fac=function(r){return new(r||e)(U(rn))}}static{this.\u0275prov=Z({token:e,factory:e.\u0275fac})}}return e})(),cB=(()=>{class e extends jp{constructor(t){super(t),this.delegate=j(ZE,{optional:!0})}supports(t){return!!this.delegate&&this.delegate.supports(t)}addEventListener(t,r,i){return this.delegate.addEventListener(t,r,i)}removeEventListener(t,r,i){return this.delegate.removeEventListener(t,r,i)}static{this.\u0275fac=function(r){return new(r||e)(U(rn))}}static{this.\u0275prov=Z({token:e,factory:e.\u0275fac})}}return e})();const AC=["alt","control","meta","shift"],lB={"\b":"Backspace","\t":"Tab","\x7f":"Delete","\x1b":"Escape",Del:"Delete",Esc:"Escape",Left:"ArrowLeft",Right:"ArrowRight",Up:"ArrowUp",Down:"ArrowDown",Menu:"ContextMenu",Scroll:"ScrollLock",Win:"OS"},uB={alt:e=>e.altKey,control:e=>e.ctrlKey,meta:e=>e.metaKey,shift:e=>e.shiftKey};function kC(e){return{appProviders:[...wB,...e?.providers??[]],platformProviders:hB}}const hB=[{provide:Yr,useValue:"browser"},{provide:iw,useValue:function fB(){Wp.makeCurrent()},multi:!0},{provide:rn,useFactory:function gB(){return function gN(e){K_=e}(document),document},deps:[]}],wB=[{provide:l_,useValue:"root"},{provide:hn,useFactory:function pB(){return new hn},deps:[]},{provide:Yl,useClass:aB,multi:!0,deps:[rn,ve,Yr]},{provide:Yl,useClass:(()=>{class e extends jp{constructor(t){super(t)}supports(t){return null!=e.parseEventName(t)}addEventListener(t,r,i){const o=e.parseEventName(r),c=e.eventCallback(o.fullKey,i,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>ra().onAndCancel(t,o.domEventName,c))}static parseEventName(t){const r=t.toLowerCase().split("."),i=r.shift();if(0===r.length||"keydown"!==i&&"keyup"!==i)return null;const o=e._normalizeKey(r.pop());let c="",l=r.indexOf("code");if(l>-1&&(r.splice(l,1),c="code."),AC.forEach(d=>{const p=r.indexOf(d);p>-1&&(r.splice(p,1),c+=d+".")}),c+=o,0!=r.length||0===o.length)return null;const _={};return _.domEventName=i,_.fullKey=c,_}static matchEventFullKeyCode(t,r){let i=lB[t.key]||t.key,o="";return r.indexOf("code.")>-1&&(i=t.code,o="code."),!(null==i||!i)&&(i=i.toLowerCase()," "===i?i="space":"."===i&&(i="dot"),AC.forEach(c=>{c!==i&&(0,uB[c])(t)&&(o+=c+".")}),o+=i,o===r)}static eventCallback(t,r,i){return o=>{e.matchEventFullKeyCode(o,t)&&i.runGuarded(()=>r(o))}}static _normalizeKey(t){return"esc"===t?"escape":t}static{this.\u0275fac=function(r){return new(r||e)(U(rn))}}static{this.\u0275prov=Z({token:e,factory:e.\u0275fac})}}return e})(),multi:!0,deps:[rn]},{provide:Yl,useClass:cB,multi:!0},IC,CC,SC,{provide:Kd,useExisting:IC},{provide:US,useClass:Yj,deps:[]},[]];var P=a(8825);const _a=new W("SDK"),OC=new W("wasm_asset_path"),xC=new W("rpc_address"),LC=(new W("node_address"),new W("verbosity")),CB=function SB(e,n){const t={value:void 0};return[{provide:dE,useFactory:(r,i,o,c)=>(0,u.A)(function*(){return t.value=yield n({wasm_asset_path:r,rpc_address:i,node_address:o,verbosity:c})}),multi:!0,deps:[OC,xC,LC]},{provide:e,useFactory:()=>{if(!j(vl).done)throw new Error(`Cannot inject ${e} until bootstrap is complete.`);return t.value}}]}(_a,function(){var e=(0,u.A)(function*(n){return(yield(0,P.Ay)(n.wasm_asset_path))&&new P.hp(n.rpc_address,n.node_address,n.verbosity)});return function(t){return e.apply(this,arguments)}}());let DB=(()=>{class e{static{this.\u0275fac=function(r){return new(r||e)}}static{this.\u0275mod=Zn({type:e})}static{this.\u0275inj=An({providers:CB,imports:[Ke]})}}return e})();const lr=new W("EnvironmentConfig"),Gp=new W("EnvironmentConfig"),PC=["deploy","transfer","put_deploy","speculative_deploy","speculative_transfer","speculative_exec_deploy","sign_deploy","call_entrypoint_deploy","install"],TB=["make_deploy","make_transfer",...PC],En={wasm_asset_path:"assets/casper_rust_wasm_sdk_bg.wasm",default_action:"get_node_status",verbosity:P.WT.High,minimum_transfer:"2500000000",TTL:"30m",standard_payment_amount:"100000000",default_pricing_mode:P.MK.Fixed,default_gas_price_tolerance:"1",default_additional_computation_factor:"0",default_is_install_upgrade:!0,action_needs_secret_key:PC,action_needs_public_key:TB,networks:{"node-launcher":{rpc_address:"http://localhost:7777",stream_address:"http://localhost:9999/events/main",chain_name:"casper-net-1"},ntcl:{rpc_address:"http://localhost:11101",stream_address:"http://localhost:18101/events/main",chain_name:"casper-net-1"},integration:{rpc_address:"https://rpc.integration.casperlabs.io",stream_address:"https://events.integration.casperlabs.io/events/main",chain_name:"integration-test"},testnet:{rpc_address:"https://rpc.testnet.casperlabs.io",stream_address:"https://events.testnet.casperlabs.io/events/main",chain_name:"casper-test"},mainnet:{rpc_address:"https://rpc.mainnet.casperlabs.io",stream_address:"https://events.mainnet.casperlabs.io/events/main",chain_name:"casper"},custom:{rpc_address:"http://3.136.227.9:7777",stream_address:"http://3.136.227.9:9999/events/main",chain_name:"casper-test"},dev:{rpc_address:"http://localhost:4200",stream_address:"http://localhost:4200/events/main",chain_name:"casper-net-1"}},localhost:"localhost",app_port:"4200",default_port:"7777",default_protocol:"http://"},qp={production:!0,default_network:"integration",localhost_to_gateway:!1},{isArray:IB}=Array,{getPrototypeOf:MB,prototype:NB,keys:AB}=Object;const{isArray:RB}=Array;function LB(e,n){return e.reduce((t,r,i)=>(t[r]=n[i],t),{})}function PB(...e){const n=function IV(e){return Ve(up(e))?e.pop():void 0}(e),{args:t,keys:r}=function kB(e){if(1===e.length){const n=e[0];if(IB(n))return{args:n,keys:null};if(function FB(e){return e&&"object"==typeof e&&MB(e)===NB}(n)){const t=AB(n);return{args:t.map(r=>n[r]),keys:t}}}return{args:e,keys:null}}(e),i=new Rt(o=>{const{length:c}=t;if(!c)return void o.complete();const l=new Array(c);let _=c,d=c;for(let p=0;p{h||(h=!0,d--),l[p]=m},()=>_--,void 0,()=>{(!_||!h)&&(d||o.next(r?LB(r,l):l),o.complete())}))}});return n?i.pipe(function xB(e){return gr(n=>function OB(e,n){return RB(n)?e(...n):e(n)}(e,n))}(n)):i}let VC=(()=>{class e{constructor(t,r){this._renderer=t,this._elementRef=r,this.onChange=i=>{},this.onTouched=()=>{}}setProperty(t,r){this._renderer.setProperty(this._elementRef.nativeElement,t,r)}registerOnTouched(t){this.onTouched=t}registerOnChange(t){this.onChange=t}setDisabledState(t){this.setProperty("disabled",t)}static{this.\u0275fac=function(r){return new(r||e)(T(os),T(tn))}}static{this.\u0275dir=ne({type:e})}}return e})(),Es=(()=>{class e extends VC{static{this.\u0275fac=(()=>{let t;return function(i){return(t||(t=ft(e)))(i||e)}})()}static{this.\u0275dir=ne({type:e,features:[Ce]})}}return e})();const $n=new W(""),VB={provide:$n,useExisting:Ie(()=>Kp),multi:!0};let Kp=(()=>{class e extends Es{writeValue(t){this.setProperty("checked",t)}static{this.\u0275fac=(()=>{let t;return function(i){return(t||(t=ft(e)))(i||e)}})()}static{this.\u0275dir=ne({type:e,selectors:[["input","type","checkbox","formControlName",""],["input","type","checkbox","formControl",""],["input","type","checkbox","ngModel",""]],hostBindings:function(r,i){1&r&&re("change",function(c){return i.onChange(c.target.checked)})("blur",function(){return i.onTouched()})},features:[Pe([VB]),Ce]})}}return e})();const WB={provide:$n,useExisting:Ie(()=>da),multi:!0},BB=new W("");let da=(()=>{class e extends VC{constructor(t,r,i){super(t,r),this._compositionMode=i,this._composing=!1,null==this._compositionMode&&(this._compositionMode=!function jB(){const e=ra()?ra().getUserAgent():"";return/android (\d+)/.test(e.toLowerCase())}())}writeValue(t){this.setProperty("value",t??"")}_handleInput(t){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(t)}_compositionStart(){this._composing=!0}_compositionEnd(t){this._composing=!1,this._compositionMode&&this.onChange(t)}static{this.\u0275fac=function(r){return new(r||e)(T(os),T(tn),T(BB,8))}}static{this.\u0275dir=ne({type:e,selectors:[["input","formControlName","",3,"type","checkbox"],["textarea","formControlName",""],["input","formControl","",3,"type","checkbox"],["textarea","formControl",""],["input","ngModel","",3,"type","checkbox"],["textarea","ngModel",""],["","ngDefaultControl",""]],hostBindings:function(r,i){1&r&&re("input",function(c){return i._handleInput(c.target.value)})("blur",function(){return i.onTouched()})("compositionstart",function(){return i._compositionStart()})("compositionend",function(c){return i._compositionEnd(c.target.value)})},features:[Pe([WB]),Ce]})}}return e})();function Or(e){return null==e||("string"==typeof e||Array.isArray(e))&&0===e.length}function WC(e){return null!=e&&"number"==typeof e.length}const wt=new W(""),xr=new W(""),HB=/^(?=.{1,254}$)(?=.{1,64}@)[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;class zB{static min(n){return function jC(e){return n=>{if(Or(n.value)||Or(e))return null;const t=parseFloat(n.value);return!isNaN(t)&&t{if(Or(n.value)||Or(e))return null;const t=parseFloat(n.value);return!isNaN(t)&&t>e?{max:{max:e,actual:n.value}}:null}}(n)}static required(n){return function HC(e){return Or(e.value)?{required:!0}:null}(n)}static requiredTrue(n){return function zC(e){return!0===e.value?null:{required:!0}}(n)}static email(n){return function UC(e){return Or(e.value)||HB.test(e.value)?null:{email:!0}}(n)}static minLength(n){return function $C(e){return n=>Or(n.value)||!WC(n.value)?null:n.value.lengthWC(n.value)&&n.value.length>e?{maxlength:{requiredLength:e,actualLength:n.value.length}}:null}function qC(e){if(!e)return eu;let n,t;return"string"==typeof e?(t="","^"!==e.charAt(0)&&(t+="^"),t+=e,"$"!==e.charAt(e.length-1)&&(t+="$"),n=new RegExp(t)):(t=e.toString(),n=e),r=>{if(Or(r.value))return null;const i=r.value;return n.test(i)?null:{pattern:{requiredPattern:t,actualValue:i}}}}function eu(e){return null}function KC(e){return null!=e}function JC(e){return bl(e)?gp(e):e}function ZC(e){let n={};return e.forEach(t=>{n=null!=t?{...n,...t}:n}),0===Object.keys(n).length?null:n}function QC(e,n){return n.map(t=>t(e))}function YC(e){return e.map(n=>function UB(e){return!e.validate}(n)?n:t=>n.validate(t))}function XC(e){if(!e)return null;const n=e.filter(KC);return 0==n.length?null:function(t){return ZC(QC(t,n))}}function Jp(e){return null!=e?XC(YC(e)):null}function eD(e){if(!e)return null;const n=e.filter(KC);return 0==n.length?null:function(t){return PB(QC(t,n).map(JC)).pipe(gr(ZC))}}function Zp(e){return null!=e?eD(YC(e)):null}function tD(e,n){return null===e?[n]:Array.isArray(e)?[...e,n]:[e,n]}function nD(e){return e._rawValidators}function rD(e){return e._rawAsyncValidators}function Qp(e){return e?Array.isArray(e)?e:[e]:[]}function tu(e,n){return Array.isArray(e)?e.includes(n):e===n}function sD(e,n){const t=Qp(n);return Qp(e).forEach(i=>{tu(t,i)||t.push(i)}),t}function iD(e,n){return Qp(n).filter(t=>!tu(e,t))}class oD{constructor(){this._rawValidators=[],this._rawAsyncValidators=[],this._onDestroyCallbacks=[]}get value(){return this.control?this.control.value:null}get valid(){return this.control?this.control.valid:null}get invalid(){return this.control?this.control.invalid:null}get pending(){return this.control?this.control.pending:null}get disabled(){return this.control?this.control.disabled:null}get enabled(){return this.control?this.control.enabled:null}get errors(){return this.control?this.control.errors:null}get pristine(){return this.control?this.control.pristine:null}get dirty(){return this.control?this.control.dirty:null}get touched(){return this.control?this.control.touched:null}get status(){return this.control?this.control.status:null}get untouched(){return this.control?this.control.untouched:null}get statusChanges(){return this.control?this.control.statusChanges:null}get valueChanges(){return this.control?this.control.valueChanges:null}get path(){return null}_setValidators(n){this._rawValidators=n||[],this._composedValidatorFn=Jp(this._rawValidators)}_setAsyncValidators(n){this._rawAsyncValidators=n||[],this._composedAsyncValidatorFn=Zp(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn||null}get asyncValidator(){return this._composedAsyncValidatorFn||null}_registerOnDestroy(n){this._onDestroyCallbacks.push(n)}_invokeOnDestroyCallbacks(){this._onDestroyCallbacks.forEach(n=>n()),this._onDestroyCallbacks=[]}reset(n=void 0){this.control&&this.control.reset(n)}hasError(n,t){return!!this.control&&this.control.hasError(n,t)}getError(n,t){return this.control?this.control.getError(n,t):null}}class kt extends oD{get formDirective(){return null}get path(){return null}}class Lr extends oD{constructor(){super(...arguments),this._parent=null,this.name=null,this.valueAccessor=null}}class aD{constructor(n){this._cd=n}get isTouched(){return this._cd?.control?._touched?.(),!!this._cd?.control?.touched}get isUntouched(){return!!this._cd?.control?.untouched}get isPristine(){return this._cd?.control?._pristine?.(),!!this._cd?.control?.pristine}get isDirty(){return!!this._cd?.control?.dirty}get isValid(){return this._cd?.control?._status?.(),!!this._cd?.control?.valid}get isInvalid(){return!!this._cd?.control?.invalid}get isPending(){return!!this._cd?.control?.pending}get isSubmitted(){return this._cd?._submitted?.(),!!this._cd?.submitted}}let nu=(()=>{class e extends aD{constructor(t){super(t)}static{this.\u0275fac=function(r){return new(r||e)(T(Lr,2))}}static{this.\u0275dir=ne({type:e,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(r,i){2&r&&ol("ng-untouched",i.isUntouched)("ng-touched",i.isTouched)("ng-pristine",i.isPristine)("ng-dirty",i.isDirty)("ng-valid",i.isValid)("ng-invalid",i.isInvalid)("ng-pending",i.isPending)},features:[Ce]})}}return e})(),fa=(()=>{class e extends aD{constructor(t){super(t)}static{this.\u0275fac=function(r){return new(r||e)(T(kt,10))}}static{this.\u0275dir=ne({type:e,selectors:[["","formGroupName",""],["","formArrayName",""],["","ngModelGroup",""],["","formGroup",""],["form",3,"ngNoForm",""],["","ngForm",""]],hostVars:16,hostBindings:function(r,i){2&r&&ol("ng-untouched",i.isUntouched)("ng-touched",i.isTouched)("ng-pristine",i.isPristine)("ng-dirty",i.isDirty)("ng-valid",i.isValid)("ng-invalid",i.isInvalid)("ng-pending",i.isPending)("ng-submitted",i.isSubmitted)},features:[Ce]})}}return e})();const pa="VALID",su="INVALID",ki="PENDING",ga="DISABLED";class Fi{}class lD extends Fi{constructor(n,t){super(),this.value=n,this.source=t}}class eg extends Fi{constructor(n,t){super(),this.pristine=n,this.source=t}}class tg extends Fi{constructor(n,t){super(),this.touched=n,this.source=t}}class iu extends Fi{constructor(n,t){super(),this.status=n,this.source=t}}class JB extends Fi{constructor(n){super(),this.source=n}}class ZB extends Fi{constructor(n){super(),this.source=n}}function ng(e){return(ou(e)?e.validators:e)||null}function rg(e,n){return(ou(n)?n.asyncValidators:e)||null}function ou(e){return null!=e&&!Array.isArray(e)&&"object"==typeof e}function uD(e,n,t){const r=e.controls;if(!(n?Object.keys(r):r).length)throw new k(1e3,"");if(!r[t])throw new k(1001,"")}function _D(e,n,t){e._forEachChild((r,i)=>{if(void 0===t[i])throw new k(1002,"")})}class au{constructor(n,t){this._pendingDirty=!1,this._hasOwnPendingAsyncValidator=null,this._pendingTouched=!1,this._onCollectionChange=()=>{},this._parent=null,this._status=na(()=>this.statusReactive()),this.statusReactive=si(void 0),this._pristine=na(()=>this.pristineReactive()),this.pristineReactive=si(!0),this._touched=na(()=>this.touchedReactive()),this.touchedReactive=si(!1),this._events=new Wr,this.events=this._events.asObservable(),this._onDisabledChange=[],this._assignValidators(n),this._assignAsyncValidators(t)}get validator(){return this._composedValidatorFn}set validator(n){this._rawValidators=this._composedValidatorFn=n}get asyncValidator(){return this._composedAsyncValidatorFn}set asyncValidator(n){this._rawAsyncValidators=this._composedAsyncValidatorFn=n}get parent(){return this._parent}get status(){return Un(this.statusReactive)}set status(n){Un(()=>this.statusReactive.set(n))}get valid(){return this.status===pa}get invalid(){return this.status===su}get pending(){return this.status==ki}get disabled(){return this.status===ga}get enabled(){return this.status!==ga}get pristine(){return Un(this.pristineReactive)}set pristine(n){Un(()=>this.pristineReactive.set(n))}get dirty(){return!this.pristine}get touched(){return Un(this.touchedReactive)}set touched(n){Un(()=>this.touchedReactive.set(n))}get untouched(){return!this.touched}get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}setValidators(n){this._assignValidators(n)}setAsyncValidators(n){this._assignAsyncValidators(n)}addValidators(n){this.setValidators(sD(n,this._rawValidators))}addAsyncValidators(n){this.setAsyncValidators(sD(n,this._rawAsyncValidators))}removeValidators(n){this.setValidators(iD(n,this._rawValidators))}removeAsyncValidators(n){this.setAsyncValidators(iD(n,this._rawAsyncValidators))}hasValidator(n){return tu(this._rawValidators,n)}hasAsyncValidator(n){return tu(this._rawAsyncValidators,n)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(n={}){const t=!1===this.touched;this.touched=!0;const r=n.sourceControl??this;this._parent&&!n.onlySelf&&this._parent.markAsTouched({...n,sourceControl:r}),t&&!1!==n.emitEvent&&this._events.next(new tg(!0,r))}markAllAsTouched(n={}){this.markAsTouched({onlySelf:!0,emitEvent:n.emitEvent,sourceControl:this}),this._forEachChild(t=>t.markAllAsTouched(n))}markAsUntouched(n={}){const t=!0===this.touched;this.touched=!1,this._pendingTouched=!1;const r=n.sourceControl??this;this._forEachChild(i=>{i.markAsUntouched({onlySelf:!0,emitEvent:n.emitEvent,sourceControl:r})}),this._parent&&!n.onlySelf&&this._parent._updateTouched(n,r),t&&!1!==n.emitEvent&&this._events.next(new tg(!1,r))}markAsDirty(n={}){const t=!0===this.pristine;this.pristine=!1;const r=n.sourceControl??this;this._parent&&!n.onlySelf&&this._parent.markAsDirty({...n,sourceControl:r}),t&&!1!==n.emitEvent&&this._events.next(new eg(!1,r))}markAsPristine(n={}){const t=!1===this.pristine;this.pristine=!0,this._pendingDirty=!1;const r=n.sourceControl??this;this._forEachChild(i=>{i.markAsPristine({onlySelf:!0,emitEvent:n.emitEvent})}),this._parent&&!n.onlySelf&&this._parent._updatePristine(n,r),t&&!1!==n.emitEvent&&this._events.next(new eg(!0,r))}markAsPending(n={}){this.status=ki;const t=n.sourceControl??this;!1!==n.emitEvent&&(this._events.next(new iu(this.status,t)),this.statusChanges.emit(this.status)),this._parent&&!n.onlySelf&&this._parent.markAsPending({...n,sourceControl:t})}disable(n={}){const t=this._parentMarkedDirty(n.onlySelf);this.status=ga,this.errors=null,this._forEachChild(i=>{i.disable({...n,onlySelf:!0})}),this._updateValue();const r=n.sourceControl??this;!1!==n.emitEvent&&(this._events.next(new lD(this.value,r)),this._events.next(new iu(this.status,r)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors({...n,skipPristineCheck:t},this),this._onDisabledChange.forEach(i=>i(!0))}enable(n={}){const t=this._parentMarkedDirty(n.onlySelf);this.status=pa,this._forEachChild(r=>{r.enable({...n,onlySelf:!0})}),this.updateValueAndValidity({onlySelf:!0,emitEvent:n.emitEvent}),this._updateAncestors({...n,skipPristineCheck:t},this),this._onDisabledChange.forEach(r=>r(!1))}_updateAncestors(n,t){this._parent&&!n.onlySelf&&(this._parent.updateValueAndValidity(n),n.skipPristineCheck||this._parent._updatePristine({},t),this._parent._updateTouched({},t))}setParent(n){this._parent=n}getRawValue(){return this.value}updateValueAndValidity(n={}){if(this._setInitialStatus(),this._updateValue(),this.enabled){const r=this._cancelExistingSubscription();this.errors=this._runValidator(),this.status=this._calculateStatus(),(this.status===pa||this.status===ki)&&this._runAsyncValidator(r,n.emitEvent)}const t=n.sourceControl??this;!1!==n.emitEvent&&(this._events.next(new lD(this.value,t)),this._events.next(new iu(this.status,t)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._parent&&!n.onlySelf&&this._parent.updateValueAndValidity({...n,sourceControl:t})}_updateTreeValidity(n={emitEvent:!0}){this._forEachChild(t=>t._updateTreeValidity(n)),this.updateValueAndValidity({onlySelf:!0,emitEvent:n.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?ga:pa}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(n,t){if(this.asyncValidator){this.status=ki,this._hasOwnPendingAsyncValidator={emitEvent:!1!==t};const r=JC(this.asyncValidator(this));this._asyncValidationSubscription=r.subscribe(i=>{this._hasOwnPendingAsyncValidator=null,this.setErrors(i,{emitEvent:t,shouldHaveEmitted:n})})}}_cancelExistingSubscription(){if(this._asyncValidationSubscription){this._asyncValidationSubscription.unsubscribe();const n=this._hasOwnPendingAsyncValidator?.emitEvent??!1;return this._hasOwnPendingAsyncValidator=null,n}return!1}setErrors(n,t={}){this.errors=n,this._updateControlsErrors(!1!==t.emitEvent,this,t.shouldHaveEmitted)}get(n){let t=n;return null==t||(Array.isArray(t)||(t=t.split(".")),0===t.length)?null:t.reduce((r,i)=>r&&r._find(i),this)}getError(n,t){const r=t?this.get(t):this;return r&&r.errors?r.errors[n]:null}hasError(n,t){return!!this.getError(n,t)}get root(){let n=this;for(;n._parent;)n=n._parent;return n}_updateControlsErrors(n,t,r){this.status=this._calculateStatus(),n&&this.statusChanges.emit(this.status),(n||r)&&this._events.next(new iu(this.status,t)),this._parent&&this._parent._updateControlsErrors(n,t,r)}_initObservables(){this.valueChanges=new Re,this.statusChanges=new Re}_calculateStatus(){return this._allControlsDisabled()?ga:this.errors?su:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(ki)?ki:this._anyControlsHaveStatus(su)?su:pa}_anyControlsHaveStatus(n){return this._anyControls(t=>t.status===n)}_anyControlsDirty(){return this._anyControls(n=>n.dirty)}_anyControlsTouched(){return this._anyControls(n=>n.touched)}_updatePristine(n,t){const r=!this._anyControlsDirty(),i=this.pristine!==r;this.pristine=r,this._parent&&!n.onlySelf&&this._parent._updatePristine(n,t),i&&this._events.next(new eg(this.pristine,t))}_updateTouched(n={},t){this.touched=this._anyControlsTouched(),this._events.next(new tg(this.touched,t)),this._parent&&!n.onlySelf&&this._parent._updateTouched(n,t)}_registerOnCollectionChange(n){this._onCollectionChange=n}_setUpdateStrategy(n){ou(n)&&null!=n.updateOn&&(this._updateOn=n.updateOn)}_parentMarkedDirty(n){return!n&&!(!this._parent||!this._parent.dirty)&&!this._parent._anyControlsDirty()}_find(n){return null}_assignValidators(n){this._rawValidators=Array.isArray(n)?n.slice():n,this._composedValidatorFn=function QB(e){return Array.isArray(e)?Jp(e):e||null}(this._rawValidators)}_assignAsyncValidators(n){this._rawAsyncValidators=Array.isArray(n)?n.slice():n,this._composedAsyncValidatorFn=function YB(e){return Array.isArray(e)?Zp(e):e||null}(this._rawAsyncValidators)}}class ha extends au{constructor(n,t,r){super(ng(t),rg(r,t)),this.controls=n,this._initObservables(),this._setUpdateStrategy(t),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}registerControl(n,t){return this.controls[n]?this.controls[n]:(this.controls[n]=t,t.setParent(this),t._registerOnCollectionChange(this._onCollectionChange),t)}addControl(n,t,r={}){this.registerControl(n,t),this.updateValueAndValidity({emitEvent:r.emitEvent}),this._onCollectionChange()}removeControl(n,t={}){this.controls[n]&&this.controls[n]._registerOnCollectionChange(()=>{}),delete this.controls[n],this.updateValueAndValidity({emitEvent:t.emitEvent}),this._onCollectionChange()}setControl(n,t,r={}){this.controls[n]&&this.controls[n]._registerOnCollectionChange(()=>{}),delete this.controls[n],t&&this.registerControl(n,t),this.updateValueAndValidity({emitEvent:r.emitEvent}),this._onCollectionChange()}contains(n){return this.controls.hasOwnProperty(n)&&this.controls[n].enabled}setValue(n,t={}){_D(this,0,n),Object.keys(n).forEach(r=>{uD(this,!0,r),this.controls[r].setValue(n[r],{onlySelf:!0,emitEvent:t.emitEvent})}),this.updateValueAndValidity(t)}patchValue(n,t={}){null!=n&&(Object.keys(n).forEach(r=>{const i=this.controls[r];i&&i.patchValue(n[r],{onlySelf:!0,emitEvent:t.emitEvent})}),this.updateValueAndValidity(t))}reset(n={},t={}){this._forEachChild((r,i)=>{r.reset(n?n[i]:null,{onlySelf:!0,emitEvent:t.emitEvent})}),this._updatePristine(t,this),this._updateTouched(t,this),this.updateValueAndValidity(t)}getRawValue(){return this._reduceChildren({},(n,t,r)=>(n[r]=t.getRawValue(),n))}_syncPendingControls(){let n=this._reduceChildren(!1,(t,r)=>!!r._syncPendingControls()||t);return n&&this.updateValueAndValidity({onlySelf:!0}),n}_forEachChild(n){Object.keys(this.controls).forEach(t=>{const r=this.controls[t];r&&n(r,t)})}_setUpControls(){this._forEachChild(n=>{n.setParent(this),n._registerOnCollectionChange(this._onCollectionChange)})}_updateValue(){this.value=this._reduceValue()}_anyControls(n){for(const[t,r]of Object.entries(this.controls))if(this.contains(t)&&n(r))return!0;return!1}_reduceValue(){return this._reduceChildren({},(t,r,i)=>((r.enabled||this.disabled)&&(t[i]=r.value),t))}_reduceChildren(n,t){let r=n;return this._forEachChild((i,o)=>{r=t(r,i,o)}),r}_allControlsDisabled(){for(const n of Object.keys(this.controls))if(this.controls[n].enabled)return!1;return Object.keys(this.controls).length>0||this.disabled}_find(n){return this.controls.hasOwnProperty(n)?this.controls[n]:null}}class dD extends ha{}const Ri=new W("CallSetDisabledState",{providedIn:"root",factory:()=>cu}),cu="always";function ma(e,n,t=cu){sg(e,n),n.valueAccessor.writeValue(e.value),(e.disabled||"always"===t)&&n.valueAccessor.setDisabledState?.(e.disabled),function eH(e,n){n.valueAccessor.registerOnChange(t=>{e._pendingValue=t,e._pendingChange=!0,e._pendingDirty=!0,"change"===e.updateOn&&fD(e,n)})}(e,n),function nH(e,n){const t=(r,i)=>{n.valueAccessor.writeValue(r),i&&n.viewToModelUpdate(r)};e.registerOnChange(t),n._registerOnDestroy(()=>{e._unregisterOnChange(t)})}(e,n),function tH(e,n){n.valueAccessor.registerOnTouched(()=>{e._pendingTouched=!0,"blur"===e.updateOn&&e._pendingChange&&fD(e,n),"submit"!==e.updateOn&&e.markAsTouched()})}(e,n),function XB(e,n){if(n.valueAccessor.setDisabledState){const t=r=>{n.valueAccessor.setDisabledState(r)};e.registerOnDisabledChange(t),n._registerOnDestroy(()=>{e._unregisterOnDisabledChange(t)})}}(e,n)}function uu(e,n,t=!0){const r=()=>{};n.valueAccessor&&(n.valueAccessor.registerOnChange(r),n.valueAccessor.registerOnTouched(r)),du(e,n),e&&(n._invokeOnDestroyCallbacks(),e._registerOnCollectionChange(()=>{}))}function _u(e,n){e.forEach(t=>{t.registerOnValidatorChange&&t.registerOnValidatorChange(n)})}function sg(e,n){const t=nD(e);null!==n.validator?e.setValidators(tD(t,n.validator)):"function"==typeof t&&e.setValidators([t]);const r=rD(e);null!==n.asyncValidator?e.setAsyncValidators(tD(r,n.asyncValidator)):"function"==typeof r&&e.setAsyncValidators([r]);const i=()=>e.updateValueAndValidity();_u(n._rawValidators,i),_u(n._rawAsyncValidators,i)}function du(e,n){let t=!1;if(null!==e){if(null!==n.validator){const i=nD(e);if(Array.isArray(i)&&i.length>0){const o=i.filter(c=>c!==n.validator);o.length!==i.length&&(t=!0,e.setValidators(o))}}if(null!==n.asyncValidator){const i=rD(e);if(Array.isArray(i)&&i.length>0){const o=i.filter(c=>c!==n.asyncValidator);o.length!==i.length&&(t=!0,e.setAsyncValidators(o))}}}const r=()=>{};return _u(n._rawValidators,r),_u(n._rawAsyncValidators,r),t}function fD(e,n){e._pendingDirty&&e.markAsDirty(),e.setValue(e._pendingValue,{emitModelToViewChange:!1}),n.viewToModelUpdate(e._pendingValue),e._pendingChange=!1}function hD(e,n){const t=e.indexOf(n);t>-1&&e.splice(t,1)}function mD(e){return"object"==typeof e&&null!==e&&2===Object.keys(e).length&&"value"in e&&"disabled"in e}Promise.resolve();const Oi=class extends au{constructor(n=null,t,r){super(ng(t),rg(r,t)),this.defaultValue=null,this._onChange=[],this._pendingChange=!1,this._applyFormState(n),this._setUpdateStrategy(t),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator}),ou(t)&&(t.nonNullable||t.initialValueIsDefault)&&(this.defaultValue=mD(n)?n.value:n)}setValue(n,t={}){this.value=this._pendingValue=n,this._onChange.length&&!1!==t.emitModelToViewChange&&this._onChange.forEach(r=>r(this.value,!1!==t.emitViewToModelChange)),this.updateValueAndValidity(t)}patchValue(n,t={}){this.setValue(n,t)}reset(n=this.defaultValue,t={}){this._applyFormState(n),this.markAsPristine(t),this.markAsUntouched(t),this.setValue(this.value,t),this._pendingChange=!1}_updateValue(){}_anyControls(n){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(n){this._onChange.push(n)}_unregisterOnChange(n){hD(this._onChange,n)}registerOnDisabledChange(n){this._onDisabledChange.push(n)}_unregisterOnDisabledChange(n){hD(this._onDisabledChange,n)}_forEachChild(n){}_syncPendingControls(){return!("submit"!==this.updateOn||(this._pendingDirty&&this.markAsDirty(),this._pendingTouched&&this.markAsTouched(),!this._pendingChange)||(this.setValue(this._pendingValue,{onlySelf:!0,emitModelToViewChange:!1}),0))}_applyFormState(n){mD(n)?(this.value=this._pendingValue=n.value,n.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=n}};Promise.resolve();let ED=(()=>{class e{static{this.\u0275fac=function(r){return new(r||e)}}static{this.\u0275dir=ne({type:e,selectors:[["form",3,"ngNoForm","",3,"ngNativeValidate",""]],hostAttrs:["novalidate",""]})}}return e})();const lg=new W(""),hH={provide:kt,useExisting:Ie(()=>Ss)};let Ss=(()=>{class e extends kt{get submitted(){return Un(this._submittedReactive)}set submitted(t){this._submittedReactive.set(t)}constructor(t,r,i){super(),this.callSetDisabledState=i,this._submitted=na(()=>this._submittedReactive()),this._submittedReactive=si(!1),this._onCollectionChange=()=>this._updateDomValue(),this.directives=[],this.form=null,this.ngSubmit=new Re,this._setValidators(t),this._setAsyncValidators(r)}ngOnChanges(t){this._checkFormPresent(),t.hasOwnProperty("form")&&(this._updateValidators(),this._updateDomValue(),this._updateRegistrations(),this._oldForm=this.form)}ngOnDestroy(){this.form&&(du(this.form,this),this.form._onCollectionChange===this._onCollectionChange&&this.form._registerOnCollectionChange(()=>{}))}get formDirective(){return this}get control(){return this.form}get path(){return[]}addControl(t){const r=this.form.get(t.path);return ma(r,t,this.callSetDisabledState),r.updateValueAndValidity({emitEvent:!1}),this.directives.push(t),r}getControl(t){return this.form.get(t.path)}removeControl(t){uu(t.control||null,t,!1),function oH(e,n){const t=e.indexOf(n);t>-1&&e.splice(t,1)}(this.directives,t)}addFormGroup(t){this._setUpFormContainer(t)}removeFormGroup(t){this._cleanUpFormContainer(t)}getFormGroup(t){return this.form.get(t.path)}addFormArray(t){this._setUpFormContainer(t)}removeFormArray(t){this._cleanUpFormContainer(t)}getFormArray(t){return this.form.get(t.path)}updateModel(t,r){this.form.get(t.path).setValue(r)}onSubmit(t){return this._submittedReactive.set(!0),function gD(e,n){e._syncPendingControls(),n.forEach(t=>{const r=t.control;"submit"===r.updateOn&&r._pendingChange&&(t.viewToModelUpdate(r._pendingValue),r._pendingChange=!1)})}(this.form,this.directives),this.ngSubmit.emit(t),this.form._events.next(new JB(this.control)),"dialog"===t?.target?.method}onReset(){this.resetForm()}resetForm(t=void 0){this.form.reset(t),this._submittedReactive.set(!1),this.form._events.next(new ZB(this.form))}_updateDomValue(){this.directives.forEach(t=>{const r=t.control,i=this.form.get(t.path);r!==i&&(uu(r||null,t),(e=>e instanceof Oi)(i)&&(ma(i,t,this.callSetDisabledState),t.control=i))}),this.form._updateTreeValidity({emitEvent:!1})}_setUpFormContainer(t){const r=this.form.get(t.path);(function pD(e,n){sg(e,n)})(r,t),r.updateValueAndValidity({emitEvent:!1})}_cleanUpFormContainer(t){if(this.form){const r=this.form.get(t.path);r&&function rH(e,n){return du(e,n)}(r,t)&&r.updateValueAndValidity({emitEvent:!1})}}_updateRegistrations(){this.form._registerOnCollectionChange(this._onCollectionChange),this._oldForm&&this._oldForm._registerOnCollectionChange(()=>{})}_updateValidators(){sg(this.form,this),this._oldForm&&du(this._oldForm,this)}_checkFormPresent(){}static{this.\u0275fac=function(r){return new(r||e)(T(wt,10),T(xr,10),T(Ri,8))}}static{this.\u0275dir=ne({type:e,selectors:[["","formGroup",""]],hostBindings:function(r,i){1&r&&re("submit",function(c){return i.onSubmit(c)})("reset",function(){return i.onReset()})},inputs:{form:[0,"formGroup","form"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[Pe([hH]),Ce,Yn]})}}return e})();const yH={provide:Lr,useExisting:Ie(()=>ya)};let ya=(()=>{class e extends Lr{set isDisabled(t){}static{this._ngModelWarningSentOnce=!1}constructor(t,r,i,o,c){super(),this._ngModelWarningConfig=c,this._added=!1,this.name=null,this.update=new Re,this._ngModelWarningSent=!1,this._parent=t,this._setValidators(r),this._setAsyncValidators(i),this.valueAccessor=function ag(e,n){if(!n)return null;let t,r,i;return Array.isArray(n),n.forEach(o=>{o.constructor===da?t=o:function iH(e){return Object.getPrototypeOf(e.constructor)===Es}(o)?r=o:i=o}),i||r||t||null}(0,o)}ngOnChanges(t){this._added||this._setUpControl(),function og(e,n){if(!e.hasOwnProperty("model"))return!1;const t=e.model;return!!t.isFirstChange()||!Object.is(n,t.currentValue)}(t,this.viewModel)&&(this.viewModel=this.model,this.formDirective.updateModel(this,this.model))}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}viewToModelUpdate(t){this.viewModel=t,this.update.emit(t)}get path(){return function lu(e,n){return[...n.path,e]}(null==this.name?this.name:this.name.toString(),this._parent)}get formDirective(){return this._parent?this._parent.formDirective:null}_checkParentType(){}_setUpControl(){this._checkParentType(),this.control=this.formDirective.addControl(this),this._added=!0}static{this.\u0275fac=function(r){return new(r||e)(T(kt,13),T(wt,10),T(xr,10),T($n,10),T(lg,8))}}static{this.\u0275dir=ne({type:e,selectors:[["","formControlName",""]],inputs:{name:[0,"formControlName","name"],isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"]},outputs:{update:"ngModelChange"},features:[Pe([yH]),Ce,Yn]})}}return e})();const bH={provide:$n,useExisting:Ie(()=>fu),multi:!0};function MD(e,n){return null==e?`${n}`:(n&&"object"==typeof n&&(n="Object"),`${e}: ${n}`.slice(0,50))}let fu=(()=>{class e extends Es{constructor(){super(...arguments),this._optionMap=new Map,this._idCounter=0,this._compareWith=Object.is}set compareWith(t){this._compareWith=t}writeValue(t){this.value=t;const i=MD(this._getOptionId(t),t);this.setProperty("value",i)}registerOnChange(t){this.onChange=r=>{this.value=this._getOptionValue(r),t(this.value)}}_registerOption(){return(this._idCounter++).toString()}_getOptionId(t){for(const r of this._optionMap.keys())if(this._compareWith(this._optionMap.get(r),t))return r;return null}_getOptionValue(t){const r=function vH(e){return e.split(":")[0]}(t);return this._optionMap.has(r)?this._optionMap.get(r):t}static{this.\u0275fac=(()=>{let t;return function(i){return(t||(t=ft(e)))(i||e)}})()}static{this.\u0275dir=ne({type:e,selectors:[["select","formControlName","",3,"multiple",""],["select","formControl","",3,"multiple",""],["select","ngModel","",3,"multiple",""]],hostBindings:function(r,i){1&r&&re("change",function(c){return i.onChange(c.target.value)})("blur",function(){return i.onTouched()})},inputs:{compareWith:"compareWith"},features:[Pe([bH]),Ce]})}}return e})(),ND=(()=>{class e{constructor(t,r,i){this._element=t,this._renderer=r,this._select=i,this._select&&(this.id=this._select._registerOption())}set ngValue(t){null!=this._select&&(this._select._optionMap.set(this.id,t),this._setElementValue(MD(this.id,t)),this._select.writeValue(this._select.value))}set value(t){this._setElementValue(t),this._select&&this._select.writeValue(this._select.value)}_setElementValue(t){this._renderer.setProperty(this._element.nativeElement,"value",t)}ngOnDestroy(){this._select&&(this._select._optionMap.delete(this.id),this._select.writeValue(this._select.value))}static{this.\u0275fac=function(r){return new(r||e)(T(tn),T(os),T(fu,9))}}static{this.\u0275dir=ne({type:e,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"}})}}return e})();const EH={provide:$n,useExisting:Ie(()=>dg),multi:!0};function AD(e,n){return null==e?`${n}`:("string"==typeof n&&(n=`'${n}'`),n&&"object"==typeof n&&(n="Object"),`${e}: ${n}`.slice(0,50))}let dg=(()=>{class e extends Es{constructor(){super(...arguments),this._optionMap=new Map,this._idCounter=0,this._compareWith=Object.is}set compareWith(t){this._compareWith=t}writeValue(t){let r;if(this.value=t,Array.isArray(t)){const i=t.map(o=>this._getOptionId(o));r=(o,c)=>{o._setSelected(i.indexOf(c.toString())>-1)}}else r=(i,o)=>{i._setSelected(!1)};this._optionMap.forEach(r)}registerOnChange(t){this.onChange=r=>{const i=[],o=r.selectedOptions;if(void 0!==o){const c=o;for(let l=0;l{let t;return function(i){return(t||(t=ft(e)))(i||e)}})()}static{this.\u0275dir=ne({type:e,selectors:[["select","multiple","","formControlName",""],["select","multiple","","formControl",""],["select","multiple","","ngModel",""]],hostBindings:function(r,i){1&r&&re("change",function(c){return i.onChange(c.target)})("blur",function(){return i.onTouched()})},inputs:{compareWith:"compareWith"},features:[Pe([EH]),Ce]})}}return e})(),kD=(()=>{class e{constructor(t,r,i){this._element=t,this._renderer=r,this._select=i,this._select&&(this.id=this._select._registerOption(this))}set ngValue(t){null!=this._select&&(this._value=t,this._setElementValue(AD(this.id,t)),this._select.writeValue(this._select.value))}set value(t){this._select?(this._value=t,this._setElementValue(AD(this.id,t)),this._select.writeValue(this._select.value)):this._setElementValue(t)}_setElementValue(t){this._renderer.setProperty(this._element.nativeElement,"value",t)}_setSelected(t){this._renderer.setProperty(this._element.nativeElement,"selected",t)}ngOnDestroy(){this._select&&(this._select._optionMap.delete(this.id),this._select.writeValue(this._select.value))}static{this.\u0275fac=function(r){return new(r||e)(T(tn),T(os),T(dg,9))}}static{this.\u0275dir=ne({type:e,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"}})}}return e})();let Cs=(()=>{class e{constructor(){this._validator=eu}ngOnChanges(t){if(this.inputName in t){const r=this.normalizeInput(t[this.inputName].currentValue);this._enabled=this.enabled(r),this._validator=this._enabled?this.createValidator(r):eu,this._onChange&&this._onChange()}}validate(t){return this._validator(t)}registerOnValidatorChange(t){this._onChange=t}enabled(t){return null!=t}static{this.\u0275fac=function(r){return new(r||e)}}static{this.\u0275dir=ne({type:e,features:[Yn]})}}return e})();const AH={provide:wt,useExisting:Ie(()=>pg),multi:!0};let pg=(()=>{class e extends Cs{constructor(){super(...arguments),this.inputName="maxlength",this.normalizeInput=t=>function FD(e){return"number"==typeof e?e:parseInt(e,10)}(t),this.createValidator=t=>GC(t)}static{this.\u0275fac=(()=>{let t;return function(i){return(t||(t=ft(e)))(i||e)}})()}static{this.\u0275dir=ne({type:e,selectors:[["","maxlength","","formControlName",""],["","maxlength","","formControl",""],["","maxlength","","ngModel",""]],hostVars:1,hostBindings:function(r,i){2&r&&Ct("maxlength",i._enabled?i.maxlength:null)},inputs:{maxlength:"maxlength"},features:[Pe([AH]),Ce]})}}return e})();const kH={provide:wt,useExisting:Ie(()=>gg),multi:!0};let gg=(()=>{class e extends Cs{constructor(){super(...arguments),this.inputName="pattern",this.normalizeInput=t=>t,this.createValidator=t=>qC(t)}static{this.\u0275fac=(()=>{let t;return function(i){return(t||(t=ft(e)))(i||e)}})()}static{this.\u0275dir=ne({type:e,selectors:[["","pattern","","formControlName",""],["","pattern","","formControl",""],["","pattern","","ngModel",""]],hostVars:1,hostBindings:function(r,i){2&r&&Ct("pattern",i._enabled?i.pattern:null)},inputs:{pattern:"pattern"},features:[Pe([kH]),Ce]})}}return e})(),FH=(()=>{class e{static{this.\u0275fac=function(r){return new(r||e)}}static{this.\u0275mod=Zn({type:e})}static{this.\u0275inj=An({})}}return e})();class WD extends au{constructor(n,t,r){super(ng(t),rg(r,t)),this.controls=n,this._initObservables(),this._setUpdateStrategy(t),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}at(n){return this.controls[this._adjustIndex(n)]}push(n,t={}){this.controls.push(n),this._registerControl(n),this.updateValueAndValidity({emitEvent:t.emitEvent}),this._onCollectionChange()}insert(n,t,r={}){this.controls.splice(n,0,t),this._registerControl(t),this.updateValueAndValidity({emitEvent:r.emitEvent})}removeAt(n,t={}){let r=this._adjustIndex(n);r<0&&(r=0),this.controls[r]&&this.controls[r]._registerOnCollectionChange(()=>{}),this.controls.splice(r,1),this.updateValueAndValidity({emitEvent:t.emitEvent})}setControl(n,t,r={}){let i=this._adjustIndex(n);i<0&&(i=0),this.controls[i]&&this.controls[i]._registerOnCollectionChange(()=>{}),this.controls.splice(i,1),t&&(this.controls.splice(i,0,t),this._registerControl(t)),this.updateValueAndValidity({emitEvent:r.emitEvent}),this._onCollectionChange()}get length(){return this.controls.length}setValue(n,t={}){_D(this,0,n),n.forEach((r,i)=>{uD(this,!1,i),this.at(i).setValue(r,{onlySelf:!0,emitEvent:t.emitEvent})}),this.updateValueAndValidity(t)}patchValue(n,t={}){null!=n&&(n.forEach((r,i)=>{this.at(i)&&this.at(i).patchValue(r,{onlySelf:!0,emitEvent:t.emitEvent})}),this.updateValueAndValidity(t))}reset(n=[],t={}){this._forEachChild((r,i)=>{r.reset(n[i],{onlySelf:!0,emitEvent:t.emitEvent})}),this._updatePristine(t,this),this._updateTouched(t,this),this.updateValueAndValidity(t)}getRawValue(){return this.controls.map(n=>n.getRawValue())}clear(n={}){this.controls.length<1||(this._forEachChild(t=>t._registerOnCollectionChange(()=>{})),this.controls.splice(0),this.updateValueAndValidity({emitEvent:n.emitEvent}))}_adjustIndex(n){return n<0?n+this.length:n}_syncPendingControls(){let n=this.controls.reduce((t,r)=>!!r._syncPendingControls()||t,!1);return n&&this.updateValueAndValidity({onlySelf:!0}),n}_forEachChild(n){this.controls.forEach((t,r)=>{n(t,r)})}_updateValue(){this.value=this.controls.filter(n=>n.enabled||this.disabled).map(n=>n.value)}_anyControls(n){return this.controls.some(t=>t.enabled&&n(t))}_setUpControls(){this._forEachChild(n=>this._registerControl(n))}_allControlsDisabled(){for(const n of this.controls)if(n.enabled)return!1;return this.controls.length>0||this.disabled}_registerControl(n){n.setParent(this),n._registerOnCollectionChange(this._onCollectionChange)}_find(n){return this.at(n)??null}}function jD(e){return!!e&&(void 0!==e.asyncValidators||void 0!==e.validators||void 0!==e.updateOn)}let RH=(()=>{class e{constructor(){this.useNonNullable=!1}get nonNullable(){const t=new e;return t.useNonNullable=!0,t}group(t,r=null){const i=this._reduceControls(t);let o={};return jD(r)?o=r:null!==r&&(o.validators=r.validator,o.asyncValidators=r.asyncValidator),new ha(i,o)}record(t,r=null){const i=this._reduceControls(t);return new dD(i,r)}control(t,r,i){let o={};return this.useNonNullable?(jD(r)?o=r:(o.validators=r,o.asyncValidators=i),new Oi(t,{...o,nonNullable:!0})):new Oi(t,r,i)}array(t,r,i){const o=t.map(c=>this._createControl(c));return new WD(o,r,i)}_reduceControls(t){const r={};return Object.keys(t).forEach(i=>{r[i]=this._createControl(t[i])}),r}_createControl(t){return t instanceof Oi||t instanceof au?t:Array.isArray(t)?this.control(t[0],t.length>1?t[1]:null,t.length>2?t[2]:null):this.control(t)}static{this.\u0275fac=function(r){return new(r||e)}}static{this.\u0275prov=Z({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})(),Ds=(()=>{class e{static withConfig(t){return{ngModule:e,providers:[{provide:lg,useValue:t.warnOnNgModelWithFormControl??"always"},{provide:Ri,useValue:t.callSetDisabledState??cu}]}}static{this.\u0275fac=function(r){return new(r||e)}}static{this.\u0275mod=Zn({type:e})}static{this.\u0275inj=An({imports:[FH]})}}return e})();const ba={id:"stateRootHashElt",type:"search",wrap_class:"col-xl-8 mb-2",class:"form-control",label:"State Root Hash",name:"state_root_hash",controlName:"stateRootHash",placeholder:"0x",e2e:"stateRootHashElt"},va={id:"paymentAmountElt",type:"tel",wrap_class:"col-lg-3 mb-2",class:"form-control",label:"Payment Amount",name:"payment_amount",controlName:"paymentAmount",placeholder:"",e2e:"paymentAmountElt",change:"motesToCSPR"},xi={id:"TTLElt",type:"search",wrap_class:"col-lg-2 mb-2",class:"form-control",label:"TTL",name:"ttl",controlName:"TTL",e2e:"TTLElt",config_name:"TTL"},BD={id:"sessionHashElt",type:"search",wrap_class:"col-xl-6 mb-2",class:"form-control",label:"Smart Contract hash or Package hash",name:"session_hash",controlName:"sessionHash",placeholder:"Contract Hash or Package Hash",e2e:"sessionHashElt",disabled_when:["has_wasm","sessionName.value"]},HD={id:"entityHashElt",type:"search",wrap_class:"col-xl-6 mb-2",class:"form-control",label:"Entity hash or Package hash",name:"entity_hash",controlName:"entityHash",placeholder:"Entity Hash (entity-contract-0x) or Package Hash (package-0x)",e2e:"entityHashElt",disabled_when:["has_wasm","entityAlias.value"]},pu={id:"callPackageElt",type:"checkbox",wrap_class:"col-xl-1 col-lg-2 mb-2",class:"form-check-input mt-0",label:"Call Package",name:"call_package",controlName:"callPackage",placeholder:"",e2e:"callPackageElt",label_class:"form-label",disabled_when:["has_wasm"]},gu={id:"versionElt",type:"search",wrap_class:"col-xl-3 mb-2",class:"form-control",label:"Version",name:"version",controlName:"version",placeholder:"1, empty last",e2e:"versionElt",disabled_when:["has_wasm"]},Ea={id:"gasPriceToleranceElt",type:"search",wrap_class:"col-xl-2 mb-2",class:"form-control",label:"Gas Price Tolerance",name:"gas_price_tolerance",controlName:"gasPriceTolerance",placeholder:"1, empty default",e2e:"gasPriceToleranceElt"},hg={id:"additionalComputationFactorElt",type:"search",wrap_class:"col-xl-2 mb-2",class:"form-control",label:"Computation Factor",name:"additional_computation_factor",controlName:"additionalComputationFactor",placeholder:"0, empty default",e2e:"additionalComputationFactorElt",disabled_when:["fixedPricingMode"]},zD={id:"sessionNameElt",type:"search",wrap_class:"col-xl-8 mb-2",class:"form-control",label:"Smart Contract name or Package name",name:"session_name",controlName:"sessionName",placeholder:"Counter",e2e:"sessionNameElt",disabled_when:["has_wasm","sessionHash.value"]},UD={id:"entityAliasElt",type:"search",wrap_class:"col-xl-8 mb-2",class:"form-control",label:"Entity alias or Package alias",name:"entity_alias",controlName:"entityAlias",placeholder:"Counter",e2e:"entityAliasElt",disabled_when:["has_wasm","entityHash.value"]},hu={id:"entryPointElt",type:"search",wrap_class:"col-lg-5 mb-2",class:"form-control",label:"Entry point",name:"entry_point",controlName:"entryPoint",placeholder:"counter_inc",e2e:"entryPointElt",disabled_when:["has_wasm"]},Sa={id:"argsSimpleElt",type:"search",wrap_class:"col-lg-8 mb-2",class:"form-control",label:"Args",name:"args_simple",controlName:"argsSimple",placeholder:"foo:Bool='true', bar:String='value'",e2e:"argsSimpleElt",disabled_when:["argsJson.value"],storage_name:"args_simple"},Ca={id:"argsJsonElt",type:"textarea",wrap_class:"col-lg-8 mb-2",class:"form-control",label:"Args Json",name:"args_json",controlName:"argsJson",placeholder:'Args as Json [{ "name": "foo", "type": "U256", "value": 1 }]',e2e:"argsJsonElt",disabled_when:["argsSimple.value"],storage_name:"args_json"},$D={id:"finalizedApprovalsElt",type:"checkbox",wrap_class:"col-lg-3 mt-3 mt-xl-0",class:"form-check-input mt-0",label:"Finalized approvals",name:"finalized_approvals",controlName:"finalizedApprovals",placeholder:"",e2e:"finalizedApprovalsElt",label_class:"form-label"},GD={id:"seedEntityHashElt",type:"search",wrap_class:"col-xl-8 mb-2",class:"form-control",label:"Entity Hash",name:"seed_entity_hash",controlName:"seedEntityHash",placeholder:"entity-contract-0x",e2e:"seedEntityHashElt",enabled_when:["newFromEntityInfo"]},qD={id:"seedNameElt",type:"search",wrap_class:"col-lg-6 mb-2",class:"form-control",label:"Dictionary Name",name:"seed_name",controlName:"seedName",placeholder:"events",e2e:"seedNameElt",enabled_when:["newFromContractInfo","newFromAccountInfo","newFromEntityInfo"]},KD={id:"itemKeyElt",type:"search",wrap_class:"col-xl-8 mb-2",class:"form-control",label:"Dictionary Item key",name:"item_key",controlName:"itemKey",placeholder:"Item key string",e2e:"itemKeyElt",enabled_when:["newFromContractInfo","newFromAccountInfo","newFromSeedUref","newFromEntityInfo"]},JD={id:"queryKeyElt",type:"search",wrap_class:"col-xl-8 mb-2",class:"form-control",label:"Key",name:"query_key",controlName:"queryKey",placeholder:"uref-0x || hash-0x || account-hash-0x",e2e:"queryKeyElt"},KH={...JD,label:"Contract Hash",placeholder:"hash-0x"},ZD={id:"queryPathElt",type:"search",wrap_class:"col-lg-4 mb-2",class:"form-control",label:"Path",name:"query_path",controlName:"queryPath",placeholder:"counter/count",e2e:"queryPathElt"},mg={id:"deployJsonElt",type:"textarea",wrap_class:"col-lg-12",class:"form-control",label:"Deploy as Json string",name:"deploy_json",controlName:"deployJson",placeholder:"Deploy as Json string",e2e:"deployJsonElt",state_name:["deploy_json"]},wg={id:"transactionJsonElt",type:"textarea",wrap_class:"col-lg-12",class:"form-control",label:"Transaction as Json string",name:"transaction_json",controlName:"transactionJson",placeholder:"Transaction as Json string",e2e:"transactionJsonElt",state_name:["transaction_json"]},yg={id:"selectPricingMode",type:"select",wrap_class:"mt-3 col-xl-3 mb-3",class:"form-select form-control form-control-sm",label:"Pricing mode",label_class:"input-group-text",name:"pricing_mode",controlName:"selectPricingMode",e2e:"selectPricingModeElt",options:[{value:P.MK.Classic.toString(),label:"Classic",default:En.default_pricing_mode===P.MK.Classic},{value:P.MK.Fixed.toString(),label:"Fixed",default:En.default_pricing_mode===P.MK.Fixed}]},bg={id:"selectTransactionCategory",type:"select",wrap_class:"mt-3 col-xl-3 mb-3",class:"form-select form-control form-control-sm",label:"Category",label_class:"input-group-text",name:"transaction_category",controlName:"selectTransactionCategory",e2e:"selectTransactionCategoryElt",options:[{value:"true",label:"Install & Upgrade",default:!0===En.default_is_install_upgrade},{value:"false",label:"Session",default:!1===En.default_is_install_upgrade}],enabled_when:["has_wasm"]},Sn=[[{input:{id:"blockIdentifierHeightElt",type:"search",wrap_class:"col-lg-3 col-xl-2 mb-2",class:"form-control",label:"Block Height",name:"block_identifier_height",controlName:"blockIdentifierHeight",placeholder:"Block Height",e2e:"blockIdentifierHeightElt"}},{input:{id:"blockIdentifierHashElt",type:"search",wrap_class:"col-lg-9 col-xl-8 mb-2",class:"form-control",label:"Block Hash",name:"block_identifier_hash",controlName:"blockIdentifierHash",placeholder:"Block Hash",e2e:"blockIdentifierHashElt"}}]],ZH=[...Sn,[{input:{id:"accountIdentifierElt",type:"search",wrap_class:"col-lg-9",class:"form-control",label:"Account identifier",name:"account_identifier",controlName:"accountIdentifier",placeholder:"Public Key, AccountHash",e2e:"accountIdentifierElt",state_name:["account_hash","public_key"]},required:!0}]],QH=[...Sn,[{input:{id:"entityIdentifierElt",type:"search",wrap_class:"col-lg-9",class:"form-control",label:"Entity identifier",name:"entity_identifier",controlName:"entityIdentifier",placeholder:"Public Key, AccountHash, Entity",e2e:"entityIdentifierElt",state_name:["account_hash","public_key","entity"]},required:!0}]],YH=[[{input:ba}],[{input:{id:"purseUrefElt",type:"search",wrap_class:"col-xl-8 mb-2",class:"form-control",label:"Purse Uref",name:"purse_uref",controlName:"purseUref",placeholder:"uref-0x",e2e:"purseUrefElt",state_name:["main_purse"]},required:!0}]],QD=[...Sn,[{input:ba}],[{input:{id:"purseIdentifierElt",type:"search",wrap_class:"col-xl-8 mb-2",class:"form-control",label:"Purse Identifier",name:"purse_identifier",controlName:"purseIdentifier",placeholder:"Public Key, AccountHash, Purse URef",e2e:"purseIdentifierElt",state_name:["main_purse","account_hash","public_key"]},required:!0}]],XH=[...Sn,[{input:ba}],[{input:JD,required:!0}],[{input:ZD}]],ez=[[{input:ba}],[{input:GD,required:!0}],[{input:qD,required:!0}],[{input:KD,required:!0}]],tz=[...Sn,[{input:KH,required:!0}],[{input:ZD,required:!0}]],nz=[[{input:ba}],[{select:{id:"selectDictIdentifierElt",type:"select",wrap_class:"mt-3 col-lg-5 mb-4",class:"form-select form-control form-control-sm",label:"Dictionary identifier",label_class:"input-group-text",name:"select_dict_identifier",controlName:"selectDictIdentifier",e2e:"selectDictIdentifierElt",state_name:["select_dict_identifier"],options:[{value:"newFromSeedUref",label:"From Dictionary Uref"},{value:"newFromContractInfo",label:"From Contract Info (depr.)"},{value:"newFromEntityInfo",label:"From Entity Info",default:!0},{value:"newFromAccountInfo",label:"From Account Info"},{value:"newFromDictionaryKey",label:"From Dictionary Key"}]}}],[{input:{id:"seedContractHashElt",type:"search",wrap_class:"col-xl-8 mb-2",class:"form-control",label:"Contract Hash",name:"seed_contract_hash",controlName:"seedContractHash",placeholder:"hash-0x",e2e:"seedContractHashElt",enabled_when:["newFromContractInfo"]},required:!0}],[{input:GD,required:!0}],[{input:{id:"seedAccountHashElt",type:"search",wrap_class:"col-xl-8 mb-2",class:"form-control",label:"Account Hash",name:"seed_account_hash",controlName:"seedAccountHash",placeholder:"account-hash-0x",e2e:"seedAccountHashElt",enabled_when:["newFromAccountInfo"]},required:!0}],[{input:{id:"seedUrefElt",type:"search",wrap_class:"col-xl-8 mb-2",class:"form-control",label:"Dictionary Uref",name:"seed_uref",controlName:"seedUref",placeholder:"uref-0x",e2e:"seedUrefElt",enabled_when:["newFromSeedUref"]},required:!0}],[{input:qD,required:!0}],[{input:KD,required:!0}],[{input:{id:"seedKeyElt",type:"search",wrap_class:"col-xl-8 mb-2",class:"form-control",label:"Dictionary Key",name:"seed_key",controlName:"seedKey",placeholder:"dictionary-0x",e2e:"seedKeyElt",enabled_when:["newFromDictionaryKey"]},required:!0}]],rz=[[{input:{id:"deployHashElt",type:"search",wrap_class:"col-xl-7",class:"form-control",label:"Deploy Hash",name:"deploy_hash",controlName:"deployHash",placeholder:"0x",e2e:"deployHashElt"},required:!0},{input:$D}]],sz=[[{input:{id:"transactionHashElt",type:"search",wrap_class:"col-xl-7",class:"form-control",label:"Transaction Hash",name:"transaction_hash",controlName:"transactionHash",placeholder:"0x",e2e:"transactionHashElt"},required:!0},{input:$D}]],Da=[[{input:{id:"transferAmountElt",type:"tel",wrap_class:"col-lg-3 mb-2",class:"form-control",label:"Transfer Amount",name:"transfer_amount",controlName:"transferAmount",e2e:"transferAmountElt",config_name:"minimum_transfer",maxlength:"28",pattern:"\\d*",change:"motesToCSPR"},required:!0},{input:xi}],[{input:{id:"targetAccountElt",type:"search",wrap_class:"col-xl-9",class:"form-control",label:"Target Account",name:"target_account",controlName:"targetAccount",placeholder:"Public Key, AccountHash, Purse URef",e2e:"targetAccountElt"},required:!0}]],YD=[...Sn,...Da],XD=[[{input:va,required:!0},{input:xi},{input:Ea},{select:yg},{input:hg}],[{wasm_button:!0},{select:bg}],[{input:Sa}],[{textarea:Ca}]],vg=[[{input:va,required:!0},{input:xi},{input:Ea}],[{wasm_button:!0},{select:bg}],[{input:BD,required:!0},{input:pu},{input:gu}],[{input:zD,required:!0}],[{input:hu,required:!0}],[{input:Sa}],[{textarea:Ca}]],Eg=[[{input:va,required:!0},{input:xi},{input:Ea},{select:yg},{input:hg}],[{wasm_button:!0},{select:bg}],[{input:HD,required:!0},{input:pu},{input:gu}],[{input:UD,required:!0}],[{input:hu,required:!0}],[{input:Sa}],[{textarea:Ca}]],iz=[...vg],oz=[...Eg],mu=new Map([["call_entrypoint",[[{input:va,required:!0},{input:xi},{input:Ea},{select:yg},{input:hg}],[{input:HD},{input:pu},{input:gu}],[{input:UD}],[{input:hu}],[{input:Sa}],[{textarea:Ca}]]],["call_entrypoint_deploy",[[{input:va,required:!0},{input:xi},{input:Ea}],[{input:BD},{input:pu},{input:gu}],[{input:zD}],[{input:hu}],[{input:Sa}],[{textarea:Ca}]]],["deploy",vg],["get_account",ZH],["get_balance",YH],["get_block",Sn],["get_block_transfers",Sn],["get_deploy",rz],["get_dictionary_item",nz],["get_era_info",Sn],["get_era_summary",Sn],["get_entity",QH],["get_state_root_hash",Sn],["get_transaction",sz],["install",XD],["install_deploy",XD],["make_deploy",vg],["make_transaction",Eg],["make_transfer",Da],["make_transfer_transaction",Da],["put_deploy",[[{file_button:!0}],[{textarea:mg,required:!0}]]],["put_transaction",[[{file_button:!0}],[{textarea:wg,required:!0}]]],["query_balance",QD],["query_balance_details",QD],["query_contract_dict",ez],["query_contract_key",tz],["query_global_state",XH],["sign_deploy",[[{file_button:!0}],[{textarea:mg,required:!0}]]],["sign_transaction",[[{file_button:!0}],[{textarea:wg,required:!0}]]],["speculative_deploy",iz],["speculative_exec_deploy",[[{file_button:!0}],[{textarea:mg,required:!0}]]],["speculative_exec",[[{file_button:!0}],[{textarea:wg,required:!0}]]],["speculative_transaction",oz],["speculative_transfer",YD],["speculative_transfer_transaction",YD],["transaction",Eg],["transfer",Da],["transfer_transaction",Da]]);let Cn=(()=>{class e{constructor(){this.state=new ku({})}setState(t){const i={...this.state.getValue(),...t};this.state.next(i)}getState(){return this.state.asObservable()}getValue(){return this.state.getValue()}static{this.\u0275fac=function(r){return new(r||e)}}static{this.\u0275prov=Z({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})(),Ta=(()=>{class e{constructor(t){this.document=t,this.prefix="casper-client",this.window=this.document.defaultView}setState(t){const i={...JSON.parse(this.window?.localStorage.getItem(this.prefix)||"{}"),...t};this.window?.localStorage.setItem(this.prefix,JSON.stringify(i))}get(t){return(JSON.parse(this.window?.localStorage.getItem(this.prefix)||"{}")||{})[t]}static{this.\u0275fac=function(r){return new(r||e)(U(rn))}}static{this.\u0275prov=Z({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})(),Li=(()=>{class e{constructor(t,r,i,o){this.config=t,this.formBuilder=r,this.stateService=i,this.storageService=o,this.stateService.getState().subscribe(c=>{this.has_wasm=!!c?.has_wasm,c?.select_dict_identifier&&(this.select_dict_identifier=c.select_dict_identifier),c?.action&&this.action!==c.action&&(c.action&&(this.action=c.action),this.initializeForm()),c&&(this.state=c),this.action&&this.updateForm()}),this.form=this.defaultForm}get defaultForm(){const t={};return mu.forEach(r=>{r.forEach(i=>{i.forEach(({input:o,textarea:c,select:l})=>{const _=o?.controlName||c?.controlName||l?.controlName||"";if(_&&(t[_]=new Oi(this.getDefaultOptionValue(l?.options))),l?.options&&"selectDictIdentifier"===_){const d=l?.options.find(p=>p.default)?.value||"";this.stateService.setState({select_dict_identifier:d})}})})}),this.formBuilder.group(t)}getDefaultOptionValue(t){const r=t&&t.find(i=>i.default);return r?r.value:null}initializeForm(){Object.values(this.form.controls).forEach(r=>{r.clearValidators(),r.markAsPristine(),r.disable()});const t=this.action&&mu.get(this.action);t&&t.forEach(r=>{r.forEach(({input:i,textarea:o,select:c,required:l})=>{if(!i&&!o&&!c)return;const d=this.form.get(i?.controlName||o?.controlName||c?.controlName||"");if(!d)return;const p=i?.state_name||o?.state_name||c?.state_name||[],h=p&&p.find(b=>this.state[b]),m=i?.storage_name||o?.storage_name||c?.storage_name||"";let w=h?this.state[h]:"";if(w=m?this.storageService.get(m):w,w)w&&d.setValue(w);else if(i?.config_name){const b=this.config[i?.config_name]||"";b&&d.setValue(b),b&&(i.placeholder_config_value=b)}d.enable(),l&&(i&&(i.required=!0),o&&(o.required=!0),d.setValidators([zB.required]))})})}updateForm(){console.log("updateForm");const t=this.action&&mu.get(this.action);if(!t)return;const r=[];t.forEach(i=>{i.forEach(({input:o,textarea:c,select:l})=>{const _=o?.controlName||c?.controlName||l?.controlName||"";if(!_)return;const d=this.form.get(_);if(d){if(c){const p=c?.state_name||[],h=p&&p.find(w=>this.state[w]),m=h?this.state[h]:"";if(m&&d.setValue(m),c.disabled_when){const w=d.value&&c.disabled_when?.find(C=>C.includes("value")),b=w&&w.split(".")[0],E=b&&this.form?.get(b);E&&(E.disable(),r.push(b)),r.includes(c.controlName)||d.enable()}}else if(l&&l.enabled_when)this.has_wasm&&l.enabled_when?.includes("has_wasm")?d.enable():d.disable();else if(o){const p=o?.state_name||[],h=p&&p.find(w=>this.state[w]),m=h?this.state[h]:"";if(m&&d.setValue(m),o.enabled_when)"get_dictionary_item"===this.action&&this.select_dict_identifier&&!o.enabled_when?.includes(this.select_dict_identifier)?d.disable():this.select_dict_identifier&&d.enable();else if(o.disabled_when){const w=d.value&&o.disabled_when?.find(N=>N.includes("value")),b=w&&w.split(".")[0],E=b&&this.form?.get(b);E&&(E.disable(),r.push(b)),this.has_wasm&&o?.disabled_when?.includes("has_wasm")?(d.reset(),d.disable()):r.includes(o.controlName)||d.enable();const C=P.MK[this.state.pricing_mode]===P.MK.Classic;o?.disabled_when?.includes("fixedPricingMode")&&C&&(d.reset(),d.disable())}}if(o||c){const p=o?.storage_name||c?.storage_name||"";p&&this.storageService.setState({[p]:d.value})}}})})}get formFields(){return mu}static{this.\u0275fac=function(r){return new(r||e)(U(lr),U(RH),U(Cn),U(Ta))}}static{this.\u0275prov=Z({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();const gz=["template"],hz=(e,n)=>[e,n],mz=(e,n,t)=>[e,n,t];function wz(e,n){if(1&e&&(O(0,"span",10),ie(1),x()),2&e){let t;const r=H(2),i=r.inputField,o=r.parentForm,c=H();L(),ht("(",c.motesToCSPR(null==(t=o.get(i.controlName))?null:t.value)," CSPR)")}}function yz(e,n){if(1&e){const t=Le();qt(0,3),O(1,"input",11),re("change",function(){ge(t);const i=H(2).inputField;return he(H().onChange(i))}),x(),Kt()}if(2&e){const t=H(2),r=t.inputField,i=t.parentForm,o=H();R("formGroup",i),L(),R("id",r.id)("type",r.type)("name",r.name)("maxlength",r.maxlength||"")("pattern",r.pattern||"")("formControlName",r.controlName)("placeholder",r.placeholder_config_value?"e.g. "+r.placeholder_config_value:r.placeholder||"")("ngClass",W0(10,mz,r.class||"form-control",o.isInvalid(r.controlName)?"is-invalid":"",o.isRequired(r)?"is-required":"")),Ct("e2e-id",r.e2e)}}function bz(e,n){if(1&e&&(O(0,"label",12),ie(1),x()),2&e){const t=H(2).inputField;R("for",t.id),L(),ht("e.g. ",t.placeholder,"")}}function vz(e,n){if(1&e&&(O(0,"label",12),ie(1),x()),2&e){const t=H(2).inputField;R("for",t.id),L(),ht("e.g. ",t.placeholder_config_value,"")}}function Ez(e,n){if(1&e&&(O(0,"div",4)(1,"label",5),ie(2),ae(3,wz,2,1,"span",6),x(),O(4,"div",7),ae(5,yz,2,14,"ng-container",8)(6,bz,2,2,"label",9)(7,vz,2,2,"label",9),x()()),2&e){let t,r;const i=H(),o=i.inputField,c=i.parentForm,l=ps(2);R("ngClass",o.wrap_class),L(),R("for",o.id)("ngClass",Di(10,hz,o.label_class||"",null!=(t=c.get(o.controlName))&&t.disabled?"disabled":"")),L(),qo("",o.label,"",o.required?" *":""," "),L(),R("ngIf",(null==o.change?null:o.change.includes("motesToCSPR"))&&(null==(r=c.get(o.controlName))?null:r.value)),L(2),R("ngIf","checkbox"!==o.type)("ngIfElse",l),L(),R("ngIf",o.placeholder),L(),R("ngIf",o.placeholder_config_value)}}function Sz(e,n){if(1&e&>(0,"input",13),2&e){const t=H().inputField;R("id",t.id)("name",t.name)("formControlName",t.controlName),Ct("e2e-id",t.e2e)}}function Cz(e,n){if(1&e&&ae(0,Ez,8,13,"div",2)(1,Sz,1,4,"ng-template",3,1,hs),2&e){let t;const r=n.inputField,i=n.parentForm;R("ngIf",!(H().hidden_when_disabled&&null!=(t=i.get(r.controlName))&&t.disabled)),L(),R("formGroup",i)}}let eT=(()=>{class e{constructor(t){this.formService=t}onChange(t){this.parentForm?.get(t.controlName)&&t.disabled_when?.find(o=>o.includes("value"))&&this.formService.updateForm()}isInvalid(t){const r=this.parentForm?.get(t);return!(!r?.enabled||!r?.dirty||r?.value||r?.valid)}isRequired(t){const r=this.parentForm?.get(t.controlName);return!(!r?.enabled||r?.dirty||r?.value||!t.required)}motesToCSPR(t){if(t)return t=this.parse_commas(t),(0,P.S3)(t)}parse_commas(t){return t.replace(/[,.]/g,"")}static{this.\u0275fac=function(r){return new(r||e)(T(Li))}}static{this.\u0275cmp=ut({type:e,selectors:[["ui-input"]],viewQuery:function(r,i){if(1&r&&Tt(gz,7),2&r){let o;It(o=Mt())&&(i.template=o.first)}},inputs:{inputField:"inputField",parentForm:"parentForm",hidden_when_disabled:"hidden_when_disabled"},standalone:!0,features:[mt],decls:2,vars:0,consts:[["template",""],["checkboxContent",""],[3,"ngClass",4,"ngIf"],[3,"formGroup"],[3,"ngClass"],[3,"for","ngClass"],["class","fw-light small text-nowrap",4,"ngIf"],[1,"form-floating"],[3,"formGroup",4,"ngIf","ngIfElse"],[3,"for",4,"ngIf"],[1,"fw-light","small","text-nowrap"],[3,"change","id","type","name","maxlength","pattern","formControlName","placeholder","ngClass"],[3,"for"],["type","checkbox",3,"id","name","formControlName"]],template:function(r,i){1&r&&ae(0,Cz,3,2,"ng-template",null,0,hs)},dependencies:[Ke,cr,an,Ds,da,Kp,nu,fa,pg,gg,Ss,ya],styles:["[_nghost-%COMP%]{display:none}label[_ngcontent-%COMP%]{max-width:100%}.form-floating[_ngcontent-%COMP%] > label[_ngcontent-%COMP%], label.disabled[_ngcontent-%COMP%]{color:#d3d3d3}"],changeDetection:0})}}return e})();const Dz=["template"],tT=e=>[e];function Tz(e,n){if(1&e&&(O(0,"option",7),ie(1),x()),2&e){const t=n.$implicit,r=H(2);Of("value",t.value),R("selected",t.default||r.select_dict_identifier===t.value),L(),ht(" ",t.label," ")}}function Iz(e,n){if(1&e){const t=Le();O(0,"div",1)(1,"div",2)(2,"label",3),ie(3),x(),qt(4,4),O(5,"select",5),re("change",function(i){return ge(t),he(H().onChange(i))}),ae(6,Tz,2,3,"option",6),x(),Kt(),x()()}if(2&e){const t=n.inputField,r=n.parentForm;R("ngClass",t.wrap_class),L(2),R("for",t.id)("ngClass",yn(11,tT,t.label_class||"")),L(),gs(t.label),L(),R("formGroup",r),L(),R("id",t.id)("name",t.name)("ngClass",yn(13,tT,t.class||"form-control"))("formControlName",t.controlName),Ct("e2e-id",t.e2e),L(),R("ngForOf",t.options)}}let nT=(()=>{class e{constructor(t,r,i){this.config=t,this.stateService=r,this.changeDetectorRef=i}ngAfterViewInit(){var t=this;return(0,u.A)(function*(){t.setStateSubscription()})()}ngOnDestroy(){this.stateSubscription&&this.stateSubscription.unsubscribe()}setStateSubscription(){this.stateSubscription=this.stateService.getState().subscribe(t=>{setTimeout(()=>{t.select_dict_identifier&&(this.select_dict_identifier=t.select_dict_identifier),this.changeDetectorRef.markForCheck()})})}onChange(t){const r=t.target?.value,i=t.target?.name;"select_dict_identifier"===i&&this.stateService.setState({select_dict_identifier:r}),"pricing_mode"===i&&this.stateService.setState({pricing_mode:P.MK[r].toString()})}static{this.\u0275fac=function(r){return new(r||e)(T(lr),T(Cn),T(Jt))}}static{this.\u0275cmp=ut({type:e,selectors:[["ui-select"]],viewQuery:function(r,i){if(1&r&&Tt(Dz,7),2&r){let o;It(o=Mt())&&(i.template=o.first)}},inputs:{inputField:"inputField",parentForm:"parentForm"},standalone:!0,features:[mt],decls:2,vars:0,consts:[["template",""],[3,"ngClass"],[1,"input-group"],[3,"for","ngClass"],[3,"formGroup"],[3,"change","id","name","ngClass","formControlName"],[3,"value","selected",4,"ngFor","ngForOf"],[3,"value","selected"]],template:function(r,i){1&r&&ae(0,Iz,7,15,"ng-template",null,0,hs)},dependencies:[Ke,cr,ia,Ds,ND,kD,fu,nu,fa,Ss,ya],styles:["[_nghost-%COMP%]{display:none}label[_ngcontent-%COMP%]{max-width:100%}[_ngcontent-%COMP%]:disabled{color:#d3d3d3}"],changeDetection:0})}}return e})();const Mz=["template"],Nz=(e,n)=>[e,n];function Az(e,n){if(1&e&&(O(0,"label",6),ie(1),x()),2&e){const t=H().inputField,r=H();R("for",t.id),L(),gs(r.currentPlaceholder||t.placeholder)}}function kz(e,n){if(1&e){const t=Le();O(0,"div",1)(1,"div",2),qt(2,3),O(3,"textarea",4),re("change",function(i){const o=ge(t).inputField;return he(H().onChange(i,o))})("focus",function(i){return ge(t),he(H().onFocus(i))})("blur",function(i){return ge(t),he(H().onBlur(i))}),ie(4," "),x(),ae(5,Az,2,2,"label",5),Kt(),x()()}if(2&e){const t=n.inputField,r=n.parentForm,i=H();R("ngClass",t.wrap_class),L(2),R("formGroup",r),L(),R("id",t.id)("name",t.name)("formControlName",t.controlName)("placeholder",i.currentPlaceholder||t.placeholder||"")("ngClass",Di(9,Nz,t.class||"form-control",i.isInvalid(t.controlName)?"is-invalid":"")),Ct("e2e-id",t.e2e),L(2),R("ngIf",t.placeholder)}}let rT=(()=>{class e{constructor(t){this.formService=t,this.update_deploy_json=new Re,this.update_transaction_json=new Re,this.jsonPattern=/\[\{.*?\}\]/g}ngOnInit(){this.originalPlaceholder=this.inputField.placeholder||""}ngAfterViewInit(){this.initializePlaceholder()}isInvalid(t){const r=this.parentForm?.get(t);return!!this.parentForm?.touched&&!!r?.invalid}onChange(t,r){const i=t.target;i.name.includes("deploy")?this.update_deploy_json.emit(i.value):i.name.includes("transaction")?this.update_transaction_json.emit(i.value):this.updateForm(r)}onFocus(t){this.currentPlaceholder=this.removeJsonParts(t.target.placeholder)}onBlur(t){t.target.value||(this.currentPlaceholder=this.originalPlaceholder)}updateForm(t){this.parentForm?.get(t.controlName)&&t.disabled_when?.find(o=>o.includes("value"))&&this.formService.updateForm()}removeJsonParts(t){return t.replace(this.jsonPattern,"").trim()}initializePlaceholder(){const t=this.parentForm.get(this.inputField.controlName);this.currentPlaceholder=t&&t.value?this.removeJsonParts(this.originalPlaceholder):this.originalPlaceholder}static{this.\u0275fac=function(r){return new(r||e)(T(Li))}}static{this.\u0275cmp=ut({type:e,selectors:[["ui-textarea"]],viewQuery:function(r,i){if(1&r&&Tt(Mz,7),2&r){let o;It(o=Mt())&&(i.template=o.first)}},inputs:{inputField:"inputField",parentForm:"parentForm"},outputs:{update_deploy_json:"update_deploy_json",update_transaction_json:"update_transaction_json"},standalone:!0,features:[mt],decls:2,vars:0,consts:[["template",""],[3,"ngClass"],[1,"form-floating","mt-3"],[3,"formGroup"],[3,"change","focus","blur","id","name","formControlName","placeholder","ngClass"],[3,"for",4,"ngIf"],[3,"for"]],template:function(r,i){1&r&&ae(0,kz,6,12,"ng-template",null,0,hs)},dependencies:[Ke,cr,an,Ds,da,nu,fa,Ss,ya],styles:["textarea[_ngcontent-%COMP%]{min-height:350px!important;white-space:pre-wrap}@media (max-width: 767px){textarea[_ngcontent-%COMP%]{min-height:200px!important}}.form-floating[_ngcontent-%COMP%] > label[_ngcontent-%COMP%], label.disabled[_ngcontent-%COMP%]{color:#d3d3d3}"],changeDetection:0})}}return e})();const Fz=["wasmElt"],Rz=["template"];function Oz(e,n){if(1&e){const t=Le();O(0,"button",6),re("click",function(){return ge(t),he(H(2).onWasmClick())}),ie(1," Wasm Module Bytes "),x()}}function xz(e,n){if(1&e){const t=Le();O(0,"span",7),re("click",function(){return ge(t),he(H(2).resetWasmClick())}),ie(1),ac(),O(2,"svg",8),gt(3,"path",9),x()()}if(2&e){const t=H(2);L(),ht(" ",t.file_name," ")}}function Lz(e,n){if(1&e){const t=Le();O(0,"div",2)(1,"input",3,1),re("change",function(i){return ge(t),he(H().onWasmSelected(i))}),x(),ae(3,Oz,2,0,"button",4)(4,xz,4,1,"span",5),x()}if(2&e){const t=H();L(3),R("ngIf",!t.file_name),L(),R("ngIf",t.file_name)}}let sT=(()=>{class e{constructor(){this.select_wasm=new Re}onWasmSelected(t){var r=this;return(0,u.A)(function*(){r.file_name=r.wasmElt?.nativeElement.value.split("\\").pop();const i=t.target.files?.item(0),o=yield i?.arrayBuffer();r.wasm=o&&new Uint8Array(o),r.wasm?.buffer||r.resetWasmClick(),r.select_wasm.emit(r.wasm)})()}onWasmClick(){this.wasmElt.nativeElement.click()}resetWasmClick(){this.wasmElt.nativeElement.value="",this.wasm=void 0,this.file_name="",this.select_wasm.emit(void 0)}static{this.\u0275fac=function(r){return new(r||e)}}static{this.\u0275cmp=ut({type:e,selectors:[["comp-submit-wasm"]],viewQuery:function(r,i){if(1&r&&(Tt(Fz,5),Tt(Rz,7)),2&r){let o;It(o=Mt())&&(i.wasmElt=o.first),It(o=Mt())&&(i.template=o.first)}},outputs:{select_wasm:"select_wasm"},standalone:!0,features:[mt],decls:2,vars:0,consts:[["template",""],["wasmElt",""],[1,"col-sm-2","mb-3","mt-3"],["name","wasm","type","file","id","wasmElt","accept",".wasm","e2e-id","wasmElt",1,"visually-hidden",3,"change"],["class","btn btn-secondary",3,"click",4,"ngIf"],["class","btn btn-light","e2e-id","wasmName",3,"click",4,"ngIf"],[1,"btn","btn-secondary",3,"click"],["e2e-id","wasmName",1,"btn","btn-light",3,"click"],["fill","none","stroke","currentColor","viewBox","0 0 24 24","xmlns","http://www.w3.org/2000/svg",1,"w-6","h-6","ml-1","cursor-pointer","shrink-0"],["stroke-linecap","round","stroke-linejoin","round","stroke-width","2","d","M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"]],template:function(r,i){1&r&&ae(0,Lz,5,2,"ng-template",null,0,hs)},dependencies:[Ke,an],styles:["[_nghost-%COMP%]{display:none}"],changeDetection:0})}}return e})(),Ia=(()=>{class e{constructor(){this.error=new ku("")}setError(t){this.error.getValue()!==t&&this.error.next(t)}getError(){return this.error.asObservable()}static{this.\u0275fac=function(r){return new(r||e)}}static{this.\u0275prov=Z({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();const Pz=["template"],Vz=["deployFileElt"],Wz=["transactionFileElt"];function jz(e,n){if(1&e){const t=Le();O(0,"div",4)(1,"input",5,1),re("change",function(i){return ge(t),he(H(2).onDeployFileSelected(i))}),x(),O(3,"button",6),re("click",function(){return ge(t),he(H(2).deployFileClick())}),ie(4," Load deploy file "),x()()}}function Bz(e,n){if(1&e){const t=Le();O(0,"div",4)(1,"input",7,2),re("change",function(i){return ge(t),he(H(2).onTransactionFileSelected(i))}),x(),O(3,"button",6),re("click",function(){return ge(t),he(H(2).transactionFileClick())}),ie(4," Load transaction file "),x()()}}function Hz(e,n){if(1&e&&ae(0,jz,5,0,"div",3)(1,Bz,5,0,"div",3),2&e){const t=H();R("ngIf","deploy"===t.type),L(),R("ngIf","transaction"===t.type)}}let iT=(()=>{class e{constructor(t){this.errorService=t,this.select_deploy=new Re,this.select_transaction=new Re,this.type="deploy"}onDeployFileSelected(t){var r=this;return(0,u.A)(function*(){const i=t.target.files?.item(0);let o;if(r.deploy_json="",i){if(o=yield i.text(),!o.trim())return;o=o.trim();try{const c=JSON.parse(o);r.deploy_json=c}catch{const c="Error parsing deploy";console.error(c),r.errorService.setError(c)}}r.select_deploy.emit(r.deploy_json),r.deployFileElt.nativeElement.value=""})()}onTransactionFileSelected(t){var r=this;return(0,u.A)(function*(){const i=t.target.files?.item(0);let o;if(r.transaction_json="",i){if(o=yield i.text(),!o.trim())return;o=o.trim();try{const c=JSON.parse(o);r.transaction_json=c}catch{const c="Error parsing transaction";console.error(c),r.errorService.setError(c)}}r.select_transaction.emit(r.transaction_json),r.transactionFileElt.nativeElement.value=""})()}deployFileClick(){this.deployFileElt.nativeElement.click()}transactionFileClick(){this.transactionFileElt.nativeElement.click()}static{this.\u0275fac=function(r){return new(r||e)(T(Ia))}}static{this.\u0275cmp=ut({type:e,selectors:[["comp-submit-file"]],viewQuery:function(r,i){if(1&r&&(Tt(Pz,7),Tt(Vz,5),Tt(Wz,5)),2&r){let o;It(o=Mt())&&(i.template=o.first),It(o=Mt())&&(i.deployFileElt=o.first),It(o=Mt())&&(i.transactionFileElt=o.first)}},inputs:{type:"type"},outputs:{select_deploy:"select_deploy",select_transaction:"select_transaction"},standalone:!0,features:[mt],decls:2,vars:0,consts:[["template",""],["deployFileElt",""],["transactionFileElt",""],["class","col-sm-2 mt-2",4,"ngIf"],[1,"col-sm-2","mt-2"],["name","deploy_file","type","file","id","deployFileElt","accept",".json, .txt, .deploy","e2e-id","deployFileElt",1,"visually-hidden",3,"change"],[1,"btn","btn-secondary",3,"click"],["name","transaction_file","type","file","id","transactionFileElt","accept",".json, .txt, .deploy","e2e-id","transactionFileElt",1,"visually-hidden",3,"change"]],template:function(r,i){1&r&&ae(0,Hz,2,2,"ng-template",null,0,hs)},dependencies:[Ke,an],styles:["[_nghost-%COMP%]{display:none}"],changeDetection:0})}}return e})();const Sg=(e,n)=>({parentForm:e,inputField:n});function zz(e,n){1&e&&ds(0)}function Uz(e,n){if(1&e&&(qt(0),gt(1,"ui-input",7,0),ae(3,zz,1,0,"ng-container",8),Kt()),2&e){const t=ps(2),r=H().$implicit,i=H(3);L(),R("parentForm",i.form)("inputField",r.input)("hidden_when_disabled","get_dictionary_item"===i.action),L(2),R("ngTemplateOutlet",t.template)("ngTemplateOutletContext",Di(5,Sg,i.form,r.input))}}function $z(e,n){1&e&&ds(0)}function Gz(e,n){if(1&e){const t=Le();qt(0),O(1,"ui-textarea",9,0),re("update_deploy_json",function(i){return ge(t),he(H(4).updateDeployJson(i))})("update_transaction_json",function(i){return ge(t),he(H(4).updateTransactionJson(i))}),x(),ae(3,$z,1,0,"ng-container",8),Kt()}if(2&e){const t=ps(2),r=H().$implicit,i=H(3);L(),R("parentForm",i.form)("inputField",r.textarea),L(2),R("ngTemplateOutlet",t.template)("ngTemplateOutletContext",Di(4,Sg,i.form,r.textarea))}}function qz(e,n){1&e&&ds(0)}function Kz(e,n){if(1&e&&(qt(0),gt(1,"ui-select",10,0),ae(3,qz,1,0,"ng-container",8),Kt()),2&e){const t=ps(2),r=H().$implicit,i=H(3);L(),R("parentForm",i.form)("inputField",r.select),L(2),R("ngTemplateOutlet",t.template)("ngTemplateOutletContext",Di(4,Sg,i.form,r.select))}}function Jz(e,n){1&e&&ds(0)}function Zz(e,n){if(1&e){const t=Le();qt(0),O(1,"comp-submit-wasm",11,1),re("select_wasm",function(i){return ge(t),he(H(4).onWasmSelected(i))}),x(),ae(3,Jz,1,0,"ng-container",12),Kt()}if(2&e){const t=ps(2);L(3),R("ngTemplateOutlet",t.template)}}function Qz(e,n){1&e&&ds(0)}function Yz(e,n){if(1&e){const t=Le();qt(0),O(1,"comp-submit-file",13,1),re("select_deploy",function(i){return ge(t),he(H(4).onDeployFileSelected(i))})("select_transaction",function(i){return ge(t),he(H(4).onTransactionFileSelected(i))}),x(),ae(3,Qz,1,0,"ng-container",12),Kt()}if(2&e){const t=ps(2),r=H(4);L(),R("type",r.action.includes("transaction")?"transaction":"deploy"),L(2),R("ngTemplateOutlet",t.template)}}function Xz(e,n){if(1&e&&(qt(0),ae(1,Uz,4,8,"ng-container",6)(2,Gz,4,7,"ng-container",6)(3,Kz,4,7,"ng-container",6)(4,Zz,4,1,"ng-container",6)(5,Yz,4,2,"ng-container",6),Kt()),2&e){const t=n.$implicit;L(),R("ngIf",t.input),L(),R("ngIf",t.textarea),L(),R("ngIf",t.select),L(),R("ngIf",t.wasm_button),L(),R("ngIf",t.file_button)}}function eU(e,n){if(1&e&&(qt(0),O(1,"div",5),ae(2,Xz,6,5,"ng-container",4),x(),Kt()),2&e){const t=n.$implicit;L(2),R("ngForOf",t)}}function tU(e,n){if(1&e&&(O(0,"form",3),ae(1,eU,3,1,"ng-container",4),x()),2&e){const t=H();R("formGroup",t.form),L(),R("ngForOf",t.formFields.get(t.action))}}let oT=(()=>{class e{constructor(t,r,i,o){this.config=t,this.formService=r,this.stateService=i,this.changeDetectorRef=o,this.formFields=this.formService.formFields,this.wasm_selected=new Re,this.verbosity=this.config.verbosity}ngOnDestroy(){this.stateSubscription&&this.stateSubscription.unsubscribe()}ngAfterViewInit(){var t=this;return(0,u.A)(function*(){t.setStateSubscription()})()}setStateSubscription(){this.stateSubscription=this.stateService.getState().subscribe(t=>{t.action&&(this.action=t.action),this.changeDetectorRef.markForCheck()})}onWasmSelected(t){var r=this;return(0,u.A)(function*(){t&&r.wasm_selected.emit(t),r.stateService.setState({has_wasm:!!t})})()}onDeployFileSelected(t){var r=this;return(0,u.A)(function*(){t=t&&(0,P.mL)(new P.m9(t).toJson(),r.verbosity),r.updateDeployJson(t)})()}onTransactionFileSelected(t){var r=this;return(0,u.A)(function*(){t=t&&(0,P.mL)(new P.ZX(t).toJson(),r.verbosity),r.updateTransactionJson(t)})()}updateDeployJson(t){t&&this.stateService.setState({deploy_json:t})}updateTransactionJson(t){t&&this.stateService.setState({transaction_json:t})}static{this.\u0275fac=function(r){return new(r||e)(T(lr),T(Li),T(Cn),T(Jt))}}static{this.\u0275cmp=ut({type:e,selectors:[["comp-form"]],inputs:{form:"form"},outputs:{wasm_selected:"wasm_selected"},standalone:!0,features:[mt],decls:1,vars:1,consts:[["inputTemplate",""],["submitTemplate",""],["class","mt-3",3,"formGroup",4,"ngIf"],[1,"mt-3",3,"formGroup"],[4,"ngFor","ngForOf"],[1,"row","align-items-end"],[4,"ngIf"],[3,"parentForm","inputField","hidden_when_disabled"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[3,"update_deploy_json","update_transaction_json","parentForm","inputField"],[3,"parentForm","inputField"],[3,"select_wasm"],[4,"ngTemplateOutlet"],[3,"select_deploy","select_transaction","type"]],template:function(r,i){1&r&&ae(0,tU,2,2,"form",2),2&r&&R("ngIf",i.action&&i.formFields&&i.formFields.has(i.action))},dependencies:[Ke,ia,an,jS,Ds,ED,fa,Ss,eT,sT,iT,rT,nT],changeDetection:0})}}return e})();const aT=new W("highlight");var nU=a(7278),rU=a.n(nU);let cT=(()=>{class e{constructor(t){this.highlightWebworkerFactory=t}highlightMessage(t){var r=this;return(0,u.A)(function*(){r.activateWorker();const i=r.hightlightWebworker&&(yield r.hightlightWebworker.postMessage(t).catch(o=>{console.error(o)}));return r.terminateWorker(),i})()}activateWorker(){if(this.webworker)return;const t=this.highlightWebworkerFactory();this.webworker=t[0],this.hightlightWebworker=t[1]}terminateWorker(){this.webworker&&(this.webworker.terminate(),delete this.webworker)}static{this.\u0275fac=function(r){return new(r||e)(U(aT))}}static{this.\u0275prov=Z({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();const sU={provide:aT,useValue:function(){const e=new Worker(a.tu(new URL(a.p+a.u(755),a.b)),{name:"highlight.worker",type:void 0});return[e,new(rU())(e)]}};let lT=(()=>{class e{static{this.\u0275fac=function(r){return new(r||e)}}static{this.\u0275mod=Zn({type:e})}static{this.\u0275inj=An({providers:[sU,cT],imports:[Ke]})}}return e})(),wu=(()=>{class e{constructor(t,r){this.highlightService=t,this.document=r,this.result=new Wr,this.window=this.document.defaultView}getResult(){return this.result.asObservable()}setResult(t){var r=this;return(0,u.A)(function*(){const i=t,o=yield r.highlightService.highlightMessage(i),c="string"==typeof t;r.result.next({result:c?i:JSON.stringify(i),resultHtml:c?i:o})})()}copyClipboard(t){this.window?.navigator.clipboard.writeText(t).catch(r=>console.error(r))}static{this.\u0275fac=function(r){return new(r||e)(U(cT),U(rn))}}static{this.\u0275prov=Z({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})(),iU=(()=>{class e{static{this.\u0275fac=function(r){return new(r||e)}}static{this.\u0275mod=Zn({type:e})}static{this.\u0275inj=An({providers:[wu],imports:[Ke,lT]})}}return e})();const oU=["resultElt"],aU=["codeElt"];function cU(e,n){if(1&e&&(O(0,"div",15,0)(2,"div",16),gt(3,"code",17,1),x()()),2&e){const t=H(2);L(3),R("innerHtml",t.resultHtml,Aw)}}function lU(e,n){if(1&e){const t=Le();O(0,"div",4)(1,"div",5)(2,"span"),ac(),O(3,"svg",6),re("click",function(){ge(t);const i=H();return he(i.copy(i.result))}),gt(4,"rect",7)(5,"path",8),x()(),function um(){!function pM(){Y.lFrame.currentNamespace=null}()}(),O(6,"span",9),re("click",function(){return ge(t),he(H().reset())}),ac(),O(7,"svg",10),gt(8,"path",11)(9,"path",12)(10,"path",13),x()()(),ae(11,cU,5,1,"div",14),x()}if(2&e){const t=H();L(11),R("ngIf",t.resultHtml)}}let uT=(()=>{class e{constructor(t,r){this.resultService=t,this.changeDetectorRef=r}ngAfterViewInit(){this.getResultSubscription=this.resultService.getResult().subscribe(t=>{this.result=t.result,this.resultHtml=t.resultHtml,this.changeDetectorRef.markForCheck()})}ngOnDestroy(){this.getResultSubscription&&this.getResultSubscription.unsubscribe()}copy(t){this.resultService.copyClipboard((0,P.mL)(JSON.parse(t),P.WT.High))}reset(){this.result="",this.resultHtml="",this.resultService.setResult("")}static{this.\u0275fac=function(r){return new(r||e)(T(wu),T(Jt))}}static{this.\u0275cmp=ut({type:e,selectors:[["comp-result"]],viewQuery:function(r,i){if(1&r&&(Tt(oU,5),Tt(aU,5,tn)),2&r){let o;It(o=Mt())&&(i.resultElt=o.first),It(o=Mt())&&(i.contentChildren=o.first)}},standalone:!0,features:[mt],decls:2,vars:1,consts:[["resultElt",""],["codeElt",""],[1,"mt-3"],["class","row",4,"ngIf"],[1,"row"],[1,"col-xs-12","d-flex","flex-row","justify-content-between","mb-2"],["viewBox","0 0 24 24","fill","none","stroke","currentColor","stroke-width","2","stroke-linecap","round","stroke-linejoin","round",1,"shrink-0","ml-2","w-5","min-w-5","text-gray-500","cursor-pointer",3,"click"],["x","9","y","9","width","13","height","13","rx","2","ry","2"],["d","M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"],["e2e-id","clear result",3,"click"],["xmlns","http://www.w3.org/2000/svg","width","16","height","16","fill","currentColor","viewBox","0 0 16 16",1,"bi","bi-journal-x","cursor-pointer"],["fill-rule","evenodd","d","M6.146 6.146a.5.5 0 0 1 .708 0L8 7.293l1.146-1.147a.5.5 0 1 1 .708.708L8.707 8l1.147 1.146a.5.5 0 0 1-.708.708L8 8.707 6.854 9.854a.5.5 0 0 1-.708-.708L7.293 8 6.146 6.854a.5.5 0 0 1 0-.708z"],["d","M3 0h10a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2v-1h1v1a1 1 0 0 0 1 1h10a1 1 0 0 0 1-1V2a1 1 0 0 0-1-1H3a1 1 0 0 0-1 1v1H1V2a2 2 0 0 1 2-2z"],["d","M1 5v-.5a.5.5 0 0 1 1 0V5h.5a.5.5 0 0 1 0 1h-2a.5.5 0 0 1 0-1H1zm0 3v-.5a.5.5 0 0 1 1 0V8h.5a.5.5 0 0 1 0 1h-2a.5.5 0 0 1 0-1H1zm0 3v-.5a.5.5 0 0 1 1 0v.5h.5a.5.5 0 0 1 0 1h-2a.5.5 0 0 1 0-1H1z"],["class","col-xs-12",4,"ngIf"],[1,"col-xs-12"],[1,"card"],["e2e-id","result",1,"card-body",3,"innerHtml"]],template:function(r,i){1&r&&(O(0,"section",2),ae(1,lU,12,1,"div",3),x()),2&r&&(L(),R("ngIf",i.result))},dependencies:[Ke,an,lT],styles:["code[_ngcontent-%COMP%]{white-space:pre-wrap;overflow-x:hidden;word-wrap:break-word;max-width:100%}.card[_ngcontent-%COMP%]{max-height:calc(95vh - 20px);overflow-y:auto;margin-bottom:20px}@media (max-width: 767px){[_nghost-%COMP%] .hljs-string{overflow-wrap:break-word;word-break:break-all;max-width:100%}}[_nghost-%COMP%] .hljs-attr{font-weight:700}@media (max-width: 767px){code[_ngcontent-%COMP%]{font-size:.8em}}"],changeDetection:0})}}return e})();const uU=["selectNetworkElt"],_T=e=>[e];function _U(e,n){if(1&e&&(O(0,"option",18),ie(1),x()),2&e){const t=n.$implicit,r=H();R("value",null==t?null:t.name)("selected",t.rpc_address===r.rpc_address),L(),qo(" ",null==t?null:t.name," (",t.rpc_address,") ")}}function dU(e,n){if(1&e&&(O(0,"option",18),ie(1),x()),2&e){const t=n.$implicit,r=H(2);R("value",r.changePort(t))("selected",r.changePort(t)===r.rpc_address),L(),qo(" ",r.changePort(t)," (",r.chain_name,") ")}}function fU(e,n){if(1&e&&(O(0,"optgroup",19),ae(1,dU,2,4,"option",15),x()),2&e){const t=H();L(),R("ngForOf",t.peers)}}function pU(e,n){if(1&e){const t=Le();O(0,"div",20)(1,"div",21)(2,"label",22)(3,"span",23),ie(4,"Net."),x(),O(5,"span",24),ie(6,"Network"),x()(),O(7,"input",25,1),re("change",function(i){return ge(t),he(H().onCustomNetworkChange(i))}),x()(),O(9,"div",26)(10,"label",27)(11,"span",23),ie(12,"Chai."),x(),O(13,"span",24),ie(14,"Chain"),x()(),O(15,"input",28,1),re("change",function(i){return ge(t),he(H().onCcustomChainChange(i))}),x()()()}if(2&e){const t=H();L(7),R("value",t.rpc_address||"")("ngClass",yn(4,_T,t.isCustomNetworkInvalid()?"is-invalid":"")),L(8),R("value",t.chain_name||"")("ngClass",yn(6,_T,t.iscustomChainInvalid()?"is-invalid":""))}}let dT=(()=>{class e{constructor(t,r,i,o,c,l,_){this.sdk=t,this.config=r,this.env=i,this.document=o,this.stateService=c,this.storageService=l,this.changeDetectorRef=_,this.networks=this.config.networks,this.network=this.config.network,this.chain_name=this.network.chain_name,this.rpc_address=this.network.rpc_address,this.is_production=this.env.production,this.localhost_to_gateway=this.env.localhost_to_gateway,this.window=this.document.defaultView,this.is_electron=this.isElectron()}ngAfterViewInit(){var t=this;return(0,u.A)(function*(){t.storageService.get("chain_name")&&t.storageService.get("rpc_address")&&(t.chain_name=t.storageService.get("chain_name")||t.chain_name,t.rpc_address=t.storageService.get("rpc_address")||t.rpc_address,t.network=t.networks.find(r=>r.rpc_address==t.rpc_address)||t.network),t.stateService.setState({chain_name:t.chain_name,rpc_address:t.rpc_address}),t.setRPCAddress(),t.changeDetectorRef.markForCheck()})()}selectNetwork(t){let r=t.target?.value||this.selectNetworkElt.nativeElement.value;r=r&&this.networks.find(i=>i.name==r),this.network=r,this.chain_name=r.chain_name,this.rpc_address=r.rpc_address,this.setRPCAddress(),this.stateService.setState({chain_name:r.chain_name}),this.storageService.setState({rpc_address:this.rpc_address,chain_name:this.chain_name})}changePort(t){const r=t.address.split(":");return[this.config.default_protocol,r.shift(),":",this.config.default_port].join("")}onCustomNetworkChange(t){this.rpc_address=t.target?.value||this.network.rpc_address;const r=this.networks.find(i=>"custom"===i.name);r&&(r.rpc_address=this.rpc_address,this.sdk.setRPCAddress(this.rpc_address),this.stateService.setState({rpc_address:this.rpc_address}),this.storageService.setState({rpc_address:this.rpc_address}))}isCustomNetworkInvalid(){return!1}onCcustomChainChange(t){this.chain_name=t.target?.value||this.network.chain_name;const r=this.networks.find(i=>"custom"===i.name);r&&(r.chain_name=this.chain_name,this.stateService.setState({chain_name:this.chain_name}),this.storageService.setState({chain_name:this.chain_name}))}iscustomChainInvalid(){return!1}isElectron(){return typeof this.window<"u"&&window.location?.origin?.startsWith("file://")}setRPCAddress(){if(this.is_electron)this.sdk.setRPCAddress(this.rpc_address);else{const t=this.networks.find(r=>r.rpc_address==this.rpc_address);this.is_production&&!this.localhost_to_gateway&&t&&["ntcl","node-launcher"].includes(t?.name)?this.sdk.setRPCAddress(this.rpc_address):t&&this.sdk.setRPCAddress([this.window?.location?.href,t?.name].join(""))}}static{this.\u0275fac=function(r){return new(r||e)(T(_a),T(lr),T(Gp),T(rn),T(Cn),T(Ta),T(Jt))}}static{this.\u0275cmp=ut({type:e,selectors:[["comp-header"]],viewQuery:function(r,i){if(1&r&&Tt(uU,5),2&r){let o;It(o=Mt())&&(i.selectNetworkElt=o.first)}},inputs:{peers:"peers"},standalone:!0,features:[mt],decls:20,vars:7,consts:[["selectNetworkElt",""],["publicKeyElt",""],[1,"navbar","navbar-light"],[1,"col-5","col-md-2"],[1,"navbar-brand"],["src","assets/logo.png","alt","CasperLabs"],[1,"col-7","col-md-4","col-lg-4","col-xl-5","d-flex","flex-column","flex-xl-row","justify-content-end","px-2","pt-2"],["e2e-id","chain_name",1,"badge","rounded-pill","bg-success","mb-2","ellipsis-container","px-2","me-xl-3",3,"hidden"],["e2e-id","rpc_address",1,"badge","rounded-pill","bg-success","mb-2","ellipsis-container","px-2","me-xl-3",3,"hidden"],[1,"col-12","col-md-6","col-lg-5"],[1,"form-inline"],[1,"input-group"],["for","selectActionElt","for","selectNetworkElt",1,"input-group-text"],["id","selectNetworkElt","e2e-id","selectNetworkElt",1,"form-select","form-control","form-control-sm",3,"change"],["label","default"],[3,"value","selected",4,"ngFor","ngForOf"],["label","fetched",4,"ngIf"],["class","input-group mt-2 justify-content-between",4,"ngIf"],[3,"value","selected"],["label","fetched"],[1,"input-group","mt-2","justify-content-between"],[1,"col-7"],["for","customNetworkElt",1,"input-group-text"],[1,"d-none","d-md-inline","d-lg-none"],[1,"d-md-none","d-lg-inline"],["type","search","name","customNetwork","id","customNetworkElt","e2e-id","customNetworkElt",1,"form-control","form-control-xs",3,"change","value","ngClass"],[1,"col-4"],["for","publicKeyElt",1,"input-group-text"],["type","search","name","customChain","id","customChainElt","e2e-id","customChainElt",1,"form-control","form-control-xs",3,"change","value","ngClass"]],template:function(r,i){if(1&r){const o=Le();O(0,"nav",2)(1,"div",3)(2,"a",4),gt(3,"img",5),x()(),O(4,"div",6)(5,"span",7),ie(6),x(),O(7,"span",8),ie(8),x()(),O(9,"div",9)(10,"form",10)(11,"div",11)(12,"label",12),ie(13,"RPC"),x(),O(14,"select",13,0),re("change",function(l){return ge(o),he(i.selectNetwork(l))}),O(16,"optgroup",14),ae(17,_U,2,4,"option",15),x(),ae(18,fU,2,1,"optgroup",16),x()(),ae(19,pU,17,8,"div",17),x()()()}2&r&&(L(5),R("hidden",!i.chain_name),L(),gs(i.chain_name),L(),R("hidden",!i.rpc_address),L(),gs(i.rpc_address),L(9),R("ngForOf",i.networks),L(),R("ngIf",i.peers),L(),R("ngIf","custom"===(null==i.network?null:i.network.name)))},dependencies:[Ke,cr,ia,an],styles:[".ellipsis-container[_ngcontent-%COMP%]{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;width:auto}"],changeDetection:0})}}return e})();function gU(e,n){if(1&e&&(O(0,"section",1)(1,"pre",2),ie(2),x()()),2&e){const t=H();L(2),gs(t.error)}}let fT=(()=>{class e{constructor(t,r){this.errorService=t,this.changeDetectorRef=r}ngAfterViewInit(){var t=this;return(0,u.A)(function*(){t.seterrorSubscription()})()}ngOnDestroy(){this.errorSubscription&&this.errorSubscription.unsubscribe()}seterrorSubscription(){var t=this;this.errorSubscription=this.errorService.getError().subscribe(function(){var r=(0,u.A)(function*(i){t.error!==i&&(t.error=i,t.changeDetectorRef.markForCheck())});return function(i){return r.apply(this,arguments)}}())}static{this.\u0275fac=function(r){return new(r||e)(T(Ia),T(Jt))}}static{this.\u0275cmp=ut({type:e,selectors:[["comp-error"]],standalone:!0,features:[mt],decls:1,vars:1,consts:[["class","mt-3","e2e-id","error",4,"ngIf"],["e2e-id","error",1,"mt-3"],[1,"error","alert","alert-warning","d-flex"]],template:function(r,i){1&r&&ae(0,gU,3,1,"section",0),2&r&&R("ngIf",i.error)},dependencies:[Ke,an],styles:[".error[_ngcontent-%COMP%]{display:block;font-family:monospace;white-space:pre-wrap;word-break:break-word}"],changeDetection:0})}}return e})();function hU(e,n){if(1&e){const t=Le();O(0,"div",4)(1,"span",5),ie(2),x(),O(3,"button",6),re("click",function(){return ge(t),he(H().get_state_root_hash())}),ie(4,"Refresh"),x()()}if(2&e){const t=H();L(2),ht("state root hash is ",t.state_root_hash,"")}}function mU(e,n){if(1&e&&(O(0,"div",7)(1,"span",8),ie(2),x()()),2&e){const t=H();L(2),ht("account hash is ",t.account_hash,"")}}function wU(e,n){if(1&e&&(O(0,"div",7)(1,"span",9),ie(2),x()()),2&e){const t=H();L(2),ht("main purse is ",t.main_purse,"")}}let pT=(()=>{class e{constructor(t,r){this.stateService=t,this.changeDetectorRef=r,this.get_state_root_hash_output=new Re}ngOnDestroy(){this.stateSubscription&&this.stateSubscription.unsubscribe()}setStateSubscription(){this.stateSubscription=this.stateService.getState().subscribe(t=>{t.account_hash&&(this.account_hash=t.account_hash),t.main_purse&&(this.main_purse=t.main_purse),t.state_root_hash&&(this.state_root_hash=t.state_root_hash),t&&this.changeDetectorRef.markForCheck()})}ngAfterViewInit(){var t=this;return(0,u.A)(function*(){t.setStateSubscription()})()}get_state_root_hash(){this.get_state_root_hash_output.emit(!0)}static{this.\u0275fac=function(r){return new(r||e)(T(Cn),T(Jt))}}static{this.\u0275cmp=ut({type:e,selectors:[["comp-status"]],outputs:{get_state_root_hash_output:"get_state_root_hash_output"},standalone:!0,features:[mt],decls:5,vars:3,consts:[[1,"row"],[1,"col-sm-12"],["class","alert alert-success d-flex flex-md-row flex-column justify-content-between align-items-center mb-1 mb-md-3",4,"ngIf"],["class","alert alert-warning d-flex mb-1 mb-md-3",4,"ngIf"],[1,"alert","alert-success","d-flex","flex-md-row","flex-column","justify-content-between","align-items-center","mb-1","mb-md-3"],["e2e-id","state_root_hash",1,"ellipsis-container"],[1,"btn","me-0",3,"click"],[1,"alert","alert-warning","d-flex","mb-1","mb-md-3"],["e2e-id","account_hash",1,"ellipsis-container"],["e2e-id","main_purse",1,"ellipsis-container"]],template:function(r,i){1&r&&(O(0,"div",0)(1,"div",1),ae(2,hU,5,1,"div",2)(3,mU,3,1,"div",3)(4,wU,3,1,"div",3),x()()),2&r&&(L(2),R("ngIf",i.state_root_hash),L(),R("ngIf",i.account_hash),L(),R("ngIf",i.main_purse))},dependencies:[Ke,an],styles:[".ellipsis-container[_ngcontent-%COMP%]{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;width:auto;font-size:.8em;max-width:260px}@media (min-width: 380px){.ellipsis-container[_ngcontent-%COMP%]{max-width:320px}}@media (min-width: 425px){.ellipsis-container[_ngcontent-%COMP%]{max-width:360px}}@media (min-width: 576px){.ellipsis-container[_ngcontent-%COMP%]{max-width:480px}}@media (min-width: 768px){.ellipsis-container[_ngcontent-%COMP%]{max-width:none;font-size:1em}}.btn[_ngcontent-%COMP%]{white-space:nowrap}@media (max-width: 767px){.btn[_ngcontent-%COMP%]{font-size:.8em;padding-bottom:0}}"],changeDetection:0})}}return e})();const Cg=e=>({deprecated:e});function yU(e,n){if(1&e&&(O(0,"option",11),ie(1),x()),2&e){const t=n.$implicit,r=H();R("value",t)("selected",r.action===t)("ngClass",yn(4,Cg,r.sdk_deprecated.includes(t))),L(),ht(" ",t," ")}}function bU(e,n){if(1&e&&(O(0,"option",12),ie(1),x()),2&e){const t=n.$implicit,r=H();R("value",t)("selected",r.action===t),L(),ht(" ",t," ")}}function vU(e,n){if(1&e&&(O(0,"option",12),ie(1),x()),2&e){const t=n.$implicit,r=H();R("value",t)("selected",r.action===t),L(),ht(" ",t," ")}}function EU(e,n){if(1&e&&(O(0,"option",11),ie(1),x()),2&e){const t=n.$implicit,r=H();R("value",t)("selected",r.action===t)("ngClass",yn(4,Cg,r.sdk_deprecated.includes(t))),L(),ht(" ",t," ")}}function SU(e,n){if(1&e&&(O(0,"option",11),ie(1),x()),2&e){const t=n.$implicit,r=H();R("value",t)("selected",r.action===t)("ngClass",yn(4,Cg,r.sdk_deprecated.includes(t))),L(),ht(" ",t," ")}}let gT=(()=>{class e{constructor(t,r,i){this.sdk=t,this.stateService=r,this.changeDetectorRef=i,this.select_action=new Re}ngAfterViewInit(){var t=this;return(0,u.A)(function*(){t.sdk_methods=Object.getOwnPropertyNames(Object.getPrototypeOf(t.sdk)).filter(r=>"function"==typeof t.sdk[r]).filter(r=>!["free","constructor","__destroy_into_raw","getRPCAddress","setRPCAddress","getVerbosity","setVerbosity","watchDeploy","waitDeploy"].includes(r)).filter(r=>!r.endsWith("_options")).filter(r=>!r.startsWith("chain_")).filter(r=>!r.startsWith("state_")).filter(r=>!r.startsWith("info_")).filter(r=>!r.startsWith("account_")).filter(r=>!r.startsWith("wait")).filter(r=>!r.startsWith("watch")).sort(),t.sdk_deploy_methods=t.sdk_methods.filter(r=>["deploy","speculative_deploy","speculative_transfer","transfer"].includes(r)),t.sdk_deploy_utils_methods=t.sdk_methods.filter(r=>["make_deploy","make_transfer","sign_deploy","put_deploy","call_entrypoint_deploy","install_deploy"].includes(r)),t.sdk_transaction_methods=t.sdk_methods.filter(r=>["transaction","speculative_transaction","speculative_transfer_transaction","transfer_transaction"].includes(r)),t.sdk_transaction_utils_methods=t.sdk_methods.filter(r=>["make_transaction","make_transfer_transaction","sign_transaction","put_transaction","call_entrypoint","install","query_contract_dict","query_contract_key"].includes(r)),t.sdk_deprecated=t.sdk_methods.filter(r=>["get_account","get_deploy","get_era_info","put_deploy","speculative_exec_deploy","sign_deploy","make_deploy","make_transfer","speculative_deploy","speculative_transfer","deploy","transfer","call_entrypoint_deploy","install_deploy","get_balance"].includes(r)),t.sdk_rpc_methods=t.sdk_methods.filter(r=>!t.sdk_deploy_methods.concat(t.sdk_deploy_utils_methods,t.sdk_transaction_utils_methods,t.sdk_transaction_methods,t.sdk_contract_methods).includes(r)),t.setStateSubscription()})()}ngOnDestroy(){this.stateSubscription&&this.stateSubscription.unsubscribe()}setStateSubscription(){this.stateSubscription=this.stateService.getState().subscribe(t=>{t.action&&(this.action=t.action),this.changeDetectorRef.markForCheck()})}selectAction(t){this.select_action.emit(t.target.value)}static{this.\u0275fac=function(r){return new(r||e)(T(_a),T(Cn),T(Jt))}}static{this.\u0275cmp=ut({type:e,selectors:[["comp-action"]],outputs:{select_action:"select_action"},standalone:!0,features:[mt],decls:16,vars:5,consts:[["selectActionElt",""],[1,"input-group"],["for","selectActionElt",1,"input-group-text"],["id","selectActionElt","e2e-id","selectActionElt",1,"form-select","form-control","form-control-sm",3,"change"],["label","rpc"],[3,"value","selected","ngClass",4,"ngFor","ngForOf"],["label","transaction"],[3,"value","selected",4,"ngFor","ngForOf"],["label","utils"],["label","deploy",1,"deprecated"],["label","deploy utils",1,"deprecated"],[3,"value","selected","ngClass"],[3,"value","selected"]],template:function(r,i){if(1&r){const o=Le();O(0,"div",1)(1,"label",2),ie(2,"Action"),x(),O(3,"select",3,0),re("change",function(l){return ge(o),he(i.selectAction(l))}),gt(5,"option"),O(6,"optgroup",4),ae(7,yU,2,6,"option",5),x(),O(8,"optgroup",6),ae(9,bU,2,3,"option",7),x(),O(10,"optgroup",8),ae(11,vU,2,3,"option",7),x(),O(12,"optgroup",9),ae(13,EU,2,6,"option",5),x(),O(14,"optgroup",10),ae(15,SU,2,6,"option",5),x()()()}2&r&&(L(7),R("ngForOf",i.sdk_rpc_methods),L(2),R("ngForOf",i.sdk_transaction_methods),L(2),R("ngForOf",i.sdk_transaction_utils_methods),L(2),R("ngForOf",i.sdk_deploy_methods),L(2),R("ngForOf",i.sdk_deploy_utils_methods))},dependencies:[Ke,cr,ia],styles:["[_nghost-%COMP%] .deprecated[_ngcontent-%COMP%]{font-style:italic;color:#d3d3d3}"],changeDetection:0})}}return e})();const CU=["*"],DU=e=>[e];let hT=(()=>{class e{constructor(t,r){this.stateService=t,this.changeDetectorRef=r,this.submit_action=new Re}ngAfterViewInit(){var t=this;return(0,u.A)(function*(){t.setStateSubscription()})()}ngOnDestroy(){this.stateSubscription&&this.stateSubscription.unsubscribe()}setStateSubscription(){this.stateSubscription=this.stateService.getState().subscribe(t=>{t.action&&(this.action=t.action),this.changeDetectorRef.markForCheck()})}submitAction(t){this.submit_action.emit(t)}static{this.\u0275fac=function(r){return new(r||e)(T(Cn),T(Jt))}}static{this.\u0275cmp=ut({type:e,selectors:[["comp-submit-action"]],inputs:{class:"class",e2e:"e2e"},outputs:{submit_action:"submit_action"},standalone:!0,features:[mt],ngContentSelectors:CU,decls:2,vars:4,consts:[["type","button",1,"btn",3,"click","ngClass"]],template:function(r,i){1&r&&(function s0(e){const n=I()[xe][ct];if(!n.projection){const r=n.projection=function Ua(e,n){const t=[];for(let r=0;r{class e{constructor(t,r,i,o,c,l){this.config=t,this.sdk=r,this.resultService=i,this.formService=o,this.errorService=c,this.stateService=l,this.verbosity=P.WT.High,this.setStateSubscription()}setStateSubscription(){this.stateService.getState().subscribe(t=>{t.chain_name&&(this.chain_name=t.chain_name),t.public_key&&(this.public_key=t.public_key),t.secret_key&&(this.secret_key=t.secret_key),t.deploy_json&&(this.deploy_json=t.deploy_json),t.verbosity&&(this.verbosity=t.verbosity),t.select_dict_identifier&&(this.select_dict_identifier=t.select_dict_identifier)})}get_account(t){var r=this;return(0,u.A)(function*(){let i;if(i=t||r.getIdentifier("accountIdentifier")?.value?.trim(),!i){const c="account_identifier is missing";return void(c&&r.errorService.setError(c.toString()))}const o=r.sdk.get_account_options({account_identifier_as_string:i});if(o){r.getIdentifieBlock(o);try{const c=yield r.sdk.get_account(o);return t||r.resultService.setResult(c.toJson()),c}catch(c){return r.errorService.setError(c.toString()),c}}else{const c="get_account_options is missing";c&&r.errorService.setError(c.toString())}})()}get_deploy(){var t=this;return(0,u.A)(function*(){const r=t.getIdentifier("finalizedApprovals")?.value,i=t.getIdentifier("deployHash")?.value?.trim();if(!i){const c="deploy_hash is missing";return void(c&&t.errorService.setError(c.toString()))}const o=t.sdk.get_deploy_options({deploy_hash_as_string:i});o.finalized_approvals=r;try{const c=yield t.sdk.get_deploy(o);c&&t.resultService.setResult(c.toJson())}catch(c){c&&t.errorService.setError(c.toString())}})()}get_transaction(){var t=this;return(0,u.A)(function*(){const r=t.getIdentifier("finalizedApprovals")?.value,i=t.getIdentifier("transactionHash")?.value?.trim();if(!i){const c="transaction_hash is missing";return void(c&&t.errorService.setError(c.toString()))}const o=t.sdk.get_transaction_options({transaction_hash_as_string:i});o.finalized_approvals=r;try{const c=yield t.sdk.get_transaction(o);c&&t.resultService.setResult(c.toJson())}catch(c){c&&t.errorService.setError(c.toString())}})()}get_entity(t){var r=this;return(0,u.A)(function*(){let i;if(i=t||r.getIdentifier("entityIdentifier")?.value?.trim(),!i){const c="entity_identifier is missing";return void(c&&r.errorService.setError(c.toString()))}const o=r.sdk.get_entity_options({entity_identifier_as_string:i});if(o){r.getIdentifieBlock(o);try{const c=yield r.sdk.get_entity(o);return t||r.resultService.setResult(c.toJson()),c}catch(c){return r.errorService.setError(c.toString()),c}}else{const c="get_entity_options is missing";c&&r.errorService.setError(c.toString())}})()}get_peers(){var t=this;return(0,u.A)(function*(){const r=yield t.sdk.get_binary_peers("localhost:4200/localws");let i;console.log(r);try{const o=yield t.sdk.get_peers();o&&t.resultService.setResult(o.toJson()),o&&(i=o.peers)}catch(o){o&&t.errorService.setError(o.toString())}return i})()}get_node_status(){var t=this;return(0,u.A)(function*(){const r=yield t.sdk.get_node_status();return r&&t.resultService.setResult(r.toJson()),r})()}get_state_root_hash(t){var r=this;return(0,u.A)(function*(){let i="";const o=r.sdk.get_state_root_hash_options({});if(!o){const c="get_state_root_hash options are missing";c&&r.errorService.setError(c.toString())}if(t)i=(yield r.sdk.get_state_root_hash(o)).toString();else{r.getIdentifieBlock(o);const c=yield r.sdk.get_state_root_hash(o);c&&r.resultService.setResult(c.toJson())}return i})()}get_auction_info(){var t=this;return(0,u.A)(function*(){try{const r=t.sdk.get_auction_info_options({});t.getIdentifieBlock(r);const i=yield t.sdk.get_auction_info(r);i&&t.resultService.setResult(i.toJson())}catch(r){r&&t.errorService.setError(r.toString())}})()}get_balance(){var t=this;return(0,u.A)(function*(){const r=t.getIdentifier("purseUref")?.value?.trim(),i=t.getIdentifier("stateRootHash")?.value?.trim();if(r)try{const o=t.sdk.get_balance_options({state_root_hash_as_string:i||"",purse_uref_as_string:r}),c=yield t.sdk.get_balance(o);c&&t.resultService.setResult(c.toJson())}catch(o){o&&t.errorService.setError(o.toString())}else{const o="purse_uref is missing";o&&t.errorService.setError(o.toString())}})()}get_block(){var t=this;return(0,u.A)(function*(){try{const r=t.sdk.get_block_options({});t.getIdentifieBlock(r);const i=yield t.sdk.get_block(r);i&&t.resultService.setResult(i.toJson())}catch(r){r&&t.errorService.setError(r.toString())}})()}get_block_transfers(){var t=this;return(0,u.A)(function*(){try{const r=t.sdk.get_block_transfers_options({});t.getIdentifieBlock(r);const i=yield t.sdk.get_block_transfers(r);i&&t.resultService.setResult(i.toJson())}catch(r){r&&t.errorService.setError(r.toString())}})()}get_chainspec(){var t=this;return(0,u.A)(function*(){try{const r=yield t.sdk.get_chainspec(),i=(0,P.IQ)(r?.chainspec_bytes.chainspec_bytes);i&&t.resultService.setResult(i)}catch(r){r&&t.errorService.setError(r.toString())}})()}get_era_info(){var t=this;return(0,u.A)(function*(){const r=t.sdk.get_era_info_options({});t.getIdentifieBlock(r);try{const i=yield t.sdk.get_era_info(r);i&&t.resultService.setResult(i.toJson())}catch(i){i&&t.errorService.setError(i.toString())}})()}get_era_summary(){var t=this;return(0,u.A)(function*(){const r=t.sdk.get_era_summary_options({});t.getIdentifieBlock(r);try{const i=yield t.sdk.get_era_summary(r);i&&t.resultService.setResult(i.toJson())}catch(i){i&&t.errorService.setError(i.toString())}})()}get_validator_changes(){var t=this;return(0,u.A)(function*(){try{const r=yield t.sdk.get_validator_changes();r&&t.resultService.setResult(r.toJson())}catch(r){r&&t.errorService.setError(r.toString())}})()}list_rpcs(){var t=this;return(0,u.A)(function*(){try{const r=yield t.sdk.list_rpcs();r&&t.resultService.setResult(r.toJson())}catch(r){r&&t.errorService.setError(r.toString())}})()}query_balance(){var t=this;return(0,u.A)(function*(){const r=t.getIdentifier("purseIdentifier")?.value?.trim();if(!r){const o="deploy_hash is missing";return void(o&&t.errorService.setError(o.toString()))}const i=t.sdk.query_balance_options({purse_identifier_as_string:r});t.getGlobalIdentifier(i);try{const o=yield t.sdk.query_balance(i);o&&t.resultService.setResult(o.balance)}catch(o){o&&t.errorService.setError(o.toString())}})()}query_balance_details(){var t=this;return(0,u.A)(function*(){const r=t.getIdentifier("purseIdentifier")?.value?.trim();if(!r){const o="deploy_hash is missing";return void(o&&t.errorService.setError(o.toString()))}const i=t.sdk.query_balance_details_options({purse_identifier_as_string:r});t.getGlobalIdentifier(i);try{const o=yield t.sdk.query_balance_details(i);o&&t.resultService.setResult(o.toJson())}catch(o){o&&t.errorService.setError(o.toString())}})()}query_global_state(){var t=this;return(0,u.A)(function*(){const r=t.getIdentifier("queryPath")?.value?.trim()||"",i=t.getIdentifier("queryKey")?.value?.trim();if(!i){const c="key is missing";return void(c&&t.errorService.setError(c.toString()))}const o=t.sdk.query_global_state_options({key_as_string:i,path_as_string:r});t.getGlobalIdentifier(o);try{const c=yield t.sdk.query_global_state(o);c&&t.resultService.setResult(c.toJson())}catch(c){c&&t.errorService.setError(c.toString())}})()}deploy(t=!0,r,i){var o=this;return(0,u.A)(function*(){const c=(0,P.lg)(),l=o.getIdentifier("TTL")?.value?.trim()||"";if(!t&&!o.public_key)return void o.errorService.setError("public_key is missing".toString());if(t&&!o.secret_key)return void o.errorService.setError("secret_key is missing".toString());const _=new P.Bh(o.chain_name,o.public_key,o.secret_key,c,l),d=new P.q1,p=o.getIdentifier("paymentAmount")?.value?.trim();if(!p){const m="paymentAmount is missing";return void(m&&o.errorService.setError(m.toString()))}d.payment_amount=p;const h=o.get_session_params(i);try{let m;if(m=r?yield o.sdk.speculative_deploy(_,h,d):t?yield o.sdk.deploy(_,h,d):o.sdk.make_deploy(_,h,d),m){const w=m.toJson();o.deploy_json=(0,P.mL)(w,o.verbosity),o.deploy_json&&o.resultService.setResult(w),!t&&o.updateDeployJson(o.deploy_json)}return m}catch(m){return void(m&&o.errorService.setError(m))}})()}transaction(t=!0,r,i){var o=this;return(0,u.A)(function*(){const c=(0,P.lg)(),l=o.getIdentifier("TTL")?.value?.trim()||"",_=o.getIdentifier("gasPriceTolerance")?.value?.trim()||"",d=o.getIdentifier("selectPricingMode")?.value?.trim()||"",p=o.getIdentifier("additionalComputationFactor")?.value?.trim()||"";if(!t&&!o.public_key){const b="public_key is missing";return void(b&&o.errorService.setError(b.toString()))}if(t&&!o.secret_key){const b="secret_key is missing";return void(b&&o.errorService.setError(b.toString()))}const h=o.get_builder_params(i);let m=new P.kD(o.chain_name,o.public_key,o.secret_key,c,l);_&&(m.gas_price_tolerance=_),d&&(m.pricing_mode=d),d==P.MK.Fixed&&(m.additional_computation_factor=p);const w=o.getIdentifier("paymentAmount")?.value?.trim();if(w){m.payment_amount=w,m=o.addTransactionArgs(m);try{let b;if(b=r?yield o.sdk.speculative_transaction(h,m):t?yield o.sdk.transaction(h,m):o.sdk.make_transaction(h,m),b){const E=b.toJson();o.transaction_json=(0,P.mL)(E,o.verbosity),o.transaction_json&&o.resultService.setResult(E),!t&&o.updateTransactionJson(o.transaction_json)}return b}catch(b){return void(b&&o.errorService.setError(b))}}else{const b="paymentAmount is missing";b&&o.errorService.setError(b.toString())}})()}install_deploy(t){var r=this;return(0,u.A)(function*(){const i=r.getIdentifier("paymentAmount")?.value?.trim();if(!i){const _="paymentAmount is missing";return void(_&&r.errorService.setError(_.toString()))}if(!r.secret_key){const _="secret_key is missing";return void(_&&r.errorService.setError(_.toString()))}if(!t?.buffer){const _="wasmBuffer is missing";_&&r.errorService.setError(_.toString())}const c=new P.Bh(r.chain_name,r.public_key,r.secret_key),l=r.get_session_params(t);try{const _=yield r.sdk.install_deploy(c,l,i);_&&r.resultService.setResult(_.toJson())}catch(_){_&&r.errorService.setError(_.toString())}})()}install(t){var r=this;return(0,u.A)(function*(){const i=r.getIdentifier("paymentAmount")?.value?.trim();if(!i){const l="paymentAmount is missing";return void(l&&r.errorService.setError(l.toString()))}if(!r.secret_key){const l="secret_key is missing";return void(l&&r.errorService.setError(l.toString()))}if(!t?.buffer){const l="wasmBuffer is missing";l&&r.errorService.setError(l.toString())}let c=new P.kD(r.chain_name,r.public_key,r.secret_key);c.payment_amount=i,c=r.addTransactionArgs(c);try{const l=t&&(yield r.sdk.install(c,P.Ix.fromUint8Array(t)));l&&r.resultService.setResult(l.toJson())}catch(l){l&&r.errorService.setError(l.toString())}})()}transfer(t=!0,r){var i=this;return(0,u.A)(function*(){const o=(0,P.lg)(),c=i.getIdentifier("TTL")?.value?.trim()||"";if(!t&&!i.public_key)return void i.errorService.setError("public_key is missing".toString());if(t&&!i.secret_key)return void i.errorService.setError("secret_key is missing".toString());const l=new P.Bh(i.chain_name,i.public_key,i.secret_key,o,c),_=new P.q1;_.payment_amount=i.config.standard_payment_amount.toString();const d=i.getIdentifier("transferAmount")?.value?.trim(),p=i.getIdentifier("targetAccount")?.value?.trim();if(d&&p)try{let h;if(h=r?yield i.sdk.speculative_transfer(d,p,void 0,l,_):t?yield i.sdk.transfer(d,p,void 0,l,_):yield i.sdk.make_transfer(d,p,void 0,l,_),h){const m=h.toJson();i.deploy_json=(0,P.mL)(m,i.verbosity),i.deploy_json&&i.resultService.setResult(m),!t&&i.updateDeployJson(i.deploy_json)}return h}catch(h){return void(h&&i.errorService.setError(h))}else{const h="transfer_amount or target_account is missing";h&&i.errorService.setError(h.toString())}})()}transfer_transaction(t=!0,r){var i=this;return(0,u.A)(function*(){const o=(0,P.lg)(),c=i.getIdentifier("TTL")?.value?.trim()||"";if(!t&&!i.public_key)return void i.errorService.setError("public_key is missing".toString());if(t&&!i.secret_key)return void i.errorService.setError("secret_key is missing".toString());const l=new P.kD(i.chain_name,i.public_key,i.secret_key,o,c),_=i.getIdentifier("transferAmount")?.value?.trim(),d=i.getIdentifier("targetAccount")?.value?.trim();if(!_||!d){const h="transfer_amount or target_account is missing";return void(h&&i.errorService.setError(h.toString()))}const p=i.config.standard_payment_amount.toString();l.payment_amount=p;try{let h;if(h=r?yield i.sdk.speculative_transfer_transaction(void 0,d,_,l,void 0):t?yield i.sdk.transfer_transaction(void 0,d,_,l):yield i.sdk.make_transfer_transaction(void 0,d,_,l),h){const m=h.toJson();i.transaction_json=(0,P.mL)(m,i.verbosity),i.transaction_json&&i.resultService.setResult(m),!t&&i.updateTransactionJson(i.transaction_json)}return h}catch(h){return void(h&&i.errorService.setError(h))}})()}put_deploy(){var t=this;return(0,u.A)(function*(){const r=t.getIdentifier("deployJson")?.value?.trim();if(!r){const c="deployJson is missing";return void(c&&t.errorService.setError(c.toString()))}const i=new P.m9(JSON.parse(r)),o=yield t.sdk.put_deploy(i);return o&&t.resultService.setResult(o.toJson()),o})()}put_transaction(){var t=this;return(0,u.A)(function*(){const r=t.getIdentifier("transactionJson")?.value?.trim();if(!r){const c="deployJson is missing";return void(c&&t.errorService.setError(c.toString()))}const i=new P.ZX(JSON.parse(r)),o=yield t.sdk.put_transaction(i);return o&&t.resultService.setResult(o.toJson()),o})()}speculative_exec_deploy(){var t=this;return(0,u.A)(function*(){const r=t.getIdentifier("deployJson")?.value?.trim();if(!r){const l="signed_deploy is missing";return void(l&&t.errorService.setError(l.toString()))}const i=new P.m9(JSON.parse(r)),o=t.sdk.get_speculative_exec_deploy_options({deploy:i.toJson()}),c=yield t.sdk.speculative_exec_deploy(o);return c&&t.resultService.setResult(c.toJson()),c})()}speculative_exec(){var t=this;return(0,u.A)(function*(){const r=t.getIdentifier("transactionJson")?.value?.trim();if(!r){const l="signed_transaction is missing";return void(l&&t.errorService.setError(l.toString()))}const i=new P.ZX(JSON.parse(r)),o=t.sdk.get_speculative_exec_options({transaction:i.toJson()}),c=yield t.sdk.speculative_exec(o);return c&&t.resultService.setResult(c.toJson()),c})()}sign_deploy(){var t=this;return(0,u.A)(function*(){if(!t.secret_key){const o="secret_key is missing";return void(o&&t.errorService.setError(o.toString()))}const r=t.getIdentifier("deployJson")?.value?.trim();if(!r){const o="signed_deploy is missing";return void(o&&t.errorService.setError(o.toString()))}let i;try{i=new P.m9(JSON.parse(r))}catch{const o="Error parsing deploy";return void(o&&t.errorService.setError(o.toString()))}if(i)i=i.sign(t.secret_key),t.deploy_json=(0,P.mL)(i.toJson(),t.verbosity),t.getIdentifier("deployJson")?.setValue(t.deploy_json),t.updateDeployJson(t.deploy_json);else{const o="signed_deploy is missing";o&&t.errorService.setError(o.toString())}})()}sign_transaction(){var t=this;return(0,u.A)(function*(){if(!t.secret_key){const o="secret_key is missing";return void(o&&t.errorService.setError(o.toString()))}const r=t.getIdentifier("transactionJson")?.value?.trim();if(!r){const o="signed_transaction is missing";return void(o&&t.errorService.setError(o.toString()))}let i;try{i=new P.ZX(JSON.parse(r))}catch{const o="Error parsing transaction";return void(o&&t.errorService.setError(o.toString()))}if(i)i=i.sign(t.secret_key),t.transaction_json=(0,P.mL)(i.toJson(),t.verbosity),t.getIdentifier("transactionJson")?.setValue(t.transaction_json),t.updateTransactionJson(t.transaction_json);else{const o="signed_transaction is missing";o&&t.errorService.setError(o.toString())}})()}wallet_sign_deploy(){var t=this;return(0,u.A)(function*(){const r=t.getIdentifier("deployJson")?.value?.trim();if(!r)return void t.errorService.setError("deploy_to_sign is missing".toString());let i;try{i=new P.m9(JSON.parse(r))}catch(o){return void(o&&t.errorService.setError(o))}try{i=yield(new P._e).signDeploy(i,t.public_key)}catch(o){return void(o&&t.errorService.setError(o))}t.deploy_json=(0,P.mL)(i.toJson(),t.verbosity),t.getIdentifier("deployJson")?.setValue(t.deploy_json),t.updateDeployJson(t.deploy_json)})()}wallet_sign_transaction(){var t=this;return(0,u.A)(function*(){const r=t.getIdentifier("transactionJson")?.value?.trim();if(!r)return void t.errorService.setError("transaction_to_sign is missing".toString());let i;try{i=new P.ZX(JSON.parse(r))}catch(o){return void(o&&t.errorService.setError(o))}try{i=yield(new P._e).signTransaction(i,t.public_key)}catch(o){return void(o&&t.errorService.setError(o))}t.transaction_json=(0,P.mL)(i.toJson(),t.verbosity),t.getIdentifier("transactionJson")?.setValue(t.transaction_json),t.updateTransactionJson(t.transaction_json)})()}updateDeployJson(t){t&&this.stateService.setState({deploy_json:t})}updateTransactionJson(t){t&&this.stateService.setState({transaction_json:t})}make_deploy(t){var r=this;return(0,u.A)(function*(){yield r.deploy(!1,!1,t)})()}make_transaction(t){var r=this;return(0,u.A)(function*(){yield r.transaction(!1,!1,t)})()}make_transfer(){var t=this;return(0,u.A)(function*(){yield t.transfer(!1)})()}make_transfer_transaction(){var t=this;return(0,u.A)(function*(){yield t.transfer_transaction(!1)})()}speculative_transfer(){var t=this;return(0,u.A)(function*(){yield t.transfer(!1,!0)})()}speculative_transfer_transaction(){var t=this;return(0,u.A)(function*(){yield t.transfer(!1,!0)})()}speculative_deploy(t){var r=this;return(0,u.A)(function*(){yield r.deploy(!1,!0,t)})()}speculative_transaction(t){var r=this;return(0,u.A)(function*(){yield r.transaction(!1,!0,t)})()}call_entrypoint_deploy(){var t=this;return(0,u.A)(function*(){if(!t.secret_key){const c="secret_key is missing";return void(c&&t.errorService.setError(c.toString()))}const r=new P.Bh(t.chain_name,t.public_key,t.secret_key),i=t.get_session_params(),o=t.getIdentifier("paymentAmount")?.value?.trim();if(o)try{const c=yield t.sdk.call_entrypoint_deploy(r,i,o);c&&t.resultService.setResult(c.toJson())}catch(c){c&&t.errorService.setError(c.toString())}else{const c="paymentAmount is missing";c&&t.errorService.setError(c.toString())}})()}call_entrypoint(){var t=this;return(0,u.A)(function*(){if(!t.secret_key){const c="secret_key is missing";return void(c&&t.errorService.setError(c.toString()))}let r=new P.kD(t.chain_name,t.public_key,t.secret_key);const i=t.getIdentifier("paymentAmount")?.value?.trim();if(!i){const c="paymentAmount is missing";return void(c&&t.errorService.setError(c.toString()))}r.payment_amount=i,r=t.addTransactionArgs(r);const o=t.get_builder_params();try{const c=yield t.sdk.call_entrypoint(o,r);c&&t.resultService.setResult(c.toJson())}catch(c){c&&t.errorService.setError(c.toString())}})()}query_contract_dict(){var t=this;return(0,u.A)(function*(){const r=t.getIdentifier("stateRootHash")?.value?.trim(),i=t.getIdentifier("itemKey")?.value?.trim();if(!i){const d="itemKey is missing";return void(d&&t.errorService.setError(d.toString()))}const o=t.getIdentifier("seedEntityHash")?.value?.trim()||"",c=t.getIdentifier("seedName")?.value?.trim();if(!c){const d="seedName is missing";return void(d&&t.errorService.setError(d.toString()))}let l;if(o&&(l=new P.NX,l.setEntityNamedKey(o,c,i)),!l){const d="dictionary_item_params is missing";return void(d&&t.errorService.setError(d.toString()))}const _=t.sdk.query_contract_dict_options({state_root_hash_as_string:r||""});_.dictionary_item_params=l;try{const d=yield t.sdk.query_contract_dict(_);d&&t.resultService.setResult(d.toJson())}catch(d){d&&t.errorService.setError(d.toString())}})()}query_contract_key(){var t=this;return(0,u.A)(function*(){const r=t.getIdentifier("queryKey")?.value?.trim();if(!r){const c="key is missing";return void(c&&t.errorService.setError(c.toString()))}const i=t.getIdentifier("queryPath")?.value?.toString().trim().replace(/^\/+|\/+$/g,""),o=t.sdk.query_contract_key_options({entity_identifier_as_string:r,path_as_string:i});t.getIdentifieBlock(o);try{const c=yield t.sdk.query_contract_key(o);c&&t.resultService.setResult(c.toJson())}catch(c){c&&t.errorService.setError(c.toString())}})()}get_dictionary_item(){var t=this;return(0,u.A)(function*(){const r=t.getIdentifier("stateRootHash")?.value?.trim(),i=t.getIdentifier("itemKey")?.value?.trim(),o=t.getIdentifier("seedKey")?.value?.trim();if(!i&&!o){const d="seedKey or itemKey is missing";return void(d&&t.errorService.setError(d.toString()))}const c=t.getIdentifier("seedUref")?.value?.trim();let l;if(c&&"newFromSeedUref"===t.select_dict_identifier)l=P.bL.newFromSeedUref(c,i);else if(o&&"newFromDictionaryKey"===t.select_dict_identifier)l=P.bL.newFromDictionaryKey(o);else{const d=t.getIdentifier("seedContractHash")?.value?.trim(),p=t.getIdentifier("seedEntityHash")?.value?.trim(),h=t.getIdentifier("seedAccountHash")?.value?.trim(),m=t.getIdentifier("seedName")?.value?.trim();if(!m){const w="seed_name is missing";return void(w&&t.errorService.setError(w.toString()))}d&&"newFromContractInfo"===t.select_dict_identifier&&(l=P.bL.newFromContractInfo(d,m,i)),p&&"newFromEntityInfo"===t.select_dict_identifier?l=P.bL.newFromEntityInfo(p,m,i):h&&"newFromAccountInfo"===t.select_dict_identifier&&(l=P.bL.newFromAccountInfo(h,m,i))}if(!l){const d="dictionary_item_identifier is missing";return void(d&&t.errorService.setError(d.toString()))}const _=t.sdk.get_dictionary_item_options({state_root_hash_as_string:r||""});_.dictionary_item_identifier=l;try{const d=yield t.sdk.state_get_dictionary_item(_);d&&t.resultService.setResult(d.toJson())}catch(d){d&&t.errorService.setError(d.toString())}})()}getIdentifier(t){return this.formService.form.get(t)}getIdentifieBlock(t){const r=this.getIdentifier("blockIdentifierHeight")?.value?.trim(),i=this.getIdentifier("blockIdentifierHash")?.value?.trim();if(i)t.maybe_block_id_as_string=i,t.maybe_block_identifier=void 0;else if(r){const o=P.z$.fromHeight(BigInt(r));t.maybe_block_id_as_string=void 0,t.maybe_block_identifier=o}else t.maybe_block_id_as_string=void 0,t.maybe_block_identifier=void 0}getGlobalIdentifier(t){const r=this.getIdentifier("stateRootHash")?.value?.trim();let i;if(r)i=P.eg.fromStateRootHash(new P.np(r));else{const o=this.getIdentifier("blockIdentifierHeight")?.value?.trim(),c=this.getIdentifier("blockIdentifierHash")?.value?.trim();c?i=P.eg.fromBlockHash(new P.Iy(c)):o&&(i=P.eg.fromBlockHeight(BigInt(o)))}i&&(t.global_state_identifier=i)}get_session_params(t){const r=new P.Qt,i=this.getIdentifier("entryPoint")?.value?.trim();i&&(r.session_entry_point=i);const o=this.getIdentifier("argsSimple")?.value?.trim().split(",").map(h=>h.trim()).filter(h=>""!==h),c=this.getIdentifier("argsJson")?.value?.trim();o?.length?r.session_args_simple=o:c&&(r.session_args_json=c);const l=this.getIdentifier("callPackage")?.value,_=this.getIdentifier("sessionHash")?.value?.trim(),d=this.getIdentifier("sessionName")?.value?.trim();l?_?r.session_package_hash=_:d&&(r.session_package_name=d):_?r.session_hash=_:d&&(r.session_name=d),t&&(r.session_bytes=P.Ix.fromUint8Array(t));const p=this.getIdentifier("version")?.value?.trim();return p&&(r.session_version=p),r}get_builder_params(t){let r=new P.C_;const i=this.getIdentifier("entityHash")?.value?.trim(),o=this.getIdentifier("entityAlias")?.value?.trim(),c=this.getIdentifier("entryPoint")?.value?.trim();if(this.getIdentifier("callPackage")?.value){const _=this.getIdentifier("version")?.value?.trim();if(o)r=P.C_.newPackageAlias(o,c,_);else{let d=null;try{d=P.Vt.fromFormattedStr(i)}catch{try{d=new P.Vt(i)}catch{return this.errorService.setError("package_hash could not be parsed".toString()),r}}d&&(r=P.C_.newPackage(d,c,_))}}else if(o)r=P.C_.newInvocableEntityAlias(o,c);else if(i){let _=null,d=null;try{_=P.xM.fromFormattedStr(i),d=new P.Ep(_.toHexString())}catch{try{d=new P.Ep(i)}catch{return this.errorService.setError("entity_hash could not be parsed".toString()),r}}d&&(r=P.C_.newInvocableEntity(d,c))}if(t){const _="true"===this.getIdentifier("selectTransactionCategory")?.value?.trim();r=P.C_.newSession(P.Ix.fromUint8Array(t),_)}return r}addTransactionArgs(t){const r=this.getIdentifier("argsSimple")?.value?.trim().split(",").map(o=>o.trim()).filter(o=>""!==o),i=this.getIdentifier("argsJson")?.value?.trim();return r?.length?t.session_args_simple=r:i&&(t.session_args_json=i),t}static{this.\u0275fac=function(r){return new(r||e)(U(lr),U(_a),U(wu),U(Li),U(Ia),U(Cn))}}static{this.\u0275prov=Z({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();const TU=["publicKeyElt"],IU=e=>[e];let wT=(()=>{class e{constructor(t,r,i,o,c,l){this.config=t,this.stateService=r,this.clientService=i,this.storageService=o,this.changeDetectorRef=c,this.formService=l}ngAfterViewInit(){var t=this;return(0,u.A)(function*(){t.setStateSubscription(),t.public_key=t.storageService.get("public_key")||t.public_key,t.public_key&&(yield t.updateAccount(),t.stateService.setState({public_key:t.public_key}))})()}ngOnDestroy(){this.stateSubscription&&this.stateSubscription.unsubscribe()}setStateSubscription(){var t=this;this.stateSubscription=this.stateService.getState().subscribe(function(){var r=(0,u.A)(function*(i){i.action&&(t.action=i.action),i.public_key&&t.public_key!=i.public_key?(i.public_key&&(t.public_key=i.public_key),i.secret_key&&(t.secret_key=i.secret_key),yield t.updateAccount()):i.public_key&&i.public_key&&(t.public_key=i.public_key),t.changeDetectorRef.markForCheck()});return function(i){return r.apply(this,arguments)}}())}onPublicKeyChange(){var t=this;return(0,u.A)(function*(){const r=t.publicKeyElt&&t.publicKeyElt.nativeElement.value.toString().trim();t.public_key="",t.stateService.setState({public_key:r,secret_key:""}),t.storageService.setState({public_key:r})})()}isInvalid(){return!(this.config.action_needs_public_key&&!this.config.action_needs_public_key?.includes(this.action)||this.publicKeyElt?.nativeElement.value?.trim())}updateAccount(){var t=this;return(0,u.A)(function*(){const r=yield t.clientService.get_entity(t.public_key);if(!r.entity_result)return;const i=r?.entity_result?.AddressableEntity?.entity.entity_kind.Account,o=r?.entity_result?.AddressableEntity?.entity.main_purse;t.stateService.setState({account_hash:i,main_purse:o}),t.storageService.setState({account_hash:i,main_purse:o}),i&&t.formService.updateForm()})()}static{this.\u0275fac=function(r){return new(r||e)(T(lr),T(Cn),T(mT),T(Ta),T(Jt),T(Li))}}static{this.\u0275cmp=ut({type:e,selectors:[["comp-public-key"]],viewQuery:function(r,i){if(1&r&&Tt(TU,5),2&r){let o;It(o=Mt())&&(i.publicKeyElt=o.first)}},standalone:!0,features:[mt],decls:7,vars:4,consts:[["publicKeyElt",""],["for","publicKeyElt",1,"input-group-text"],[1,"d-none","d-md-inline","d-lg-none"],[1,"d-md-none","d-lg-inline"],["type","search","name","public_key","placeholder","e.g. 0x","id","publicKeyElt","e2e-id","publicKeyElt",1,"form-control","form-control-xs",3,"input","value","ngClass"]],template:function(r,i){if(1&r){const o=Le();O(0,"label",1)(1,"span",2),ie(2,"Pub. Key"),x(),O(3,"span",3),ie(4,"Public Key"),x()(),O(5,"input",4,0),re("input",function(){return ge(o),he(i.onPublicKeyChange())}),x()}2&r&&(L(5),R("value",i.public_key||"")("ngClass",yn(2,IU,i.isInvalid()?"is-invalid":"")))},dependencies:[Ke,cr],changeDetection:0})}}return e})();const MU=["secretKeyElt"],NU=e=>[e];function AU(e,n){if(1&e){const t=Le();O(0,"button",4),re("click",function(){return ge(t),he(H().onSecretKeyClick())}),ie(1," Load Secret Key\n"),x()}if(2&e){const t=H();R("ngClass",yn(1,NU,t.isInvalid()?"btn-warning":"btn-secondary"))}}function kU(e,n){if(1&e){const t=Le();O(0,"button",5),re("click",function(){return ge(t),he(H().onSecretKeyClick())}),ie(1," Secret Key Loaded\n"),x()}}let yT=(()=>{class e{constructor(t,r,i,o,c){this.config=t,this.stateService=r,this.errorService=i,this.storageService=o,this.changeDetectorRef=c}ngAfterViewInit(){var t=this;return(0,u.A)(function*(){t.setStateSubscription()})()}ngOnDestroy(){this.stateSubscription&&this.stateSubscription.unsubscribe()}setStateSubscription(){var t=this;this.stateSubscription=this.stateService.getState().subscribe(function(){var r=(0,u.A)(function*(i){i.action&&(t.action=i.action),t.changeDetectorRef.markForCheck()});return function(i){return r.apply(this,arguments)}}())}onSecretKeyClick(){this.secretKeyElt.nativeElement.click()}onPemSelected(t){var r=this;return(0,u.A)(function*(){const i=t.target.files?.item(0);let o="";if(i){let c=yield i.text();if(!c.trim())return;c=c.trim(),r.errorService.setError("");try{o=(0,P.kw)(c)}catch(l){r.errorService.setError(l)}o&&(r.secret_key=c)}else r.secret_key="";r.stateService.setState({public_key:o,secret_key:r.secret_key}),r.storageService.setState({public_key:o}),r.secretKeyElt.nativeElement.value="",r.changeDetectorRef.markForCheck()})()}isInvalid(){return!(this.config.action_needs_secret_key&&!this.config.action_needs_secret_key?.includes(this.action)||this.secret_key)}static{this.\u0275fac=function(r){return new(r||e)(T(lr),T(Cn),T(Ia),T(Ta),T(Jt))}}static{this.\u0275cmp=ut({type:e,selectors:[["comp-secret-key"]],viewQuery:function(r,i){if(1&r&&Tt(MU,5),2&r){let o;It(o=Mt())&&(i.secretKeyElt=o.first)}},standalone:!0,features:[mt],decls:4,vars:2,consts:[["secretKeyElt",""],["name","secret_key","type","file","id","secretKeyElt","accept",".pem","e2e-id","secretKeyElt",1,"visually-hidden",3,"change"],["class","btn",3,"ngClass","click",4,"ngIf"],["class","btn btn-light",3,"click",4,"ngIf"],[1,"btn",3,"click","ngClass"],[1,"btn","btn-light",3,"click"]],template:function(r,i){if(1&r){const o=Le();O(0,"input",1,0),re("change",function(l){return ge(o),he(i.onPemSelected(l))}),x(),ae(2,AU,2,3,"button",2)(3,kU,2,0,"button",3)}2&r&&(L(2),R("ngIf",!i.secret_key),L(),R("ngIf",i.secret_key))},dependencies:[Ke,cr,an],changeDetection:0})}}return e})();const FU=["selectDictIdentifierElt"],Dg=()=>["sign_deploy","sign_transaction"];function RU(e,n){if(1&e){const t=Le();O(0,"comp-submit-action",12),re("submit_action",function(i){return ge(t),he(H().submitAction(i))}),ie(1,"Go"),x()}2&e&&(al("btn-success ms-1 ms-sm-2 ms-xl-3"),R("e2e","submit"))}function OU(e,n){if(1&e){const t=Le();O(0,"comp-submit-action",12),re("submit_action",function(i){return ge(t),he(H().submitAction(i))}),ie(1,"Sign "),x()}2&e&&(al("btn-warning mt-3"),R("e2e","sign"))}function xU(e,n){if(1&e){const t=Le();O(0,"button",13),re("click",function(i){ge(t);const o=H();return he(o.walletSign(i,o.action))}),ie(1," Casper Wallet Sign "),x()}2&e&&(al("btn-warning mt-3 ms-3"),Ct("e2e","wallet_sign"))}let LU=(()=>{class e{constructor(t,r,i,o,c,l,_,d,p){this.sdk=t,this.config=r,this.env=i,this.clientService=o,this.resultService=c,this.stateService=l,this.formService=_,this.errorService=d,this.storageService=p,this.form=this.formService.form}ngOnInit(){var t=this;return(0,u.A)(function*(){console.info(t.sdk)})()}ngOnDestroy(){this.stateSubscription&&this.stateSubscription.unsubscribe()}setStateSubscription(){this.stateSubscription=this.stateService.getState().subscribe(t=>{t.action&&(this.action=t.action)})}ngAfterViewInit(){var t=this;return(0,u.A)(function*(){const i=t.storageService.get("action")||t.config.default_action.toString();try{i==t.config.default_action.toString()&&(yield t.handleAction(i,!0)),yield t.get_state_root_hash(!0)}catch(o){console.error(o),t.errorService.setError(o)}t.stateService.setState({action:i}),t.setStateSubscription()})()}selectAction(t){var r=this;return(0,u.A)(function*(){yield r.cleanResult(),r.stateService.setState({action:t}),yield r.handleAction(t),r.storageService.setState({action:t})})()}submitAction(t){var r=this;return(0,u.A)(function*(){yield r.cleanResult(),(r.form.disabled||r.form.valid)&&(yield r.handleAction(t,!0))})()}walletSign(t,r){var i=this;return(0,u.A)(function*(){i.clientService.wallet_sign_deploy()})()}handleAction(t,r){var i=this;return(0,u.A)(function*(){const o=i[t];if(o&&"function"==typeof o){if(r)try{yield o.bind(i)()}catch(c){i.errorService.setError(c)}}else{const c=`Method ${t} is not defined on the component.`;console.error(c),i.errorService.setError(c)}})()}onWasmSelected(t){var r=this;return(0,u.A)(function*(){t&&(r.wasm=t)})()}cleanResult(){var t=this;return(0,u.A)(function*(){t.errorService.setError(""),yield t.resultService.setResult("")})()}call_entrypoint_deploy(){var t=this;return(0,u.A)(function*(){return yield t.clientService.call_entrypoint_deploy()})()}call_entrypoint(){var t=this;return(0,u.A)(function*(){return yield t.clientService.call_entrypoint()})()}deploy(t=!0,r){var i=this;return(0,u.A)(function*(){return yield i.clientService.deploy(t,r,i.wasm)})()}transaction(t=!0,r){var i=this;return(0,u.A)(function*(){return yield i.clientService.transaction(t,r,i.wasm)})()}get_account(t){var r=this;return(0,u.A)(function*(){return yield r.clientService.get_account(t)})()}get_auction_info(){var t=this;return(0,u.A)(function*(){return yield t.clientService.get_auction_info()})()}get_balance(){var t=this;return(0,u.A)(function*(){return yield t.clientService.get_balance()})()}get_block(){var t=this;return(0,u.A)(function*(){return yield t.clientService.get_block()})()}get_block_transfers(){var t=this;return(0,u.A)(function*(){return yield t.clientService.get_block_transfers()})()}get_chainspec(){var t=this;return(0,u.A)(function*(){return yield t.clientService.get_chainspec()})()}get_deploy(){var t=this;return(0,u.A)(function*(){return yield t.clientService.get_deploy()})()}get_transaction(){var t=this;return(0,u.A)(function*(){return yield t.clientService.get_transaction()})()}get_dictionary_item(){var t=this;return(0,u.A)(function*(){return yield t.clientService.get_dictionary_item()})()}get_entity(t){var r=this;return(0,u.A)(function*(){return yield r.clientService.get_entity(t)})()}get_era_info(){var t=this;return(0,u.A)(function*(){return yield t.clientService.get_era_info()})()}get_era_summary(){var t=this;return(0,u.A)(function*(){return yield t.clientService.get_era_summary()})()}get_node_status(){var t=this;return(0,u.A)(function*(){return yield t.clientService.get_node_status()})()}get_peers(){var t=this;return(0,u.A)(function*(){return t.peers=yield t.clientService.get_peers(),t.peers})()}get_state_root_hash(t){var r=this;return(0,u.A)(function*(){const i=yield r.clientService.get_state_root_hash(t);return r.stateService.setState({state_root_hash:i}),i})()}get_validator_changes(){var t=this;return(0,u.A)(function*(){return yield t.clientService.get_validator_changes()})()}install_deploy(){var t=this;return(0,u.A)(function*(){return yield t.clientService.install_deploy(t.wasm)})()}install(){var t=this;return(0,u.A)(function*(){return yield t.clientService.install(t.wasm)})()}list_rpcs(){var t=this;return(0,u.A)(function*(){return yield t.clientService.list_rpcs()})()}make_deploy(){var t=this;return(0,u.A)(function*(){return yield t.clientService.make_deploy(t.wasm)})()}make_transaction(){var t=this;return(0,u.A)(function*(){return yield t.clientService.make_transaction(t.wasm)})()}make_transfer(){var t=this;return(0,u.A)(function*(){return yield t.clientService.make_transfer()})()}make_transfer_transaction(){var t=this;return(0,u.A)(function*(){return yield t.clientService.make_transfer_transaction()})()}put_deploy(){var t=this;return(0,u.A)(function*(){return yield t.clientService.put_deploy()})()}put_transaction(){var t=this;return(0,u.A)(function*(){return yield t.clientService.put_transaction()})()}query_balance(){var t=this;return(0,u.A)(function*(){return yield t.clientService.query_balance()})()}query_balance_details(){var t=this;return(0,u.A)(function*(){return yield t.clientService.query_balance_details()})()}query_contract_dict(){var t=this;return(0,u.A)(function*(){return yield t.clientService.query_contract_dict()})()}query_contract_key(){var t=this;return(0,u.A)(function*(){return yield t.clientService.query_contract_key()})()}query_global_state(){var t=this;return(0,u.A)(function*(){return yield t.clientService.query_global_state()})()}sign_deploy(){var t=this;return(0,u.A)(function*(){return yield t.clientService.sign_deploy()})()}sign_transaction(){var t=this;return(0,u.A)(function*(){return yield t.clientService.sign_transaction()})()}speculative_deploy(){var t=this;return(0,u.A)(function*(){return yield t.clientService.speculative_deploy(t.wasm)})()}speculative_transaction(){var t=this;return(0,u.A)(function*(){return yield t.clientService.speculative_transaction(t.wasm)})()}speculative_exec_deploy(){var t=this;return(0,u.A)(function*(){return yield t.clientService.speculative_exec_deploy()})()}speculative_exec(){var t=this;return(0,u.A)(function*(){return yield t.clientService.speculative_exec()})()}speculative_transfer(){var t=this;return(0,u.A)(function*(){return yield t.clientService.speculative_transfer()})()}speculative_transfer_transaction(){var t=this;return(0,u.A)(function*(){return yield t.clientService.speculative_transfer_transaction()})()}transfer(t=!0,r){var i=this;return(0,u.A)(function*(){return yield i.clientService.transfer(t,r)})()}transfer_transaction(t=!0,r){var i=this;return(0,u.A)(function*(){return yield i.clientService.transfer_transaction(t,r)})()}static{this.\u0275fac=function(r){return new(r||e)(T(_a),T(lr),T(Gp),T(mT),T(wu),T(Cn),T(Li),T(Ia),T(Ta))}}static{this.\u0275cmp=ut({type:e,selectors:[["app-root"]],viewQuery:function(r,i){if(1&r&&Tt(FU,5),2&r){let o;It(o=Mt())&&(i.selectDictIdentifierElt=o.first)}},standalone:!0,features:[mt],decls:16,vars:8,consts:[[1,"container"],[3,"peers"],[3,"get_state_root_hash_output"],[1,"row","flex-column-reverse","flex-column-reverse","flex-md-row"],[1,"col-12","col-md-6","col-lg-5","my-1","my-md-0","d-flex","justify-content-between"],[1,"w-100",3,"select_action"],[3,"class","e2e","submit_action",4,"ngIf"],[1,"col-12","col-md-6","col-lg-7","my-1","my-md-0","d-flex","justify-content-end","ps-md-0"],[1,"input-group"],[1,"d-flex","justify-content-end","ms-1","ms-sm-2","ms-xl-3"],[3,"wasm_selected","form"],["type","button","class","btn",3,"class","click",4,"ngIf"],[3,"submit_action","e2e"],["type","button",1,"btn",3,"click"]],template:function(r,i){1&r&&(O(0,"main",0),gt(1,"comp-header",1),O(2,"comp-status",2),re("get_state_root_hash_output",function(c){return i.get_state_root_hash(c)}),x(),O(3,"div",3)(4,"div",4)(5,"comp-action",5),re("select_action",function(c){return i.selectAction(c)}),x(),ae(6,RU,2,3,"comp-submit-action",6),x(),O(7,"div",7),gt(8,"comp-public-key",8),O(9,"div",9),gt(10,"comp-secret-key"),x()()(),gt(11,"comp-error"),O(12,"comp-form",10),re("wasm_selected",function(c){return i.onWasmSelected(c)}),x(),ae(13,OU,2,3,"comp-submit-action",6)(14,xU,2,3,"button",11),gt(15,"comp-result"),x()),2&r&&(L(),R("peers",i.peers),L(5),R("ngIf",!gl(5,Dg).includes(i.action)),L(6),R("form",i.form),L(),R("ngIf",gl(6,Dg).includes(i.action)),L(),R("ngIf",gl(7,Dg).includes(i.action)))},dependencies:[Ke,an,Ds,oT,uT,dT,fT,pT,gT,hT,wT,yT],changeDetection:0})}}return e})(),yu=Object.entries(En.networks).map(([e,n])=>({name:e,...n}));qp.production&&(yu=yu.filter(e=>"dev"!==e.name)),En.networks=yu,En.network=yu.find(e=>e.name==qp.default_network.toString()),function dB(e,n){return XP({rootComponent:e,...kC(n)})}(LU,{providers:[{provide:Gp,useValue:qp},{provide:lr,useValue:En},{provide:OC,useValue:En.wasm_asset_path},{provide:xC,useValue:En.network?.rpc_address},{provide:LC,useValue:P.WT[En.verbosity]},Mh([Wj,DB,iU])]}).then(()=>{}).catch(()=>{})},7278:f=>{var s=0;function a(g,y){var v=y.data;if(Array.isArray(v)&&!(v.length<2)){var S=v[0],A=v[1],M=v[2],B=g._callbacks[S];B&&(delete g._callbacks[S],B(A,M))}}function u(g){var y=this;y._worker=g,y._callbacks={},g.addEventListener("message",function(v){a(y,v)})}u.prototype.postMessage=function(g){var y=this,v=s++,S=[v,g];return new Promise(function(A,M){if(y._callbacks[v]=function(X,de){if(X)return M(new Error(X.message));A(de)},typeof y._worker.controller<"u"){var B=new MessageChannel;B.port1.onmessage=function(X){a(y,X)},y._worker.controller.postMessage(S,[B.port2])}else y._worker.postMessage(S)})},f.exports=u},8825:(__unused_webpack___webpack_module__,__webpack_exports__,__webpack_require__)=>{__webpack_require__.d(__webpack_exports__,{Ay:()=>__WEBPACK_DEFAULT_EXPORT__,Bh:()=>DeployStrParams,C_:()=>TransactionBuilderParams,Ep:()=>AddressableEntityHash,IQ:()=>hexToString,Ix:()=>Bytes,Iy:()=>BlockHash,MK:()=>PricingMode,NX:()=>DictionaryItemStrParams,Qt:()=>SessionStrParams,S3:()=>motesToCSPR,Vt:()=>PackageHash,WT:()=>Verbosity,ZX:()=>Transaction,_e:()=>CasperWallet,bL:()=>DictionaryItemIdentifier,eg:()=>GlobalStateIdentifier,hp:()=>SDK,kD:()=>TransactionStrParams,kw:()=>publicKeyFromSecretKey,lg:()=>getTimestamp,m9:()=>Deploy,mL:()=>jsonPrettyPrint,np:()=>Digest,q1:()=>PaymentStrParams,xM:()=>EntityAddr,z$:()=>BlockIdentifier});var _opt2_casper_rustSDK_examples_frontend_angular_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(467);let wasm;const cachedTextDecoder=typeof TextDecoder<"u"?new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}):{decode:()=>{throw Error("TextDecoder not available")}};typeof TextDecoder<"u"&&cachedTextDecoder.decode();let cachedUint8ArrayMemory0=null;function getUint8ArrayMemory0(){return(null===cachedUint8ArrayMemory0||0===cachedUint8ArrayMemory0.byteLength)&&(cachedUint8ArrayMemory0=new Uint8Array(wasm.memory.buffer)),cachedUint8ArrayMemory0}function getStringFromWasm0(f,s){return f>>>=0,cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(f,f+s))}let WASM_VECTOR_LEN=0;const cachedTextEncoder=typeof TextEncoder<"u"?new TextEncoder("utf-8"):{encode:()=>{throw Error("TextEncoder not available")}},encodeString="function"==typeof cachedTextEncoder.encodeInto?function(f,s){return cachedTextEncoder.encodeInto(f,s)}:function(f,s){const a=cachedTextEncoder.encode(f);return s.set(a),{read:f.length,written:a.length}};function passStringToWasm0(f,s,a){if(void 0===a){const S=cachedTextEncoder.encode(f),A=s(S.length,1)>>>0;return getUint8ArrayMemory0().subarray(A,A+S.length).set(S),WASM_VECTOR_LEN=S.length,A}let u=f.length,g=s(u,1)>>>0;const y=getUint8ArrayMemory0();let v=0;for(;v127)break;y[g+v]=S}if(v!==u){0!==v&&(f=f.slice(v)),g=a(g,u,u=v+3*f.length,1)>>>0;const S=getUint8ArrayMemory0().subarray(g+v,g+u);v+=encodeString(f,S).written,g=a(g,u,v,1)>>>0}return WASM_VECTOR_LEN=v,g}function isLikeNone(f){return null==f}let cachedDataViewMemory0=null;function getDataViewMemory0(){return(null===cachedDataViewMemory0||!0===cachedDataViewMemory0.buffer.detached||void 0===cachedDataViewMemory0.buffer.detached&&cachedDataViewMemory0.buffer!==wasm.memory.buffer)&&(cachedDataViewMemory0=new DataView(wasm.memory.buffer)),cachedDataViewMemory0}function debugString(f){const s=typeof f;if("number"==s||"boolean"==s||null==f)return`${f}`;if("string"==s)return`"${f}"`;if("symbol"==s){const g=f.description;return null==g?"Symbol":`Symbol(${g})`}if("function"==s){const g=f.name;return"string"==typeof g&&g.length>0?`Function(${g})`:"Function"}if(Array.isArray(f)){const g=f.length;let y="[";g>0&&(y+=debugString(f[0]));for(let v=1;v1))return toString.call(f);if(u=a[1],"Object"==u)try{return"Object("+JSON.stringify(f)+")"}catch{return"Object"}return f instanceof Error?`${f.name}: ${f.message}\n${f.stack}`:u}const CLOSURE_DTORS=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>{wasm.__wbindgen_export_3.get(f.dtor)(f.a,f.b)});function makeMutClosure(f,s,a,u){const g={a:f,b:s,cnt:1,dtor:a},y=(...v)=>{g.cnt++;const S=g.a;g.a=0;try{return u(S,g.b,...v)}finally{0==--g.cnt?(wasm.__wbindgen_export_3.get(g.dtor)(S,g.b),CLOSURE_DTORS.unregister(g)):g.a=S}};return y.original=g,CLOSURE_DTORS.register(y,g,g),y}function __wbg_adapter_38(f,s,a){wasm.closure937_externref_shim(f,s,a)}function __wbg_adapter_43(f,s){wasm._dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h6b87dddcaa71d61d(f,s)}function __wbg_adapter_48(f,s,a){wasm.closure1139_externref_shim(f,s,a)}function __wbg_adapter_51(f,s,a){wasm.closure1153_externref_shim(f,s,a)}function _assertClass(f,s){if(!(f instanceof s))throw new Error(`expected instance of ${s.name}`);return f.ptr}function takeFromExternrefTable0(f){const s=wasm.__wbindgen_export_2.get(f);return wasm.__externref_table_dealloc(f),s}function addToExternrefTable0(f){const s=wasm.__externref_table_alloc();return wasm.__wbindgen_export_2.set(s,f),s}function passArray8ToWasm0(f,s){const a=s(1*f.length,1)>>>0;return getUint8ArrayMemory0().set(f,a/1),WASM_VECTOR_LEN=f.length,a}function passArrayJsValueToWasm0(f,s){const a=s(4*f.length,4)>>>0,u=getDataViewMemory0();for(let g=0;g{throw new Error(`${f} is not defined`)}}function handleError(f,s){try{return f.apply(this,s)}catch(a){const u=addToExternrefTable0(a);wasm.__wbindgen_exn_store(u)}}function getArrayU8FromWasm0(f,s){return f>>>=0,getUint8ArrayMemory0().subarray(f/1,f/1+s)}function hexToString(f){let s,a;try{const u=passStringToWasm0(f,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),y=wasm.hexToString(u,WASM_VECTOR_LEN);return s=y[0],a=y[1],getStringFromWasm0(y[0],y[1])}finally{wasm.__wbindgen_free(s,a,1)}}function hexToUint8Array(f){const s=passStringToWasm0(f,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),u=wasm.hexToUint8Array(s,WASM_VECTOR_LEN);var g=getArrayU8FromWasm0(u[0],u[1]).slice();return wasm.__wbindgen_free(u[0],1*u[1],1),g}function uint8ArrayToBytes(f){const s=wasm.uint8ArrayToBytes(f);return Bytes.__wrap(s)}function motesToCSPR(f){let s,a;try{const y=passStringToWasm0(f,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),S=wasm.motesToCSPR(y,WASM_VECTOR_LEN);var u=S[0],g=S[1];if(S[3])throw u=0,g=0,takeFromExternrefTable0(S[2]);return s=u,a=g,getStringFromWasm0(u,g)}finally{wasm.__wbindgen_free(s,a,1)}}function jsonPrettyPrint(f,s){const a=wasm.jsonPrettyPrint(f,isLikeNone(s)?3:s);if(a[2])throw takeFromExternrefTable0(a[1]);return takeFromExternrefTable0(a[0])}function publicKeyFromSecretKey(f){const s=passStringToWasm0(f,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),u=wasm.publicKeyFromSecretKey(s,WASM_VECTOR_LEN);if(u[2])throw takeFromExternrefTable0(u[1]);return takeFromExternrefTable0(u[0])}function generateSecretKey(){const f=wasm.generateSecretKey();if(f[2])throw takeFromExternrefTable0(f[1]);return takeFromExternrefTable0(f[0])}function generateSecretKey_secp256k1(){const f=wasm.generateSecretKey_secp256k1();if(f[2])throw takeFromExternrefTable0(f[1]);return takeFromExternrefTable0(f[0])}function accountHashToBase64Key(f){let s,a;try{const y=passStringToWasm0(f,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),S=wasm.accountHashToBase64Key(y,WASM_VECTOR_LEN);var u=S[0],g=S[1];if(S[3])throw u=0,g=0,takeFromExternrefTable0(S[2]);return s=u,a=g,getStringFromWasm0(u,g)}finally{wasm.__wbindgen_free(s,a,1)}}function getTimestamp(){return wasm.getTimestamp()}function encodeLowerBlake2b(f){const s=passStringToWasm0(f,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);return wasm.encodeLowerBlake2b(s,WASM_VECTOR_LEN)}function makeDictionaryItemKey(f,s){let a,u;try{_assertClass(f,Key);var g=f.__destroy_into_raw();const S=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),M=wasm.makeDictionaryItemKey(g,S,WASM_VECTOR_LEN);var y=M[0],v=M[1];if(M[3])throw y=0,v=0,takeFromExternrefTable0(M[2]);return a=y,u=v,getStringFromWasm0(y,v)}finally{wasm.__wbindgen_free(a,u,1)}}function getArrayJsValueFromWasm0(f,s){f>>>=0;const a=getDataViewMemory0(),u=[];for(let g=f;g"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_accessrights_free(f>>>0,1));class AccessRights{static __wrap(s){s>>>=0;const a=Object.create(AccessRights.prototype);return a.__wbg_ptr=s,AccessRightsFinalization.register(a,a.__wbg_ptr,a),a}__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,AccessRightsFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_accessrights_free(s,0)}static NONE(){return wasm.accessrights_NONE()}static READ(){return wasm.accessrights_READ()}static WRITE(){return wasm.accessrights_WRITE()}static ADD(){return wasm.accessrights_ADD()}static READ_ADD(){return wasm.accessrights_READ_ADD()}static READ_WRITE(){return wasm.accessrights_READ_WRITE()}static ADD_WRITE(){return wasm.accessrights_ADD_WRITE()}static READ_ADD_WRITE(){return wasm.accessrights_READ_ADD_WRITE()}constructor(s){const a=wasm.accessrights_new(s);if(a[2])throw takeFromExternrefTable0(a[1]);return this.__wbg_ptr=a[0]>>>0,AccessRightsFinalization.register(this,this.__wbg_ptr,this),this}static from_bits(s,a,u){const g=wasm.accessrights_from_bits(s,a,u);return AccessRights.__wrap(g)}is_readable(){return 0!==wasm.accessrights_is_readable(this.__wbg_ptr)}is_writeable(){return 0!==wasm.accessrights_is_writeable(this.__wbg_ptr)}is_addable(){return 0!==wasm.accessrights_is_addable(this.__wbg_ptr)}is_none(){return 0!==wasm.accessrights_is_none(this.__wbg_ptr)}}const AccountHashFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_accounthash_free(f>>>0,1));class AccountHash{static __wrap(s){s>>>=0;const a=Object.create(AccountHash.prototype);return a.__wbg_ptr=s,AccountHashFinalization.register(a,a.__wbg_ptr,a),a}__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,AccountHashFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_accounthash_free(s,0)}constructor(s){const a=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),g=wasm.accounthash_new_js_alias(a,WASM_VECTOR_LEN);if(g[2])throw takeFromExternrefTable0(g[1]);return this.__wbg_ptr=g[0]>>>0,AccountHashFinalization.register(this,this.__wbg_ptr,this),this}static fromFormattedStr(s){const a=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),g=wasm.accounthash_fromFormattedStr(a,WASM_VECTOR_LEN);if(g[2])throw takeFromExternrefTable0(g[1]);return AccountHash.__wrap(g[0])}static fromPublicKey(s){_assertClass(s,PublicKey);var a=s.__destroy_into_raw();const u=wasm.accounthash_fromPublicKey(a);return AccountHash.__wrap(u)}toFormattedString(){let s,a;try{const u=wasm.accounthash_toFormattedString(this.__wbg_ptr);return s=u[0],a=u[1],getStringFromWasm0(u[0],u[1])}finally{wasm.__wbindgen_free(s,a,1)}}toHexString(){let s,a;try{const u=wasm.accounthash_toHexString(this.__wbg_ptr);return s=u[0],a=u[1],getStringFromWasm0(u[0],u[1])}finally{wasm.__wbindgen_free(s,a,1)}}static fromUint8Array(s){const a=passArray8ToWasm0(s,wasm.__wbindgen_malloc),g=wasm.accounthash_fromUint8Array(a,WASM_VECTOR_LEN);return AccountHash.__wrap(g)}toJson(){return wasm.accounthash_toJson(this.__wbg_ptr)}}const AccountIdentifierFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_accountidentifier_free(f>>>0,1));class AccountIdentifier{static __wrap(s){s>>>=0;const a=Object.create(AccountIdentifier.prototype);return a.__wbg_ptr=s,AccountIdentifierFinalization.register(a,a.__wbg_ptr,a),a}__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,AccountIdentifierFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_accountidentifier_free(s,0)}constructor(s){const a=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),g=wasm.accountidentifier_new(a,WASM_VECTOR_LEN);if(g[2])throw takeFromExternrefTable0(g[1]);return this.__wbg_ptr=g[0]>>>0,AccountIdentifierFinalization.register(this,this.__wbg_ptr,this),this}static fromFormattedStr(s){const a=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),g=wasm.accountidentifier_fromFormattedStr(a,WASM_VECTOR_LEN);if(g[2])throw takeFromExternrefTable0(g[1]);return AccountIdentifier.__wrap(g[0])}static fromPublicKey(s){_assertClass(s,PublicKey);var a=s.__destroy_into_raw();const u=wasm.accountidentifier_fromPublicKey(a);return AccountIdentifier.__wrap(u)}static fromAccountHash(s){_assertClass(s,AccountHash);var a=s.__destroy_into_raw();const u=wasm.accountidentifier_fromAccountHash(a);return AccountIdentifier.__wrap(u)}toJson(){return wasm.accountidentifier_toJson(this.__wbg_ptr)}}const AddressableEntityHashFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_addressableentityhash_free(f>>>0,1));class AddressableEntityHash{static __wrap(s){s>>>=0;const a=Object.create(AddressableEntityHash.prototype);return a.__wbg_ptr=s,AddressableEntityHashFinalization.register(a,a.__wbg_ptr,a),a}__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,AddressableEntityHashFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_addressableentityhash_free(s,0)}constructor(s){const a=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),g=wasm.addressableentityhash_new_js_alias(a,WASM_VECTOR_LEN);if(g[2])throw takeFromExternrefTable0(g[1]);return this.__wbg_ptr=g[0]>>>0,AddressableEntityHashFinalization.register(this,this.__wbg_ptr,this),this}static fromFormattedStr(s){const a=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),g=wasm.addressableentityhash_fromFormattedStr(a,WASM_VECTOR_LEN);if(g[2])throw takeFromExternrefTable0(g[1]);return AddressableEntityHash.__wrap(g[0])}toFormattedString(){let s,a;try{const u=wasm.addressableentityhash_toFormattedString(this.__wbg_ptr);return s=u[0],a=u[1],getStringFromWasm0(u[0],u[1])}finally{wasm.__wbindgen_free(s,a,1)}}static fromUint8Array(s){const a=passArray8ToWasm0(s,wasm.__wbindgen_malloc),g=wasm.addressableentityhash_fromUint8Array(a,WASM_VECTOR_LEN);return AddressableEntityHash.__wrap(g)}}const ArgsSimpleFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_argssimple_free(f>>>0,1));class ArgsSimple{static __wrap(s){s>>>=0;const a=Object.create(ArgsSimple.prototype);return a.__wbg_ptr=s,ArgsSimpleFinalization.register(a,a.__wbg_ptr,a),a}__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,ArgsSimpleFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_argssimple_free(s,0)}}const BlockHashFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_blockhash_free(f>>>0,1));class BlockHash{static __wrap(s){s>>>=0;const a=Object.create(BlockHash.prototype);return a.__wbg_ptr=s,BlockHashFinalization.register(a,a.__wbg_ptr,a),a}__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,BlockHashFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_blockhash_free(s,0)}constructor(s){const a=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),g=wasm.blockhash_new_js_alias(a,WASM_VECTOR_LEN);if(g[2])throw takeFromExternrefTable0(g[1]);return this.__wbg_ptr=g[0]>>>0,BlockHashFinalization.register(this,this.__wbg_ptr,this),this}static fromDigest(s){_assertClass(s,Digest);var a=s.__destroy_into_raw();const u=wasm.blockhash_fromDigest(a);if(u[2])throw takeFromExternrefTable0(u[1]);return BlockHash.__wrap(u[0])}toJson(){return wasm.blockhash_toJson(this.__wbg_ptr)}toString(){let s,a;try{const u=wasm.blockhash_toString(this.__wbg_ptr);return s=u[0],a=u[1],getStringFromWasm0(u[0],u[1])}finally{wasm.__wbindgen_free(s,a,1)}}}const BlockIdentifierFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_blockidentifier_free(f>>>0,1));class BlockIdentifier{static __wrap(s){s>>>=0;const a=Object.create(BlockIdentifier.prototype);return a.__wbg_ptr=s,BlockIdentifierFinalization.register(a,a.__wbg_ptr,a),a}__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,BlockIdentifierFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_blockidentifier_free(s,0)}constructor(s){_assertClass(s,BlockIdentifier);var a=s.__destroy_into_raw();const u=wasm.blockidentifier_new(a);return this.__wbg_ptr=u>>>0,BlockIdentifierFinalization.register(this,this.__wbg_ptr,this),this}static from_hash(s){_assertClass(s,BlockHash);var a=s.__destroy_into_raw();const u=wasm.blockidentifier_from_hash(a);return BlockIdentifier.__wrap(u)}static fromHeight(s){const a=wasm.blockidentifier_fromHeight(s);return BlockIdentifier.__wrap(a)}toJson(){return wasm.blockidentifier_toJson(this.__wbg_ptr)}}const BodyFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_body_free(f>>>0,1));class Body{static __wrap(s){s>>>=0;const a=Object.create(Body.prototype);return a.__wbg_ptr=s,BodyFinalization.register(a,a.__wbg_ptr,a),a}__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,BodyFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_body_free(s,0)}get transaction_processed(){const s=wasm.__wbg_get_body_transaction_processed(this.__wbg_ptr);return 0===s?void 0:TransactionProcessed.__wrap(s)}set transaction_processed(s){let a=0;isLikeNone(s)||(_assertClass(s,TransactionProcessed),a=s.__destroy_into_raw()),wasm.__wbg_set_body_transaction_processed(this.__wbg_ptr,a)}get get_deploy_processed(){const s=wasm.body_get_deploy_processed(this.__wbg_ptr);return 0===s?void 0:TransactionProcessed.__wrap(s)}get get_transaction_processed(){const s=wasm.body_get_deploy_processed(this.__wbg_ptr);return 0===s?void 0:TransactionProcessed.__wrap(s)}}const BytesFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_bytes_free(f>>>0,1));class Bytes{static __wrap(s){s>>>=0;const a=Object.create(Bytes.prototype);return a.__wbg_ptr=s,BytesFinalization.register(a,a.__wbg_ptr,a),a}__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,BytesFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_bytes_free(s,0)}constructor(){const s=wasm.bytes_new();return this.__wbg_ptr=s>>>0,BytesFinalization.register(this,this.__wbg_ptr,this),this}static fromUint8Array(s){const a=wasm.bytes_fromUint8Array(s);return Bytes.__wrap(a)}}const CasperWalletFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_casperwallet_free(f>>>0,1));class CasperWallet{__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,CasperWalletFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_casperwallet_free(s,0)}constructor(){const s=wasm.casperwallet_new();return this.__wbg_ptr=s>>>0,CasperWalletFinalization.register(this,this.__wbg_ptr,this),this}signDeploy(s,a){_assertClass(s,Deploy);var u=s.__destroy_into_raw(),g=isLikeNone(a)?0:passStringToWasm0(a,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);return wasm.casperwallet_signDeploy(this.__wbg_ptr,u,g,WASM_VECTOR_LEN)}signTransaction(s,a){_assertClass(s,Transaction);var u=s.__destroy_into_raw(),g=isLikeNone(a)?0:passStringToWasm0(a,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);return wasm.casperwallet_signTransaction(this.__wbg_ptr,u,g,WASM_VECTOR_LEN)}signDeployHash(s,a){const u=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),g=WASM_VECTOR_LEN;var y=isLikeNone(a)?0:passStringToWasm0(a,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);return wasm.casperwallet_signDeployHash(this.__wbg_ptr,u,g,y,WASM_VECTOR_LEN)}signTransactionHash(s,a){const u=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),g=WASM_VECTOR_LEN;var y=isLikeNone(a)?0:passStringToWasm0(a,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);return wasm.casperwallet_signTransactionHash(this.__wbg_ptr,u,g,y,WASM_VECTOR_LEN)}signMessage(s,a){const u=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),g=WASM_VECTOR_LEN;var y=isLikeNone(a)?0:passStringToWasm0(a,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);return wasm.casperwallet_signMessage(this.__wbg_ptr,u,g,y,WASM_VECTOR_LEN)}connect(){return wasm.casperwallet_connect(this.__wbg_ptr)}disconnect(){return wasm.casperwallet_disconnect(this.__wbg_ptr)}isConnected(){return wasm.casperwallet_isConnected(this.__wbg_ptr)}getVersion(){return wasm.casperwallet_getVersion(this.__wbg_ptr)}getActivePublicKey(){return wasm.casperwallet_getActivePublicKey(this.__wbg_ptr)}switchAccount(){return wasm.casperwallet_switchAccount(this.__wbg_ptr)}}const ContractHashFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_contracthash_free(f>>>0,1));class ContractHash{static __wrap(s){s>>>=0;const a=Object.create(ContractHash.prototype);return a.__wbg_ptr=s,ContractHashFinalization.register(a,a.__wbg_ptr,a),a}__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,ContractHashFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_contracthash_free(s,0)}constructor(s){const a=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),g=wasm.contracthash_new_js_alias(a,WASM_VECTOR_LEN);if(g[2])throw takeFromExternrefTable0(g[1]);return this.__wbg_ptr=g[0]>>>0,ContractHashFinalization.register(this,this.__wbg_ptr,this),this}static fromFormattedStr(s){const a=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),g=wasm.contracthash_fromFormattedStr(a,WASM_VECTOR_LEN);if(g[2])throw takeFromExternrefTable0(g[1]);return ContractHash.__wrap(g[0])}toFormattedString(){let s,a;try{const u=wasm.contracthash_toFormattedString(this.__wbg_ptr);return s=u[0],a=u[1],getStringFromWasm0(u[0],u[1])}finally{wasm.__wbindgen_free(s,a,1)}}static fromUint8Array(s){const a=passArray8ToWasm0(s,wasm.__wbindgen_malloc),g=wasm.contracthash_fromUint8Array(a,WASM_VECTOR_LEN);return ContractHash.__wrap(g)}}const ContractPackageHashFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_contractpackagehash_free(f>>>0,1));class ContractPackageHash{static __wrap(s){s>>>=0;const a=Object.create(ContractPackageHash.prototype);return a.__wbg_ptr=s,ContractPackageHashFinalization.register(a,a.__wbg_ptr,a),a}__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,ContractPackageHashFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_contractpackagehash_free(s,0)}constructor(s){const a=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),g=wasm.contractpackagehash_new_js_alias(a,WASM_VECTOR_LEN);if(g[2])throw takeFromExternrefTable0(g[1]);return this.__wbg_ptr=g[0]>>>0,ContractPackageHashFinalization.register(this,this.__wbg_ptr,this),this}static fromFormattedStr(s){const a=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),g=wasm.contractpackagehash_fromFormattedStr(a,WASM_VECTOR_LEN);if(g[2])throw takeFromExternrefTable0(g[1]);return ContractPackageHash.__wrap(g[0])}toFormattedString(){let s,a;try{const u=wasm.contractpackagehash_toFormattedString(this.__wbg_ptr);return s=u[0],a=u[1],getStringFromWasm0(u[0],u[1])}finally{wasm.__wbindgen_free(s,a,1)}}static fromUint8Array(s){const a=passArray8ToWasm0(s,wasm.__wbindgen_malloc),g=wasm.contractpackagehash_fromUint8Array(a,WASM_VECTOR_LEN);return ContractPackageHash.__wrap(g)}}const DeployFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_deploy_free(f>>>0,1));class Deploy{static __wrap(s){s>>>=0;const a=Object.create(Deploy.prototype);return a.__wbg_ptr=s,DeployFinalization.register(a,a.__wbg_ptr,a),a}__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,DeployFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_deploy_free(s,0)}constructor(s){const a=wasm.deploy_new(s);return this.__wbg_ptr=a>>>0,DeployFinalization.register(this,this.__wbg_ptr,this),this}toJson(){return wasm.deploy_toJson(this.__wbg_ptr)}static withPaymentAndSession(s,a,u){_assertClass(s,DeployStrParams);var g=s.__destroy_into_raw();_assertClass(a,SessionStrParams);var y=a.__destroy_into_raw();_assertClass(u,PaymentStrParams);var v=u.__destroy_into_raw();const S=wasm.deploy_withPaymentAndSession(g,y,v);if(S[2])throw takeFromExternrefTable0(S[1]);return Deploy.__wrap(S[0])}static withTransfer(s,a,u,g,y){const v=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),S=WASM_VECTOR_LEN,A=passStringToWasm0(a,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),M=WASM_VECTOR_LEN;var B=isLikeNone(u)?0:passStringToWasm0(u,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),X=WASM_VECTOR_LEN;_assertClass(g,DeployStrParams);var de=g.__destroy_into_raw();_assertClass(y,PaymentStrParams);var le=y.__destroy_into_raw();const ue=wasm.deploy_withTransfer(v,S,A,M,B,X,de,le);if(ue[2])throw takeFromExternrefTable0(ue[1]);return Deploy.__wrap(ue[0])}withTTL(s,a){const u=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),g=WASM_VECTOR_LEN;var y=isLikeNone(a)?0:passStringToWasm0(a,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);const S=wasm.deploy_withTTL(this.__wbg_ptr,u,g,y,WASM_VECTOR_LEN);return Deploy.__wrap(S)}withTimestamp(s,a){const u=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),g=WASM_VECTOR_LEN;var y=isLikeNone(a)?0:passStringToWasm0(a,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);const S=wasm.deploy_withTimestamp(this.__wbg_ptr,u,g,y,WASM_VECTOR_LEN);return Deploy.__wrap(S)}withChainName(s,a){const u=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),g=WASM_VECTOR_LEN;var y=isLikeNone(a)?0:passStringToWasm0(a,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);const S=wasm.deploy_withChainName(this.__wbg_ptr,u,g,y,WASM_VECTOR_LEN);return Deploy.__wrap(S)}withAccount(s,a){_assertClass(s,PublicKey);var u=s.__destroy_into_raw(),g=isLikeNone(a)?0:passStringToWasm0(a,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);const v=wasm.deploy_withAccount(this.__wbg_ptr,u,g,WASM_VECTOR_LEN);return Deploy.__wrap(v)}withEntryPointName(s,a){const u=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),g=WASM_VECTOR_LEN;var y=isLikeNone(a)?0:passStringToWasm0(a,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);const S=wasm.deploy_withEntryPointName(this.__wbg_ptr,u,g,y,WASM_VECTOR_LEN);return Deploy.__wrap(S)}withHash(s,a){_assertClass(s,ContractHash);var u=s.__destroy_into_raw(),g=isLikeNone(a)?0:passStringToWasm0(a,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);const v=wasm.deploy_withHash(this.__wbg_ptr,u,g,WASM_VECTOR_LEN);return Deploy.__wrap(v)}withPackageHash(s,a){_assertClass(s,ContractPackageHash);var u=s.__destroy_into_raw(),g=isLikeNone(a)?0:passStringToWasm0(a,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);const v=wasm.deploy_withPackageHash(this.__wbg_ptr,u,g,WASM_VECTOR_LEN);return Deploy.__wrap(v)}withModuleBytes(s,a){_assertClass(s,Bytes);var u=s.__destroy_into_raw(),g=isLikeNone(a)?0:passStringToWasm0(a,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);const v=wasm.deploy_withModuleBytes(this.__wbg_ptr,u,g,WASM_VECTOR_LEN);return Deploy.__wrap(v)}withSecretKey(s){var a=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);const g=wasm.deploy_withSecretKey(this.__wbg_ptr,a,WASM_VECTOR_LEN);return Deploy.__wrap(g)}withStandardPayment(s,a){const u=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),g=WASM_VECTOR_LEN;var y=isLikeNone(a)?0:passStringToWasm0(a,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);const S=wasm.deploy_withStandardPayment(this.__wbg_ptr,u,g,y,WASM_VECTOR_LEN);return Deploy.__wrap(S)}withPayment(s,a){var u=isLikeNone(a)?0:passStringToWasm0(a,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);const y=wasm.deploy_withPayment(this.__wbg_ptr,s,u,WASM_VECTOR_LEN);return Deploy.__wrap(y)}withSession(s,a){var u=isLikeNone(a)?0:passStringToWasm0(a,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);const y=wasm.deploy_withSession(this.__wbg_ptr,s,u,WASM_VECTOR_LEN);return Deploy.__wrap(y)}validateDeploySize(){return 0!==wasm.deploy_validateDeploySize(this.__wbg_ptr)}isValid(){return 0!==wasm.deploy_isValid(this.__wbg_ptr)}get hash(){const s=wasm.deploy_hash(this.__wbg_ptr);return DeployHash.__wrap(s)}hasValidHash(){return 0!==wasm.deploy_hasValidHash(this.__wbg_ptr)}isExpired(){return 0!==wasm.deploy_isExpired(this.__wbg_ptr)}sign(s){const a=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),g=wasm.deploy_sign(this.__wbg_ptr,a,WASM_VECTOR_LEN);return Deploy.__wrap(g)}approvalsHash(){return wasm.deploy_approvalsHash(this.__wbg_ptr)}approvals(){return wasm.deploy_approvals(this.__wbg_ptr)}isTransfer(){return 0!==wasm.deploy_isTransfer(this.__wbg_ptr)}isStandardPayment(s){return 0!==wasm.deploy_isStandardPayment(this.__wbg_ptr,s)}isStoredContract(){return 0!==wasm.deploy_isStoredContract(this.__wbg_ptr)}isStoredContractPackage(){return 0!==wasm.deploy_isStoredContractPackage(this.__wbg_ptr)}isModuleBytes(){return 0!==wasm.deploy_isModuleBytes(this.__wbg_ptr)}isByName(){return 0!==wasm.deploy_isByName(this.__wbg_ptr)}byName(){const s=wasm.deploy_byName(this.__wbg_ptr);let a;return 0!==s[0]&&(a=getStringFromWasm0(s[0],s[1]).slice(),wasm.__wbindgen_free(s[0],1*s[1],1)),a}entryPointName(){let s,a;try{const u=wasm.deploy_entryPointName(this.__wbg_ptr);return s=u[0],a=u[1],getStringFromWasm0(u[0],u[1])}finally{wasm.__wbindgen_free(s,a,1)}}addSignature(s,a){const u=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),g=WASM_VECTOR_LEN,y=passStringToWasm0(a,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),S=wasm.deploy_addSignature(this.__wbg_ptr,u,g,y,WASM_VECTOR_LEN);return Deploy.__wrap(S)}TTL(){let s,a;try{const u=wasm.deploy_TTL(this.__wbg_ptr);return s=u[0],a=u[1],getStringFromWasm0(u[0],u[1])}finally{wasm.__wbindgen_free(s,a,1)}}timestamp(){let s,a;try{const u=wasm.deploy_timestamp(this.__wbg_ptr);return s=u[0],a=u[1],getStringFromWasm0(u[0],u[1])}finally{wasm.__wbindgen_free(s,a,1)}}chainName(){let s,a;try{const u=wasm.deploy_chainName(this.__wbg_ptr);return s=u[0],a=u[1],getStringFromWasm0(u[0],u[1])}finally{wasm.__wbindgen_free(s,a,1)}}account(){let s,a;try{const u=wasm.deploy_account(this.__wbg_ptr);return s=u[0],a=u[1],getStringFromWasm0(u[0],u[1])}finally{wasm.__wbindgen_free(s,a,1)}}paymentAmount(s){let a,u;try{const g=wasm.deploy_paymentAmount(this.__wbg_ptr,s);return a=g[0],u=g[1],getStringFromWasm0(g[0],g[1])}finally{wasm.__wbindgen_free(a,u,1)}}args(){return wasm.deploy_args(this.__wbg_ptr)}addArg(s,a){var u=isLikeNone(a)?0:passStringToWasm0(a,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);const y=wasm.deploy_addArg(this.__wbg_ptr,s,u,WASM_VECTOR_LEN);if(y[2])throw takeFromExternrefTable0(y[1]);return Deploy.__wrap(y[0])}}const DeployHashFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_deployhash_free(f>>>0,1));class DeployHash{static __wrap(s){s>>>=0;const a=Object.create(DeployHash.prototype);return a.__wbg_ptr=s,DeployHashFinalization.register(a,a.__wbg_ptr,a),a}__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,DeployHashFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_deployhash_free(s,0)}constructor(s){const a=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),g=wasm.deployhash_new_js_alias(a,WASM_VECTOR_LEN);if(g[2])throw takeFromExternrefTable0(g[1]);return this.__wbg_ptr=g[0]>>>0,DeployHashFinalization.register(this,this.__wbg_ptr,this),this}static fromDigest(s){_assertClass(s,Digest);var a=s.__destroy_into_raw();const u=wasm.deployhash_fromDigest(a);if(u[2])throw takeFromExternrefTable0(u[1]);return DeployHash.__wrap(u[0])}toJson(){return wasm.deployhash_toJson(this.__wbg_ptr)}toString(){let s,a;try{const u=wasm.deployhash_toString(this.__wbg_ptr);return s=u[0],a=u[1],getStringFromWasm0(u[0],u[1])}finally{wasm.__wbindgen_free(s,a,1)}}}const DeployStrParamsFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_deploystrparams_free(f>>>0,1));class DeployStrParams{__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,DeployStrParamsFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_deploystrparams_free(s,0)}constructor(s,a,u,g,y,v){const S=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),A=WASM_VECTOR_LEN,M=passStringToWasm0(a,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),B=WASM_VECTOR_LEN;var X=isLikeNone(u)?0:passStringToWasm0(u,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),de=WASM_VECTOR_LEN,le=isLikeNone(g)?0:passStringToWasm0(g,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),ue=WASM_VECTOR_LEN,ot=isLikeNone(y)?0:passStringToWasm0(y,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),rt=WASM_VECTOR_LEN,st=isLikeNone(v)?0:passStringToWasm0(v,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);const Dn=wasm.deploystrparams_new(S,A,M,B,X,de,le,ue,ot,rt,st,WASM_VECTOR_LEN);return this.__wbg_ptr=Dn>>>0,DeployStrParamsFinalization.register(this,this.__wbg_ptr,this),this}get secret_key(){const s=wasm.deploystrparams_secret_key(this.__wbg_ptr);let a;return 0!==s[0]&&(a=getStringFromWasm0(s[0],s[1]).slice(),wasm.__wbindgen_free(s[0],1*s[1],1)),a}set secret_key(s){const a=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.deploystrparams_set_secret_key(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get timestamp(){const s=wasm.deploystrparams_timestamp(this.__wbg_ptr);let a;return 0!==s[0]&&(a=getStringFromWasm0(s[0],s[1]).slice(),wasm.__wbindgen_free(s[0],1*s[1],1)),a}set timestamp(s){var a=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.deploystrparams_set_timestamp(this.__wbg_ptr,a,WASM_VECTOR_LEN)}setDefaultTimestamp(){wasm.deploystrparams_setDefaultTimestamp(this.__wbg_ptr)}get ttl(){const s=wasm.deploystrparams_ttl(this.__wbg_ptr);let a;return 0!==s[0]&&(a=getStringFromWasm0(s[0],s[1]).slice(),wasm.__wbindgen_free(s[0],1*s[1],1)),a}set ttl(s){var a=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.deploystrparams_set_ttl(this.__wbg_ptr,a,WASM_VECTOR_LEN)}setDefaultTTL(){wasm.deploystrparams_setDefaultTTL(this.__wbg_ptr)}get chain_name(){const s=wasm.deploystrparams_chain_name(this.__wbg_ptr);let a;return 0!==s[0]&&(a=getStringFromWasm0(s[0],s[1]).slice(),wasm.__wbindgen_free(s[0],1*s[1],1)),a}set chain_name(s){const a=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.deploystrparams_set_chain_name(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get session_account(){const s=wasm.deploystrparams_session_account(this.__wbg_ptr);let a;return 0!==s[0]&&(a=getStringFromWasm0(s[0],s[1]).slice(),wasm.__wbindgen_free(s[0],1*s[1],1)),a}set session_account(s){const a=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.deploystrparams_set_session_account(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get gas_price_tolerance(){const s=wasm.deploystrparams_gas_price_tolerance(this.__wbg_ptr);let a;return 0!==s[0]&&(a=getStringFromWasm0(s[0],s[1]).slice(),wasm.__wbindgen_free(s[0],1*s[1],1)),a}set gas_price_tolerance(s){const a=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.deploystrparams_set_gas_price_tolerance(this.__wbg_ptr,a,WASM_VECTOR_LEN)}}const DictionaryAddrFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_dictionaryaddr_free(f>>>0,1));class DictionaryAddr{static __wrap(s){s>>>=0;const a=Object.create(DictionaryAddr.prototype);return a.__wbg_ptr=s,DictionaryAddrFinalization.register(a,a.__wbg_ptr,a),a}__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,DictionaryAddrFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_dictionaryaddr_free(s,0)}constructor(s){const a=passArray8ToWasm0(s,wasm.__wbindgen_malloc),g=wasm.dictionaryaddr_new(a,WASM_VECTOR_LEN);if(g[2])throw takeFromExternrefTable0(g[1]);return this.__wbg_ptr=g[0]>>>0,DictionaryAddrFinalization.register(this,this.__wbg_ptr,this),this}}const DictionaryItemIdentifierFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_dictionaryitemidentifier_free(f>>>0,1));class DictionaryItemIdentifier{static __wrap(s){s>>>=0;const a=Object.create(DictionaryItemIdentifier.prototype);return a.__wbg_ptr=s,DictionaryItemIdentifierFinalization.register(a,a.__wbg_ptr,a),a}__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,DictionaryItemIdentifierFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_dictionaryitemidentifier_free(s,0)}static newFromAccountInfo(s,a,u){const g=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),y=WASM_VECTOR_LEN,v=passStringToWasm0(a,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),S=WASM_VECTOR_LEN,A=passStringToWasm0(u,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),B=wasm.dictionaryitemidentifier_newFromAccountInfo(g,y,v,S,A,WASM_VECTOR_LEN);if(B[2])throw takeFromExternrefTable0(B[1]);return DictionaryItemIdentifier.__wrap(B[0])}static newFromContractInfo(s,a,u){const g=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),y=WASM_VECTOR_LEN,v=passStringToWasm0(a,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),S=WASM_VECTOR_LEN,A=passStringToWasm0(u,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),B=wasm.dictionaryitemidentifier_newFromContractInfo(g,y,v,S,A,WASM_VECTOR_LEN);if(B[2])throw takeFromExternrefTable0(B[1]);return DictionaryItemIdentifier.__wrap(B[0])}static newFromEntityInfo(s,a,u){const g=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),y=WASM_VECTOR_LEN,v=passStringToWasm0(a,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),S=WASM_VECTOR_LEN,A=passStringToWasm0(u,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),B=wasm.dictionaryitemidentifier_newFromEntityInfo(g,y,v,S,A,WASM_VECTOR_LEN);if(B[2])throw takeFromExternrefTable0(B[1]);return DictionaryItemIdentifier.__wrap(B[0])}static newFromSeedUref(s,a){const u=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),g=WASM_VECTOR_LEN,y=passStringToWasm0(a,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),S=wasm.dictionaryitemidentifier_newFromSeedUref(u,g,y,WASM_VECTOR_LEN);if(S[2])throw takeFromExternrefTable0(S[1]);return DictionaryItemIdentifier.__wrap(S[0])}static newFromDictionaryKey(s){const a=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),g=wasm.dictionaryitemidentifier_newFromDictionaryKey(a,WASM_VECTOR_LEN);if(g[2])throw takeFromExternrefTable0(g[1]);return DictionaryItemIdentifier.__wrap(g[0])}toJson(){return wasm.dictionaryitemidentifier_toJson(this.__wbg_ptr)}}const DictionaryItemStrParamsFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_dictionaryitemstrparams_free(f>>>0,1));class DictionaryItemStrParams{static __wrap(s){s>>>=0;const a=Object.create(DictionaryItemStrParams.prototype);return a.__wbg_ptr=s,DictionaryItemStrParamsFinalization.register(a,a.__wbg_ptr,a),a}__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,DictionaryItemStrParamsFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_dictionaryitemstrparams_free(s,0)}constructor(){const s=wasm.dictionaryitemstrparams_new();return this.__wbg_ptr=s>>>0,DictionaryItemStrParamsFinalization.register(this,this.__wbg_ptr,this),this}setAccountNamedKey(s,a,u){const g=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),y=WASM_VECTOR_LEN,v=passStringToWasm0(a,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),S=WASM_VECTOR_LEN,A=passStringToWasm0(u,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.dictionaryitemstrparams_setAccountNamedKey(this.__wbg_ptr,g,y,v,S,A,WASM_VECTOR_LEN)}setContractNamedKey(s,a,u){const g=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),y=WASM_VECTOR_LEN,v=passStringToWasm0(a,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),S=WASM_VECTOR_LEN,A=passStringToWasm0(u,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.dictionaryitemstrparams_setContractNamedKey(this.__wbg_ptr,g,y,v,S,A,WASM_VECTOR_LEN)}setEntityNamedKey(s,a,u){const g=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),y=WASM_VECTOR_LEN,v=passStringToWasm0(a,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),S=WASM_VECTOR_LEN,A=passStringToWasm0(u,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.dictionaryitemstrparams_setEntityNamedKey(this.__wbg_ptr,g,y,v,S,A,WASM_VECTOR_LEN)}setUref(s,a){const u=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),g=WASM_VECTOR_LEN,y=passStringToWasm0(a,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.dictionaryitemstrparams_setUref(this.__wbg_ptr,u,g,y,WASM_VECTOR_LEN)}setDictionary(s){const a=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.dictionaryitemstrparams_setDictionary(this.__wbg_ptr,a,WASM_VECTOR_LEN)}toJson(){return wasm.dictionaryitemstrparams_toJson(this.__wbg_ptr)}}const DigestFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_digest_free(f>>>0,1));class Digest{static __wrap(s){s>>>=0;const a=Object.create(Digest.prototype);return a.__wbg_ptr=s,DigestFinalization.register(a,a.__wbg_ptr,a),a}__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,DigestFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_digest_free(s,0)}constructor(s){const a=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),g=wasm.digest_new_js_alias(a,WASM_VECTOR_LEN);if(g[2])throw takeFromExternrefTable0(g[1]);return this.__wbg_ptr=g[0]>>>0,DigestFinalization.register(this,this.__wbg_ptr,this),this}static fromString(s){const a=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),g=wasm.digest_fromString(a,WASM_VECTOR_LEN);if(g[2])throw takeFromExternrefTable0(g[1]);return Digest.__wrap(g[0])}static fromRaw(s){const a=passArray8ToWasm0(s,wasm.__wbindgen_malloc),g=wasm.digest_fromRaw(a,WASM_VECTOR_LEN);if(g[2])throw takeFromExternrefTable0(g[1]);return Digest.__wrap(g[0])}toJson(){return wasm.digest_toJson(this.__wbg_ptr)}toString(){let s,a;try{const u=wasm.digest_toString(this.__wbg_ptr);return s=u[0],a=u[1],getStringFromWasm0(u[0],u[1])}finally{wasm.__wbindgen_free(s,a,1)}}}const EntityAddrFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_entityaddr_free(f>>>0,1));class EntityAddr{static __wrap(s){s>>>=0;const a=Object.create(EntityAddr.prototype);return a.__wbg_ptr=s,EntityAddrFinalization.register(a,a.__wbg_ptr,a),a}__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,EntityAddrFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_entityaddr_free(s,0)}static fromFormattedStr(s){const a=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),g=wasm.entityaddr_fromFormattedStr(a,WASM_VECTOR_LEN);if(g[2])throw takeFromExternrefTable0(g[1]);return EntityAddr.__wrap(g[0])}toFormattedString(){let s,a;try{const u=wasm.entityaddr_toFormattedString(this.__wbg_ptr);return s=u[0],a=u[1],getStringFromWasm0(u[0],u[1])}finally{wasm.__wbindgen_free(s,a,1)}}toHexString(){let s,a;try{const u=wasm.entityaddr_toHexString(this.__wbg_ptr);return s=u[0],a=u[1],getStringFromWasm0(u[0],u[1])}finally{wasm.__wbindgen_free(s,a,1)}}toJson(){return wasm.entityaddr_toJson(this.__wbg_ptr)}}const EntityIdentifierFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_entityidentifier_free(f>>>0,1));class EntityIdentifier{static __wrap(s){s>>>=0;const a=Object.create(EntityIdentifier.prototype);return a.__wbg_ptr=s,EntityIdentifierFinalization.register(a,a.__wbg_ptr,a),a}__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,EntityIdentifierFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_entityidentifier_free(s,0)}constructor(s){const a=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),g=wasm.entityidentifier_new_js_alias(a,WASM_VECTOR_LEN);if(g[2])throw takeFromExternrefTable0(g[1]);return this.__wbg_ptr=g[0]>>>0,EntityIdentifierFinalization.register(this,this.__wbg_ptr,this),this}static fromFormattedStr(s){const a=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),g=wasm.entityidentifier_fromFormattedStr(a,WASM_VECTOR_LEN);if(g[2])throw takeFromExternrefTable0(g[1]);return EntityIdentifier.__wrap(g[0])}static fromPublicKey(s){_assertClass(s,PublicKey);var a=s.__destroy_into_raw();const u=wasm.entityidentifier_fromPublicKey(a);return EntityIdentifier.__wrap(u)}static fromAccountHash(s){_assertClass(s,AccountHash);var a=s.__destroy_into_raw();const u=wasm.entityidentifier_fromAccountHash(a);return EntityIdentifier.__wrap(u)}static fromEntityAddr(s){_assertClass(s,EntityAddr);var a=s.__destroy_into_raw();const u=wasm.entityidentifier_fromEntityAddr(a);return EntityIdentifier.__wrap(u)}toJson(){return wasm.entityidentifier_toJson(this.__wbg_ptr)}}const EraIdFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_eraid_free(f>>>0,1));class EraId{__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,EraIdFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_eraid_free(s,0)}constructor(s){const a=wasm.eraid_new(s);return this.__wbg_ptr=a>>>0,EraIdFinalization.register(this,this.__wbg_ptr,this),this}value(){const s=wasm.eraid_value(this.__wbg_ptr);return BigInt.asUintN(64,s)}}const EventParseResultFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_eventparseresult_free(f>>>0,1));class EventParseResult{__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,EventParseResultFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_eventparseresult_free(s,0)}get err(){const s=wasm.__wbg_get_eventparseresult_err(this.__wbg_ptr);let a;return 0!==s[0]&&(a=getStringFromWasm0(s[0],s[1]).slice(),wasm.__wbindgen_free(s[0],1*s[1],1)),a}set err(s){var a=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.__wbg_set_eventparseresult_err(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get body(){const s=wasm.__wbg_get_eventparseresult_body(this.__wbg_ptr);return 0===s?void 0:Body.__wrap(s)}set body(s){let a=0;isLikeNone(s)||(_assertClass(s,Body),a=s.__destroy_into_raw()),wasm.__wbg_set_eventparseresult_body(this.__wbg_ptr,a)}}const ExecutionResultFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_executionresult_free(f>>>0,1));class ExecutionResult{static __wrap(s){s>>>=0;const a=Object.create(ExecutionResult.prototype);return a.__wbg_ptr=s,ExecutionResultFinalization.register(a,a.__wbg_ptr,a),a}__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,ExecutionResultFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_executionresult_free(s,0)}get Success(){const s=wasm.__wbg_get_executionresult_Success(this.__wbg_ptr);return 0===s?void 0:Version2.__wrap(s)}set Success(s){let a=0;isLikeNone(s)||(_assertClass(s,Version2),a=s.__destroy_into_raw()),wasm.__wbg_set_executionresult_Success(this.__wbg_ptr,a)}get Failure(){const s=wasm.__wbg_get_executionresult_Failure(this.__wbg_ptr);return 0===s?void 0:Failure.__wrap(s)}set Failure(s){let a=0;isLikeNone(s)||(_assertClass(s,Failure),a=s.__destroy_into_raw()),wasm.__wbg_set_executionresult_Failure(this.__wbg_ptr,a)}}const FailureFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_failure_free(f>>>0,1));class Failure{static __wrap(s){s>>>=0;const a=Object.create(Failure.prototype);return a.__wbg_ptr=s,FailureFinalization.register(a,a.__wbg_ptr,a),a}__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,FailureFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_failure_free(s,0)}get cost(){let s,a;try{const u=wasm.__wbg_get_failure_cost(this.__wbg_ptr);return s=u[0],a=u[1],getStringFromWasm0(u[0],u[1])}finally{wasm.__wbindgen_free(s,a,1)}}set cost(s){const a=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.__wbg_set_failure_cost(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get error_message(){let s,a;try{const u=wasm.__wbg_get_failure_error_message(this.__wbg_ptr);return s=u[0],a=u[1],getStringFromWasm0(u[0],u[1])}finally{wasm.__wbindgen_free(s,a,1)}}set error_message(s){const a=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.__wbg_set_failure_error_message(this.__wbg_ptr,a,WASM_VECTOR_LEN)}}const GetAccountResultFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_getaccountresult_free(f>>>0,1));class GetAccountResult{static __wrap(s){s>>>=0;const a=Object.create(GetAccountResult.prototype);return a.__wbg_ptr=s,GetAccountResultFinalization.register(a,a.__wbg_ptr,a),a}__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,GetAccountResultFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_getaccountresult_free(s,0)}get api_version(){return wasm.getaccountresult_api_version(this.__wbg_ptr)}get account(){return wasm.getaccountresult_account(this.__wbg_ptr)}get merkle_proof(){let s,a;try{const u=wasm.getaccountresult_merkle_proof(this.__wbg_ptr);return s=u[0],a=u[1],getStringFromWasm0(u[0],u[1])}finally{wasm.__wbindgen_free(s,a,1)}}toJson(){return wasm.getaccountresult_toJson(this.__wbg_ptr)}}const GetAddressableEntityResultFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_getaddressableentityresult_free(f>>>0,1));class GetAddressableEntityResult{static __wrap(s){s>>>=0;const a=Object.create(GetAddressableEntityResult.prototype);return a.__wbg_ptr=s,GetAddressableEntityResultFinalization.register(a,a.__wbg_ptr,a),a}__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,GetAddressableEntityResultFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_getaddressableentityresult_free(s,0)}get api_version(){return wasm.getaddressableentityresult_api_version(this.__wbg_ptr)}get entity_result(){return wasm.getaddressableentityresult_entity_result(this.__wbg_ptr)}get merkle_proof(){let s,a;try{const u=wasm.getaddressableentityresult_merkle_proof(this.__wbg_ptr);return s=u[0],a=u[1],getStringFromWasm0(u[0],u[1])}finally{wasm.__wbindgen_free(s,a,1)}}toJson(){return wasm.getaddressableentityresult_toJson(this.__wbg_ptr)}}const GetAuctionInfoResultFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_getauctioninforesult_free(f>>>0,1));class GetAuctionInfoResult{static __wrap(s){s>>>=0;const a=Object.create(GetAuctionInfoResult.prototype);return a.__wbg_ptr=s,GetAuctionInfoResultFinalization.register(a,a.__wbg_ptr,a),a}__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,GetAuctionInfoResultFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_getauctioninforesult_free(s,0)}get api_version(){return wasm.getauctioninforesult_api_version(this.__wbg_ptr)}get auction_state(){return wasm.getauctioninforesult_auction_state(this.__wbg_ptr)}toJson(){return wasm.getauctioninforesult_toJson(this.__wbg_ptr)}}const GetBalanceResultFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_getbalanceresult_free(f>>>0,1));class GetBalanceResult{static __wrap(s){s>>>=0;const a=Object.create(GetBalanceResult.prototype);return a.__wbg_ptr=s,GetBalanceResultFinalization.register(a,a.__wbg_ptr,a),a}__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,GetBalanceResultFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_getbalanceresult_free(s,0)}get api_version(){return wasm.getbalanceresult_api_version(this.__wbg_ptr)}get balance_value(){return wasm.getbalanceresult_balance_value(this.__wbg_ptr)}get merkle_proof(){let s,a;try{const u=wasm.getbalanceresult_merkle_proof(this.__wbg_ptr);return s=u[0],a=u[1],getStringFromWasm0(u[0],u[1])}finally{wasm.__wbindgen_free(s,a,1)}}toJson(){return wasm.getbalanceresult_toJson(this.__wbg_ptr)}}const GetBlockResultFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_getblockresult_free(f>>>0,1));class GetBlockResult{static __wrap(s){s>>>=0;const a=Object.create(GetBlockResult.prototype);return a.__wbg_ptr=s,GetBlockResultFinalization.register(a,a.__wbg_ptr,a),a}__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,GetBlockResultFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_getblockresult_free(s,0)}get api_version(){return wasm.getblockresult_api_version(this.__wbg_ptr)}get block(){return wasm.getblockresult_block(this.__wbg_ptr)}toJson(){return wasm.getblockresult_toJson(this.__wbg_ptr)}}const GetBlockTransfersResultFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_getblocktransfersresult_free(f>>>0,1));class GetBlockTransfersResult{static __wrap(s){s>>>=0;const a=Object.create(GetBlockTransfersResult.prototype);return a.__wbg_ptr=s,GetBlockTransfersResultFinalization.register(a,a.__wbg_ptr,a),a}__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,GetBlockTransfersResultFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_getblocktransfersresult_free(s,0)}get api_version(){return wasm.getblocktransfersresult_api_version(this.__wbg_ptr)}get block_hash(){const s=wasm.getblocktransfersresult_block_hash(this.__wbg_ptr);return 0===s?void 0:BlockHash.__wrap(s)}get transfers(){return wasm.getblocktransfersresult_transfers(this.__wbg_ptr)}toJson(){return wasm.getblocktransfersresult_toJson(this.__wbg_ptr)}}const GetChainspecResultFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_getchainspecresult_free(f>>>0,1));class GetChainspecResult{static __wrap(s){s>>>=0;const a=Object.create(GetChainspecResult.prototype);return a.__wbg_ptr=s,GetChainspecResultFinalization.register(a,a.__wbg_ptr,a),a}__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,GetChainspecResultFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_getchainspecresult_free(s,0)}get api_version(){return wasm.getchainspecresult_api_version(this.__wbg_ptr)}get chainspec_bytes(){return wasm.getchainspecresult_chainspec_bytes(this.__wbg_ptr)}toJson(){return wasm.getchainspecresult_toJson(this.__wbg_ptr)}}const GetDeployResultFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_getdeployresult_free(f>>>0,1));class GetDeployResult{static __wrap(s){s>>>=0;const a=Object.create(GetDeployResult.prototype);return a.__wbg_ptr=s,GetDeployResultFinalization.register(a,a.__wbg_ptr,a),a}__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,GetDeployResultFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_getdeployresult_free(s,0)}get api_version(){return wasm.getdeployresult_api_version(this.__wbg_ptr)}get deploy(){const s=wasm.getdeployresult_deploy(this.__wbg_ptr);return Deploy.__wrap(s)}get execution_info(){return wasm.getdeployresult_execution_info(this.__wbg_ptr)}toJson(){return wasm.getdeployresult_toJson(this.__wbg_ptr)}}const GetDictionaryItemResultFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_getdictionaryitemresult_free(f>>>0,1));class GetDictionaryItemResult{static __wrap(s){s>>>=0;const a=Object.create(GetDictionaryItemResult.prototype);return a.__wbg_ptr=s,GetDictionaryItemResultFinalization.register(a,a.__wbg_ptr,a),a}__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,GetDictionaryItemResultFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_getdictionaryitemresult_free(s,0)}get api_version(){return wasm.getdictionaryitemresult_api_version(this.__wbg_ptr)}get dictionary_key(){let s,a;try{const u=wasm.getdictionaryitemresult_dictionary_key(this.__wbg_ptr);return s=u[0],a=u[1],getStringFromWasm0(u[0],u[1])}finally{wasm.__wbindgen_free(s,a,1)}}get stored_value(){return wasm.getdictionaryitemresult_stored_value(this.__wbg_ptr)}get merkle_proof(){let s,a;try{const u=wasm.getdictionaryitemresult_merkle_proof(this.__wbg_ptr);return s=u[0],a=u[1],getStringFromWasm0(u[0],u[1])}finally{wasm.__wbindgen_free(s,a,1)}}toJson(){return wasm.getdictionaryitemresult_toJson(this.__wbg_ptr)}}const GetEraInfoResultFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_geterainforesult_free(f>>>0,1));class GetEraInfoResult{static __wrap(s){s>>>=0;const a=Object.create(GetEraInfoResult.prototype);return a.__wbg_ptr=s,GetEraInfoResultFinalization.register(a,a.__wbg_ptr,a),a}__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,GetEraInfoResultFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_geterainforesult_free(s,0)}get api_version(){return wasm.geterainforesult_api_version(this.__wbg_ptr)}get era_summary(){return wasm.geterainforesult_era_summary(this.__wbg_ptr)}toJson(){return wasm.geterainforesult_toJson(this.__wbg_ptr)}}const GetEraSummaryResultFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_geterasummaryresult_free(f>>>0,1));class GetEraSummaryResult{static __wrap(s){s>>>=0;const a=Object.create(GetEraSummaryResult.prototype);return a.__wbg_ptr=s,GetEraSummaryResultFinalization.register(a,a.__wbg_ptr,a),a}__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,GetEraSummaryResultFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_geterasummaryresult_free(s,0)}get api_version(){return wasm.geterasummaryresult_api_version(this.__wbg_ptr)}get era_summary(){return wasm.geterasummaryresult_era_summary(this.__wbg_ptr)}toJson(){return wasm.geterasummaryresult_toJson(this.__wbg_ptr)}}const GetNodeStatusResultFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_getnodestatusresult_free(f>>>0,1));class GetNodeStatusResult{static __wrap(s){s>>>=0;const a=Object.create(GetNodeStatusResult.prototype);return a.__wbg_ptr=s,GetNodeStatusResultFinalization.register(a,a.__wbg_ptr,a),a}__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,GetNodeStatusResultFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_getnodestatusresult_free(s,0)}get api_version(){return wasm.getnodestatusresult_api_version(this.__wbg_ptr)}get chainspec_name(){let s,a;try{const u=wasm.getnodestatusresult_chainspec_name(this.__wbg_ptr);return s=u[0],a=u[1],getStringFromWasm0(u[0],u[1])}finally{wasm.__wbindgen_free(s,a,1)}}get starting_state_root_hash(){const s=wasm.getnodestatusresult_starting_state_root_hash(this.__wbg_ptr);return Digest.__wrap(s)}get peers(){return wasm.getnodestatusresult_peers(this.__wbg_ptr)}get last_added_block_info(){return wasm.getnodestatusresult_last_added_block_info(this.__wbg_ptr)}get our_public_signing_key(){const s=wasm.getnodestatusresult_our_public_signing_key(this.__wbg_ptr);return 0===s?void 0:PublicKey.__wrap(s)}get round_length(){return wasm.getnodestatusresult_round_length(this.__wbg_ptr)}get next_upgrade(){return wasm.getnodestatusresult_next_upgrade(this.__wbg_ptr)}get build_version(){let s,a;try{const u=wasm.getnodestatusresult_build_version(this.__wbg_ptr);return s=u[0],a=u[1],getStringFromWasm0(u[0],u[1])}finally{wasm.__wbindgen_free(s,a,1)}}get uptime(){return wasm.getnodestatusresult_uptime(this.__wbg_ptr)}get reactor_state(){return wasm.getnodestatusresult_reactor_state(this.__wbg_ptr)}get last_progress(){return wasm.getnodestatusresult_last_progress(this.__wbg_ptr)}get available_block_range(){return wasm.getnodestatusresult_available_block_range(this.__wbg_ptr)}get block_sync(){return wasm.getnodestatusresult_block_sync(this.__wbg_ptr)}toJson(){return wasm.getnodestatusresult_toJson(this.__wbg_ptr)}}const GetPeersResultFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_getpeersresult_free(f>>>0,1));class GetPeersResult{static __wrap(s){s>>>=0;const a=Object.create(GetPeersResult.prototype);return a.__wbg_ptr=s,GetPeersResultFinalization.register(a,a.__wbg_ptr,a),a}__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,GetPeersResultFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_getpeersresult_free(s,0)}get api_version(){return wasm.getpeersresult_api_version(this.__wbg_ptr)}get peers(){return wasm.getpeersresult_peers(this.__wbg_ptr)}toJson(){return wasm.getpeersresult_toJson(this.__wbg_ptr)}}const GetStateRootHashResultFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_getstateroothashresult_free(f>>>0,1));class GetStateRootHashResult{static __wrap(s){s>>>=0;const a=Object.create(GetStateRootHashResult.prototype);return a.__wbg_ptr=s,GetStateRootHashResultFinalization.register(a,a.__wbg_ptr,a),a}__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,GetStateRootHashResultFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_getstateroothashresult_free(s,0)}get api_version(){return wasm.getstateroothashresult_api_version(this.__wbg_ptr)}get state_root_hash(){const s=wasm.getstateroothashresult_state_root_hash(this.__wbg_ptr);return 0===s?void 0:Digest.__wrap(s)}get state_root_hash_as_string(){let s,a;try{const u=wasm.getstateroothashresult_state_root_hash_as_string(this.__wbg_ptr);return s=u[0],a=u[1],getStringFromWasm0(u[0],u[1])}finally{wasm.__wbindgen_free(s,a,1)}}toString(){let s,a;try{const u=wasm.getstateroothashresult_toString(this.__wbg_ptr);return s=u[0],a=u[1],getStringFromWasm0(u[0],u[1])}finally{wasm.__wbindgen_free(s,a,1)}}toJson(){return wasm.getstateroothashresult_toJson(this.__wbg_ptr)}}const GetTransactionResultFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_gettransactionresult_free(f>>>0,1));class GetTransactionResult{static __wrap(s){s>>>=0;const a=Object.create(GetTransactionResult.prototype);return a.__wbg_ptr=s,GetTransactionResultFinalization.register(a,a.__wbg_ptr,a),a}__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,GetTransactionResultFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_gettransactionresult_free(s,0)}get api_version(){return wasm.gettransactionresult_api_version(this.__wbg_ptr)}get transaction(){const s=wasm.gettransactionresult_transaction(this.__wbg_ptr);return Transaction.__wrap(s)}get execution_info(){return wasm.gettransactionresult_execution_info(this.__wbg_ptr)}toJson(){return wasm.gettransactionresult_toJson(this.__wbg_ptr)}}const GetValidatorChangesResultFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_getvalidatorchangesresult_free(f>>>0,1));class GetValidatorChangesResult{static __wrap(s){s>>>=0;const a=Object.create(GetValidatorChangesResult.prototype);return a.__wbg_ptr=s,GetValidatorChangesResultFinalization.register(a,a.__wbg_ptr,a),a}__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,GetValidatorChangesResultFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_getvalidatorchangesresult_free(s,0)}get api_version(){return wasm.getvalidatorchangesresult_api_version(this.__wbg_ptr)}get changes(){return wasm.getvalidatorchangesresult_changes(this.__wbg_ptr)}toJson(){return wasm.getvalidatorchangesresult_toJson(this.__wbg_ptr)}}const GlobalStateIdentifierFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_globalstateidentifier_free(f>>>0,1));class GlobalStateIdentifier{static __wrap(s){s>>>=0;const a=Object.create(GlobalStateIdentifier.prototype);return a.__wbg_ptr=s,GlobalStateIdentifierFinalization.register(a,a.__wbg_ptr,a),a}__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,GlobalStateIdentifierFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_globalstateidentifier_free(s,0)}constructor(s){_assertClass(s,GlobalStateIdentifier);var a=s.__destroy_into_raw();const u=wasm.globalstateidentifier_new(a);return this.__wbg_ptr=u>>>0,GlobalStateIdentifierFinalization.register(this,this.__wbg_ptr,this),this}static fromBlockHash(s){_assertClass(s,BlockHash);var a=s.__destroy_into_raw();const u=wasm.globalstateidentifier_fromBlockHash(a);return GlobalStateIdentifier.__wrap(u)}static fromBlockHeight(s){const a=wasm.globalstateidentifier_fromBlockHeight(s);return GlobalStateIdentifier.__wrap(a)}static fromStateRootHash(s){_assertClass(s,Digest);var a=s.__destroy_into_raw();const u=wasm.globalstateidentifier_fromStateRootHash(a);return GlobalStateIdentifier.__wrap(u)}toJson(){return wasm.globalstateidentifier_toJson(this.__wbg_ptr)}}const HashAddrFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_hashaddr_free(f>>>0,1));class HashAddr{static __wrap(s){s>>>=0;const a=Object.create(HashAddr.prototype);return a.__wbg_ptr=s,HashAddrFinalization.register(a,a.__wbg_ptr,a),a}__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,HashAddrFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_hashaddr_free(s,0)}constructor(s){const a=passArray8ToWasm0(s,wasm.__wbindgen_malloc),g=wasm.hashaddr_new(a,WASM_VECTOR_LEN);if(g[2])throw takeFromExternrefTable0(g[1]);return this.__wbg_ptr=g[0]>>>0,HashAddrFinalization.register(this,this.__wbg_ptr,this),this}toBytes(){const s=wasm.hashaddr_toBytes(this.__wbg_ptr);var a=getArrayU8FromWasm0(s[0],s[1]).slice();return wasm.__wbindgen_free(s[0],1*s[1],1),a}toHexString(){let s,a;try{const u=wasm.hashaddr_toHexString(this.__wbg_ptr);return s=u[0],a=u[1],getStringFromWasm0(u[0],u[1])}finally{wasm.__wbindgen_free(s,a,1)}}}const HashStringFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_hashstring_free(f>>>0,1));class HashString{static __wrap(s){s>>>=0;const a=Object.create(HashString.prototype);return a.__wbg_ptr=s,HashStringFinalization.register(a,a.__wbg_ptr,a),a}__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,HashStringFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_hashstring_free(s,0)}get hash(){let s,a;try{const u=wasm.__wbg_get_hashstring_hash(this.__wbg_ptr);return s=u[0],a=u[1],getStringFromWasm0(u[0],u[1])}finally{wasm.__wbindgen_free(s,a,1)}}set hash(s){const a=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.__wbg_set_failure_cost(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get Deploy(){let s,a;try{const u=wasm.hashstring_Deploy(this.__wbg_ptr);return s=u[0],a=u[1],getStringFromWasm0(u[0],u[1])}finally{wasm.__wbindgen_free(s,a,1)}}get Version1(){let s,a;try{const u=wasm.hashstring_Version1(this.__wbg_ptr);return s=u[0],a=u[1],getStringFromWasm0(u[0],u[1])}finally{wasm.__wbindgen_free(s,a,1)}}toString(){let s,a;try{const u=wasm.hashstring_toString(this.__wbg_ptr);return s=u[0],a=u[1],getStringFromWasm0(u[0],u[1])}finally{wasm.__wbindgen_free(s,a,1)}}}const IntoUnderlyingByteSourceFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_intounderlyingbytesource_free(f>>>0,1));class IntoUnderlyingByteSource{__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,IntoUnderlyingByteSourceFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_intounderlyingbytesource_free(s,0)}get type(){const s=wasm.intounderlyingbytesource_type(this.__wbg_ptr);return __wbindgen_enum_ReadableStreamType[s]}get autoAllocateChunkSize(){return wasm.intounderlyingbytesource_autoAllocateChunkSize(this.__wbg_ptr)>>>0}start(s){wasm.intounderlyingbytesource_start(this.__wbg_ptr,s)}pull(s){return wasm.intounderlyingbytesource_pull(this.__wbg_ptr,s)}cancel(){const s=this.__destroy_into_raw();wasm.intounderlyingbytesource_cancel(s)}}const IntoUnderlyingSinkFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_intounderlyingsink_free(f>>>0,1));class IntoUnderlyingSink{__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,IntoUnderlyingSinkFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_intounderlyingsink_free(s,0)}write(s){return wasm.intounderlyingsink_write(this.__wbg_ptr,s)}close(){const s=this.__destroy_into_raw();return wasm.intounderlyingsink_close(s)}abort(s){const a=this.__destroy_into_raw();return wasm.intounderlyingsink_abort(a,s)}}const IntoUnderlyingSourceFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_intounderlyingsource_free(f>>>0,1));class IntoUnderlyingSource{__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,IntoUnderlyingSourceFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_intounderlyingsource_free(s,0)}pull(s){return wasm.intounderlyingsource_pull(this.__wbg_ptr,s)}cancel(){const s=this.__destroy_into_raw();wasm.intounderlyingsource_cancel(s)}}const KeyFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_key_free(f>>>0,1));class Key{static __wrap(s){s>>>=0;const a=Object.create(Key.prototype);return a.__wbg_ptr=s,KeyFinalization.register(a,a.__wbg_ptr,a),a}__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,KeyFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_key_free(s,0)}constructor(s){_assertClass(s,Key);var a=s.__destroy_into_raw();const u=wasm.key_new(a);if(u[2])throw takeFromExternrefTable0(u[1]);return this.__wbg_ptr=u[0]>>>0,KeyFinalization.register(this,this.__wbg_ptr,this),this}toJson(){return wasm.key_toJson(this.__wbg_ptr)}static fromURef(s){_assertClass(s,URef);var a=s.__destroy_into_raw();const u=wasm.key_fromURef(a);return Key.__wrap(u)}static fromDeployInfo(s){_assertClass(s,DeployHash);var a=s.__destroy_into_raw();const u=wasm.key_fromDeployInfo(a);return Key.__wrap(u)}static fromAccount(s){_assertClass(s,AccountHash);var a=s.__destroy_into_raw();const u=wasm.key_fromAccount(a);return Key.__wrap(u)}static fromHash(s){_assertClass(s,HashAddr);var a=s.__destroy_into_raw();const u=wasm.key_fromHash(a);return Key.__wrap(u)}static fromTransfer(s){const a=passArray8ToWasm0(s,wasm.__wbindgen_malloc),g=wasm.key_fromTransfer(a,WASM_VECTOR_LEN);return TransferAddr.__wrap(g)}static fromEraInfo(s){_assertClass(s,EraId);var a=s.__destroy_into_raw();const u=wasm.key_fromEraInfo(a);return Key.__wrap(u)}static fromBalance(s){_assertClass(s,URefAddr);var a=s.__destroy_into_raw();const u=wasm.key_fromBalance(a);return Key.__wrap(u)}static fromBid(s){_assertClass(s,AccountHash);var a=s.__destroy_into_raw();const u=wasm.key_fromBid(a);return Key.__wrap(u)}static fromWithdraw(s){_assertClass(s,AccountHash);var a=s.__destroy_into_raw();const u=wasm.key_fromWithdraw(a);return Key.__wrap(u)}static fromDictionaryAddr(s){_assertClass(s,DictionaryAddr);var a=s.__destroy_into_raw();const u=wasm.key_fromDictionaryAddr(a);return Key.__wrap(u)}asDictionaryAddr(){const s=wasm.key_asDictionaryAddr(this.__wbg_ptr);return 0===s?void 0:DictionaryAddr.__wrap(s)}static fromSystemEntityRegistry(){const s=wasm.key_fromSystemEntityRegistry();return Key.__wrap(s)}static fromEraSummary(){const s=wasm.key_fromEraSummary();return Key.__wrap(s)}static fromUnbond(s){_assertClass(s,AccountHash);var a=s.__destroy_into_raw();const u=wasm.key_fromUnbond(a);return Key.__wrap(u)}static fromChainspecRegistry(){const s=wasm.key_fromChainspecRegistry();return Key.__wrap(s)}static fromChecksumRegistry(){const s=wasm.key_fromChecksumRegistry();return Key.__wrap(s)}toFormattedString(){let s,a;try{const u=wasm.key_toFormattedString(this.__wbg_ptr);return s=u[0],a=u[1],getStringFromWasm0(u[0],u[1])}finally{wasm.__wbindgen_free(s,a,1)}}static fromFormattedString(s){const a=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),g=wasm.key_fromFormattedString(a,WASM_VECTOR_LEN);if(g[2])throw takeFromExternrefTable0(g[1]);return Key.__wrap(g[0])}static fromDictionaryKey(s,a){_assertClass(s,URef);var u=s.__destroy_into_raw();const g=passArray8ToWasm0(a,wasm.__wbindgen_malloc),v=wasm.key_fromDictionaryKey(u,g,WASM_VECTOR_LEN);return Key.__wrap(v)}isDictionaryKey(){return 0!==wasm.key_isDictionaryKey(this.__wbg_ptr)}intoAccount(){const s=this.__destroy_into_raw(),a=wasm.key_intoAccount(s);return 0===a?void 0:AccountHash.__wrap(a)}intoHash(){const s=this.__destroy_into_raw(),a=wasm.key_intoHash(s);return 0===a?void 0:HashAddr.__wrap(a)}asBalance(){const s=wasm.key_asBalance(this.__wbg_ptr);return 0===s?void 0:URefAddr.__wrap(s)}intoURef(){const s=this.__destroy_into_raw(),a=wasm.key_intoURef(s);return 0===a?void 0:URef.__wrap(a)}urefToHash(){const s=wasm.key_urefToHash(this.__wbg_ptr);return 0===s?void 0:Key.__wrap(s)}withdrawToUnbond(){const s=wasm.key_withdrawToUnbond(this.__wbg_ptr);return 0===s?void 0:Key.__wrap(s)}}const ListRpcsResultFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_listrpcsresult_free(f>>>0,1));class ListRpcsResult{static __wrap(s){s>>>=0;const a=Object.create(ListRpcsResult.prototype);return a.__wbg_ptr=s,ListRpcsResultFinalization.register(a,a.__wbg_ptr,a),a}__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,ListRpcsResultFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_listrpcsresult_free(s,0)}get api_version(){return wasm.listrpcsresult_api_version(this.__wbg_ptr)}get name(){let s,a;try{const u=wasm.listrpcsresult_name(this.__wbg_ptr);return s=u[0],a=u[1],getStringFromWasm0(u[0],u[1])}finally{wasm.__wbindgen_free(s,a,1)}}get schema(){return wasm.listrpcsresult_schema(this.__wbg_ptr)}toJson(){return wasm.listrpcsresult_toJson(this.__wbg_ptr)}}const MessageFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_message_free(f>>>0,1));class Message{static __wrap(s){s>>>=0;const a=Object.create(Message.prototype);return a.__wbg_ptr=s,MessageFinalization.register(a,a.__wbg_ptr,a),a}__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,MessageFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_message_free(s,0)}get String(){let s,a;try{const u=wasm.__wbg_get_message_String(this.__wbg_ptr);return s=u[0],a=u[1],getStringFromWasm0(u[0],u[1])}finally{wasm.__wbindgen_free(s,a,1)}}set String(s){const a=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.__wbg_set_failure_cost(this.__wbg_ptr,a,WASM_VECTOR_LEN)}}const MessagesFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_messages_free(f>>>0,1));class Messages{static __wrap(s){s>>>=0;const a=Object.create(Messages.prototype);return a.__wbg_ptr=s,MessagesFinalization.register(a,a.__wbg_ptr,a),a}static __unwrap(s){return s instanceof Messages?s.__destroy_into_raw():0}__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,MessagesFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_messages_free(s,0)}get entity_hash(){let s,a;try{const u=wasm.__wbg_get_messages_entity_hash(this.__wbg_ptr);return s=u[0],a=u[1],getStringFromWasm0(u[0],u[1])}finally{wasm.__wbindgen_free(s,a,1)}}set entity_hash(s){const a=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.__wbg_set_messages_entity_hash(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get message(){const s=wasm.__wbg_get_messages_message(this.__wbg_ptr);return Message.__wrap(s)}set message(s){_assertClass(s,Message);var a=s.__destroy_into_raw();wasm.__wbg_set_messages_message(this.__wbg_ptr,a)}get topic_name(){let s,a;try{const u=wasm.__wbg_get_messages_topic_name(this.__wbg_ptr);return s=u[0],a=u[1],getStringFromWasm0(u[0],u[1])}finally{wasm.__wbindgen_free(s,a,1)}}set topic_name(s){const a=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.__wbg_set_messages_topic_name(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get topic_name_hash(){let s,a;try{const u=wasm.__wbg_get_messages_topic_name_hash(this.__wbg_ptr);return s=u[0],a=u[1],getStringFromWasm0(u[0],u[1])}finally{wasm.__wbindgen_free(s,a,1)}}set topic_name_hash(s){const a=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.__wbg_set_messages_topic_name_hash(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get topic_index(){return wasm.__wbg_get_messages_topic_index(this.__wbg_ptr)>>>0}set topic_index(s){wasm.__wbg_set_messages_topic_index(this.__wbg_ptr,s)}get block_index(){const s=wasm.__wbg_get_messages_block_index(this.__wbg_ptr);return BigInt.asUintN(64,s)}set block_index(s){wasm.__wbg_set_messages_block_index(this.__wbg_ptr,s)}}const PackageHashFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_packagehash_free(f>>>0,1));class PackageHash{static __wrap(s){s>>>=0;const a=Object.create(PackageHash.prototype);return a.__wbg_ptr=s,PackageHashFinalization.register(a,a.__wbg_ptr,a),a}__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,PackageHashFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_packagehash_free(s,0)}constructor(s){const a=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),g=wasm.packagehash_new_js_alias(a,WASM_VECTOR_LEN);if(g[2])throw takeFromExternrefTable0(g[1]);return this.__wbg_ptr=g[0]>>>0,PackageHashFinalization.register(this,this.__wbg_ptr,this),this}static fromFormattedStr(s){const a=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),g=wasm.packagehash_fromFormattedStr(a,WASM_VECTOR_LEN);if(g[2])throw takeFromExternrefTable0(g[1]);return PackageHash.__wrap(g[0])}toFormattedString(){let s,a;try{const u=wasm.packagehash_toFormattedString(this.__wbg_ptr);return s=u[0],a=u[1],getStringFromWasm0(u[0],u[1])}finally{wasm.__wbindgen_free(s,a,1)}}static fromUint8Array(s){const a=passArray8ToWasm0(s,wasm.__wbindgen_malloc),g=wasm.packagehash_fromUint8Array(a,WASM_VECTOR_LEN);return PackageHash.__wrap(g)}}const PathFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_path_free(f>>>0,1));class Path{static __wrap(s){s>>>=0;const a=Object.create(Path.prototype);return a.__wbg_ptr=s,PathFinalization.register(a,a.__wbg_ptr,a),a}__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,PathFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_path_free(s,0)}constructor(s){const a=wasm.path_new(s);return this.__wbg_ptr=a>>>0,PathFinalization.register(this,this.__wbg_ptr,this),this}static fromArray(s){const a=wasm.path_fromArray(s);return Path.__wrap(a)}toJson(){return wasm.path_toJson(this.__wbg_ptr)}toString(){let s,a;try{const u=wasm.path_toString(this.__wbg_ptr);return s=u[0],a=u[1],getStringFromWasm0(u[0],u[1])}finally{wasm.__wbindgen_free(s,a,1)}}is_empty(){return 0!==wasm.path_is_empty(this.__wbg_ptr)}}const PaymentFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_payment_free(f>>>0,1));class Payment{__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,PaymentFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_payment_free(s,0)}get source(){let s,a;try{const u=wasm.__wbg_get_payment_source(this.__wbg_ptr);return s=u[0],a=u[1],getStringFromWasm0(u[0],u[1])}finally{wasm.__wbindgen_free(s,a,1)}}set source(s){const a=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.__wbg_set_failure_cost(this.__wbg_ptr,a,WASM_VECTOR_LEN)}}const PaymentStrParamsFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_paymentstrparams_free(f>>>0,1));class PaymentStrParams{__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,PaymentStrParamsFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_paymentstrparams_free(s,0)}constructor(s,a,u,g,y,v,S,A,M,B){var X=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),de=WASM_VECTOR_LEN,le=isLikeNone(a)?0:passStringToWasm0(a,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),ue=WASM_VECTOR_LEN,ot=isLikeNone(u)?0:passStringToWasm0(u,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),rt=WASM_VECTOR_LEN,st=isLikeNone(g)?0:passStringToWasm0(g,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),Ft=WASM_VECTOR_LEN,Dn=isLikeNone(y)?0:passStringToWasm0(y,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),Tn=WASM_VECTOR_LEN,Gn=isLikeNone(v)?0:passStringToWasm0(v,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),In=WASM_VECTOR_LEN,qn=isLikeNone(A)?0:passStringToWasm0(A,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),_r=WASM_VECTOR_LEN,Mn=isLikeNone(M)?0:passStringToWasm0(M,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),ln=WASM_VECTOR_LEN,Nn=isLikeNone(B)?0:passStringToWasm0(B,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),dr=WASM_VECTOR_LEN;const fr=wasm.paymentstrparams_new(X,de,le,ue,ot,rt,st,Ft,Dn,Tn,Gn,In,isLikeNone(S)?0:addToExternrefTable0(S),qn,_r,Mn,ln,Nn,dr);return this.__wbg_ptr=fr>>>0,PaymentStrParamsFinalization.register(this,this.__wbg_ptr,this),this}get payment_amount(){const s=wasm.paymentstrparams_payment_amount(this.__wbg_ptr);let a;return 0!==s[0]&&(a=getStringFromWasm0(s[0],s[1]).slice(),wasm.__wbindgen_free(s[0],1*s[1],1)),a}set payment_amount(s){const a=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.paymentstrparams_set_payment_amount(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get payment_hash(){const s=wasm.paymentstrparams_payment_hash(this.__wbg_ptr);let a;return 0!==s[0]&&(a=getStringFromWasm0(s[0],s[1]).slice(),wasm.__wbindgen_free(s[0],1*s[1],1)),a}set payment_hash(s){const a=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.paymentstrparams_set_payment_hash(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get payment_name(){const s=wasm.paymentstrparams_payment_name(this.__wbg_ptr);let a;return 0!==s[0]&&(a=getStringFromWasm0(s[0],s[1]).slice(),wasm.__wbindgen_free(s[0],1*s[1],1)),a}set payment_name(s){const a=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.paymentstrparams_set_payment_name(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get payment_package_hash(){const s=wasm.paymentstrparams_payment_package_hash(this.__wbg_ptr);let a;return 0!==s[0]&&(a=getStringFromWasm0(s[0],s[1]).slice(),wasm.__wbindgen_free(s[0],1*s[1],1)),a}set payment_package_hash(s){const a=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.paymentstrparams_set_payment_package_hash(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get payment_package_name(){const s=wasm.paymentstrparams_payment_package_name(this.__wbg_ptr);let a;return 0!==s[0]&&(a=getStringFromWasm0(s[0],s[1]).slice(),wasm.__wbindgen_free(s[0],1*s[1],1)),a}set payment_package_name(s){const a=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.paymentstrparams_set_payment_package_name(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get payment_path(){const s=wasm.paymentstrparams_payment_path(this.__wbg_ptr);let a;return 0!==s[0]&&(a=getStringFromWasm0(s[0],s[1]).slice(),wasm.__wbindgen_free(s[0],1*s[1],1)),a}set payment_path(s){const a=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.paymentstrparams_set_payment_path(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get payment_args_simple(){return wasm.paymentstrparams_payment_args_simple(this.__wbg_ptr)}set payment_args_simple(s){wasm.paymentstrparams_set_payment_args_simple(this.__wbg_ptr,s)}get payment_args_json(){const s=wasm.paymentstrparams_payment_args_json(this.__wbg_ptr);let a;return 0!==s[0]&&(a=getStringFromWasm0(s[0],s[1]).slice(),wasm.__wbindgen_free(s[0],1*s[1],1)),a}set payment_args_json(s){const a=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.paymentstrparams_set_payment_args_json(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get payment_version(){const s=wasm.paymentstrparams_payment_version(this.__wbg_ptr);let a;return 0!==s[0]&&(a=getStringFromWasm0(s[0],s[1]).slice(),wasm.__wbindgen_free(s[0],1*s[1],1)),a}set payment_version(s){const a=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.paymentstrparams_set_payment_version(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get payment_entry_point(){const s=wasm.paymentstrparams_payment_entry_point(this.__wbg_ptr);let a;return 0!==s[0]&&(a=getStringFromWasm0(s[0],s[1]).slice(),wasm.__wbindgen_free(s[0],1*s[1],1)),a}set payment_entry_point(s){const a=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.paymentstrparams_set_payment_entry_point(this.__wbg_ptr,a,WASM_VECTOR_LEN)}}const PeerEntryFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_peerentry_free(f>>>0,1));class PeerEntry{__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,PeerEntryFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_peerentry_free(s,0)}get node_id(){let s,a;try{const u=wasm.peerentry_node_id(this.__wbg_ptr);return s=u[0],a=u[1],getStringFromWasm0(u[0],u[1])}finally{wasm.__wbindgen_free(s,a,1)}}get address(){let s,a;try{const u=wasm.peerentry_address(this.__wbg_ptr);return s=u[0],a=u[1],getStringFromWasm0(u[0],u[1])}finally{wasm.__wbindgen_free(s,a,1)}}}const PublicKeyFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_publickey_free(f>>>0,1));class PublicKey{static __wrap(s){s>>>=0;const a=Object.create(PublicKey.prototype);return a.__wbg_ptr=s,PublicKeyFinalization.register(a,a.__wbg_ptr,a),a}__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,PublicKeyFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_publickey_free(s,0)}constructor(s){const a=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),g=wasm.publickey_new_js_alias(a,WASM_VECTOR_LEN);if(g[2])throw takeFromExternrefTable0(g[1]);return this.__wbg_ptr=g[0]>>>0,PublicKeyFinalization.register(this,this.__wbg_ptr,this),this}static fromUint8Array(s){const a=passArray8ToWasm0(s,wasm.__wbindgen_malloc),g=wasm.publickey_fromUint8Array(a,WASM_VECTOR_LEN);if(g[2])throw takeFromExternrefTable0(g[1]);return PublicKey.__wrap(g[0])}toAccountHash(){const s=wasm.publickey_toAccountHash(this.__wbg_ptr);return AccountHash.__wrap(s)}toPurseUref(){const s=wasm.publickey_toPurseUref(this.__wbg_ptr);return URef.__wrap(s)}toJson(){return wasm.publickey_toJson(this.__wbg_ptr)}}const PublicKeyStringFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_publickeystring_free(f>>>0,1));class PublicKeyString{static __wrap(s){s>>>=0;const a=Object.create(PublicKeyString.prototype);return a.__wbg_ptr=s,PublicKeyStringFinalization.register(a,a.__wbg_ptr,a),a}__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,PublicKeyStringFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_publickeystring_free(s,0)}get PublicKey(){let s,a;try{const u=wasm.__wbg_get_publickeystring_PublicKey(this.__wbg_ptr);return s=u[0],a=u[1],getStringFromWasm0(u[0],u[1])}finally{wasm.__wbindgen_free(s,a,1)}}set PublicKey(s){const a=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.__wbg_set_failure_cost(this.__wbg_ptr,a,WASM_VECTOR_LEN)}}const PurseIdentifierFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_purseidentifier_free(f>>>0,1));class PurseIdentifier{static __wrap(s){s>>>=0;const a=Object.create(PurseIdentifier.prototype);return a.__wbg_ptr=s,PurseIdentifierFinalization.register(a,a.__wbg_ptr,a),a}__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,PurseIdentifierFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_purseidentifier_free(s,0)}constructor(s){_assertClass(s,PublicKey);var a=s.__destroy_into_raw();const u=wasm.entityidentifier_fromPublicKey(a);return this.__wbg_ptr=u>>>0,PurseIdentifierFinalization.register(this,this.__wbg_ptr,this),this}static fromAccountHash(s){_assertClass(s,AccountHash);var a=s.__destroy_into_raw();const u=wasm.entityidentifier_fromAccountHash(a);return PurseIdentifier.__wrap(u)}static fromURef(s){_assertClass(s,URef);var a=s.__destroy_into_raw();const u=wasm.purseidentifier_fromURef(a);return PurseIdentifier.__wrap(u)}toJson(){return wasm.purseidentifier_toJson(this.__wbg_ptr)}}const PutDeployResultFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_putdeployresult_free(f>>>0,1));class PutDeployResult{static __wrap(s){s>>>=0;const a=Object.create(PutDeployResult.prototype);return a.__wbg_ptr=s,PutDeployResultFinalization.register(a,a.__wbg_ptr,a),a}__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,PutDeployResultFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_putdeployresult_free(s,0)}get api_version(){return wasm.putdeployresult_api_version(this.__wbg_ptr)}get deploy_hash(){const s=wasm.putdeployresult_deploy_hash(this.__wbg_ptr);return DeployHash.__wrap(s)}toJson(){return wasm.putdeployresult_toJson(this.__wbg_ptr)}}const PutTransactionResultFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_puttransactionresult_free(f>>>0,1));class PutTransactionResult{static __wrap(s){s>>>=0;const a=Object.create(PutTransactionResult.prototype);return a.__wbg_ptr=s,PutTransactionResultFinalization.register(a,a.__wbg_ptr,a),a}__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,PutTransactionResultFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_puttransactionresult_free(s,0)}get api_version(){return wasm.puttransactionresult_api_version(this.__wbg_ptr)}get transaction_hash(){const s=wasm.puttransactionresult_transaction_hash(this.__wbg_ptr);return TransactionHash.__wrap(s)}toJson(){return wasm.puttransactionresult_toJson(this.__wbg_ptr)}}const QueryBalanceDetailsResultFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_querybalancedetailsresult_free(f>>>0,1));class QueryBalanceDetailsResult{static __wrap(s){s>>>=0;const a=Object.create(QueryBalanceDetailsResult.prototype);return a.__wbg_ptr=s,QueryBalanceDetailsResultFinalization.register(a,a.__wbg_ptr,a),a}__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,QueryBalanceDetailsResultFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_querybalancedetailsresult_free(s,0)}get api_version(){return wasm.querybalancedetailsresult_api_version(this.__wbg_ptr)}get total_balance(){return wasm.querybalancedetailsresult_total_balance(this.__wbg_ptr)}get available_balance(){return wasm.querybalancedetailsresult_available_balance(this.__wbg_ptr)}get total_balance_proof(){return wasm.querybalancedetailsresult_total_balance_proof(this.__wbg_ptr)}get holds(){return wasm.querybalancedetailsresult_holds(this.__wbg_ptr)}toJson(){return wasm.querybalancedetailsresult_toJson(this.__wbg_ptr)}}const QueryBalanceResultFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_querybalanceresult_free(f>>>0,1));class QueryBalanceResult{static __wrap(s){s>>>=0;const a=Object.create(QueryBalanceResult.prototype);return a.__wbg_ptr=s,QueryBalanceResultFinalization.register(a,a.__wbg_ptr,a),a}__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,QueryBalanceResultFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_querybalanceresult_free(s,0)}get api_version(){return wasm.querybalanceresult_api_version(this.__wbg_ptr)}get balance(){return wasm.querybalanceresult_balance(this.__wbg_ptr)}toJson(){return wasm.querybalanceresult_toJson(this.__wbg_ptr)}}const QueryGlobalStateResultFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_queryglobalstateresult_free(f>>>0,1));class QueryGlobalStateResult{static __wrap(s){s>>>=0;const a=Object.create(QueryGlobalStateResult.prototype);return a.__wbg_ptr=s,QueryGlobalStateResultFinalization.register(a,a.__wbg_ptr,a),a}__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,QueryGlobalStateResultFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_queryglobalstateresult_free(s,0)}get api_version(){return wasm.queryglobalstateresult_api_version(this.__wbg_ptr)}get block_header(){return wasm.queryglobalstateresult_block_header(this.__wbg_ptr)}get stored_value(){return wasm.queryglobalstateresult_stored_value(this.__wbg_ptr)}get merkle_proof(){let s,a;try{const u=wasm.queryglobalstateresult_merkle_proof(this.__wbg_ptr);return s=u[0],a=u[1],getStringFromWasm0(u[0],u[1])}finally{wasm.__wbindgen_free(s,a,1)}}toJson(){return wasm.queryglobalstateresult_toJson(this.__wbg_ptr)}}const RecordIdFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_recordid_free(f>>>0,1));class RecordId{__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,RecordIdFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_recordid_free(s,0)}constructor(s){const a=wasm.recordid_new_js_alias(s);if(a[2])throw takeFromExternrefTable0(a[1]);return this.__wbg_ptr=a[0]>>>0,RecordIdFinalization.register(this,this.__wbg_ptr,this),this}}const SDKFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_sdk_free(f>>>0,1));class SDK{__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,SDKFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_sdk_free(s,0)}get_balance_options(s){const a=wasm.sdk_get_balance_options(this.__wbg_ptr,s);if(a[2])throw takeFromExternrefTable0(a[1]);return getBalanceOptions.__wrap(a[0])}get_balance(s){let a=0;return isLikeNone(s)||(_assertClass(s,getBalanceOptions),a=s.__destroy_into_raw()),wasm.sdk_get_balance(this.__wbg_ptr,a)}state_get_balance(s){let a=0;return isLikeNone(s)||(_assertClass(s,getBalanceOptions),a=s.__destroy_into_raw()),wasm.sdk_state_get_balance(this.__wbg_ptr,a)}get_dictionary_item_options(s){const a=wasm.sdk_get_dictionary_item_options(this.__wbg_ptr,s);if(a[2])throw takeFromExternrefTable0(a[1]);return getDictionaryItemOptions.__wrap(a[0])}get_dictionary_item(s){let a=0;return isLikeNone(s)||(_assertClass(s,getDictionaryItemOptions),a=s.__destroy_into_raw()),wasm.sdk_get_dictionary_item(this.__wbg_ptr,a)}state_get_dictionary_item(s){let a=0;return isLikeNone(s)||(_assertClass(s,getDictionaryItemOptions),a=s.__destroy_into_raw()),wasm.sdk_state_get_dictionary_item(this.__wbg_ptr,a)}transaction(s,a,u,g){_assertClass(s,TransactionBuilderParams);var y=s.__destroy_into_raw();_assertClass(a,TransactionStrParams);var v=a.__destroy_into_raw(),S=isLikeNone(g)?0:passStringToWasm0(g,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),A=WASM_VECTOR_LEN;return wasm.sdk_transaction(this.__wbg_ptr,y,v,isLikeNone(u)?3:u,S,A)}query_contract_dict_options(s){const a=wasm.sdk_query_contract_dict_options(this.__wbg_ptr,s);if(a[2])throw takeFromExternrefTable0(a[1]);return queryContractDictOptions.__wrap(a[0])}query_contract_dict(s){let a=0;return isLikeNone(s)||(_assertClass(s,queryContractDictOptions),a=s.__destroy_into_raw()),wasm.sdk_query_contract_dict(this.__wbg_ptr,a)}deploy(s,a,u,g,y){_assertClass(s,DeployStrParams);var v=s.__destroy_into_raw();_assertClass(a,SessionStrParams);var S=a.__destroy_into_raw();_assertClass(u,PaymentStrParams);var A=u.__destroy_into_raw(),M=isLikeNone(y)?0:passStringToWasm0(y,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),B=WASM_VECTOR_LEN;return wasm.sdk_deploy(this.__wbg_ptr,v,S,A,isLikeNone(g)?3:g,M,B)}get_deploy_options(s){const a=wasm.sdk_get_deploy_options(this.__wbg_ptr,s);if(a[2])throw takeFromExternrefTable0(a[1]);return getDeployOptions.__wrap(a[0])}get_deploy(s){let a=0;return isLikeNone(s)||(_assertClass(s,getDeployOptions),a=s.__destroy_into_raw()),wasm.sdk_get_deploy(this.__wbg_ptr,a)}info_get_deploy(s){let a=0;return isLikeNone(s)||(_assertClass(s,getDeployOptions),a=s.__destroy_into_raw()),wasm.sdk_info_get_deploy(this.__wbg_ptr,a)}get_transaction_options(s){const a=wasm.sdk_get_transaction_options(this.__wbg_ptr,s);if(a[2])throw takeFromExternrefTable0(a[1]);return getTransactionOptions.__wrap(a[0])}get_transaction(s){let a=0;return isLikeNone(s)||(_assertClass(s,getTransactionOptions),a=s.__destroy_into_raw()),wasm.sdk_get_transaction(this.__wbg_ptr,a)}info_get_transaction(s){let a=0;return isLikeNone(s)||(_assertClass(s,getTransactionOptions),a=s.__destroy_into_raw()),wasm.sdk_info_get_transaction(this.__wbg_ptr,a)}get_speculative_exec_options(s){const a=wasm.sdk_get_speculative_exec_options(this.__wbg_ptr,s);if(a[2])throw takeFromExternrefTable0(a[1]);return getSpeculativeExecTxnOptions.__wrap(a[0])}speculative_exec(s){let a=0;return isLikeNone(s)||(_assertClass(s,getSpeculativeExecTxnOptions),a=s.__destroy_into_raw()),wasm.sdk_speculative_exec(this.__wbg_ptr,a)}make_transfer(s,a,u,g,y){const v=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),S=WASM_VECTOR_LEN,A=passStringToWasm0(a,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),M=WASM_VECTOR_LEN;var B=isLikeNone(u)?0:passStringToWasm0(u,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),X=WASM_VECTOR_LEN;_assertClass(g,DeployStrParams);var de=g.__destroy_into_raw();_assertClass(y,PaymentStrParams);var le=y.__destroy_into_raw();const ue=wasm.sdk_make_transfer(this.__wbg_ptr,v,S,A,M,B,X,de,le);if(ue[2])throw takeFromExternrefTable0(ue[1]);return Deploy.__wrap(ue[0])}make_transfer_transaction(s,a,u,g,y){let v=0;isLikeNone(s)||(_assertClass(s,URef),v=s.__destroy_into_raw());const S=passStringToWasm0(a,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),A=WASM_VECTOR_LEN,M=passStringToWasm0(u,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),B=WASM_VECTOR_LEN;_assertClass(g,TransactionStrParams);var X=g.__destroy_into_raw(),de=isLikeNone(y)?0:passStringToWasm0(y,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);const ue=wasm.sdk_make_transfer_transaction(this.__wbg_ptr,v,S,A,M,B,X,de,WASM_VECTOR_LEN);if(ue[2])throw takeFromExternrefTable0(ue[1]);return Transaction.__wrap(ue[0])}get_era_info_options(s){const a=wasm.sdk_get_era_info_options(this.__wbg_ptr,s);if(a[2])throw takeFromExternrefTable0(a[1]);return getEraInfoOptions.__wrap(a[0])}get_era_info(s){let a=0;return isLikeNone(s)||(_assertClass(s,getEraInfoOptions),a=s.__destroy_into_raw()),wasm.sdk_get_era_info(this.__wbg_ptr,a)}chain_get_era_info_by_switch_block(s){let a=0;return isLikeNone(s)||(_assertClass(s,getEraInfoOptions),a=s.__destroy_into_raw()),wasm.sdk_chain_get_era_info_by_switch_block(this.__wbg_ptr,a)}transfer(s,a,u,g,y,v,S){const A=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),M=WASM_VECTOR_LEN,B=passStringToWasm0(a,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),X=WASM_VECTOR_LEN;var de=isLikeNone(u)?0:passStringToWasm0(u,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),le=WASM_VECTOR_LEN;_assertClass(g,DeployStrParams);var ue=g.__destroy_into_raw();_assertClass(y,PaymentStrParams);var ot=y.__destroy_into_raw(),rt=isLikeNone(S)?0:passStringToWasm0(S,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),st=WASM_VECTOR_LEN;return wasm.sdk_transfer(this.__wbg_ptr,A,M,B,X,de,le,ue,ot,isLikeNone(v)?3:v,rt,st)}get_entity_options(s){const a=wasm.sdk_get_entity_options(this.__wbg_ptr,s);if(a[2])throw takeFromExternrefTable0(a[1]);return getEntityOptions.__wrap(a[0])}get_entity(s){let a=0;return isLikeNone(s)||(_assertClass(s,getEntityOptions),a=s.__destroy_into_raw()),wasm.sdk_get_entity(this.__wbg_ptr,a)}state_get_entity(s){let a=0;return isLikeNone(s)||(_assertClass(s,getEntityOptions),a=s.__destroy_into_raw()),wasm.sdk_state_get_entity(this.__wbg_ptr,a)}put_transaction(s,a,u){_assertClass(s,Transaction);var g=s.__destroy_into_raw(),y=isLikeNone(u)?0:passStringToWasm0(u,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),v=WASM_VECTOR_LEN;return wasm.sdk_put_transaction(this.__wbg_ptr,g,isLikeNone(a)?3:a,y,v)}account_put_transaction(s,a,u){_assertClass(s,Transaction);var g=s.__destroy_into_raw(),y=isLikeNone(u)?0:passStringToWasm0(u,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),v=WASM_VECTOR_LEN;return wasm.sdk_account_put_transaction(this.__wbg_ptr,g,isLikeNone(a)?3:a,y,v)}query_balance_details_options(s){const a=wasm.sdk_query_balance_details_options(this.__wbg_ptr,s);if(a[2])throw takeFromExternrefTable0(a[1]);return queryBalanceDetailsOptions.__wrap(a[0])}query_balance_details(s){let a=0;return isLikeNone(s)||(_assertClass(s,queryBalanceDetailsOptions),a=s.__destroy_into_raw()),wasm.sdk_query_balance_details(this.__wbg_ptr,a)}query_global_state_options(s){const a=wasm.sdk_query_global_state_options(this.__wbg_ptr,s);if(a[2])throw takeFromExternrefTable0(a[1]);return queryGlobalStateOptions.__wrap(a[0])}query_global_state(s){let a=0;return isLikeNone(s)||(_assertClass(s,queryGlobalStateOptions),a=s.__destroy_into_raw()),wasm.sdk_query_global_state(this.__wbg_ptr,a)}install(s,a,u){_assertClass(s,TransactionStrParams);var g=s.__destroy_into_raw();_assertClass(a,Bytes);var y=a.__destroy_into_raw(),v=isLikeNone(u)?0:passStringToWasm0(u,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);return wasm.sdk_install(this.__wbg_ptr,g,y,v,WASM_VECTOR_LEN)}install_deploy(s,a,u,g){_assertClass(s,DeployStrParams);var y=s.__destroy_into_raw();_assertClass(a,SessionStrParams);var v=a.__destroy_into_raw();const S=passStringToWasm0(u,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),A=WASM_VECTOR_LEN;var M=isLikeNone(g)?0:passStringToWasm0(g,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);return wasm.sdk_install_deploy(this.__wbg_ptr,y,v,S,A,M,WASM_VECTOR_LEN)}speculative_deploy(s,a,u,g,y){_assertClass(s,DeployStrParams);var v=s.__destroy_into_raw();_assertClass(a,SessionStrParams);var S=a.__destroy_into_raw();_assertClass(u,PaymentStrParams);var A=u.__destroy_into_raw(),M=isLikeNone(y)?0:passStringToWasm0(y,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),B=WASM_VECTOR_LEN;return wasm.sdk_speculative_deploy(this.__wbg_ptr,v,S,A,isLikeNone(g)?3:g,M,B)}get_block_transfers_options(s){const a=wasm.sdk_get_block_transfers_options(this.__wbg_ptr,s);if(a[2])throw takeFromExternrefTable0(a[1]);return getBlockTransfersOptions.__wrap(a[0])}get_block_transfers(s){let a=0;return isLikeNone(s)||(_assertClass(s,getBlockTransfersOptions),a=s.__destroy_into_raw()),wasm.sdk_get_block_transfers(this.__wbg_ptr,a)}chain_get_block_transfers(s){let a=0;return isLikeNone(s)||(_assertClass(s,getBlockTransfersOptions),a=s.__destroy_into_raw()),wasm.sdk_chain_get_block_transfers(this.__wbg_ptr,a)}query_balance_options(s){const a=wasm.sdk_query_balance_options(this.__wbg_ptr,s);if(a[2])throw takeFromExternrefTable0(a[1]);return queryBalanceOptions.__wrap(a[0])}query_balance(s){let a=0;return isLikeNone(s)||(_assertClass(s,queryBalanceOptions),a=s.__destroy_into_raw()),wasm.sdk_query_balance(this.__wbg_ptr,a)}get_speculative_exec_deploy_options(s){const a=wasm.sdk_get_speculative_exec_deploy_options(this.__wbg_ptr,s);if(a[2])throw takeFromExternrefTable0(a[1]);return getSpeculativeExecDeployOptions.__wrap(a[0])}speculative_exec_deploy(s){let a=0;return isLikeNone(s)||(_assertClass(s,getSpeculativeExecDeployOptions),a=s.__destroy_into_raw()),wasm.sdk_speculative_exec_deploy(this.__wbg_ptr,a)}call_entrypoint(s,a,u){_assertClass(s,TransactionBuilderParams);var g=s.__destroy_into_raw();_assertClass(a,TransactionStrParams);var y=a.__destroy_into_raw(),v=isLikeNone(u)?0:passStringToWasm0(u,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);return wasm.sdk_call_entrypoint(this.__wbg_ptr,g,y,v,WASM_VECTOR_LEN)}constructor(s,a,u){var g=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),y=WASM_VECTOR_LEN,v=isLikeNone(a)?0:passStringToWasm0(a,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);const A=wasm.sdk_new(g,y,v,WASM_VECTOR_LEN,isLikeNone(u)?3:u);return this.__wbg_ptr=A>>>0,SDKFinalization.register(this,this.__wbg_ptr,this),this}getRPCAddress(s){let a,u;try{var g=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);const v=wasm.sdk_getRPCAddress(this.__wbg_ptr,g,WASM_VECTOR_LEN);return a=v[0],u=v[1],getStringFromWasm0(v[0],v[1])}finally{wasm.__wbindgen_free(a,u,1)}}setRPCAddress(s){var a=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);const g=wasm.sdk_setRPCAddress(this.__wbg_ptr,a,WASM_VECTOR_LEN);if(g[1])throw takeFromExternrefTable0(g[0])}getNodeAddress(s){let a,u;try{var g=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);const v=wasm.sdk_getNodeAddress(this.__wbg_ptr,g,WASM_VECTOR_LEN);return a=v[0],u=v[1],getStringFromWasm0(v[0],v[1])}finally{wasm.__wbindgen_free(a,u,1)}}setNodeAddress(s){var a=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);const g=wasm.sdk_setNodeAddress(this.__wbg_ptr,a,WASM_VECTOR_LEN);if(g[1])throw takeFromExternrefTable0(g[0])}getVerbosity(s){return wasm.sdk_getVerbosity(this.__wbg_ptr,isLikeNone(s)?3:s)}setVerbosity(s){const a=wasm.sdk_setVerbosity(this.__wbg_ptr,isLikeNone(s)?3:s);if(a[1])throw takeFromExternrefTable0(a[0])}speculative_transfer(s,a,u,g,y,v,S){const A=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),M=WASM_VECTOR_LEN,B=passStringToWasm0(a,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),X=WASM_VECTOR_LEN;var de=isLikeNone(u)?0:passStringToWasm0(u,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),le=WASM_VECTOR_LEN;_assertClass(g,DeployStrParams);var ue=g.__destroy_into_raw();_assertClass(y,PaymentStrParams);var ot=y.__destroy_into_raw(),rt=isLikeNone(S)?0:passStringToWasm0(S,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),st=WASM_VECTOR_LEN;return wasm.sdk_speculative_transfer(this.__wbg_ptr,A,M,B,X,de,le,ue,ot,isLikeNone(v)?3:v,rt,st)}get_state_root_hash_options(s){const a=wasm.sdk_get_state_root_hash_options(this.__wbg_ptr,s);if(a[2])throw takeFromExternrefTable0(a[1]);return getStateRootHashOptions.__wrap(a[0])}get_state_root_hash(s){let a=0;return isLikeNone(s)||(_assertClass(s,getStateRootHashOptions),a=s.__destroy_into_raw()),wasm.sdk_get_state_root_hash(this.__wbg_ptr,a)}chain_get_state_root_hash(s){let a=0;return isLikeNone(s)||(_assertClass(s,getStateRootHashOptions),a=s.__destroy_into_raw()),wasm.sdk_chain_get_state_root_hash(this.__wbg_ptr,a)}put_deploy(s,a,u){_assertClass(s,Deploy);var g=s.__destroy_into_raw(),y=isLikeNone(u)?0:passStringToWasm0(u,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),v=WASM_VECTOR_LEN;return wasm.sdk_put_deploy(this.__wbg_ptr,g,isLikeNone(a)?3:a,y,v)}account_put_deploy(s,a,u){_assertClass(s,Deploy);var g=s.__destroy_into_raw(),y=isLikeNone(u)?0:passStringToWasm0(u,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),v=WASM_VECTOR_LEN;return wasm.sdk_account_put_deploy(this.__wbg_ptr,g,isLikeNone(a)?3:a,y,v)}speculative_transaction(s,a,u,g){_assertClass(s,TransactionBuilderParams);var y=s.__destroy_into_raw();_assertClass(a,TransactionStrParams);var v=a.__destroy_into_raw(),S=isLikeNone(g)?0:passStringToWasm0(g,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),A=WASM_VECTOR_LEN;return wasm.sdk_speculative_transaction(this.__wbg_ptr,y,v,isLikeNone(u)?3:u,S,A)}watchDeploy(s,a){const u=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),y=wasm.sdk_watchDeploy(this.__wbg_ptr,u,WASM_VECTOR_LEN,!isLikeNone(a),isLikeNone(a)?0:a);return Watcher.__wrap(y)}watchTransaction(s,a){const u=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),y=wasm.sdk_watchTransaction(this.__wbg_ptr,u,WASM_VECTOR_LEN,!isLikeNone(a),isLikeNone(a)?0:a);return Watcher.__wrap(y)}waitDeploy(s,a,u){const g=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),y=WASM_VECTOR_LEN,v=passStringToWasm0(a,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);return wasm.sdk_waitDeploy(this.__wbg_ptr,g,y,v,WASM_VECTOR_LEN,!isLikeNone(u),isLikeNone(u)?0:u)}waitTransaction(s,a,u){const g=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),y=WASM_VECTOR_LEN,v=passStringToWasm0(a,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);return wasm.sdk_waitTransaction(this.__wbg_ptr,g,y,v,WASM_VECTOR_LEN,!isLikeNone(u),isLikeNone(u)?0:u)}get_binary_latest_switch_block_header(s){var a=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);return wasm.sdk_get_binary_latest_switch_block_header(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get_binary_latest_block_header(s){var a=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);return wasm.sdk_get_binary_latest_block_header(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get_binary_block_header_by_height(s,a){var u=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);return wasm.sdk_get_binary_block_header_by_height(this.__wbg_ptr,u,WASM_VECTOR_LEN,a)}get_binary_block_header_by_hash(s,a){var u=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),g=WASM_VECTOR_LEN;_assertClass(a,BlockHash);var y=a.__destroy_into_raw();return wasm.sdk_get_binary_block_header_by_hash(this.__wbg_ptr,u,g,y)}get_binary_latest_signed_block(s){var a=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);return wasm.sdk_get_binary_latest_signed_block(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get_binary_signed_block_by_height(s,a){var u=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);return wasm.sdk_get_binary_signed_block_by_height(this.__wbg_ptr,u,WASM_VECTOR_LEN,a)}get_binary_signed_block_by_hash(s,a){var u=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),g=WASM_VECTOR_LEN;_assertClass(a,BlockHash);var y=a.__destroy_into_raw();return wasm.sdk_get_binary_signed_block_by_hash(this.__wbg_ptr,u,g,y)}get_binary_transaction_by_hash(s,a,u){var g=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),y=WASM_VECTOR_LEN;_assertClass(a,TransactionHash);var v=a.__destroy_into_raw();return wasm.sdk_get_binary_transaction_by_hash(this.__wbg_ptr,g,y,v,u)}get_binary_peers(s){var a=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);return wasm.sdk_get_binary_peers(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get_binary_uptime(s){var a=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);return wasm.sdk_get_binary_uptime(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get_binary_last_progress(s){var a=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);return wasm.sdk_get_binary_last_progress(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get_binary_reactor_state(s){var a=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);return wasm.sdk_get_binary_reactor_state(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get_binary_network_name(s){var a=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);return wasm.sdk_get_binary_network_name(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get_binary_consensus_validator_changes(s){var a=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);return wasm.sdk_get_binary_consensus_validator_changes(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get_binary_block_synchronizer_status(s){var a=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);return wasm.sdk_get_binary_block_synchronizer_status(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get_binary_available_block_range(s){var a=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);return wasm.sdk_get_binary_available_block_range(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get_binary_next_upgrade(s){var a=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);return wasm.sdk_get_binary_next_upgrade(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get_binary_consensus_status(s){var a=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);return wasm.sdk_get_binary_consensus_status(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get_binary_chainspec_raw_bytes(s){var a=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);return wasm.sdk_get_binary_chainspec_raw_bytes(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get_binary_node_status(s){var a=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);return wasm.sdk_get_binary_node_status(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get_binary_get_validator_reward_by_era(s,a,u){var g=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),y=WASM_VECTOR_LEN;_assertClass(a,PublicKey);var v=a.__destroy_into_raw();_assertClass(u,EraId);var S=u.__destroy_into_raw();return wasm.sdk_get_binary_get_validator_reward_by_era(this.__wbg_ptr,g,y,v,S)}get_binary_get_validator_reward_by_block_height(s,a,u){var g=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),y=WASM_VECTOR_LEN;_assertClass(a,PublicKey);var v=a.__destroy_into_raw();return wasm.sdk_get_binary_get_validator_reward_by_block_height(this.__wbg_ptr,g,y,v,u)}get_binary_get_validator_reward_by_block_hash(s,a,u){var g=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),y=WASM_VECTOR_LEN;_assertClass(a,PublicKey);var v=a.__destroy_into_raw();_assertClass(u,BlockHash);var S=u.__destroy_into_raw();return wasm.sdk_get_binary_get_validator_reward_by_block_hash(this.__wbg_ptr,g,y,v,S)}get_binary_get_delegator_reward_by_era(s,a,u,g){var y=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),v=WASM_VECTOR_LEN;_assertClass(a,PublicKey);var S=a.__destroy_into_raw();_assertClass(u,PublicKey);var A=u.__destroy_into_raw();_assertClass(g,EraId);var M=g.__destroy_into_raw();return wasm.sdk_get_binary_get_delegator_reward_by_era(this.__wbg_ptr,y,v,S,A,M)}get_binary_get_delegator_reward_by_block_height(s,a,u,g){var y=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),v=WASM_VECTOR_LEN;_assertClass(a,PublicKey);var S=a.__destroy_into_raw();_assertClass(u,PublicKey);var A=u.__destroy_into_raw();return wasm.sdk_get_binary_get_delegator_reward_by_block_height(this.__wbg_ptr,y,v,S,A,g)}get_binary_get_delegator_reward_by_block_hash(s,a,u,g){var y=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),v=WASM_VECTOR_LEN;_assertClass(a,PublicKey);var S=a.__destroy_into_raw();_assertClass(u,PublicKey);var A=u.__destroy_into_raw();_assertClass(g,BlockHash);var M=g.__destroy_into_raw();return wasm.sdk_get_binary_get_delegator_reward_by_block_hash(this.__wbg_ptr,y,v,S,A,M)}get_binary_read_record(s,a,u){var g=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),y=WASM_VECTOR_LEN;_assertClass(a,RecordId);var v=a.__destroy_into_raw();const S=passArray8ToWasm0(u,wasm.__wbindgen_malloc);return wasm.sdk_get_binary_read_record(this.__wbg_ptr,g,y,v,S,WASM_VECTOR_LEN)}get_binary_global_state_item(s,a,u){var g=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),y=WASM_VECTOR_LEN;_assertClass(a,Key);var v=a.__destroy_into_raw();const S=passArrayJsValueToWasm0(u,wasm.__wbindgen_malloc);return wasm.sdk_get_binary_global_state_item(this.__wbg_ptr,g,y,v,S,WASM_VECTOR_LEN)}get_binary_global_state_item_by_state_root_hash(s,a,u,g){var y=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),v=WASM_VECTOR_LEN;_assertClass(a,Digest);var S=a.__destroy_into_raw();_assertClass(u,Key);var A=u.__destroy_into_raw();const M=passArrayJsValueToWasm0(g,wasm.__wbindgen_malloc);return wasm.sdk_get_binary_global_state_item_by_state_root_hash(this.__wbg_ptr,y,v,S,A,M,WASM_VECTOR_LEN)}get_binary_global_state_item_by_block_hash(s,a,u,g){var y=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),v=WASM_VECTOR_LEN;_assertClass(a,BlockHash);var S=a.__destroy_into_raw();_assertClass(u,Key);var A=u.__destroy_into_raw();const M=passArrayJsValueToWasm0(g,wasm.__wbindgen_malloc);return wasm.sdk_get_binary_global_state_item_by_block_hash(this.__wbg_ptr,y,v,S,A,M,WASM_VECTOR_LEN)}get_binary_global_state_item_by_block_height(s,a,u,g){var y=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),v=WASM_VECTOR_LEN;_assertClass(u,Key);var S=u.__destroy_into_raw();const A=passArrayJsValueToWasm0(g,wasm.__wbindgen_malloc);return wasm.sdk_get_binary_global_state_item_by_block_height(this.__wbg_ptr,y,v,a,S,A,WASM_VECTOR_LEN)}get_binary_try_accept_transaction(s,a){var u=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),g=WASM_VECTOR_LEN;_assertClass(a,Transaction);var y=a.__destroy_into_raw();return wasm.sdk_get_binary_try_accept_transaction(this.__wbg_ptr,u,g,y)}get_binary_try_speculative_execution(s,a){var u=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),g=WASM_VECTOR_LEN;_assertClass(a,Transaction);var y=a.__destroy_into_raw();return wasm.sdk_get_binary_try_speculative_execution(this.__wbg_ptr,u,g,y)}get_binary_get_protocol_version(s){var a=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);return wasm.sdk_get_binary_get_protocol_version(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get_auction_info_options(s){const a=wasm.sdk_get_auction_info_options(this.__wbg_ptr,s);if(a[2])throw takeFromExternrefTable0(a[1]);return getAuctionInfoOptions.__wrap(a[0])}get_auction_info(s){let a=0;return isLikeNone(s)||(_assertClass(s,getAuctionInfoOptions),a=s.__destroy_into_raw()),wasm.sdk_get_auction_info(this.__wbg_ptr,a)}state_get_auction_info_js_alias(s){let a=0;return isLikeNone(s)||(_assertClass(s,getAuctionInfoOptions),a=s.__destroy_into_raw()),wasm.sdk_state_get_auction_info_js_alias(this.__wbg_ptr,a)}get_block_options(s){const a=wasm.sdk_get_block_options(this.__wbg_ptr,s);if(a[2])throw takeFromExternrefTable0(a[1]);return getBlockOptions.__wrap(a[0])}get_block(s){let a=0;return isLikeNone(s)||(_assertClass(s,getBlockOptions),a=s.__destroy_into_raw()),wasm.sdk_get_block(this.__wbg_ptr,a)}chain_get_block(s){let a=0;return isLikeNone(s)||(_assertClass(s,getBlockOptions),a=s.__destroy_into_raw()),wasm.sdk_chain_get_block(this.__wbg_ptr,a)}get_chainspec(s,a){var u=isLikeNone(a)?0:passStringToWasm0(a,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),g=WASM_VECTOR_LEN;return wasm.sdk_get_chainspec(this.__wbg_ptr,isLikeNone(s)?3:s,u,g)}info_get_chainspec(s,a){var u=isLikeNone(a)?0:passStringToWasm0(a,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),g=WASM_VECTOR_LEN;return wasm.sdk_info_get_chainspec(this.__wbg_ptr,isLikeNone(s)?3:s,u,g)}get_node_status(s,a){var u=isLikeNone(a)?0:passStringToWasm0(a,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),g=WASM_VECTOR_LEN;return wasm.sdk_get_node_status(this.__wbg_ptr,isLikeNone(s)?3:s,u,g)}info_get_status(s,a){var u=isLikeNone(a)?0:passStringToWasm0(a,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),g=WASM_VECTOR_LEN;return wasm.sdk_info_get_status(this.__wbg_ptr,isLikeNone(s)?3:s,u,g)}get_peers(s,a){var u=isLikeNone(a)?0:passStringToWasm0(a,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),g=WASM_VECTOR_LEN;return wasm.sdk_get_peers(this.__wbg_ptr,isLikeNone(s)?3:s,u,g)}info_get_peers(s,a){var u=isLikeNone(a)?0:passStringToWasm0(a,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),g=WASM_VECTOR_LEN;return wasm.sdk_info_get_peers(this.__wbg_ptr,isLikeNone(s)?3:s,u,g)}get_validator_changes(s,a){var u=isLikeNone(a)?0:passStringToWasm0(a,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),g=WASM_VECTOR_LEN;return wasm.sdk_get_validator_changes(this.__wbg_ptr,isLikeNone(s)?3:s,u,g)}info_get_validator_change(s,a){var u=isLikeNone(a)?0:passStringToWasm0(a,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),g=WASM_VECTOR_LEN;return wasm.sdk_info_get_validator_change(this.__wbg_ptr,isLikeNone(s)?3:s,u,g)}list_rpcs(s,a){var u=isLikeNone(a)?0:passStringToWasm0(a,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),g=WASM_VECTOR_LEN;return wasm.sdk_list_rpcs(this.__wbg_ptr,isLikeNone(s)?3:s,u,g)}speculative_transfer_transaction(s,a,u,g,y,v,S){let A=0;isLikeNone(s)||(_assertClass(s,URef),A=s.__destroy_into_raw());const M=passStringToWasm0(a,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),B=WASM_VECTOR_LEN,X=passStringToWasm0(u,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),de=WASM_VECTOR_LEN;_assertClass(g,TransactionStrParams);var le=g.__destroy_into_raw(),ue=isLikeNone(y)?0:passStringToWasm0(y,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),ot=WASM_VECTOR_LEN,rt=isLikeNone(S)?0:passStringToWasm0(S,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),st=WASM_VECTOR_LEN;return wasm.sdk_speculative_transfer_transaction(this.__wbg_ptr,A,M,B,X,de,le,ue,ot,isLikeNone(v)?3:v,rt,st)}make_deploy(s,a,u){_assertClass(s,DeployStrParams);var g=s.__destroy_into_raw();_assertClass(a,SessionStrParams);var y=a.__destroy_into_raw();_assertClass(u,PaymentStrParams);var v=u.__destroy_into_raw();const S=wasm.sdk_make_deploy(this.__wbg_ptr,g,y,v);if(S[2])throw takeFromExternrefTable0(S[1]);return Deploy.__wrap(S[0])}sign_deploy(s,a){_assertClass(s,Deploy);var u=s.__destroy_into_raw();const g=passStringToWasm0(a,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),v=wasm.sdk_sign_deploy(this.__wbg_ptr,u,g,WASM_VECTOR_LEN);return Deploy.__wrap(v)}make_transaction(s,a){_assertClass(s,TransactionBuilderParams);var u=s.__destroy_into_raw();_assertClass(a,TransactionStrParams);var g=a.__destroy_into_raw();const y=wasm.sdk_make_transaction(this.__wbg_ptr,u,g);if(y[2])throw takeFromExternrefTable0(y[1]);return Transaction.__wrap(y[0])}sign_transaction(s,a){_assertClass(s,Transaction);var u=s.__destroy_into_raw();const g=passStringToWasm0(a,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),v=wasm.sdk_sign_transaction(this.__wbg_ptr,u,g,WASM_VECTOR_LEN);return Transaction.__wrap(v)}call_entrypoint_deploy(s,a,u,g){_assertClass(s,DeployStrParams);var y=s.__destroy_into_raw();_assertClass(a,SessionStrParams);var v=a.__destroy_into_raw();const S=passStringToWasm0(u,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),A=WASM_VECTOR_LEN;var M=isLikeNone(g)?0:passStringToWasm0(g,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);return wasm.sdk_call_entrypoint_deploy(this.__wbg_ptr,y,v,S,A,M,WASM_VECTOR_LEN)}query_contract_key_options(s){const a=wasm.sdk_query_contract_key_options(this.__wbg_ptr,s);if(a[2])throw takeFromExternrefTable0(a[1]);return queryContractKeyOptions.__wrap(a[0])}query_contract_key(s){let a=0;return isLikeNone(s)||(_assertClass(s,queryContractKeyOptions),a=s.__destroy_into_raw()),wasm.sdk_query_contract_key(this.__wbg_ptr,a)}get_account_options(s){const a=wasm.sdk_get_account_options(this.__wbg_ptr,s);if(a[2])throw takeFromExternrefTable0(a[1]);return getAccountOptions.__wrap(a[0])}get_account(s){let a=0;return isLikeNone(s)||(_assertClass(s,getAccountOptions),a=s.__destroy_into_raw()),wasm.sdk_get_account(this.__wbg_ptr,a)}state_get_account_info(s){let a=0;return isLikeNone(s)||(_assertClass(s,getAccountOptions),a=s.__destroy_into_raw()),wasm.sdk_state_get_account_info(this.__wbg_ptr,a)}get_era_summary_options(s){const a=wasm.sdk_get_era_summary_options(this.__wbg_ptr,s);if(a[2])throw takeFromExternrefTable0(a[1]);return getEraSummaryOptions.__wrap(a[0])}get_era_summary(s){let a=0;return isLikeNone(s)||(_assertClass(s,getEraSummaryOptions),a=s.__destroy_into_raw()),wasm.sdk_get_era_summary(this.__wbg_ptr,a)}chain_get_era_summary(s){let a=0;return isLikeNone(s)||(_assertClass(s,getEraSummaryOptions),a=s.__destroy_into_raw()),wasm.sdk_chain_get_era_summary(this.__wbg_ptr,a)}transfer_transaction(s,a,u,g,y,v,S){let A=0;isLikeNone(s)||(_assertClass(s,URef),A=s.__destroy_into_raw());const M=passStringToWasm0(a,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),B=WASM_VECTOR_LEN,X=passStringToWasm0(u,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),de=WASM_VECTOR_LEN;_assertClass(g,TransactionStrParams);var le=g.__destroy_into_raw(),ue=isLikeNone(y)?0:passStringToWasm0(y,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),ot=WASM_VECTOR_LEN,rt=isLikeNone(S)?0:passStringToWasm0(S,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),st=WASM_VECTOR_LEN;return wasm.sdk_transfer_transaction(this.__wbg_ptr,A,M,B,X,de,le,ue,ot,isLikeNone(v)?3:v,rt,st)}}const SessionStrParamsFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_sessionstrparams_free(f>>>0,1));class SessionStrParams{__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,SessionStrParamsFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_sessionstrparams_free(s,0)}constructor(s,a,u,g,y,v,S,A,M,B,X){var de=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),le=WASM_VECTOR_LEN,ue=isLikeNone(a)?0:passStringToWasm0(a,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),ot=WASM_VECTOR_LEN,rt=isLikeNone(u)?0:passStringToWasm0(u,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),st=WASM_VECTOR_LEN,Ft=isLikeNone(g)?0:passStringToWasm0(g,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),Dn=WASM_VECTOR_LEN,Tn=isLikeNone(y)?0:passStringToWasm0(y,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),Gn=WASM_VECTOR_LEN;let In=0;isLikeNone(v)||(_assertClass(v,Bytes),In=v.__destroy_into_raw());var qn=isLikeNone(A)?0:passStringToWasm0(A,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),_r=WASM_VECTOR_LEN,Mn=isLikeNone(M)?0:passStringToWasm0(M,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),ln=WASM_VECTOR_LEN,Nn=isLikeNone(B)?0:passStringToWasm0(B,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),dr=WASM_VECTOR_LEN;const fr=wasm.sessionstrparams_new(de,le,ue,ot,rt,st,Ft,Dn,Tn,Gn,In,isLikeNone(S)?0:addToExternrefTable0(S),qn,_r,Mn,ln,Nn,dr,isLikeNone(X)?16777215:X?1:0);return this.__wbg_ptr=fr>>>0,SessionStrParamsFinalization.register(this,this.__wbg_ptr,this),this}get session_hash(){const s=wasm.sessionstrparams_session_hash(this.__wbg_ptr);let a;return 0!==s[0]&&(a=getStringFromWasm0(s[0],s[1]).slice(),wasm.__wbindgen_free(s[0],1*s[1],1)),a}set session_hash(s){const a=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.sessionstrparams_set_session_hash(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get session_name(){const s=wasm.sessionstrparams_session_name(this.__wbg_ptr);let a;return 0!==s[0]&&(a=getStringFromWasm0(s[0],s[1]).slice(),wasm.__wbindgen_free(s[0],1*s[1],1)),a}set session_name(s){const a=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.sessionstrparams_set_session_name(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get session_package_hash(){const s=wasm.sessionstrparams_session_package_hash(this.__wbg_ptr);let a;return 0!==s[0]&&(a=getStringFromWasm0(s[0],s[1]).slice(),wasm.__wbindgen_free(s[0],1*s[1],1)),a}set session_package_hash(s){const a=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.sessionstrparams_set_session_package_hash(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get session_package_name(){const s=wasm.sessionstrparams_session_package_name(this.__wbg_ptr);let a;return 0!==s[0]&&(a=getStringFromWasm0(s[0],s[1]).slice(),wasm.__wbindgen_free(s[0],1*s[1],1)),a}set session_package_name(s){const a=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.sessionstrparams_set_session_package_name(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get session_path(){const s=wasm.sessionstrparams_session_path(this.__wbg_ptr);let a;return 0!==s[0]&&(a=getStringFromWasm0(s[0],s[1]).slice(),wasm.__wbindgen_free(s[0],1*s[1],1)),a}set session_path(s){const a=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.sessionstrparams_set_session_path(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get session_bytes(){const s=wasm.sessionstrparams_session_bytes(this.__wbg_ptr);return 0===s?void 0:Bytes.__wrap(s)}set session_bytes(s){_assertClass(s,Bytes);var a=s.__destroy_into_raw();wasm.sessionstrparams_set_session_bytes(this.__wbg_ptr,a)}get session_args_simple(){const s=wasm.sessionstrparams_session_args_simple(this.__wbg_ptr);return 0===s?void 0:ArgsSimple.__wrap(s)}set session_args_simple(s){wasm.sessionstrparams_set_session_args_simple(this.__wbg_ptr,s)}get session_args_json(){const s=wasm.sessionstrparams_session_args_json(this.__wbg_ptr);let a;return 0!==s[0]&&(a=getStringFromWasm0(s[0],s[1]).slice(),wasm.__wbindgen_free(s[0],1*s[1],1)),a}set session_args_json(s){const a=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.sessionstrparams_set_session_args_json(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get session_version(){const s=wasm.sessionstrparams_session_version(this.__wbg_ptr);let a;return 0!==s[0]&&(a=getStringFromWasm0(s[0],s[1]).slice(),wasm.__wbindgen_free(s[0],1*s[1],1)),a}set session_version(s){const a=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.sessionstrparams_set_session_version(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get session_entry_point(){const s=wasm.sessionstrparams_session_entry_point(this.__wbg_ptr);let a;return 0!==s[0]&&(a=getStringFromWasm0(s[0],s[1]).slice(),wasm.__wbindgen_free(s[0],1*s[1],1)),a}set session_entry_point(s){const a=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.sessionstrparams_set_session_entry_point(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get is_session_transfer(){const s=wasm.sessionstrparams_is_session_transfer(this.__wbg_ptr);return 16777215===s?void 0:0!==s}set is_session_transfer(s){wasm.sessionstrparams_set_is_session_transfer(this.__wbg_ptr,s)}}const SignatureResponseFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_signatureresponse_free(f>>>0,1));class SignatureResponse{__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,SignatureResponseFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_signatureresponse_free(s,0)}is_cancelled(){return 0!==wasm.signatureresponse_is_cancelled(this.__wbg_ptr)}get_signature_hex(){let s,a;try{const u=wasm.signatureresponse_get_signature_hex(this.__wbg_ptr);return s=u[0],a=u[1],getStringFromWasm0(u[0],u[1])}finally{wasm.__wbindgen_free(s,a,1)}}get_signature(){const s=wasm.signatureresponse_get_signature(this.__wbg_ptr);var a=getArrayU8FromWasm0(s[0],s[1]).slice();return wasm.__wbindgen_free(s[0],1*s[1],1),a}}const SpeculativeExecResultFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_speculativeexecresult_free(f>>>0,1));class SpeculativeExecResult{static __wrap(s){s>>>=0;const a=Object.create(SpeculativeExecResult.prototype);return a.__wbg_ptr=s,SpeculativeExecResultFinalization.register(a,a.__wbg_ptr,a),a}__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,SpeculativeExecResultFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_speculativeexecresult_free(s,0)}get api_version(){return wasm.speculativeexecresult_api_version(this.__wbg_ptr)}get block_hash(){const s=wasm.speculativeexecresult_block_hash(this.__wbg_ptr);return BlockHash.__wrap(s)}get execution_result(){return wasm.speculativeexecresult_execution_result(this.__wbg_ptr)}toJson(){return wasm.speculativeexecresult_toJson(this.__wbg_ptr)}}const SpeculativeExecTxnResultFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_speculativeexectxnresult_free(f>>>0,1));class SpeculativeExecTxnResult{static __wrap(s){s>>>=0;const a=Object.create(SpeculativeExecTxnResult.prototype);return a.__wbg_ptr=s,SpeculativeExecTxnResultFinalization.register(a,a.__wbg_ptr,a),a}__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,SpeculativeExecTxnResultFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_speculativeexectxnresult_free(s,0)}get api_version(){return wasm.speculativeexectxnresult_api_version(this.__wbg_ptr)}get block_hash(){const s=wasm.speculativeexectxnresult_block_hash(this.__wbg_ptr);return BlockHash.__wrap(s)}get execution_result(){return wasm.speculativeexectxnresult_execution_result(this.__wbg_ptr)}toJson(){return wasm.speculativeexectxnresult_toJson(this.__wbg_ptr)}}const SubscriptionFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_subscription_free(f>>>0,1));class Subscription{static __unwrap(s){return s instanceof Subscription?s.__destroy_into_raw():0}__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,SubscriptionFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_subscription_free(s,0)}get targetHash(){let s,a;try{const u=wasm.__wbg_get_subscription_targetHash(this.__wbg_ptr);return s=u[0],a=u[1],getStringFromWasm0(u[0],u[1])}finally{wasm.__wbindgen_free(s,a,1)}}set targetHash(s){const a=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.__wbg_set_failure_cost(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get eventHandlerFn(){return wasm.__wbg_get_subscription_eventHandlerFn(this.__wbg_ptr)}set eventHandlerFn(s){wasm.__wbg_set_subscription_eventHandlerFn(this.__wbg_ptr,s)}constructor(s,a){const u=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),y=wasm.subscription_new(u,WASM_VECTOR_LEN,a);return this.__wbg_ptr=y>>>0,SubscriptionFinalization.register(this,this.__wbg_ptr,this),this}}const TransactionFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_transaction_free(f>>>0,1));class Transaction{static __wrap(s){s>>>=0;const a=Object.create(Transaction.prototype);return a.__wbg_ptr=s,TransactionFinalization.register(a,a.__wbg_ptr,a),a}__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,TransactionFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_transaction_free(s,0)}constructor(s){const a=wasm.transaction_new(s);return this.__wbg_ptr=a>>>0,TransactionFinalization.register(this,this.__wbg_ptr,this),this}toJson(){return wasm.transaction_toJson(this.__wbg_ptr)}static newSession(s,a){_assertClass(s,TransactionBuilderParams);var u=s.__destroy_into_raw();_assertClass(a,TransactionStrParams);var g=a.__destroy_into_raw();const y=wasm.transaction_newSession(u,g);if(y[2])throw takeFromExternrefTable0(y[1]);return Transaction.__wrap(y[0])}static newTransfer(s,a,u,g,y){let v=0;isLikeNone(s)||(_assertClass(s,URef),v=s.__destroy_into_raw());const S=passStringToWasm0(a,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),A=WASM_VECTOR_LEN,M=passStringToWasm0(u,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),B=WASM_VECTOR_LEN;_assertClass(g,TransactionStrParams);var X=g.__destroy_into_raw(),de=isLikeNone(y)?0:passStringToWasm0(y,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);const ue=wasm.transaction_newTransfer(v,S,A,M,B,X,de,WASM_VECTOR_LEN);if(ue[2])throw takeFromExternrefTable0(ue[1]);return Transaction.__wrap(ue[0])}withTTL(s,a){const u=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),g=WASM_VECTOR_LEN;var y=isLikeNone(a)?0:passStringToWasm0(a,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);const S=wasm.transaction_withTTL(this.__wbg_ptr,u,g,y,WASM_VECTOR_LEN);return Transaction.__wrap(S)}withTimestamp(s,a){const u=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),g=WASM_VECTOR_LEN;var y=isLikeNone(a)?0:passStringToWasm0(a,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);const S=wasm.transaction_withTimestamp(this.__wbg_ptr,u,g,y,WASM_VECTOR_LEN);return Transaction.__wrap(S)}withChainName(s,a){const u=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),g=WASM_VECTOR_LEN;var y=isLikeNone(a)?0:passStringToWasm0(a,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);const S=wasm.transaction_withChainName(this.__wbg_ptr,u,g,y,WASM_VECTOR_LEN);return Transaction.__wrap(S)}withPublicKey(s,a){_assertClass(s,PublicKey);var u=s.__destroy_into_raw(),g=isLikeNone(a)?0:passStringToWasm0(a,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);const v=wasm.transaction_withPublicKey(this.__wbg_ptr,u,g,WASM_VECTOR_LEN);return Transaction.__wrap(v)}withAccountHash(s,a){_assertClass(s,AccountHash);var u=s.__destroy_into_raw(),g=isLikeNone(a)?0:passStringToWasm0(a,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);const v=wasm.transaction_withAccountHash(this.__wbg_ptr,u,g,WASM_VECTOR_LEN);return Transaction.__wrap(v)}withEntryPoint(s,a){const u=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),g=WASM_VECTOR_LEN;var y=isLikeNone(a)?0:passStringToWasm0(a,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);const S=wasm.transaction_withEntryPoint(this.__wbg_ptr,u,g,y,WASM_VECTOR_LEN);return Transaction.__wrap(S)}withEntityHash(s,a){_assertClass(s,AddressableEntityHash);var u=s.__destroy_into_raw(),g=isLikeNone(a)?0:passStringToWasm0(a,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);const v=wasm.transaction_withEntityHash(this.__wbg_ptr,u,g,WASM_VECTOR_LEN);return Transaction.__wrap(v)}withPackageHash(s,a){_assertClass(s,PackageHash);var u=s.__destroy_into_raw(),g=isLikeNone(a)?0:passStringToWasm0(a,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);const v=wasm.transaction_withPackageHash(this.__wbg_ptr,u,g,WASM_VECTOR_LEN);return Transaction.__wrap(v)}withTransactionBytes(s,a,u){_assertClass(s,Bytes);var g=s.__destroy_into_raw(),y=isLikeNone(u)?0:passStringToWasm0(u,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),v=WASM_VECTOR_LEN;const S=wasm.transaction_withTransactionBytes(this.__wbg_ptr,g,isLikeNone(a)?16777215:a?1:0,y,v);return Transaction.__wrap(S)}withSecretKey(s){var a=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);const g=wasm.transaction_withSecretKey(this.__wbg_ptr,a,WASM_VECTOR_LEN);return Transaction.__wrap(g)}verify(){return 0!==wasm.transaction_verify(this.__wbg_ptr)}get hash(){const s=wasm.transaction_hash(this.__wbg_ptr);return TransactionHash.__wrap(s)}get expired(){return 0!==wasm.transaction_expired(this.__wbg_ptr)}get expires(){return wasm.transaction_expires(this.__wbg_ptr)}get signers(){return wasm.transaction_signers(this.__wbg_ptr)}get authorization_keys(){return wasm.transaction_authorization_keys(this.__wbg_ptr)}sign(s){const a=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),g=wasm.transaction_sign(this.__wbg_ptr,a,WASM_VECTOR_LEN);return Transaction.__wrap(g)}approvalsHash(){return wasm.transaction_approvalsHash(this.__wbg_ptr)}get approvals(){return wasm.transaction_approvals(this.__wbg_ptr)}get is_native(){return 0!==wasm.transaction_is_native(this.__wbg_ptr)}get target(){return wasm.transaction_target(this.__wbg_ptr)}get is_standard_payment(){return 0!==wasm.transaction_is_standard_payment(this.__wbg_ptr)}session_args(){return wasm.transaction_session_args(this.__wbg_ptr)}addSignature(s,a){const u=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),g=WASM_VECTOR_LEN,y=passStringToWasm0(a,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),S=wasm.transaction_addSignature(this.__wbg_ptr,u,g,y,WASM_VECTOR_LEN);return Transaction.__wrap(S)}get entry_point(){let s,a;try{const u=wasm.transaction_entry_point(this.__wbg_ptr);return s=u[0],a=u[1],getStringFromWasm0(u[0],u[1])}finally{wasm.__wbindgen_free(s,a,1)}}get ttl(){let s,a;try{const u=wasm.transaction_ttl(this.__wbg_ptr);return s=u[0],a=u[1],getStringFromWasm0(u[0],u[1])}finally{wasm.__wbindgen_free(s,a,1)}}get timestamp(){let s,a;try{const u=wasm.transaction_timestamp(this.__wbg_ptr);return s=u[0],a=u[1],getStringFromWasm0(u[0],u[1])}finally{wasm.__wbindgen_free(s,a,1)}}get size_estimate(){return wasm.transaction_size_estimate(this.__wbg_ptr)>>>0}get chain_name(){let s,a;try{const u=wasm.transaction_chain_name(this.__wbg_ptr);return s=u[0],a=u[1],getStringFromWasm0(u[0],u[1])}finally{wasm.__wbindgen_free(s,a,1)}}get initiator_addr(){let s,a;try{const u=wasm.transaction_initiator_addr(this.__wbg_ptr);return s=u[0],a=u[1],getStringFromWasm0(u[0],u[1])}finally{wasm.__wbindgen_free(s,a,1)}}get pricing_mode(){return wasm.transaction_pricing_mode(this.__wbg_ptr)}get additional_computation_factor(){return wasm.transaction_additional_computation_factor(this.__wbg_ptr)}get receipt(){const s=wasm.transaction_receipt(this.__wbg_ptr);return Digest.__wrap(s)}get gas_price_tolerance(){return wasm.transaction_gas_price_tolerance(this.__wbg_ptr)}get account_hash(){const s=wasm.transaction_account_hash(this.__wbg_ptr);return AccountHash.__wrap(s)}addArg(s,a){var u=isLikeNone(a)?0:passStringToWasm0(a,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);const y=wasm.transaction_addArg(this.__wbg_ptr,s,u,WASM_VECTOR_LEN);if(y[2])throw takeFromExternrefTable0(y[1]);return Transaction.__wrap(y[0])}}const TransactionBuilderParamsFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_transactionbuilderparams_free(f>>>0,1));class TransactionBuilderParams{static __wrap(s){s>>>=0;const a=Object.create(TransactionBuilderParams.prototype);return a.__wbg_ptr=s,TransactionBuilderParamsFinalization.register(a,a.__wbg_ptr,a),a}__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,TransactionBuilderParamsFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_transactionbuilderparams_free(s,0)}static newSession(s,a){let u=0;isLikeNone(s)||(_assertClass(s,Bytes),u=s.__destroy_into_raw());const g=wasm.transactionbuilderparams_newSession(u,isLikeNone(a)?16777215:a?1:0);return TransactionBuilderParams.__wrap(g)}static newTransfer(s,a,u,g){let y=0;isLikeNone(s)||(_assertClass(s,URef),y=s.__destroy_into_raw()),_assertClass(a,TransferTarget);var v=a.__destroy_into_raw();const S=passStringToWasm0(u,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),M=wasm.transactionbuilderparams_newTransfer(y,v,S,WASM_VECTOR_LEN,!isLikeNone(g),isLikeNone(g)?BigInt(0):g);return TransactionBuilderParams.__wrap(M)}static newInvocableEntity(s,a){_assertClass(s,AddressableEntityHash);var u=s.__destroy_into_raw();const g=passStringToWasm0(a,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),v=wasm.transactionbuilderparams_newInvocableEntity(u,g,WASM_VECTOR_LEN);return TransactionBuilderParams.__wrap(v)}static newInvocableEntityAlias(s,a){const u=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),g=WASM_VECTOR_LEN,y=passStringToWasm0(a,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),S=wasm.transactionbuilderparams_newInvocableEntityAlias(u,g,y,WASM_VECTOR_LEN);return TransactionBuilderParams.__wrap(S)}static newPackage(s,a,u){_assertClass(s,PackageHash);var g=s.__destroy_into_raw();const y=passStringToWasm0(a,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),v=WASM_VECTOR_LEN;var S=isLikeNone(u)?0:passStringToWasm0(u,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);const M=wasm.transactionbuilderparams_newPackage(g,y,v,S,WASM_VECTOR_LEN);return TransactionBuilderParams.__wrap(M)}static newPackageAlias(s,a,u){const g=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),y=WASM_VECTOR_LEN,v=passStringToWasm0(a,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),S=WASM_VECTOR_LEN;var A=isLikeNone(u)?0:passStringToWasm0(u,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);const B=wasm.transactionbuilderparams_newPackageAlias(g,y,v,S,A,WASM_VECTOR_LEN);return TransactionBuilderParams.__wrap(B)}static newAddBid(s,a,u,g,y){_assertClass(s,PublicKey);var v=s.__destroy_into_raw();const S=passStringToWasm0(u,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),M=wasm.transactionbuilderparams_newAddBid(v,a,S,WASM_VECTOR_LEN,g,y);return TransactionBuilderParams.__wrap(M)}static newDelegate(s,a,u){_assertClass(s,PublicKey);var g=s.__destroy_into_raw();_assertClass(a,PublicKey);var y=a.__destroy_into_raw();const v=passStringToWasm0(u,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),A=wasm.transactionbuilderparams_newDelegate(g,y,v,WASM_VECTOR_LEN);return TransactionBuilderParams.__wrap(A)}static newUndelegate(s,a,u){_assertClass(s,PublicKey);var g=s.__destroy_into_raw();_assertClass(a,PublicKey);var y=a.__destroy_into_raw();const v=passStringToWasm0(u,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),A=wasm.transactionbuilderparams_newUndelegate(g,y,v,WASM_VECTOR_LEN);return TransactionBuilderParams.__wrap(A)}static newRedelegate(s,a,u,g){_assertClass(s,PublicKey);var y=s.__destroy_into_raw();_assertClass(a,PublicKey);var v=a.__destroy_into_raw();_assertClass(u,PublicKey);var S=u.__destroy_into_raw();const A=passStringToWasm0(g,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),B=wasm.transactionbuilderparams_newRedelegate(y,v,S,A,WASM_VECTOR_LEN);return TransactionBuilderParams.__wrap(B)}static newWithdrawBid(s,a){_assertClass(s,PublicKey);var u=s.__destroy_into_raw();const g=passStringToWasm0(a,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),v=wasm.transactionbuilderparams_newWithdrawBid(u,g,WASM_VECTOR_LEN);return TransactionBuilderParams.__wrap(v)}get kind(){return wasm.transactionbuilderparams_kind(this.__wbg_ptr)}set kind(s){wasm.transactionbuilderparams_set_kind(this.__wbg_ptr,s)}get transaction_bytes(){const s=wasm.transactionbuilderparams_transaction_bytes(this.__wbg_ptr);return 0===s?void 0:Bytes.__wrap(s)}set transaction_bytes(s){_assertClass(s,Bytes);var a=s.__destroy_into_raw();wasm.transactionbuilderparams_set_transaction_bytes(this.__wbg_ptr,a)}get maybe_source(){const s=wasm.transactionbuilderparams_maybe_source(this.__wbg_ptr);return 0===s?void 0:URef.__wrap(s)}set maybe_source(s){_assertClass(s,URef);var a=s.__destroy_into_raw();wasm.transactionbuilderparams_set_maybe_source(this.__wbg_ptr,a)}get target(){const s=wasm.transactionbuilderparams_target(this.__wbg_ptr);return 0===s?void 0:TransferTarget.__wrap(s)}set target(s){_assertClass(s,TransferTarget);var a=s.__destroy_into_raw();wasm.transactionbuilderparams_set_target(this.__wbg_ptr,a)}get amount(){const s=wasm.transactionbuilderparams_amount(this.__wbg_ptr);let a;return 0!==s[0]&&(a=getStringFromWasm0(s[0],s[1]).slice(),wasm.__wbindgen_free(s[0],1*s[1],1)),a}set amount(s){const a=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.transactionbuilderparams_set_amount(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get maybe_id(){const s=wasm.transactionbuilderparams_maybe_id(this.__wbg_ptr);return 0===s[0]?void 0:BigInt.asUintN(64,s[1])}set maybe_id(s){wasm.transactionbuilderparams_set_maybe_id(this.__wbg_ptr,s)}get entity_hash(){const s=wasm.transactionbuilderparams_entity_hash(this.__wbg_ptr);return 0===s?void 0:AddressableEntityHash.__wrap(s)}set entity_hash(s){_assertClass(s,AddressableEntityHash);var a=s.__destroy_into_raw();wasm.transactionbuilderparams_set_entity_hash(this.__wbg_ptr,a)}get entity_alias(){const s=wasm.transactionbuilderparams_entity_alias(this.__wbg_ptr);let a;return 0!==s[0]&&(a=getStringFromWasm0(s[0],s[1]).slice(),wasm.__wbindgen_free(s[0],1*s[1],1)),a}set entity_alias(s){const a=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.transactionbuilderparams_set_entity_alias(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get entry_point(){const s=wasm.transactionbuilderparams_entry_point(this.__wbg_ptr);let a;return 0!==s[0]&&(a=getStringFromWasm0(s[0],s[1]).slice(),wasm.__wbindgen_free(s[0],1*s[1],1)),a}set entry_point(s){const a=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.transactionbuilderparams_set_entry_point(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get package_hash(){const s=wasm.transactionbuilderparams_package_hash(this.__wbg_ptr);return 0===s?void 0:PackageHash.__wrap(s)}set package_hash(s){_assertClass(s,PackageHash);var a=s.__destroy_into_raw();wasm.transactionbuilderparams_set_package_hash(this.__wbg_ptr,a)}get package_alias(){const s=wasm.transactionbuilderparams_package_alias(this.__wbg_ptr);let a;return 0!==s[0]&&(a=getStringFromWasm0(s[0],s[1]).slice(),wasm.__wbindgen_free(s[0],1*s[1],1)),a}set package_alias(s){const a=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.transactionbuilderparams_set_package_alias(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get public_key(){const s=wasm.transactionbuilderparams_public_key(this.__wbg_ptr);return 0===s?void 0:PublicKey.__wrap(s)}set public_key(s){_assertClass(s,PublicKey);var a=s.__destroy_into_raw();wasm.transactionbuilderparams_set_public_key(this.__wbg_ptr,a)}get delegation_rate(){const s=wasm.transactionbuilderparams_delegation_rate(this.__wbg_ptr);return 16777215===s?void 0:s}set delegation_rate(s){wasm.transactionbuilderparams_set_delegation_rate(this.__wbg_ptr,s)}get delegator(){const s=wasm.transactionbuilderparams_delegator(this.__wbg_ptr);return 0===s?void 0:PublicKey.__wrap(s)}set delegator(s){_assertClass(s,PublicKey);var a=s.__destroy_into_raw();wasm.transactionbuilderparams_set_delegator(this.__wbg_ptr,a)}get validator(){const s=wasm.transactionbuilderparams_validator(this.__wbg_ptr);return 0===s?void 0:PublicKey.__wrap(s)}set validator(s){_assertClass(s,PublicKey);var a=s.__destroy_into_raw();wasm.transactionbuilderparams_set_validator(this.__wbg_ptr,a)}get new_validator(){const s=wasm.transactionbuilderparams_new_validator(this.__wbg_ptr);return 0===s?void 0:PublicKey.__wrap(s)}set new_validator(s){_assertClass(s,PublicKey);var a=s.__destroy_into_raw();wasm.transactionbuilderparams_set_new_validator(this.__wbg_ptr,a)}get minimum_delegation_amount(){const s=wasm.transactionbuilderparams_minimum_delegation_amount(this.__wbg_ptr);return 0===s[0]?void 0:BigInt.asUintN(64,s[1])}set minimum_delegation_amount(s){wasm.transactionbuilderparams_set_minimum_delegation_amount(this.__wbg_ptr,s)}get maximum_delegation_amount(){const s=wasm.transactionbuilderparams_maximum_delegation_amount(this.__wbg_ptr);return 0===s[0]?void 0:BigInt.asUintN(64,s[1])}set maximum_delegation_amount(s){wasm.transactionbuilderparams_set_maximum_delegation_amount(this.__wbg_ptr,s)}get is_install_upgrade(){const s=wasm.transactionbuilderparams_is_install_upgrade(this.__wbg_ptr);return 16777215===s?void 0:0!==s}set is_install_upgrade(s){wasm.transactionbuilderparams_set_is_install_upgrade(this.__wbg_ptr,s)}}const TransactionHashFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_transactionhash_free(f>>>0,1));class TransactionHash{static __wrap(s){s>>>=0;const a=Object.create(TransactionHash.prototype);return a.__wbg_ptr=s,TransactionHashFinalization.register(a,a.__wbg_ptr,a),a}__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,TransactionHashFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_transactionhash_free(s,0)}constructor(s){const a=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),g=wasm.transactionhash_new_js_alias(a,WASM_VECTOR_LEN);if(g[2])throw takeFromExternrefTable0(g[1]);return this.__wbg_ptr=g[0]>>>0,TransactionHashFinalization.register(this,this.__wbg_ptr,this),this}static fromRaw(s){const a=passArray8ToWasm0(s,wasm.__wbindgen_malloc),g=wasm.transactionhash_fromRaw(a,WASM_VECTOR_LEN);if(g[2])throw takeFromExternrefTable0(g[1]);return TransactionHash.__wrap(g[0])}digest(){const s=wasm.transactionhash_digest(this.__wbg_ptr);if(s[2])throw takeFromExternrefTable0(s[1]);return Digest.__wrap(s[0])}toJson(){return wasm.transactionhash_toJson(this.__wbg_ptr)}toString(){let s,a;try{const u=wasm.transactionhash_toString(this.__wbg_ptr);return s=u[0],a=u[1],getStringFromWasm0(u[0],u[1])}finally{wasm.__wbindgen_free(s,a,1)}}}const TransactionProcessedFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_transactionprocessed_free(f>>>0,1));class TransactionProcessed{static __wrap(s){s>>>=0;const a=Object.create(TransactionProcessed.prototype);return a.__wbg_ptr=s,TransactionProcessedFinalization.register(a,a.__wbg_ptr,a),a}__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,TransactionProcessedFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_transactionprocessed_free(s,0)}get hash(){const s=wasm.__wbg_get_transactionprocessed_hash(this.__wbg_ptr);return HashString.__wrap(s)}set hash(s){_assertClass(s,HashString);var a=s.__destroy_into_raw();wasm.__wbg_set_transactionprocessed_hash(this.__wbg_ptr,a)}get initiator_addr(){const s=wasm.__wbg_get_transactionprocessed_initiator_addr(this.__wbg_ptr);return PublicKeyString.__wrap(s)}set initiator_addr(s){_assertClass(s,PublicKeyString);var a=s.__destroy_into_raw();wasm.__wbg_set_transactionprocessed_initiator_addr(this.__wbg_ptr,a)}get timestamp(){let s,a;try{const u=wasm.__wbg_get_transactionprocessed_timestamp(this.__wbg_ptr);return s=u[0],a=u[1],getStringFromWasm0(u[0],u[1])}finally{wasm.__wbindgen_free(s,a,1)}}set timestamp(s){const a=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.__wbg_set_transactionprocessed_timestamp(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get ttl(){let s,a;try{const u=wasm.__wbg_get_transactionprocessed_ttl(this.__wbg_ptr);return s=u[0],a=u[1],getStringFromWasm0(u[0],u[1])}finally{wasm.__wbindgen_free(s,a,1)}}set ttl(s){const a=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.__wbg_set_transactionprocessed_ttl(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get block_hash(){let s,a;try{const u=wasm.__wbg_get_transactionprocessed_block_hash(this.__wbg_ptr);return s=u[0],a=u[1],getStringFromWasm0(u[0],u[1])}finally{wasm.__wbindgen_free(s,a,1)}}set block_hash(s){const a=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.__wbg_set_messages_topic_name_hash(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get execution_result(){const s=wasm.__wbg_get_transactionprocessed_execution_result(this.__wbg_ptr);return ExecutionResult.__wrap(s)}set execution_result(s){_assertClass(s,ExecutionResult);var a=s.__destroy_into_raw();wasm.__wbg_set_transactionprocessed_execution_result(this.__wbg_ptr,a)}get messages(){const s=wasm.__wbg_get_transactionprocessed_messages(this.__wbg_ptr);var a=getArrayJsValueFromWasm0(s[0],s[1]).slice();return wasm.__wbindgen_free(s[0],4*s[1],4),a}set messages(s){const a=passArrayJsValueToWasm0(s,wasm.__wbindgen_malloc);wasm.__wbg_set_transactionprocessed_messages(this.__wbg_ptr,a,WASM_VECTOR_LEN)}}const TransactionStrParamsFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_transactionstrparams_free(f>>>0,1));class TransactionStrParams{static __wrap(s){s>>>=0;const a=Object.create(TransactionStrParams.prototype);return a.__wbg_ptr=s,TransactionStrParamsFinalization.register(a,a.__wbg_ptr,a),a}__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,TransactionStrParamsFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_transactionstrparams_free(s,0)}constructor(s,a,u,g,y,v,S,A,M,B,X,de,le){const ue=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),ot=WASM_VECTOR_LEN;var rt=isLikeNone(a)?0:passStringToWasm0(a,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),st=WASM_VECTOR_LEN,Ft=isLikeNone(u)?0:passStringToWasm0(u,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),Dn=WASM_VECTOR_LEN,Tn=isLikeNone(g)?0:passStringToWasm0(g,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),Gn=WASM_VECTOR_LEN,In=isLikeNone(y)?0:passStringToWasm0(y,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),qn=WASM_VECTOR_LEN,_r=isLikeNone(v)?0:passArrayJsValueToWasm0(v,wasm.__wbindgen_malloc),Mn=WASM_VECTOR_LEN,ln=isLikeNone(S)?0:passStringToWasm0(S,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),Nn=WASM_VECTOR_LEN,dr=isLikeNone(M)?0:passStringToWasm0(M,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),fr=WASM_VECTOR_LEN,bu=isLikeNone(B)?0:passStringToWasm0(B,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),Pi=WASM_VECTOR_LEN,Vi=isLikeNone(X)?0:passStringToWasm0(X,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),Ts=WASM_VECTOR_LEN,vu=isLikeNone(de)?0:passStringToWasm0(de,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),Eu=WASM_VECTOR_LEN;const Ma=wasm.transactionstrparams_new(ue,ot,rt,st,Ft,Dn,Tn,Gn,In,qn,_r,Mn,ln,Nn,isLikeNone(A)?3:A,dr,fr,bu,Pi,Vi,Ts,vu,Eu,isLikeNone(le)?16777215:le?1:0);return this.__wbg_ptr=Ma>>>0,TransactionStrParamsFinalization.register(this,this.__wbg_ptr,this),this}static new_with_defaults(s,a,u,g){const y=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),v=WASM_VECTOR_LEN;var S=isLikeNone(a)?0:passStringToWasm0(a,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),A=WASM_VECTOR_LEN,M=isLikeNone(u)?0:passStringToWasm0(u,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),B=WASM_VECTOR_LEN,X=isLikeNone(g)?0:passStringToWasm0(g,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);const le=wasm.transactionstrparams_new_with_defaults(y,v,S,A,M,B,X,WASM_VECTOR_LEN);return TransactionStrParams.__wrap(le)}get secret_key(){const s=wasm.transactionstrparams_secret_key(this.__wbg_ptr);let a;return 0!==s[0]&&(a=getStringFromWasm0(s[0],s[1]).slice(),wasm.__wbindgen_free(s[0],1*s[1],1)),a}set secret_key(s){const a=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.transactionstrparams_set_secret_key(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get timestamp(){const s=wasm.transactionstrparams_timestamp(this.__wbg_ptr);let a;return 0!==s[0]&&(a=getStringFromWasm0(s[0],s[1]).slice(),wasm.__wbindgen_free(s[0],1*s[1],1)),a}set timestamp(s){var a=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.transactionstrparams_set_timestamp(this.__wbg_ptr,a,WASM_VECTOR_LEN)}setDefaultTimestamp(){wasm.transactionstrparams_setDefaultTimestamp(this.__wbg_ptr)}get ttl(){const s=wasm.transactionstrparams_ttl(this.__wbg_ptr);let a;return 0!==s[0]&&(a=getStringFromWasm0(s[0],s[1]).slice(),wasm.__wbindgen_free(s[0],1*s[1],1)),a}set ttl(s){var a=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.transactionstrparams_set_ttl(this.__wbg_ptr,a,WASM_VECTOR_LEN)}setDefaultTTL(){wasm.transactionstrparams_setDefaultTTL(this.__wbg_ptr)}get chain_name(){const s=wasm.transactionstrparams_chain_name(this.__wbg_ptr);let a;return 0!==s[0]&&(a=getStringFromWasm0(s[0],s[1]).slice(),wasm.__wbindgen_free(s[0],1*s[1],1)),a}set chain_name(s){const a=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.transactionstrparams_set_chain_name(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get initiator_addr(){const s=wasm.transactionstrparams_initiator_addr(this.__wbg_ptr);let a;return 0!==s[0]&&(a=getStringFromWasm0(s[0],s[1]).slice(),wasm.__wbindgen_free(s[0],1*s[1],1)),a}set initiator_addr(s){const a=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.transactionstrparams_set_initiator_addr(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get session_args_simple(){const s=wasm.transactionstrparams_session_args_simple(this.__wbg_ptr);return 0===s?void 0:ArgsSimple.__wrap(s)}set session_args_simple(s){const a=passArrayJsValueToWasm0(s,wasm.__wbindgen_malloc);wasm.transactionstrparams_set_session_args_simple(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get session_args_json(){const s=wasm.transactionstrparams_session_args_json(this.__wbg_ptr);let a;return 0!==s[0]&&(a=getStringFromWasm0(s[0],s[1]).slice(),wasm.__wbindgen_free(s[0],1*s[1],1)),a}set session_args_json(s){const a=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.transactionstrparams_set_session_args_json(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get pricing_mode(){const s=wasm.transactionstrparams_pricing_mode(this.__wbg_ptr);return 3===s?void 0:s}set pricing_mode(s){wasm.transactionstrparams_set_pricing_mode(this.__wbg_ptr,s)}get additional_computation_factor(){const s=wasm.transactionstrparams_additional_computation_factor(this.__wbg_ptr);let a;return 0!==s[0]&&(a=getStringFromWasm0(s[0],s[1]).slice(),wasm.__wbindgen_free(s[0],1*s[1],1)),a}set additional_computation_factor(s){const a=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.transactionstrparams_set_additional_computation_factor(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get payment_amount(){const s=wasm.transactionstrparams_payment_amount(this.__wbg_ptr);let a;return 0!==s[0]&&(a=getStringFromWasm0(s[0],s[1]).slice(),wasm.__wbindgen_free(s[0],1*s[1],1)),a}set payment_amount(s){const a=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.transactionstrparams_set_payment_amount(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get gas_price_tolerance(){const s=wasm.transactionstrparams_gas_price_tolerance(this.__wbg_ptr);let a;return 0!==s[0]&&(a=getStringFromWasm0(s[0],s[1]).slice(),wasm.__wbindgen_free(s[0],1*s[1],1)),a}set gas_price_tolerance(s){const a=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.transactionstrparams_set_gas_price_tolerance(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get receipt(){const s=wasm.transactionstrparams_receipt(this.__wbg_ptr);let a;return 0!==s[0]&&(a=getStringFromWasm0(s[0],s[1]).slice(),wasm.__wbindgen_free(s[0],1*s[1],1)),a}set receipt(s){const a=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.transactionstrparams_set_receipt(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get standard_payment(){const s=wasm.transactionstrparams_standard_payment(this.__wbg_ptr);return 16777215===s?void 0:0!==s}set standard_payment(s){wasm.transactionstrparams_set_standard_payment(this.__wbg_ptr,s)}}const TransferAddrFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_transferaddr_free(f>>>0,1));class TransferAddr{static __wrap(s){s>>>=0;const a=Object.create(TransferAddr.prototype);return a.__wbg_ptr=s,TransferAddrFinalization.register(a,a.__wbg_ptr,a),a}__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,TransferAddrFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_transferaddr_free(s,0)}constructor(s){const a=passArray8ToWasm0(s,wasm.__wbindgen_malloc),g=wasm.transferaddr_new(a,WASM_VECTOR_LEN);if(g[2])throw takeFromExternrefTable0(g[1]);return this.__wbg_ptr=g[0]>>>0,TransferAddrFinalization.register(this,this.__wbg_ptr,this),this}}const TransferTargetFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_transfertarget_free(f>>>0,1));class TransferTarget{static __wrap(s){s>>>=0;const a=Object.create(TransferTarget.prototype);return a.__wbg_ptr=s,TransferTargetFinalization.register(a,a.__wbg_ptr,a),a}__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,TransferTargetFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_transfertarget_free(s,0)}constructor(s,a,u,g){let y=0;isLikeNone(a)||(_assertClass(a,PublicKey),y=a.__destroy_into_raw());let v=0;isLikeNone(u)||(_assertClass(u,AccountHash),v=u.__destroy_into_raw());let S=0;isLikeNone(g)||(_assertClass(g,URef),S=g.__destroy_into_raw());const A=wasm.transfertarget_new(s,y,v,S);return this.__wbg_ptr=A>>>0,TransferTargetFinalization.register(this,this.__wbg_ptr,this),this}}const URefFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_uref_free(f>>>0,1));class URef{static __wrap(s){s>>>=0;const a=Object.create(URef.prototype);return a.__wbg_ptr=s,URefFinalization.register(a,a.__wbg_ptr,a),a}__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,URefFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_uref_free(s,0)}constructor(s,a){const u=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),y=wasm.uref_new_js_alias(u,WASM_VECTOR_LEN,a);if(y[2])throw takeFromExternrefTable0(y[1]);return this.__wbg_ptr=y[0]>>>0,URefFinalization.register(this,this.__wbg_ptr,this),this}static fromFormattedStr(s){const a=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),g=wasm.uref_fromFormattedStr(a,WASM_VECTOR_LEN);if(g[2])throw takeFromExternrefTable0(g[1]);return URef.__wrap(g[0])}static fromUint8Array(s,a){const u=passArray8ToWasm0(s,wasm.__wbindgen_malloc),y=wasm.uref_fromUint8Array(u,WASM_VECTOR_LEN,a);return URef.__wrap(y)}toFormattedString(){let s,a;try{const u=wasm.uref_toFormattedString(this.__wbg_ptr);return s=u[0],a=u[1],getStringFromWasm0(u[0],u[1])}finally{wasm.__wbindgen_free(s,a,1)}}toJson(){return wasm.uref_toJson(this.__wbg_ptr)}}const URefAddrFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_urefaddr_free(f>>>0,1));class URefAddr{static __wrap(s){s>>>=0;const a=Object.create(URefAddr.prototype);return a.__wbg_ptr=s,URefAddrFinalization.register(a,a.__wbg_ptr,a),a}__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,URefAddrFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_urefaddr_free(s,0)}constructor(s){const a=passArray8ToWasm0(s,wasm.__wbindgen_malloc),g=wasm.urefaddr_new(a,WASM_VECTOR_LEN);if(g[2])throw takeFromExternrefTable0(g[1]);return this.__wbg_ptr=g[0]>>>0,URefAddrFinalization.register(this,this.__wbg_ptr,this),this}}const Version2Finalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_version2_free(f>>>0,1));class Version2{static __wrap(s){s>>>=0;const a=Object.create(Version2.prototype);return a.__wbg_ptr=s,Version2Finalization.register(a,a.__wbg_ptr,a),a}__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,Version2Finalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_version2_free(s,0)}get initiator(){const s=wasm.__wbg_get_transactionprocessed_hash(this.__wbg_ptr);return PublicKeyString.__wrap(s)}set initiator(s){_assertClass(s,PublicKeyString);var a=s.__destroy_into_raw();wasm.__wbg_set_transactionprocessed_hash(this.__wbg_ptr,a)}get error_message(){const s=wasm.__wbg_get_version2_error_message(this.__wbg_ptr);let a;return 0!==s[0]&&(a=getStringFromWasm0(s[0],s[1]).slice(),wasm.__wbindgen_free(s[0],1*s[1],1)),a}set error_message(s){var a=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.__wbg_set_version2_error_message(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get limit(){let s,a;try{const u=wasm.__wbg_get_version2_limit(this.__wbg_ptr);return s=u[0],a=u[1],getStringFromWasm0(u[0],u[1])}finally{wasm.__wbindgen_free(s,a,1)}}set limit(s){const a=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.__wbg_set_failure_error_message(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get consumed(){let s,a;try{const u=wasm.__wbg_get_version2_consumed(this.__wbg_ptr);return s=u[0],a=u[1],getStringFromWasm0(u[0],u[1])}finally{wasm.__wbindgen_free(s,a,1)}}set consumed(s){const a=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.__wbg_set_transactionprocessed_timestamp(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get cost(){let s,a;try{const u=wasm.__wbg_get_version2_cost(this.__wbg_ptr);return s=u[0],a=u[1],getStringFromWasm0(u[0],u[1])}finally{wasm.__wbindgen_free(s,a,1)}}set cost(s){const a=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.__wbg_set_transactionprocessed_ttl(this.__wbg_ptr,a,WASM_VECTOR_LEN)}}const WatcherFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_watcher_free(f>>>0,1));class Watcher{static __wrap(s){s>>>=0;const a=Object.create(Watcher.prototype);return a.__wbg_ptr=s,WatcherFinalization.register(a,a.__wbg_ptr,a),a}__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,WatcherFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_watcher_free(s,0)}constructor(s,a){const u=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),y=wasm.watcher_new(u,WASM_VECTOR_LEN,!isLikeNone(a),isLikeNone(a)?BigInt(0):a);return this.__wbg_ptr=y>>>0,WatcherFinalization.register(this,this.__wbg_ptr,this),this}subscribe(s){const a=passArrayJsValueToWasm0(s,wasm.__wbindgen_malloc),g=wasm.watcher_subscribe(this.__wbg_ptr,a,WASM_VECTOR_LEN);if(g[1])throw takeFromExternrefTable0(g[0])}unsubscribe(s){const a=passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.watcher_unsubscribe(this.__wbg_ptr,a,WASM_VECTOR_LEN)}start(){return wasm.watcher_start(this.__wbg_ptr)}stop(){wasm.watcher_stop(this.__wbg_ptr)}}const getAccountOptionsFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_getaccountoptions_free(f>>>0,1));class getAccountOptions{static __wrap(s){s>>>=0;const a=Object.create(getAccountOptions.prototype);return a.__wbg_ptr=s,getAccountOptionsFinalization.register(a,a.__wbg_ptr,a),a}__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,getAccountOptionsFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_getaccountoptions_free(s,0)}get account_identifier(){const s=wasm.__wbg_get_getaccountoptions_account_identifier(this.__wbg_ptr);return 0===s?void 0:AccountIdentifier.__wrap(s)}set account_identifier(s){let a=0;isLikeNone(s)||(_assertClass(s,AccountIdentifier),a=s.__destroy_into_raw()),wasm.__wbg_set_getaccountoptions_account_identifier(this.__wbg_ptr,a)}get account_identifier_as_string(){const s=wasm.__wbg_get_getaccountoptions_account_identifier_as_string(this.__wbg_ptr);let a;return 0!==s[0]&&(a=getStringFromWasm0(s[0],s[1]).slice(),wasm.__wbindgen_free(s[0],1*s[1],1)),a}set account_identifier_as_string(s){var a=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.__wbg_set_getaccountoptions_account_identifier_as_string(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get maybe_block_id_as_string(){const s=wasm.__wbg_get_getaccountoptions_maybe_block_id_as_string(this.__wbg_ptr);let a;return 0!==s[0]&&(a=getStringFromWasm0(s[0],s[1]).slice(),wasm.__wbindgen_free(s[0],1*s[1],1)),a}set maybe_block_id_as_string(s){var a=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.__wbg_set_getaccountoptions_maybe_block_id_as_string(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get maybe_block_identifier(){const s=wasm.__wbg_get_getaccountoptions_maybe_block_identifier(this.__wbg_ptr);return 0===s?void 0:BlockIdentifier.__wrap(s)}set maybe_block_identifier(s){let a=0;isLikeNone(s)||(_assertClass(s,BlockIdentifier),a=s.__destroy_into_raw()),wasm.__wbg_set_getaccountoptions_maybe_block_identifier(this.__wbg_ptr,a)}get rpc_address(){const s=wasm.__wbg_get_getaccountoptions_rpc_address(this.__wbg_ptr);let a;return 0!==s[0]&&(a=getStringFromWasm0(s[0],s[1]).slice(),wasm.__wbindgen_free(s[0],1*s[1],1)),a}set rpc_address(s){var a=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.__wbg_set_getaccountoptions_rpc_address(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get verbosity(){const s=wasm.__wbg_get_getaccountoptions_verbosity(this.__wbg_ptr);return 3===s?void 0:s}set verbosity(s){wasm.__wbg_set_getaccountoptions_verbosity(this.__wbg_ptr,isLikeNone(s)?3:s)}}const getAuctionInfoOptionsFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_getauctioninfooptions_free(f>>>0,1));class getAuctionInfoOptions{static __wrap(s){s>>>=0;const a=Object.create(getAuctionInfoOptions.prototype);return a.__wbg_ptr=s,getAuctionInfoOptionsFinalization.register(a,a.__wbg_ptr,a),a}__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,getAuctionInfoOptionsFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_getauctioninfooptions_free(s,0)}get maybe_block_id_as_string(){const s=wasm.__wbg_get_getauctioninfooptions_maybe_block_id_as_string(this.__wbg_ptr);let a;return 0!==s[0]&&(a=getStringFromWasm0(s[0],s[1]).slice(),wasm.__wbindgen_free(s[0],1*s[1],1)),a}set maybe_block_id_as_string(s){var a=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.__wbg_set_getauctioninfooptions_maybe_block_id_as_string(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get maybe_block_identifier(){const s=wasm.__wbg_get_getauctioninfooptions_maybe_block_identifier(this.__wbg_ptr);return 0===s?void 0:BlockIdentifier.__wrap(s)}set maybe_block_identifier(s){let a=0;isLikeNone(s)||(_assertClass(s,BlockIdentifier),a=s.__destroy_into_raw()),wasm.__wbg_set_getauctioninfooptions_maybe_block_identifier(this.__wbg_ptr,a)}get rpc_address(){const s=wasm.__wbg_get_getauctioninfooptions_rpc_address(this.__wbg_ptr);let a;return 0!==s[0]&&(a=getStringFromWasm0(s[0],s[1]).slice(),wasm.__wbindgen_free(s[0],1*s[1],1)),a}set rpc_address(s){var a=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.__wbg_set_getauctioninfooptions_rpc_address(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get verbosity(){const s=wasm.__wbg_get_getauctioninfooptions_verbosity(this.__wbg_ptr);return 3===s?void 0:s}set verbosity(s){wasm.__wbg_set_getauctioninfooptions_verbosity(this.__wbg_ptr,isLikeNone(s)?3:s)}}const getBalanceOptionsFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_getbalanceoptions_free(f>>>0,1));class getBalanceOptions{static __wrap(s){s>>>=0;const a=Object.create(getBalanceOptions.prototype);return a.__wbg_ptr=s,getBalanceOptionsFinalization.register(a,a.__wbg_ptr,a),a}__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,getBalanceOptionsFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_getbalanceoptions_free(s,0)}get state_root_hash_as_string(){const s=wasm.__wbg_get_getbalanceoptions_state_root_hash_as_string(this.__wbg_ptr);let a;return 0!==s[0]&&(a=getStringFromWasm0(s[0],s[1]).slice(),wasm.__wbindgen_free(s[0],1*s[1],1)),a}set state_root_hash_as_string(s){var a=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.__wbg_set_getbalanceoptions_state_root_hash_as_string(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get state_root_hash(){const s=wasm.__wbg_get_getbalanceoptions_state_root_hash(this.__wbg_ptr);return 0===s?void 0:Digest.__wrap(s)}set state_root_hash(s){let a=0;isLikeNone(s)||(_assertClass(s,Digest),a=s.__destroy_into_raw()),wasm.__wbg_set_getbalanceoptions_state_root_hash(this.__wbg_ptr,a)}get purse_uref_as_string(){const s=wasm.__wbg_get_getbalanceoptions_purse_uref_as_string(this.__wbg_ptr);let a;return 0!==s[0]&&(a=getStringFromWasm0(s[0],s[1]).slice(),wasm.__wbindgen_free(s[0],1*s[1],1)),a}set purse_uref_as_string(s){var a=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.__wbg_set_getbalanceoptions_purse_uref_as_string(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get purse_uref(){const s=wasm.__wbg_get_getbalanceoptions_purse_uref(this.__wbg_ptr);return 0===s?void 0:URef.__wrap(s)}set purse_uref(s){let a=0;isLikeNone(s)||(_assertClass(s,URef),a=s.__destroy_into_raw()),wasm.__wbg_set_getbalanceoptions_purse_uref(this.__wbg_ptr,a)}get rpc_address(){const s=wasm.__wbg_get_getbalanceoptions_rpc_address(this.__wbg_ptr);let a;return 0!==s[0]&&(a=getStringFromWasm0(s[0],s[1]).slice(),wasm.__wbindgen_free(s[0],1*s[1],1)),a}set rpc_address(s){var a=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.__wbg_set_getbalanceoptions_rpc_address(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get verbosity(){const s=wasm.__wbg_get_getbalanceoptions_verbosity(this.__wbg_ptr);return 3===s?void 0:s}set verbosity(s){wasm.__wbg_set_getbalanceoptions_verbosity(this.__wbg_ptr,isLikeNone(s)?3:s)}}const getBlockOptionsFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_getblockoptions_free(f>>>0,1));class getBlockOptions{static __wrap(s){s>>>=0;const a=Object.create(getBlockOptions.prototype);return a.__wbg_ptr=s,getBlockOptionsFinalization.register(a,a.__wbg_ptr,a),a}__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,getBlockOptionsFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_getblockoptions_free(s,0)}get maybe_block_id_as_string(){const s=wasm.__wbg_get_getblockoptions_maybe_block_id_as_string(this.__wbg_ptr);let a;return 0!==s[0]&&(a=getStringFromWasm0(s[0],s[1]).slice(),wasm.__wbindgen_free(s[0],1*s[1],1)),a}set maybe_block_id_as_string(s){var a=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.__wbg_set_getauctioninfooptions_maybe_block_id_as_string(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get maybe_block_identifier(){const s=wasm.__wbg_get_getauctioninfooptions_maybe_block_identifier(this.__wbg_ptr);return 0===s?void 0:BlockIdentifier.__wrap(s)}set maybe_block_identifier(s){let a=0;isLikeNone(s)||(_assertClass(s,BlockIdentifier),a=s.__destroy_into_raw()),wasm.__wbg_set_getauctioninfooptions_maybe_block_identifier(this.__wbg_ptr,a)}get rpc_address(){const s=wasm.__wbg_get_getblockoptions_rpc_address(this.__wbg_ptr);let a;return 0!==s[0]&&(a=getStringFromWasm0(s[0],s[1]).slice(),wasm.__wbindgen_free(s[0],1*s[1],1)),a}set rpc_address(s){var a=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.__wbg_set_getauctioninfooptions_rpc_address(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get verbosity(){const s=wasm.__wbg_get_getauctioninfooptions_verbosity(this.__wbg_ptr);return 3===s?void 0:s}set verbosity(s){wasm.__wbg_set_getauctioninfooptions_verbosity(this.__wbg_ptr,isLikeNone(s)?3:s)}}const getBlockTransfersOptionsFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_getblocktransfersoptions_free(f>>>0,1));class getBlockTransfersOptions{static __wrap(s){s>>>=0;const a=Object.create(getBlockTransfersOptions.prototype);return a.__wbg_ptr=s,getBlockTransfersOptionsFinalization.register(a,a.__wbg_ptr,a),a}__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,getBlockTransfersOptionsFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_getblocktransfersoptions_free(s,0)}get maybe_block_id_as_string(){const s=wasm.__wbg_get_getblocktransfersoptions_maybe_block_id_as_string(this.__wbg_ptr);let a;return 0!==s[0]&&(a=getStringFromWasm0(s[0],s[1]).slice(),wasm.__wbindgen_free(s[0],1*s[1],1)),a}set maybe_block_id_as_string(s){var a=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.__wbg_set_getblocktransfersoptions_maybe_block_id_as_string(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get maybe_block_identifier(){const s=wasm.__wbg_get_getblocktransfersoptions_maybe_block_identifier(this.__wbg_ptr);return 0===s?void 0:BlockIdentifier.__wrap(s)}set maybe_block_identifier(s){let a=0;isLikeNone(s)||(_assertClass(s,BlockIdentifier),a=s.__destroy_into_raw()),wasm.__wbg_set_getblocktransfersoptions_maybe_block_identifier(this.__wbg_ptr,a)}get verbosity(){const s=wasm.__wbg_get_getblocktransfersoptions_verbosity(this.__wbg_ptr);return 3===s?void 0:s}set verbosity(s){wasm.__wbg_set_getblocktransfersoptions_verbosity(this.__wbg_ptr,isLikeNone(s)?3:s)}get rpc_address(){const s=wasm.__wbg_get_getblocktransfersoptions_rpc_address(this.__wbg_ptr);let a;return 0!==s[0]&&(a=getStringFromWasm0(s[0],s[1]).slice(),wasm.__wbindgen_free(s[0],1*s[1],1)),a}set rpc_address(s){var a=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.__wbg_set_getblocktransfersoptions_rpc_address(this.__wbg_ptr,a,WASM_VECTOR_LEN)}}const getDeployOptionsFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_getdeployoptions_free(f>>>0,1));class getDeployOptions{static __wrap(s){s>>>=0;const a=Object.create(getDeployOptions.prototype);return a.__wbg_ptr=s,getDeployOptionsFinalization.register(a,a.__wbg_ptr,a),a}__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,getDeployOptionsFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_getdeployoptions_free(s,0)}get deploy_hash_as_string(){const s=wasm.__wbg_get_getdeployoptions_deploy_hash_as_string(this.__wbg_ptr);let a;return 0!==s[0]&&(a=getStringFromWasm0(s[0],s[1]).slice(),wasm.__wbindgen_free(s[0],1*s[1],1)),a}set deploy_hash_as_string(s){var a=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.__wbg_set_getdeployoptions_deploy_hash_as_string(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get deploy_hash(){const s=wasm.__wbg_get_getdeployoptions_deploy_hash(this.__wbg_ptr);return 0===s?void 0:DeployHash.__wrap(s)}set deploy_hash(s){let a=0;isLikeNone(s)||(_assertClass(s,DeployHash),a=s.__destroy_into_raw()),wasm.__wbg_set_getdeployoptions_deploy_hash(this.__wbg_ptr,a)}get finalized_approvals(){const s=wasm.__wbg_get_getdeployoptions_finalized_approvals(this.__wbg_ptr);return 16777215===s?void 0:0!==s}set finalized_approvals(s){wasm.__wbg_set_getdeployoptions_finalized_approvals(this.__wbg_ptr,isLikeNone(s)?16777215:s?1:0)}get rpc_address(){const s=wasm.__wbg_get_getdeployoptions_rpc_address(this.__wbg_ptr);let a;return 0!==s[0]&&(a=getStringFromWasm0(s[0],s[1]).slice(),wasm.__wbindgen_free(s[0],1*s[1],1)),a}set rpc_address(s){var a=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.__wbg_set_getdeployoptions_rpc_address(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get verbosity(){const s=wasm.__wbg_get_getdeployoptions_verbosity(this.__wbg_ptr);return 3===s?void 0:s}set verbosity(s){wasm.__wbg_set_getdeployoptions_verbosity(this.__wbg_ptr,isLikeNone(s)?3:s)}}const getDictionaryItemOptionsFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_getdictionaryitemoptions_free(f>>>0,1));class getDictionaryItemOptions{static __wrap(s){s>>>=0;const a=Object.create(getDictionaryItemOptions.prototype);return a.__wbg_ptr=s,getDictionaryItemOptionsFinalization.register(a,a.__wbg_ptr,a),a}__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,getDictionaryItemOptionsFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_getdictionaryitemoptions_free(s,0)}get state_root_hash_as_string(){const s=wasm.__wbg_get_getdictionaryitemoptions_state_root_hash_as_string(this.__wbg_ptr);let a;return 0!==s[0]&&(a=getStringFromWasm0(s[0],s[1]).slice(),wasm.__wbindgen_free(s[0],1*s[1],1)),a}set state_root_hash_as_string(s){var a=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.__wbg_set_getdictionaryitemoptions_state_root_hash_as_string(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get state_root_hash(){const s=wasm.__wbg_get_getdictionaryitemoptions_state_root_hash(this.__wbg_ptr);return 0===s?void 0:Digest.__wrap(s)}set state_root_hash(s){let a=0;isLikeNone(s)||(_assertClass(s,Digest),a=s.__destroy_into_raw()),wasm.__wbg_set_getdictionaryitemoptions_state_root_hash(this.__wbg_ptr,a)}get dictionary_item_params(){const s=wasm.__wbg_get_getdictionaryitemoptions_dictionary_item_params(this.__wbg_ptr);return 0===s?void 0:DictionaryItemStrParams.__wrap(s)}set dictionary_item_params(s){let a=0;isLikeNone(s)||(_assertClass(s,DictionaryItemStrParams),a=s.__destroy_into_raw()),wasm.__wbg_set_getdictionaryitemoptions_dictionary_item_params(this.__wbg_ptr,a)}get dictionary_item_identifier(){const s=wasm.__wbg_get_getdictionaryitemoptions_dictionary_item_identifier(this.__wbg_ptr);return 0===s?void 0:DictionaryItemIdentifier.__wrap(s)}set dictionary_item_identifier(s){let a=0;isLikeNone(s)||(_assertClass(s,DictionaryItemIdentifier),a=s.__destroy_into_raw()),wasm.__wbg_set_getdictionaryitemoptions_dictionary_item_identifier(this.__wbg_ptr,a)}get rpc_address(){const s=wasm.__wbg_get_getdictionaryitemoptions_rpc_address(this.__wbg_ptr);let a;return 0!==s[0]&&(a=getStringFromWasm0(s[0],s[1]).slice(),wasm.__wbindgen_free(s[0],1*s[1],1)),a}set rpc_address(s){var a=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.__wbg_set_getdictionaryitemoptions_rpc_address(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get verbosity(){const s=wasm.__wbg_get_getdictionaryitemoptions_verbosity(this.__wbg_ptr);return 3===s?void 0:s}set verbosity(s){wasm.__wbg_set_getdictionaryitemoptions_verbosity(this.__wbg_ptr,isLikeNone(s)?3:s)}}const getEntityOptionsFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_getentityoptions_free(f>>>0,1));class getEntityOptions{static __wrap(s){s>>>=0;const a=Object.create(getEntityOptions.prototype);return a.__wbg_ptr=s,getEntityOptionsFinalization.register(a,a.__wbg_ptr,a),a}__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,getEntityOptionsFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_getentityoptions_free(s,0)}get entity_identifier(){const s=wasm.__wbg_get_getentityoptions_entity_identifier(this.__wbg_ptr);return 0===s?void 0:EntityIdentifier.__wrap(s)}set entity_identifier(s){let a=0;isLikeNone(s)||(_assertClass(s,EntityIdentifier),a=s.__destroy_into_raw()),wasm.__wbg_set_getentityoptions_entity_identifier(this.__wbg_ptr,a)}get entity_identifier_as_string(){const s=wasm.__wbg_get_getentityoptions_entity_identifier_as_string(this.__wbg_ptr);let a;return 0!==s[0]&&(a=getStringFromWasm0(s[0],s[1]).slice(),wasm.__wbindgen_free(s[0],1*s[1],1)),a}set entity_identifier_as_string(s){var a=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.__wbg_set_getentityoptions_entity_identifier_as_string(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get maybe_block_id_as_string(){const s=wasm.__wbg_get_getentityoptions_maybe_block_id_as_string(this.__wbg_ptr);let a;return 0!==s[0]&&(a=getStringFromWasm0(s[0],s[1]).slice(),wasm.__wbindgen_free(s[0],1*s[1],1)),a}set maybe_block_id_as_string(s){var a=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.__wbg_set_getentityoptions_maybe_block_id_as_string(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get maybe_block_identifier(){const s=wasm.__wbg_get_getentityoptions_maybe_block_identifier(this.__wbg_ptr);return 0===s?void 0:BlockIdentifier.__wrap(s)}set maybe_block_identifier(s){let a=0;isLikeNone(s)||(_assertClass(s,BlockIdentifier),a=s.__destroy_into_raw()),wasm.__wbg_set_getentityoptions_maybe_block_identifier(this.__wbg_ptr,a)}get rpc_address(){const s=wasm.__wbg_get_getentityoptions_rpc_address(this.__wbg_ptr);let a;return 0!==s[0]&&(a=getStringFromWasm0(s[0],s[1]).slice(),wasm.__wbindgen_free(s[0],1*s[1],1)),a}set rpc_address(s){var a=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.__wbg_set_getentityoptions_rpc_address(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get verbosity(){const s=wasm.__wbg_get_getentityoptions_verbosity(this.__wbg_ptr);return 3===s?void 0:s}set verbosity(s){wasm.__wbg_set_getentityoptions_verbosity(this.__wbg_ptr,isLikeNone(s)?3:s)}}const getEraInfoOptionsFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_geterainfooptions_free(f>>>0,1));class getEraInfoOptions{static __wrap(s){s>>>=0;const a=Object.create(getEraInfoOptions.prototype);return a.__wbg_ptr=s,getEraInfoOptionsFinalization.register(a,a.__wbg_ptr,a),a}__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,getEraInfoOptionsFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_geterainfooptions_free(s,0)}get maybe_block_id_as_string(){const s=wasm.__wbg_get_geterainfooptions_maybe_block_id_as_string(this.__wbg_ptr);let a;return 0!==s[0]&&(a=getStringFromWasm0(s[0],s[1]).slice(),wasm.__wbindgen_free(s[0],1*s[1],1)),a}set maybe_block_id_as_string(s){var a=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.__wbg_set_geterainfooptions_maybe_block_id_as_string(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get maybe_block_identifier(){const s=wasm.__wbg_get_geterainfooptions_maybe_block_identifier(this.__wbg_ptr);return 0===s?void 0:BlockIdentifier.__wrap(s)}set maybe_block_identifier(s){let a=0;isLikeNone(s)||(_assertClass(s,BlockIdentifier),a=s.__destroy_into_raw()),wasm.__wbg_set_geterainfooptions_maybe_block_identifier(this.__wbg_ptr,a)}get rpc_address(){const s=wasm.__wbg_get_geterainfooptions_rpc_address(this.__wbg_ptr);let a;return 0!==s[0]&&(a=getStringFromWasm0(s[0],s[1]).slice(),wasm.__wbindgen_free(s[0],1*s[1],1)),a}set rpc_address(s){var a=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.__wbg_set_geterainfooptions_rpc_address(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get verbosity(){const s=wasm.__wbg_get_geterainfooptions_verbosity(this.__wbg_ptr);return 3===s?void 0:s}set verbosity(s){wasm.__wbg_set_geterainfooptions_verbosity(this.__wbg_ptr,isLikeNone(s)?3:s)}}const getEraSummaryOptionsFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_geterasummaryoptions_free(f>>>0,1));class getEraSummaryOptions{static __wrap(s){s>>>=0;const a=Object.create(getEraSummaryOptions.prototype);return a.__wbg_ptr=s,getEraSummaryOptionsFinalization.register(a,a.__wbg_ptr,a),a}__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,getEraSummaryOptionsFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_geterasummaryoptions_free(s,0)}get maybe_block_id_as_string(){const s=wasm.__wbg_get_geterasummaryoptions_maybe_block_id_as_string(this.__wbg_ptr);let a;return 0!==s[0]&&(a=getStringFromWasm0(s[0],s[1]).slice(),wasm.__wbindgen_free(s[0],1*s[1],1)),a}set maybe_block_id_as_string(s){var a=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.__wbg_set_geterasummaryoptions_maybe_block_id_as_string(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get maybe_block_identifier(){const s=wasm.__wbg_get_getaccountoptions_maybe_block_identifier(this.__wbg_ptr);return 0===s?void 0:BlockIdentifier.__wrap(s)}set maybe_block_identifier(s){let a=0;isLikeNone(s)||(_assertClass(s,BlockIdentifier),a=s.__destroy_into_raw()),wasm.__wbg_set_getaccountoptions_maybe_block_identifier(this.__wbg_ptr,a)}get rpc_address(){const s=wasm.__wbg_get_geterasummaryoptions_rpc_address(this.__wbg_ptr);let a;return 0!==s[0]&&(a=getStringFromWasm0(s[0],s[1]).slice(),wasm.__wbindgen_free(s[0],1*s[1],1)),a}set rpc_address(s){var a=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.__wbg_set_geterasummaryoptions_rpc_address(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get verbosity(){const s=wasm.__wbg_get_geterasummaryoptions_verbosity(this.__wbg_ptr);return 3===s?void 0:s}set verbosity(s){wasm.__wbg_set_geterasummaryoptions_verbosity(this.__wbg_ptr,isLikeNone(s)?3:s)}}const getSpeculativeExecDeployOptionsFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_getspeculativeexecdeployoptions_free(f>>>0,1));class getSpeculativeExecDeployOptions{static __wrap(s){s>>>=0;const a=Object.create(getSpeculativeExecDeployOptions.prototype);return a.__wbg_ptr=s,getSpeculativeExecDeployOptionsFinalization.register(a,a.__wbg_ptr,a),a}__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,getSpeculativeExecDeployOptionsFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_getspeculativeexecdeployoptions_free(s,0)}get deploy_as_string(){const s=wasm.__wbg_get_getspeculativeexecdeployoptions_deploy_as_string(this.__wbg_ptr);let a;return 0!==s[0]&&(a=getStringFromWasm0(s[0],s[1]).slice(),wasm.__wbindgen_free(s[0],1*s[1],1)),a}set deploy_as_string(s){var a=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.__wbg_set_getspeculativeexecdeployoptions_deploy_as_string(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get deploy(){const s=wasm.__wbg_get_getspeculativeexecdeployoptions_deploy(this.__wbg_ptr);return 0===s?void 0:Deploy.__wrap(s)}set deploy(s){let a=0;isLikeNone(s)||(_assertClass(s,Deploy),a=s.__destroy_into_raw()),wasm.__wbg_set_getspeculativeexecdeployoptions_deploy(this.__wbg_ptr,a)}get rpc_address(){const s=wasm.__wbg_get_getspeculativeexecdeployoptions_rpc_address(this.__wbg_ptr);let a;return 0!==s[0]&&(a=getStringFromWasm0(s[0],s[1]).slice(),wasm.__wbindgen_free(s[0],1*s[1],1)),a}set rpc_address(s){var a=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.__wbg_set_getspeculativeexecdeployoptions_rpc_address(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get verbosity(){const s=wasm.__wbg_get_getspeculativeexecdeployoptions_verbosity(this.__wbg_ptr);return 3===s?void 0:s}set verbosity(s){wasm.__wbg_set_getspeculativeexecdeployoptions_verbosity(this.__wbg_ptr,isLikeNone(s)?3:s)}}const getSpeculativeExecTxnOptionsFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_getspeculativeexectxnoptions_free(f>>>0,1));class getSpeculativeExecTxnOptions{static __wrap(s){s>>>=0;const a=Object.create(getSpeculativeExecTxnOptions.prototype);return a.__wbg_ptr=s,getSpeculativeExecTxnOptionsFinalization.register(a,a.__wbg_ptr,a),a}__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,getSpeculativeExecTxnOptionsFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_getspeculativeexectxnoptions_free(s,0)}get transaction_as_string(){const s=wasm.__wbg_get_getspeculativeexectxnoptions_transaction_as_string(this.__wbg_ptr);let a;return 0!==s[0]&&(a=getStringFromWasm0(s[0],s[1]).slice(),wasm.__wbindgen_free(s[0],1*s[1],1)),a}set transaction_as_string(s){var a=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.__wbg_set_getspeculativeexectxnoptions_transaction_as_string(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get transaction(){const s=wasm.__wbg_get_getspeculativeexectxnoptions_transaction(this.__wbg_ptr);return 0===s?void 0:Transaction.__wrap(s)}set transaction(s){let a=0;isLikeNone(s)||(_assertClass(s,Transaction),a=s.__destroy_into_raw()),wasm.__wbg_set_getspeculativeexectxnoptions_transaction(this.__wbg_ptr,a)}get rpc_address(){const s=wasm.__wbg_get_getspeculativeexectxnoptions_rpc_address(this.__wbg_ptr);let a;return 0!==s[0]&&(a=getStringFromWasm0(s[0],s[1]).slice(),wasm.__wbindgen_free(s[0],1*s[1],1)),a}set rpc_address(s){var a=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.__wbg_set_getspeculativeexectxnoptions_rpc_address(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get verbosity(){const s=wasm.__wbg_get_getspeculativeexectxnoptions_verbosity(this.__wbg_ptr);return 3===s?void 0:s}set verbosity(s){wasm.__wbg_set_getspeculativeexectxnoptions_verbosity(this.__wbg_ptr,isLikeNone(s)?3:s)}}const getStateRootHashOptionsFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_getstateroothashoptions_free(f>>>0,1));class getStateRootHashOptions{static __wrap(s){s>>>=0;const a=Object.create(getStateRootHashOptions.prototype);return a.__wbg_ptr=s,getStateRootHashOptionsFinalization.register(a,a.__wbg_ptr,a),a}__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,getStateRootHashOptionsFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_getstateroothashoptions_free(s,0)}get maybe_block_id_as_string(){const s=wasm.__wbg_get_getstateroothashoptions_maybe_block_id_as_string(this.__wbg_ptr);let a;return 0!==s[0]&&(a=getStringFromWasm0(s[0],s[1]).slice(),wasm.__wbindgen_free(s[0],1*s[1],1)),a}set maybe_block_id_as_string(s){var a=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.__wbg_set_getstateroothashoptions_maybe_block_id_as_string(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get maybe_block_identifier(){const s=wasm.__wbg_get_getstateroothashoptions_maybe_block_identifier(this.__wbg_ptr);return 0===s?void 0:BlockIdentifier.__wrap(s)}set maybe_block_identifier(s){let a=0;isLikeNone(s)||(_assertClass(s,BlockIdentifier),a=s.__destroy_into_raw()),wasm.__wbg_set_getstateroothashoptions_maybe_block_identifier(this.__wbg_ptr,a)}get rpc_address(){const s=wasm.__wbg_get_getstateroothashoptions_rpc_address(this.__wbg_ptr);let a;return 0!==s[0]&&(a=getStringFromWasm0(s[0],s[1]).slice(),wasm.__wbindgen_free(s[0],1*s[1],1)),a}set rpc_address(s){var a=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.__wbg_set_getstateroothashoptions_rpc_address(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get verbosity(){const s=wasm.__wbg_get_getstateroothashoptions_verbosity(this.__wbg_ptr);return 3===s?void 0:s}set verbosity(s){wasm.__wbg_set_getstateroothashoptions_verbosity(this.__wbg_ptr,isLikeNone(s)?3:s)}}const getTransactionOptionsFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_gettransactionoptions_free(f>>>0,1));class getTransactionOptions{static __wrap(s){s>>>=0;const a=Object.create(getTransactionOptions.prototype);return a.__wbg_ptr=s,getTransactionOptionsFinalization.register(a,a.__wbg_ptr,a),a}__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,getTransactionOptionsFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_gettransactionoptions_free(s,0)}get transaction_hash_as_string(){const s=wasm.__wbg_get_gettransactionoptions_transaction_hash_as_string(this.__wbg_ptr);let a;return 0!==s[0]&&(a=getStringFromWasm0(s[0],s[1]).slice(),wasm.__wbindgen_free(s[0],1*s[1],1)),a}set transaction_hash_as_string(s){var a=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.__wbg_set_getdeployoptions_deploy_hash_as_string(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get transaction_hash(){const s=wasm.__wbg_get_gettransactionoptions_transaction_hash(this.__wbg_ptr);return 0===s?void 0:TransactionHash.__wrap(s)}set transaction_hash(s){let a=0;isLikeNone(s)||(_assertClass(s,TransactionHash),a=s.__destroy_into_raw()),wasm.__wbg_set_gettransactionoptions_transaction_hash(this.__wbg_ptr,a)}get finalized_approvals(){const s=wasm.__wbg_get_getdeployoptions_finalized_approvals(this.__wbg_ptr);return 16777215===s?void 0:0!==s}set finalized_approvals(s){wasm.__wbg_set_getdeployoptions_finalized_approvals(this.__wbg_ptr,isLikeNone(s)?16777215:s?1:0)}get rpc_address(){const s=wasm.__wbg_get_gettransactionoptions_rpc_address(this.__wbg_ptr);let a;return 0!==s[0]&&(a=getStringFromWasm0(s[0],s[1]).slice(),wasm.__wbindgen_free(s[0],1*s[1],1)),a}set rpc_address(s){var a=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.__wbg_set_getdeployoptions_rpc_address(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get verbosity(){const s=wasm.__wbg_get_getdeployoptions_verbosity(this.__wbg_ptr);return 3===s?void 0:s}set verbosity(s){wasm.__wbg_set_getdeployoptions_verbosity(this.__wbg_ptr,isLikeNone(s)?3:s)}}const queryBalanceDetailsOptionsFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_querybalancedetailsoptions_free(f>>>0,1));class queryBalanceDetailsOptions{static __wrap(s){s>>>=0;const a=Object.create(queryBalanceDetailsOptions.prototype);return a.__wbg_ptr=s,queryBalanceDetailsOptionsFinalization.register(a,a.__wbg_ptr,a),a}__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,queryBalanceDetailsOptionsFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_querybalancedetailsoptions_free(s,0)}get purse_identifier_as_string(){const s=wasm.__wbg_get_querybalancedetailsoptions_purse_identifier_as_string(this.__wbg_ptr);let a;return 0!==s[0]&&(a=getStringFromWasm0(s[0],s[1]).slice(),wasm.__wbindgen_free(s[0],1*s[1],1)),a}set purse_identifier_as_string(s){var a=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.__wbg_set_getentityoptions_entity_identifier_as_string(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get purse_identifier(){const s=wasm.__wbg_get_querybalancedetailsoptions_purse_identifier(this.__wbg_ptr);return 0===s?void 0:PurseIdentifier.__wrap(s)}set purse_identifier(s){let a=0;isLikeNone(s)||(_assertClass(s,PurseIdentifier),a=s.__destroy_into_raw()),wasm.__wbg_set_querybalancedetailsoptions_purse_identifier(this.__wbg_ptr,a)}get global_state_identifier(){const s=wasm.__wbg_get_querybalancedetailsoptions_global_state_identifier(this.__wbg_ptr);return 0===s?void 0:GlobalStateIdentifier.__wrap(s)}set global_state_identifier(s){let a=0;isLikeNone(s)||(_assertClass(s,GlobalStateIdentifier),a=s.__destroy_into_raw()),wasm.__wbg_set_querybalancedetailsoptions_global_state_identifier(this.__wbg_ptr,a)}get state_root_hash_as_string(){const s=wasm.__wbg_get_querybalancedetailsoptions_state_root_hash_as_string(this.__wbg_ptr);let a;return 0!==s[0]&&(a=getStringFromWasm0(s[0],s[1]).slice(),wasm.__wbindgen_free(s[0],1*s[1],1)),a}set state_root_hash_as_string(s){var a=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.__wbg_set_getentityoptions_maybe_block_id_as_string(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get state_root_hash(){const s=wasm.__wbg_get_querybalancedetailsoptions_state_root_hash(this.__wbg_ptr);return 0===s?void 0:Digest.__wrap(s)}set state_root_hash(s){let a=0;isLikeNone(s)||(_assertClass(s,Digest),a=s.__destroy_into_raw()),wasm.__wbg_set_querybalancedetailsoptions_state_root_hash(this.__wbg_ptr,a)}get maybe_block_id_as_string(){const s=wasm.__wbg_get_querybalancedetailsoptions_maybe_block_id_as_string(this.__wbg_ptr);let a;return 0!==s[0]&&(a=getStringFromWasm0(s[0],s[1]).slice(),wasm.__wbindgen_free(s[0],1*s[1],1)),a}set maybe_block_id_as_string(s){var a=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.__wbg_set_getentityoptions_rpc_address(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get rpc_address(){const s=wasm.__wbg_get_querybalancedetailsoptions_rpc_address(this.__wbg_ptr);let a;return 0!==s[0]&&(a=getStringFromWasm0(s[0],s[1]).slice(),wasm.__wbindgen_free(s[0],1*s[1],1)),a}set rpc_address(s){var a=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.__wbg_set_querybalancedetailsoptions_rpc_address(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get verbosity(){const s=wasm.__wbg_get_querybalancedetailsoptions_verbosity(this.__wbg_ptr);return 3===s?void 0:s}set verbosity(s){wasm.__wbg_set_querybalancedetailsoptions_verbosity(this.__wbg_ptr,isLikeNone(s)?3:s)}}const queryBalanceOptionsFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_querybalanceoptions_free(f>>>0,1));class queryBalanceOptions{static __wrap(s){s>>>=0;const a=Object.create(queryBalanceOptions.prototype);return a.__wbg_ptr=s,queryBalanceOptionsFinalization.register(a,a.__wbg_ptr,a),a}__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,queryBalanceOptionsFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_querybalanceoptions_free(s,0)}get purse_identifier_as_string(){const s=wasm.__wbg_get_querybalanceoptions_purse_identifier_as_string(this.__wbg_ptr);let a;return 0!==s[0]&&(a=getStringFromWasm0(s[0],s[1]).slice(),wasm.__wbindgen_free(s[0],1*s[1],1)),a}set purse_identifier_as_string(s){var a=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.__wbg_set_querybalanceoptions_purse_identifier_as_string(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get purse_identifier(){const s=wasm.__wbg_get_querybalanceoptions_purse_identifier(this.__wbg_ptr);return 0===s?void 0:PurseIdentifier.__wrap(s)}set purse_identifier(s){let a=0;isLikeNone(s)||(_assertClass(s,PurseIdentifier),a=s.__destroy_into_raw()),wasm.__wbg_set_querybalanceoptions_purse_identifier(this.__wbg_ptr,a)}get global_state_identifier(){const s=wasm.__wbg_get_querybalanceoptions_global_state_identifier(this.__wbg_ptr);return 0===s?void 0:GlobalStateIdentifier.__wrap(s)}set global_state_identifier(s){let a=0;isLikeNone(s)||(_assertClass(s,GlobalStateIdentifier),a=s.__destroy_into_raw()),wasm.__wbg_set_querybalanceoptions_global_state_identifier(this.__wbg_ptr,a)}get state_root_hash_as_string(){const s=wasm.__wbg_get_querybalanceoptions_state_root_hash_as_string(this.__wbg_ptr);let a;return 0!==s[0]&&(a=getStringFromWasm0(s[0],s[1]).slice(),wasm.__wbindgen_free(s[0],1*s[1],1)),a}set state_root_hash_as_string(s){var a=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.__wbg_set_querybalanceoptions_state_root_hash_as_string(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get state_root_hash(){const s=wasm.__wbg_get_querybalanceoptions_state_root_hash(this.__wbg_ptr);return 0===s?void 0:Digest.__wrap(s)}set state_root_hash(s){let a=0;isLikeNone(s)||(_assertClass(s,Digest),a=s.__destroy_into_raw()),wasm.__wbg_set_querybalanceoptions_state_root_hash(this.__wbg_ptr,a)}get maybe_block_id_as_string(){const s=wasm.__wbg_get_querybalanceoptions_maybe_block_id_as_string(this.__wbg_ptr);let a;return 0!==s[0]&&(a=getStringFromWasm0(s[0],s[1]).slice(),wasm.__wbindgen_free(s[0],1*s[1],1)),a}set maybe_block_id_as_string(s){var a=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.__wbg_set_querybalanceoptions_maybe_block_id_as_string(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get rpc_address(){const s=wasm.__wbg_get_querybalanceoptions_rpc_address(this.__wbg_ptr);let a;return 0!==s[0]&&(a=getStringFromWasm0(s[0],s[1]).slice(),wasm.__wbindgen_free(s[0],1*s[1],1)),a}set rpc_address(s){var a=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.__wbg_set_querybalanceoptions_rpc_address(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get verbosity(){const s=wasm.__wbg_get_querybalanceoptions_verbosity(this.__wbg_ptr);return 3===s?void 0:s}set verbosity(s){wasm.__wbg_set_querybalanceoptions_verbosity(this.__wbg_ptr,isLikeNone(s)?3:s)}}const queryContractDictOptionsFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_querycontractdictoptions_free(f>>>0,1));class queryContractDictOptions{static __wrap(s){s>>>=0;const a=Object.create(queryContractDictOptions.prototype);return a.__wbg_ptr=s,queryContractDictOptionsFinalization.register(a,a.__wbg_ptr,a),a}__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,queryContractDictOptionsFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_querycontractdictoptions_free(s,0)}get state_root_hash_as_string(){const s=wasm.__wbg_get_querycontractdictoptions_state_root_hash_as_string(this.__wbg_ptr);let a;return 0!==s[0]&&(a=getStringFromWasm0(s[0],s[1]).slice(),wasm.__wbindgen_free(s[0],1*s[1],1)),a}set state_root_hash_as_string(s){var a=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.__wbg_set_getdictionaryitemoptions_state_root_hash_as_string(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get state_root_hash(){const s=wasm.__wbg_get_getdictionaryitemoptions_state_root_hash(this.__wbg_ptr);return 0===s?void 0:Digest.__wrap(s)}set state_root_hash(s){let a=0;isLikeNone(s)||(_assertClass(s,Digest),a=s.__destroy_into_raw()),wasm.__wbg_set_getdictionaryitemoptions_state_root_hash(this.__wbg_ptr,a)}get dictionary_item_params(){const s=wasm.__wbg_get_getdictionaryitemoptions_dictionary_item_params(this.__wbg_ptr);return 0===s?void 0:DictionaryItemStrParams.__wrap(s)}set dictionary_item_params(s){let a=0;isLikeNone(s)||(_assertClass(s,DictionaryItemStrParams),a=s.__destroy_into_raw()),wasm.__wbg_set_getdictionaryitemoptions_dictionary_item_params(this.__wbg_ptr,a)}get dictionary_item_identifier(){const s=wasm.__wbg_get_getdictionaryitemoptions_dictionary_item_identifier(this.__wbg_ptr);return 0===s?void 0:DictionaryItemIdentifier.__wrap(s)}set dictionary_item_identifier(s){let a=0;isLikeNone(s)||(_assertClass(s,DictionaryItemIdentifier),a=s.__destroy_into_raw()),wasm.__wbg_set_getdictionaryitemoptions_dictionary_item_identifier(this.__wbg_ptr,a)}get rpc_address(){const s=wasm.__wbg_get_querycontractdictoptions_rpc_address(this.__wbg_ptr);let a;return 0!==s[0]&&(a=getStringFromWasm0(s[0],s[1]).slice(),wasm.__wbindgen_free(s[0],1*s[1],1)),a}set rpc_address(s){var a=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.__wbg_set_getdictionaryitemoptions_rpc_address(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get verbosity(){const s=wasm.__wbg_get_getdictionaryitemoptions_verbosity(this.__wbg_ptr);return 3===s?void 0:s}set verbosity(s){wasm.__wbg_set_getdictionaryitemoptions_verbosity(this.__wbg_ptr,isLikeNone(s)?3:s)}}const queryContractKeyOptionsFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_querycontractkeyoptions_free(f>>>0,1));class queryContractKeyOptions{static __wrap(s){s>>>=0;const a=Object.create(queryContractKeyOptions.prototype);return a.__wbg_ptr=s,queryContractKeyOptionsFinalization.register(a,a.__wbg_ptr,a),a}__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,queryContractKeyOptionsFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_querycontractkeyoptions_free(s,0)}get entity_identifier(){const s=wasm.__wbg_get_querycontractkeyoptions_entity_identifier(this.__wbg_ptr);return 0===s?void 0:EntityIdentifier.__wrap(s)}set entity_identifier(s){let a=0;isLikeNone(s)||(_assertClass(s,EntityIdentifier),a=s.__destroy_into_raw()),wasm.__wbg_set_querycontractkeyoptions_entity_identifier(this.__wbg_ptr,a)}get entity_identifier_as_string(){const s=wasm.__wbg_get_querycontractkeyoptions_entity_identifier_as_string(this.__wbg_ptr);let a;return 0!==s[0]&&(a=getStringFromWasm0(s[0],s[1]).slice(),wasm.__wbindgen_free(s[0],1*s[1],1)),a}set entity_identifier_as_string(s){var a=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.__wbg_set_querycontractkeyoptions_entity_identifier_as_string(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get maybe_block_identifier(){const s=wasm.__wbg_get_getauctioninfooptions_maybe_block_identifier(this.__wbg_ptr);return 0===s?void 0:BlockIdentifier.__wrap(s)}set maybe_block_identifier(s){let a=0;isLikeNone(s)||(_assertClass(s,BlockIdentifier),a=s.__destroy_into_raw()),wasm.__wbg_set_getauctioninfooptions_maybe_block_identifier(this.__wbg_ptr,a)}get maybe_block_id_as_string(){const s=wasm.__wbg_get_querycontractkeyoptions_maybe_block_id_as_string(this.__wbg_ptr);let a;return 0!==s[0]&&(a=getStringFromWasm0(s[0],s[1]).slice(),wasm.__wbindgen_free(s[0],1*s[1],1)),a}set maybe_block_id_as_string(s){var a=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.__wbg_set_querycontractkeyoptions_maybe_block_id_as_string(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get path_as_string(){const s=wasm.__wbg_get_querycontractkeyoptions_path_as_string(this.__wbg_ptr);let a;return 0!==s[0]&&(a=getStringFromWasm0(s[0],s[1]).slice(),wasm.__wbindgen_free(s[0],1*s[1],1)),a}set path_as_string(s){var a=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.__wbg_set_querycontractkeyoptions_path_as_string(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get path(){const s=wasm.__wbg_get_querycontractkeyoptions_path(this.__wbg_ptr);return 0===s?void 0:Path.__wrap(s)}set path(s){let a=0;isLikeNone(s)||(_assertClass(s,Path),a=s.__destroy_into_raw()),wasm.__wbg_set_querycontractkeyoptions_path(this.__wbg_ptr,a)}get rpc_address(){const s=wasm.__wbg_get_querycontractkeyoptions_rpc_address(this.__wbg_ptr);let a;return 0!==s[0]&&(a=getStringFromWasm0(s[0],s[1]).slice(),wasm.__wbindgen_free(s[0],1*s[1],1)),a}set rpc_address(s){var a=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.__wbg_set_querycontractkeyoptions_rpc_address(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get verbosity(){const s=wasm.__wbg_get_querycontractkeyoptions_verbosity(this.__wbg_ptr);return 3===s?void 0:s}set verbosity(s){wasm.__wbg_set_querycontractkeyoptions_verbosity(this.__wbg_ptr,isLikeNone(s)?3:s)}}const queryGlobalStateOptionsFinalization=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(f=>wasm.__wbg_queryglobalstateoptions_free(f>>>0,1));class queryGlobalStateOptions{static __wrap(s){s>>>=0;const a=Object.create(queryGlobalStateOptions.prototype);return a.__wbg_ptr=s,queryGlobalStateOptionsFinalization.register(a,a.__wbg_ptr,a),a}__destroy_into_raw(){const s=this.__wbg_ptr;return this.__wbg_ptr=0,queryGlobalStateOptionsFinalization.unregister(this),s}free(){const s=this.__destroy_into_raw();wasm.__wbg_queryglobalstateoptions_free(s,0)}get global_state_identifier(){const s=wasm.__wbg_get_queryglobalstateoptions_global_state_identifier(this.__wbg_ptr);return 0===s?void 0:GlobalStateIdentifier.__wrap(s)}set global_state_identifier(s){let a=0;isLikeNone(s)||(_assertClass(s,GlobalStateIdentifier),a=s.__destroy_into_raw()),wasm.__wbg_set_queryglobalstateoptions_global_state_identifier(this.__wbg_ptr,a)}get state_root_hash_as_string(){const s=wasm.__wbg_get_queryglobalstateoptions_state_root_hash_as_string(this.__wbg_ptr);let a;return 0!==s[0]&&(a=getStringFromWasm0(s[0],s[1]).slice(),wasm.__wbindgen_free(s[0],1*s[1],1)),a}set state_root_hash_as_string(s){var a=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.__wbg_set_queryglobalstateoptions_state_root_hash_as_string(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get state_root_hash(){const s=wasm.__wbg_get_queryglobalstateoptions_state_root_hash(this.__wbg_ptr);return 0===s?void 0:Digest.__wrap(s)}set state_root_hash(s){let a=0;isLikeNone(s)||(_assertClass(s,Digest),a=s.__destroy_into_raw()),wasm.__wbg_set_queryglobalstateoptions_state_root_hash(this.__wbg_ptr,a)}get maybe_block_id_as_string(){const s=wasm.__wbg_get_queryglobalstateoptions_maybe_block_id_as_string(this.__wbg_ptr);let a;return 0!==s[0]&&(a=getStringFromWasm0(s[0],s[1]).slice(),wasm.__wbindgen_free(s[0],1*s[1],1)),a}set maybe_block_id_as_string(s){var a=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.__wbg_set_queryglobalstateoptions_maybe_block_id_as_string(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get key_as_string(){const s=wasm.__wbg_get_queryglobalstateoptions_key_as_string(this.__wbg_ptr);let a;return 0!==s[0]&&(a=getStringFromWasm0(s[0],s[1]).slice(),wasm.__wbindgen_free(s[0],1*s[1],1)),a}set key_as_string(s){var a=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.__wbg_set_queryglobalstateoptions_key_as_string(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get key(){const s=wasm.__wbg_get_queryglobalstateoptions_key(this.__wbg_ptr);return 0===s?void 0:Key.__wrap(s)}set key(s){let a=0;isLikeNone(s)||(_assertClass(s,Key),a=s.__destroy_into_raw()),wasm.__wbg_set_queryglobalstateoptions_key(this.__wbg_ptr,a)}get path_as_string(){const s=wasm.__wbg_get_queryglobalstateoptions_path_as_string(this.__wbg_ptr);let a;return 0!==s[0]&&(a=getStringFromWasm0(s[0],s[1]).slice(),wasm.__wbindgen_free(s[0],1*s[1],1)),a}set path_as_string(s){var a=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.__wbg_set_queryglobalstateoptions_path_as_string(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get path(){const s=wasm.__wbg_get_queryglobalstateoptions_path(this.__wbg_ptr);return 0===s?void 0:Path.__wrap(s)}set path(s){let a=0;isLikeNone(s)||(_assertClass(s,Path),a=s.__destroy_into_raw()),wasm.__wbg_set_queryglobalstateoptions_path(this.__wbg_ptr,a)}get rpc_address(){const s=wasm.__wbg_get_queryglobalstateoptions_rpc_address(this.__wbg_ptr);let a;return 0!==s[0]&&(a=getStringFromWasm0(s[0],s[1]).slice(),wasm.__wbindgen_free(s[0],1*s[1],1)),a}set rpc_address(s){var a=isLikeNone(s)?0:passStringToWasm0(s,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc);wasm.__wbg_set_queryglobalstateoptions_rpc_address(this.__wbg_ptr,a,WASM_VECTOR_LEN)}get verbosity(){const s=wasm.__wbg_get_queryglobalstateoptions_verbosity(this.__wbg_ptr);return 3===s?void 0:s}set verbosity(s){wasm.__wbg_set_queryglobalstateoptions_verbosity(this.__wbg_ptr,isLikeNone(s)?3:s)}}function __wbg_load(f,s){return _wbg_load.apply(this,arguments)}function _wbg_load(){return(_wbg_load=(0,_opt2_casper_rustSDK_examples_frontend_angular_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__.A)(function*(f,s){if("function"==typeof Response&&f instanceof Response){if("function"==typeof WebAssembly.instantiateStreaming)try{return yield WebAssembly.instantiateStreaming(f,s)}catch(u){if("application/wasm"==f.headers.get("Content-Type"))throw u;console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n",u)}const a=yield f.arrayBuffer();return yield WebAssembly.instantiate(a,s)}{const a=yield WebAssembly.instantiate(f,s);return a instanceof WebAssembly.Instance?{instance:a,module:f}:a}})).apply(this,arguments)}function __wbg_get_imports(){const imports={wbg:{}};return imports.wbg.__wbindgen_error_new=function(f,s){return new Error(getStringFromWasm0(f,s))},imports.wbg.__wbg_getdictionaryitemresult_new=function(f){return GetDictionaryItemResult.__wrap(f)},imports.wbg.__wbg_puttransactionresult_new=function(f){return PutTransactionResult.__wrap(f)},imports.wbg.__wbg_queryglobalstateresult_new=function(f){return QueryGlobalStateResult.__wrap(f)},imports.wbg.__wbindgen_string_new=function(f,s){return getStringFromWasm0(f,s)},imports.wbg.__wbg_getnodestatusresult_new=function(f){return GetNodeStatusResult.__wrap(f)},imports.wbg.__wbg_deploy_new=function(f){return Deploy.__wrap(f)},imports.wbg.__wbg_speculativeexectxnresult_new=function(f){return SpeculativeExecTxnResult.__wrap(f)},imports.wbg.__wbg_getvalidatorchangesresult_new=function(f){return GetValidatorChangesResult.__wrap(f)},imports.wbg.__wbg_putdeployresult_new=function(f){return PutDeployResult.__wrap(f)},imports.wbg.__wbg_getblocktransfersresult_new=function(f){return GetBlockTransfersResult.__wrap(f)},imports.wbg.__wbg_getchainspecresult_new=function(f){return GetChainspecResult.__wrap(f)},imports.wbg.__wbg_geterainforesult_new=function(f){return GetEraInfoResult.__wrap(f)},imports.wbg.__wbg_getdeployresult_new=function(f){return GetDeployResult.__wrap(f)},imports.wbg.__wbg_listrpcsresult_new=function(f){return ListRpcsResult.__wrap(f)},imports.wbg.__wbg_querybalanceresult_new=function(f){return QueryBalanceResult.__wrap(f)},imports.wbg.__wbg_requestSwitchAccount_0e44115ee2041c5e=function(){return handleError(function(f){return f.requestSwitchAccount()},arguments)},imports.wbg.__wbindgen_boolean_get=function(f){return"boolean"==typeof f?f?1:0:2},imports.wbg.__wbg_getaddressableentityresult_new=function(f){return GetAddressableEntityResult.__wrap(f)},imports.wbg.__wbg_gettransactionresult_new=function(f){return GetTransactionResult.__wrap(f)},imports.wbg.__wbg_getbalanceresult_new=function(f){return GetBalanceResult.__wrap(f)},imports.wbg.__wbg_getauctioninforesult_new=function(f){return GetAuctionInfoResult.__wrap(f)},imports.wbg.__wbg_speculativeexecresult_new=function(f){return SpeculativeExecResult.__wrap(f)},imports.wbg.__wbg_getstateroothashresult_new=function(f){return GetStateRootHashResult.__wrap(f)},imports.wbg.__wbg_getVersion_821280958b37ff1f=function(){return handleError(function(f){return f.getVersion()},arguments)},imports.wbg.__wbindgen_string_get=function(f,s){const u="string"==typeof s?s:void 0;var g=isLikeNone(u)?0:passStringToWasm0(u,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),y=WASM_VECTOR_LEN;getDataViewMemory0().setInt32(f+4,y,!0),getDataViewMemory0().setInt32(f+0,g,!0)},imports.wbg.__wbg_getaccountresult_new=function(f){return GetAccountResult.__wrap(f)},imports.wbg.__wbg_geterasummaryresult_new=function(f){return GetEraSummaryResult.__wrap(f)},imports.wbg.__wbg_querybalancedetailsresult_new=function(f){return QueryBalanceDetailsResult.__wrap(f)},imports.wbg.__wbg_transaction_new=function(f){return Transaction.__wrap(f)},imports.wbg.__wbg_isConnected_f84ffbccb9898623=function(){return handleError(function(f){return f.isConnected()},arguments)},imports.wbg.__wbg_getblockresult_new=function(f){return GetBlockResult.__wrap(f)},imports.wbg.__wbg_getpeersresult_new=function(f){return GetPeersResult.__wrap(f)},imports.wbg.__wbg_disconnectFromSite_2d2501f4e00e57c8=function(){return handleError(function(f){return f.disconnectFromSite()},arguments)},imports.wbg.__wbindgen_is_function=function(f){return"function"==typeof f},imports.wbg.__wbg_signMessage_c2bf40612e99c084=function(){return handleError(function(f,s,a,u,g){return f.signMessage(getStringFromWasm0(s,a),getStringFromWasm0(u,g))},arguments)},imports.wbg.__wbg_requestConnection_df909ec1fae47c86=function(){return handleError(function(f){return f.requestConnection()},arguments)},imports.wbg.__wbg_getActivePublicKey_7cd2af2b4a2b810f=function(){return handleError(function(f){return f.getActivePublicKey()},arguments)},imports.wbg.__wbindgen_number_get=function(f,s){const u="number"==typeof s?s:void 0;getDataViewMemory0().setFloat64(f+8,isLikeNone(u)?0:u,!0),getDataViewMemory0().setInt32(f+0,!isLikeNone(u),!0)},imports.wbg.__wbg_messages_new=function(f){return Messages.__wrap(f)},imports.wbg.__wbg_error_d52bf4e1868fa715=function(f,s){console.error(getStringFromWasm0(f,s))},imports.wbg.__wbg_log_5199e4d2d51afa95=function(f,s){console.log(getStringFromWasm0(f,s))},imports.wbg.__wbg_CasperWalletProvider_e342cf6a96cfbb6c="function"==typeof CasperWalletProvider?CasperWalletProvider:notDefined("CasperWalletProvider"),imports.wbg.__wbg_sign_5740ada8ba2ef8c3=function(){return handleError(function(f,s,a,u,g){return f.sign(getStringFromWasm0(s,a),getStringFromWasm0(u,g))},arguments)},imports.wbg.__wbg_subscription_unwrap=function(f){return Subscription.__unwrap(f)},imports.wbg.__wbg_messages_unwrap=function(f){return Messages.__unwrap(f)},imports.wbg.__wbindgen_is_undefined=function(f){return void 0===f},imports.wbg.__wbindgen_is_null=function(f){return null===f},imports.wbg.__wbindgen_jsval_eq=function(f,s){return f===s},imports.wbg.__wbindgen_cb_drop=function(f){const s=f.original;return 1==s.cnt--&&(s.a=0,!0)},imports.wbg.__wbg_log_a4ea4344db098de3=function(f,s){console.log(getStringFromWasm0(f,s))},imports.wbg.__wbg_fetch_f8d735ba6fe1b719="function"==typeof fetch?fetch:notDefined("fetch"),imports.wbg.__wbg_getReader_7a604d2d7b2f6e3e=function(){return handleError(function(f){return f.getReader()},arguments)},imports.wbg.__wbg_queueMicrotask_848aa4969108a57e=function(f){return f.queueMicrotask},imports.wbg.__wbg_queueMicrotask_c5419c06eab41e73="function"==typeof queueMicrotask?queueMicrotask:notDefined("queueMicrotask"),imports.wbg.__wbg_fetch_1fdc4448ed9eec00=function(f,s){return f.fetch(s)},imports.wbg.__wbg_newwithstrandinit_4b92c89af0a8e383=function(){return handleError(function(f,s,a){return new Request(getStringFromWasm0(f,s),a)},arguments)},imports.wbg.__wbg_instanceof_Response_3c0e210a57ff751d=function(f){let s;try{s=f instanceof Response}catch{s=!1}return s},imports.wbg.__wbg_url_58af972663531d16=function(f,s){const u=passStringToWasm0(s.url,wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),g=WASM_VECTOR_LEN;getDataViewMemory0().setInt32(f+4,g,!0),getDataViewMemory0().setInt32(f+0,u,!0)},imports.wbg.__wbg_status_5f4e900d22140a18=function(f){return f.status},imports.wbg.__wbg_headers_1b9bf90c73fae600=function(f){return f.headers},imports.wbg.__wbg_body_06c4eb578a55c1d4=function(f){const s=f.body;return isLikeNone(s)?0:addToExternrefTable0(s)},imports.wbg.__wbg_arrayBuffer_144729e09879650e=function(){return handleError(function(f){return f.arrayBuffer()},arguments)},imports.wbg.__wbg_setbody_aa8b691bec428bf4=function(f,s){f.body=s},imports.wbg.__wbg_setcredentials_a4e661320cdb9738=function(f,s){f.credentials=__wbindgen_enum_RequestCredentials[s]},imports.wbg.__wbg_setheaders_f5205d36e423a544=function(f,s){f.headers=s},imports.wbg.__wbg_setmethod_ce2da76000b02f6a=function(f,s,a){f.method=getStringFromWasm0(s,a)},imports.wbg.__wbg_setmode_4919fd636102c586=function(f,s){f.mode=__wbindgen_enum_RequestMode[s]},imports.wbg.__wbg_setsignal_812ccb8269a7fd90=function(f,s){f.signal=s},imports.wbg.__wbg_signal_9acfcec9e7dffc22=function(f){return f.signal},imports.wbg.__wbg_new_75169ae5a9683c55=function(){return handleError(function(){return new AbortController},arguments)},imports.wbg.__wbg_abort_c57daab47a6c1215=function(f){f.abort()},imports.wbg.__wbg_new_a9ae04a5200606a5=function(){return handleError(function(){return new Headers},arguments)},imports.wbg.__wbg_append_8b3e7f74a47ea7d5=function(){return handleError(function(f,s,a,u,g){f.append(getStringFromWasm0(s,a),getStringFromWasm0(u,g))},arguments)},imports.wbg.__wbg_byobRequest_86ac467c94924d3c=function(f){const s=f.byobRequest;return isLikeNone(s)?0:addToExternrefTable0(s)},imports.wbg.__wbg_close_7cda9dd901230214=function(){return handleError(function(f){f.close()},arguments)},imports.wbg.__wbg_getdone_38a59a1c17131633=function(f){const s=f.done;return isLikeNone(s)?16777215:s?1:0},imports.wbg.__wbg_getvalue_674bb48c8380247b=function(f){return f.value},imports.wbg.__wbg_result_5cc84600fc64bf35=function(){return handleError(function(f){return f.result},arguments)},imports.wbg.__wbg_setonload_0e9d43ec0cbb3987=function(f,s){f.onload=s},imports.wbg.__wbg_new_e282c42c5fc7a7b1=function(){return handleError(function(){return new FileReader},arguments)},imports.wbg.__wbg_readAsArrayBuffer_467dfea5cb42f85c=function(){return handleError(function(f,s){f.readAsArrayBuffer(s)},arguments)},imports.wbg.__wbg_setonopen_c0e1464e3ea28727=function(f,s){f.onopen=s},imports.wbg.__wbg_setonerror_e16deca7fd15a59c=function(f,s){f.onerror=s},imports.wbg.__wbg_setonmessage_84cd941c1df08da7=function(f,s){f.onmessage=s},imports.wbg.__wbg_new_d550f7a7120dd942=function(){return handleError(function(f,s){return new WebSocket(getStringFromWasm0(f,s))},arguments)},imports.wbg.__wbg_instanceof_Blob_702ee3ea790162e1=function(f){let s;try{s=f instanceof Blob}catch{s=!1}return s},imports.wbg.__wbg_read_08d62388e7870059=function(f){return f.read()},imports.wbg.__wbg_releaseLock_32c310d7be334e1c=function(f){f.releaseLock()},imports.wbg.__wbg_cancel_2a3c2f3c115ac7e0=function(f){return f.cancel()},imports.wbg.__wbg_data_134d3a704b9fca32=function(f){return f.data},imports.wbg.__wbg_view_de0e81c5c00d2129=function(f){const s=f.view;return isLikeNone(s)?0:addToExternrefTable0(s)},imports.wbg.__wbg_respond_ffb6928cd9b79c32=function(){return handleError(function(f,s){f.respond(s>>>0)},arguments)},imports.wbg.__wbg_close_cfd08d9cf9f36856=function(){return handleError(function(f){f.close()},arguments)},imports.wbg.__wbg_enqueue_e693a6fb4f3261c1=function(){return handleError(function(f,s){f.enqueue(s)},arguments)},imports.wbg.__wbg_crypto_1d1f22824a6a080c=function(f){return f.crypto},imports.wbg.__wbindgen_is_object=function(f){return"object"==typeof f&&null!==f},imports.wbg.__wbg_process_4a72847cc503995b=function(f){return f.process},imports.wbg.__wbg_versions_f686565e586dd935=function(f){return f.versions},imports.wbg.__wbg_node_104a2ff8d6ea03a2=function(f){return f.node},imports.wbg.__wbindgen_is_string=function(f){return"string"==typeof f},imports.wbg.__wbg_require_cca90b1a94a0255b=function(){return handleError(function(){return module.require},arguments)},imports.wbg.__wbg_msCrypto_eb05e62b530a1508=function(f){return f.msCrypto},imports.wbg.__wbg_randomFillSync_5c9c955aa56b6049=function(){return handleError(function(f,s){f.randomFillSync(s)},arguments)},imports.wbg.__wbg_getRandomValues_3aa56aa6edec874c=function(){return handleError(function(f,s){f.getRandomValues(s)},arguments)},imports.wbg.__wbg_get_5419cf6b954aa11d=function(f,s){return f[s>>>0]},imports.wbg.__wbg_length_f217bbbf7e8e4df4=function(f){return f.length},imports.wbg.__wbg_new_034f913e7636e987=function(){return new Array},imports.wbg.__wbg_newnoargs_1ede4bf2ebbaaf43=function(f,s){return new Function(getStringFromWasm0(f,s))},imports.wbg.__wbg_next_13b477da1eaa3897=function(f){return f.next},imports.wbg.__wbg_next_b06e115d1b01e10b=function(){return handleError(function(f){return f.next()},arguments)},imports.wbg.__wbg_done_983b5ffcaec8c583=function(f){return f.done},imports.wbg.__wbg_value_2ab8a198c834c26a=function(f){return f.value},imports.wbg.__wbg_iterator_695d699a44d6234c=function(){return Symbol.iterator},imports.wbg.__wbg_get_ef828680c64da212=function(){return handleError(function(f,s){return Reflect.get(f,s)},arguments)},imports.wbg.__wbg_call_a9ef466721e824f2=function(){return handleError(function(f,s){return f.call(s)},arguments)},imports.wbg.__wbg_new_e69b5f66fda8f13c=function(){return new Object},imports.wbg.__wbg_self_bf91bf94d9e04084=function(){return handleError(function(){return self.self},arguments)},imports.wbg.__wbg_window_52dd9f07d03fd5f8=function(){return handleError(function(){return window.window},arguments)},imports.wbg.__wbg_globalThis_05c129bf37fcf1be=function(){return handleError(function(){return globalThis.globalThis},arguments)},imports.wbg.__wbg_global_3eca19bb09e9c484=function(){return handleError(function(){return global.global},arguments)},imports.wbg.__wbg_eval_1bab7c4fbae3b3d6=function(){return handleError(function(arg0,arg1){const ret=eval(getStringFromWasm0(arg0,arg1));return ret},arguments)},imports.wbg.__wbg_isArray_6f3b47f09adb61b5=function(f){return Array.isArray(f)},imports.wbg.__wbg_push_36cf4d81d7da33d1=function(f,s){return f.push(s)},imports.wbg.__wbg_instanceof_ArrayBuffer_74945570b4a62ec7=function(f){let s;try{s=f instanceof ArrayBuffer}catch{s=!1}return s},imports.wbg.__wbg_new_70a2f23d1565c04c=function(f,s){return new Error(getStringFromWasm0(f,s))},imports.wbg.__wbg_apply_c37b42ff44b0469d=function(){return handleError(function(f,s,a){return f.apply(s,a)},arguments)},imports.wbg.__wbg_call_3bfa248576352471=function(){return handleError(function(f,s,a){return f.call(s,a)},arguments)},imports.wbg.__wbg_getTime_41225036a0393d63=function(f){return f.getTime()},imports.wbg.__wbg_new0_218ada33b570be35=function(){return new Date},imports.wbg.__wbg_instanceof_Object_4bbac482eda9b711=function(f){let s;try{s=f instanceof Object}catch{s=!1}return s},imports.wbg.__wbg_instanceof_Promise_f3fd1bcac3157f0c=function(f){let s;try{s=f instanceof Promise}catch{s=!1}return s},imports.wbg.__wbg_new_1073970097e5a420=function(f,s){try{var a={a:f,b:s};return new Promise((y,v)=>{const S=a.a;a.a=0;try{return __wbg_adapter_1203(S,a.b,y,v)}finally{a.a=S}})}finally{a.a=a.b=0}},imports.wbg.__wbg_resolve_0aad7c1484731c99=function(f){return Promise.resolve(f)},imports.wbg.__wbg_catch_8097da4375a5dd1b=function(f,s){return f.catch(s)},imports.wbg.__wbg_then_748f75edfb032440=function(f,s){return f.then(s)},imports.wbg.__wbg_then_4866a7d9f55d8f3e=function(f,s,a){return f.then(s,a)},imports.wbg.__wbg_buffer_ccaed51a635d8a2d=function(f){return f.buffer},imports.wbg.__wbg_newwithbyteoffsetandlength_7e3eb787208af730=function(f,s,a){return new Uint8Array(f,s>>>0,a>>>0)},imports.wbg.__wbg_new_fec2611eb9180f95=function(f){return new Uint8Array(f)},imports.wbg.__wbg_set_ec2fcf81bc573fd9=function(f,s,a){f.set(s,a>>>0)},imports.wbg.__wbg_length_9254c4bd3b9f23c4=function(f){return f.length},imports.wbg.__wbg_newwithlength_76462a666eca145f=function(f){return new Uint8Array(f>>>0)},imports.wbg.__wbg_buffer_95102df5554646dc=function(f){return f.buffer},imports.wbg.__wbg_subarray_975a06f9dbd16995=function(f,s,a){return f.subarray(s>>>0,a>>>0)},imports.wbg.__wbg_byteLength_5d623ba3d92a3a9c=function(f){return f.byteLength},imports.wbg.__wbg_byteOffset_ec0928143c619cd7=function(f){return f.byteOffset},imports.wbg.__wbg_getindex_146612fa21bd6845=function(f,s){return f[s>>>0]},imports.wbg.__wbg_parse_51ee5409072379d3=function(){return handleError(function(f,s){return JSON.parse(getStringFromWasm0(f,s))},arguments)},imports.wbg.__wbg_stringify_eead5648c09faaf8=function(){return handleError(function(f){return JSON.stringify(f)},arguments)},imports.wbg.__wbg_has_bd717f25f195f23d=function(){return handleError(function(f,s){return Reflect.has(f,s)},arguments)},imports.wbg.__wbindgen_debug_string=function(f,s){const u=passStringToWasm0(debugString(s),wasm.__wbindgen_malloc,wasm.__wbindgen_realloc),g=WASM_VECTOR_LEN;getDataViewMemory0().setInt32(f+4,g,!0),getDataViewMemory0().setInt32(f+0,u,!0)},imports.wbg.__wbindgen_throw=function(f,s){throw new Error(getStringFromWasm0(f,s))},imports.wbg.__wbindgen_memory=function(){return wasm.memory},imports.wbg.__wbindgen_closure_wrapper5161=function(f,s,a){return makeMutClosure(f,s,938,__wbg_adapter_38)},imports.wbg.__wbindgen_closure_wrapper5163=function(f,s,a){return makeMutClosure(f,s,938,__wbg_adapter_38)},imports.wbg.__wbindgen_closure_wrapper5165=function(f,s,a){return makeMutClosure(f,s,938,__wbg_adapter_43)},imports.wbg.__wbindgen_closure_wrapper5167=function(f,s,a){return makeMutClosure(f,s,938,__wbg_adapter_38)},imports.wbg.__wbindgen_closure_wrapper6001=function(f,s,a){return makeMutClosure(f,s,1140,__wbg_adapter_48)},imports.wbg.__wbindgen_closure_wrapper6053=function(f,s,a){return makeMutClosure(f,s,1154,__wbg_adapter_51)},imports.wbg.__wbindgen_init_externref_table=function(){const f=wasm.__wbindgen_export_2,s=f.grow(4);f.set(0,void 0),f.set(s+0,void 0),f.set(s+1,null),f.set(s+2,!0),f.set(s+3,!1)},imports}function __wbg_init_memory(f,s){}function __wbg_finalize_init(f,s){return wasm=f.exports,__wbg_init.__wbindgen_wasm_module=s,cachedDataViewMemory0=null,cachedUint8ArrayMemory0=null,wasm.__wbindgen_start(),wasm}function initSync(f){if(void 0!==wasm)return wasm;typeof f<"u"&&(Object.getPrototypeOf(f)===Object.prototype?({module:f}=f):console.warn("using deprecated parameters for `initSync()`; pass a single object instead"));const s=__wbg_get_imports();return f instanceof WebAssembly.Module||(f=new WebAssembly.Module(f)),__wbg_finalize_init(new WebAssembly.Instance(f,s),f)}function __wbg_init(f){return _wbg_init.apply(this,arguments)}function _wbg_init(){return(_wbg_init=(0,_opt2_casper_rustSDK_examples_frontend_angular_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__.A)(function*(f){if(void 0!==wasm)return wasm;typeof f<"u"&&(Object.getPrototypeOf(f)===Object.prototype?({module_or_path:f}=f):console.warn("using deprecated parameters for the initialization function; pass a single object instead")),typeof f>"u"&&(f=new URL("casper_rust_wasm_sdk_bg.wasm","file:///opt2/casper/rustSDK/pkg/casper_rust_wasm_sdk.js"));const s=__wbg_get_imports();("string"==typeof f||"function"==typeof Request&&f instanceof Request||"function"==typeof URL&&f instanceof URL)&&(f=fetch(f));const{instance:a,module:u}=yield __wbg_load(yield f,s);return __wbg_finalize_init(a,u)})).apply(this,arguments)}const __WEBPACK_DEFAULT_EXPORT__=__wbg_init},467:(f,s,a)=>{function u(y,v,S,A,M,B,X){try{var de=y[B](X),le=de.value}catch(ue){return void S(ue)}de.done?v(le):Promise.resolve(le).then(A,M)}function g(y){return function(){var v=this,S=arguments;return new Promise(function(A,M){var B=y.apply(v,S);function X(le){u(B,A,M,X,de,"next",le)}function de(le){u(B,A,M,X,de,"throw",le)}X(void 0)})}}a.d(s,{A:()=>g})}},f=>{f(f.s=3435)}]); \ No newline at end of file diff --git a/pkg-nodejs/README.md b/pkg-nodejs/README.md index a68705fc2..a4ed43f8f 100644 --- a/pkg-nodejs/README.md +++ b/pkg-nodejs/README.md @@ -293,7 +293,7 @@ You can find all RPC methods on the [RPC doc](https://casper-ecosystem.github.io ```rust use casper_rust_wasm_sdk::types::{ - transaction::Transaction, transaction_hash::TransactionHash, + transaction::Transaction, hash::transaction_hash::TransactionHash, }; let transaction_hash = @@ -314,7 +314,7 @@ println!("{timestamp} {hash}"); #### Get deploy by deploy hash (legacy) ```rust -use casper_rust_wasm_sdk::types::deploy_hash::DeployHash; +use casper_rust_wasm_sdk::types::hash::deploy_hash::DeployHash; let deploy_hash = DeployHash::new("a8778b2e4bd1ad02c168329a1f6f3674513f4d350da1b5f078e058a3422ad0b9") @@ -633,7 +633,7 @@ console.log(transaction_hash); ```rust use casper_rust_wasm_sdk::types::{ addr::entity_addr::EntityAddr, - addressable_entity_hash::AddressableEntityHash, + hash::addressable_entity_hash::AddressableEntityHash, transaction_params::{ transaction_builder_params::TransactionBuilderParams, transaction_str_params::TransactionStrParams, @@ -712,7 +712,7 @@ let sdk = SDK::new( ); use casper_rust_wasm_sdk::types::{ - addressable_entity_hash::AddressableEntityHash, + hash::addressable_entity_hash::AddressableEntityHash, transaction_params::{ transaction_builder_params::TransactionBuilderParams, transaction_str_params::TransactionStrParams, @@ -798,7 +798,7 @@ Puts a [`Transaction`] to the network for execution. ```rust use casper_rust_wasm_sdk::types::{ - addressable_entity_hash::AddressableEntityHash, + hash::addressable_entity_hash::AddressableEntityHash, transaction_params::{ transaction_builder_params::TransactionBuilderParams, transaction_str_params::TransactionStrParams, @@ -1128,7 +1128,7 @@ console.log(results); use casper_rust_wasm_sdk::{ helpers::json_pretty_print, types::{ - transaction_hash::TransactionHash, + hash::transaction_hash::TransactionHash, transaction_params::transaction_str_params::TransactionStrParams, }, }; @@ -1290,7 +1290,7 @@ async function loadFile() { ```rust use casper_rust_wasm_sdk::types::{ - addressable_entity_hash::AddressableEntityHash, + hash::addressable_entity_hash::AddressableEntityHash, transaction_params::{ transaction_builder_params::TransactionBuilderParams, transaction_str_params::TransactionStrParams, @@ -2061,7 +2061,7 @@ console.log(results); use casper_rust_wasm_sdk::{ helpers::json_pretty_print, types::{ - deploy_hash::DeployHash, + hash::deploy_hash::DeployHash, deploy_params::{ deploy_str_params::DeployStrParams, payment_str_params::PaymentStrParams, session_str_params::SessionStrParams, @@ -2225,7 +2225,7 @@ async function loadFile() { ```rust use casper_rust_wasm_sdk::types::{ - deploy_hash::DeployHash, + hash::deploy_hash::DeployHash, deploy_params::{ deploy_str_params::DeployStrParams, payment_str_params::PaymentStrParams, session_str_params::SessionStrParams, diff --git a/pkg-nodejs/casper_rust_wasm_sdk.d.ts b/pkg-nodejs/casper_rust_wasm_sdk.d.ts index 791f3f058..c616b3bda 100644 --- a/pkg-nodejs/casper_rust_wasm_sdk.d.ts +++ b/pkg-nodejs/casper_rust_wasm_sdk.d.ts @@ -1950,1377 +1950,1377 @@ export class SDK { */ query_contract_dict(options?: queryContractDictOptions): Promise; /** - * @param {any} options - * @returns {getEraInfoOptions} - */ - get_era_info_options(options: any): getEraInfoOptions; - /** - * @param {getEraInfoOptions | undefined} [options] - * @returns {Promise} - */ - get_era_info(options?: getEraInfoOptions): Promise; - /** - * @param {getEraInfoOptions | undefined} [options] - * @returns {Promise} + * JavaScript function for deploying with deserialized parameters. + * + * # Arguments + * + * * `deploy_params` - Deploy parameters. + * * `session_params` - Session parameters. + * * `payment_params` - Payment parameters. + * * `verbosity` - An optional verbosity level. + * * `rpc_address` - An optional rpc address. + * + * # Returns + * + * A result containing PutDeployResult or a JsError. + * @param {DeployStrParams} deploy_params + * @param {SessionStrParams} session_params + * @param {PaymentStrParams} payment_params + * @param {Verbosity | undefined} [verbosity] + * @param {string | undefined} [rpc_address] + * @returns {Promise} */ - chain_get_era_info_by_switch_block(options?: getEraInfoOptions): Promise; + deploy(deploy_params: DeployStrParams, session_params: SessionStrParams, payment_params: PaymentStrParams, verbosity?: Verbosity, rpc_address?: string): Promise; /** - * Parses auction info options from a JsValue. + * Parses deploy options from a JsValue. * * # Arguments * - * * `options` - A JsValue containing auction info options to be parsed. + * * `options` - A JsValue containing deploy options to be parsed. * * # Returns * - * Result containing parsed auction info options as a `GetAuctionInfoOptions` struct, - * or a `JsError` if deserialization fails. + * Parsed deploy options as a `GetDeployOptions` struct. * @param {any} options - * @returns {getAuctionInfoOptions} + * @returns {getDeployOptions} */ - get_auction_info_options(options: any): getAuctionInfoOptions; + get_deploy_options(options: any): getDeployOptions; /** - * Retrieves auction information using the provided options. + * Retrieves deploy information using the provided options. * * # Arguments * - * * `options` - An optional `GetAuctionInfoOptions` struct containing retrieval options. + * * `options` - An optional `GetDeployOptions` struct containing retrieval options. * * # Returns * - * A `Result` containing either a `GetAuctionInfoResult` or a `JsError` in case of an error. - * - * # Errors - * - * Returns a `JsError` if there is an error during the retrieval process. - * @param {getAuctionInfoOptions | undefined} [options] - * @returns {Promise} + * A `Result` containing either a `GetDeployResult` or an error. + * @param {getDeployOptions | undefined} [options] + * @returns {Promise} */ - get_auction_info(options?: getAuctionInfoOptions): Promise; + get_deploy(options?: getDeployOptions): Promise; /** - * @param {getAuctionInfoOptions | undefined} [options] - * @returns {Promise} + * Retrieves deploy information using the provided options, alias for `get_deploy`. + * @param {getDeployOptions | undefined} [options] + * @returns {Promise} */ - state_get_auction_info_js_alias(options?: getAuctionInfoOptions): Promise; + info_get_deploy(options?: getDeployOptions): Promise; /** - * Parses block options from a JsValue. + * Parses transaction options from a JsValue. * * # Arguments * - * * `options` - A JsValue containing block options to be parsed. + * * `options` - A JsValue containing transaction options to be parsed. * * # Returns * - * Parsed block options as a `GetBlockOptions` struct. + * Parsed transaction options as a `GetTransactionOptions` struct. * @param {any} options - * @returns {getBlockOptions} + * @returns {getTransactionOptions} */ - get_block_options(options: any): getBlockOptions; + get_transaction_options(options: any): getTransactionOptions; /** - * Retrieves block information using the provided options. + * Retrieves transaction information using the provided options. * * # Arguments * - * * `options` - An optional `GetBlockOptions` struct containing retrieval options. + * * `options` - An optional `GetTransactionOptions` struct containing retrieval options. * * # Returns * - * A `Result` containing either a `GetBlockResult` or a `JsError` in case of an error. - * - * # Errors - * - * Returns a `JsError` if there is an error during the retrieval process. - * @param {getBlockOptions | undefined} [options] - * @returns {Promise} + * A `Result` containing either a `GetTransactionResult` or an error. + * @param {getTransactionOptions | undefined} [options] + * @returns {Promise} */ - get_block(options?: getBlockOptions): Promise; + get_transaction(options?: getTransactionOptions): Promise; /** - * JavaScript Alias for the `get_block`. + * Retrieves transaction information using the provided options, alias for `get_transaction`. + * @param {getTransactionOptions | undefined} [options] + * @returns {Promise} + */ + info_get_transaction(options?: getTransactionOptions): Promise; + /** + * Get options for speculative execution from a JavaScript value. + * @param {any} options + * @returns {getSpeculativeExecTxnOptions} + */ + get_speculative_exec_options(options: any): getSpeculativeExecTxnOptions; + /** + * JS function for speculative execution. * * # Arguments * - * * `options` - An optional `GetBlockOptions` struct containing retrieval options. + * * `options` - The options for speculative execution. * * # Returns * - * A `Result` containing either a `GetBlockResult` or a `JsError` in case of an error. - * - * # Errors - * - * Returns a `JsError` if there is an error during the retrieval process. - * @param {getBlockOptions | undefined} [options] - * @returns {Promise} + * A `Result` containing the result of the speculative execution or a `JsError` in case of an error. + * @param {getSpeculativeExecTxnOptions | undefined} [options] + * @returns {Promise} */ - chain_get_block(options?: getBlockOptions): Promise; + speculative_exec(options?: getSpeculativeExecTxnOptions): Promise; /** - * Asynchronously retrieves the chainspec. + * JS function for `make_transfer`. * * # Arguments * - * * `verbosity` - An optional `Verbosity` parameter. - * * `rpc_address` - An optional rpc address as a string. + * * `amount` - The transfer amount. + * * `target_account` - The target account. + * * `transfer_id` - Optional transfer identifier. + * * `deploy_params` - The deploy parameters. + * * `payment_params` - The payment parameters. * * # Returns * - * A `Result` containing either a `GetChainspecResult` or a `JsError` in case of an error. - * @param {Verbosity | undefined} [verbosity] - * @param {string | undefined} [rpc_address] - * @returns {Promise} - */ - get_chainspec(verbosity?: Verbosity, rpc_address?: string): Promise; - /** - * @param {Verbosity | undefined} [verbosity] - * @param {string | undefined} [rpc_address] - * @returns {Promise} + * A `Result` containing the created `Deploy` or a `JsError` in case of an error. + * @param {string} amount + * @param {string} target_account + * @param {string | undefined} transfer_id + * @param {DeployStrParams} deploy_params + * @param {PaymentStrParams} payment_params + * @returns {Deploy} */ - info_get_chainspec(verbosity?: Verbosity, rpc_address?: string): Promise; + make_transfer(amount: string, target_account: string, transfer_id: string | undefined, deploy_params: DeployStrParams, payment_params: PaymentStrParams): Deploy; /** - * Retrieves node status information using the provided options. + * JS function for `make_transfer_transaction`. * * # Arguments * - * * `verbosity` - An optional `Verbosity` level for controlling the output verbosity. - * * `rpc_address` - An optional string specifying the rpc address to use for the request. + * * `maybe_source` - Optional transfer source uref. + * * `amount` - The transfer amount. + * * `target` - The target account. + * * `transaction_params` - The transaction parameters. + * * `maybe_id` - Optional transfer identifier. * * # Returns * - * A `Result` containing either a `GetNodeStatusResult` or a `JsError` in case of an error. - * - * # Errors - * - * Returns a `JsError` if there is an error during the retrieval process. - * @param {Verbosity | undefined} [verbosity] - * @param {string | undefined} [rpc_address] - * @returns {Promise} + * A `Result` containing the created `Transaction` or a `JsError` in case of an error. + * @param {URef | undefined} maybe_source + * @param {string} target + * @param {string} amount + * @param {TransactionStrParams} transaction_params + * @param {string | undefined} [maybe_id] + * @returns {Transaction} */ - get_node_status(verbosity?: Verbosity, rpc_address?: string): Promise; + make_transfer_transaction(maybe_source: URef | undefined, target: string, amount: string, transaction_params: TransactionStrParams, maybe_id?: string): Transaction; /** - * @param {Verbosity | undefined} [verbosity] - * @param {string | undefined} [rpc_address] - * @returns {Promise} + * @param {any} options + * @returns {getEraInfoOptions} */ - info_get_status(verbosity?: Verbosity, rpc_address?: string): Promise; + get_era_info_options(options: any): getEraInfoOptions; /** - * Retrieves peers asynchronously. + * @param {getEraInfoOptions | undefined} [options] + * @returns {Promise} + */ + get_era_info(options?: getEraInfoOptions): Promise; + /** + * @param {getEraInfoOptions | undefined} [options] + * @returns {Promise} + */ + chain_get_era_info_by_switch_block(options?: getEraInfoOptions): Promise; + /** + * JS function for transferring funds. * * # Arguments * - * * `verbosity` - Optional verbosity level. - * * `rpc_address` - Optional rpc address. + * * `amount` - The amount to transfer. + * * `target_account` - The target account. + * * `transfer_id` - An optional transfer ID (defaults to a random number). + * * `deploy_params` - The deployment parameters. + * * `payment_params` - The payment parameters. + * * `verbosity` - The verbosity level for logging (optional). + * * `rpc_address` - The address of the node to connect to (optional). * * # Returns * - * A `Result` containing `GetPeersResult` or a `JsError` if an error occurs. + * A `Result` containing the result of the transfer or a `JsError` in case of an error. + * @param {string} amount + * @param {string} target_account + * @param {string | undefined} transfer_id + * @param {DeployStrParams} deploy_params + * @param {PaymentStrParams} payment_params * @param {Verbosity | undefined} [verbosity] * @param {string | undefined} [rpc_address] - * @returns {Promise} + * @returns {Promise} */ - get_peers(verbosity?: Verbosity, rpc_address?: string): Promise; + transfer(amount: string, target_account: string, transfer_id: string | undefined, deploy_params: DeployStrParams, payment_params: PaymentStrParams, verbosity?: Verbosity, rpc_address?: string): Promise; /** - * @param {Verbosity | undefined} [verbosity] - * @param {string | undefined} [rpc_address] - * @returns {Promise} + * @param {any} options + * @returns {getEntityOptions} */ - info_get_peers(verbosity?: Verbosity, rpc_address?: string): Promise; + get_entity_options(options: any): getEntityOptions; /** - * Retrieves validator changes using the provided options. + * Retrieves entity information using the provided options. + * + * This function is an asynchronous JavaScript binding for the Rust `get_entity` method. * * # Arguments * - * * `verbosity` - An optional `Verbosity` level for controlling the output verbosity. - * * `rpc_address` - An optional string specifying the rpc address to use for the request. + * * `options` - An optional `GetEntityOptions` struct containing retrieval options, such as: + * - `entity_identifier`: Identifier for the entity. + * - `entity_identifier_as_string`: String representation of the entity identifier. + * - `maybe_block_id_as_string`: Optional string representation of the block ID. + * - `maybe_block_identifier`: Optional `BlockIdentifierInput` for specifying the block. + * - `verbosity`: Verbosity level for the output. + * - `rpc_address`: Address of the node to query. * * # Returns * - * A `Result` containing either a `GetValidatorChangesResult` or a `JsError` in case of an error. + * A `Result` containing either a `GetAddressableEntityResult` on success or a `JsError` on failure. * * # Errors * - * Returns a `JsError` if there is an error during the retrieval process. - * @param {Verbosity | undefined} [verbosity] - * @param {string | undefined} [rpc_address] - * @returns {Promise} + * Returns a `JsError` if there is an error during the retrieval process, such as issues with the provided options or network errors. + * ``` + * @param {getEntityOptions | undefined} [options] + * @returns {Promise} */ - get_validator_changes(verbosity?: Verbosity, rpc_address?: string): Promise; + get_entity(options?: getEntityOptions): Promise; /** - * @param {Verbosity | undefined} [verbosity] - * @param {string | undefined} [rpc_address] - * @returns {Promise} + * @param {getEntityOptions | undefined} [options] + * @returns {Promise} */ - info_get_validator_change(verbosity?: Verbosity, rpc_address?: string): Promise; + state_get_entity(options?: getEntityOptions): Promise; /** - * Lists available RPCs using the provided options. + * Puts a transaction using the provided options. * * # Arguments * + * * `transaction` - The `Transaction` object to be sent. * * `verbosity` - An optional `Verbosity` level for controlling the output verbosity. * * `rpc_address` - An optional string specifying the rpc address to use for the request. * * # Returns * - * A `Result` containing either a `ListRpcsResult` or a `JsError` in case of an error. + * A `Result` containing either a `PutTransactionResult` or a `JsError` in case of an error. * * # Errors * - * Returns a `JsError` if there is an error during the listing process. + * Returns a `JsError` if there is an error during the transaction process. + * @param {Transaction} transaction * @param {Verbosity | undefined} [verbosity] * @param {string | undefined} [rpc_address] - * @returns {Promise} + * @returns {Promise} */ - list_rpcs(verbosity?: Verbosity, rpc_address?: string): Promise; + put_transaction(transaction: Transaction, verbosity?: Verbosity, rpc_address?: string): Promise; /** - * JS function for `make_deploy`. - * - * # Arguments - * - * * `deploy_params` - The deploy parameters. - * * `session_params` - The session parameters. - * * `payment_params` - The payment parameters. - * - * # Returns - * - * A `Result` containing the created `Deploy` or a `JsError` in case of an error. - * @param {DeployStrParams} deploy_params - * @param {SessionStrParams} session_params - * @param {PaymentStrParams} payment_params - * @returns {Deploy} + * JavaScript Alias for `put_transaction`. + * @param {Transaction} transaction + * @param {Verbosity | undefined} [verbosity] + * @param {string | undefined} [rpc_address] + * @returns {Promise} */ - make_deploy(deploy_params: DeployStrParams, session_params: SessionStrParams, payment_params: PaymentStrParams): Deploy; + account_put_transaction(transaction: Transaction, verbosity?: Verbosity, rpc_address?: string): Promise; /** - * JS function for `sign_deploy`. + * Parses query balance options from a JsValue. * * # Arguments * - * * `deploy` - The deploy to sign. - * * `secret_key` - The secret key for signing. + * * `options` - A JsValue containing query balance options to be parsed. * * # Returns * - * The signed `Deploy`. - * @param {Deploy} deploy - * @param {string} secret_key - * @returns {Deploy} + * Parsed query balance options as a `QueryBalanceDetailsOptions` struct. + * @param {any} options + * @returns {queryBalanceDetailsOptions} */ - sign_deploy(deploy: Deploy, secret_key: string): Deploy; + query_balance_details_options(options: any): queryBalanceDetailsOptions; /** - * JS function for `make_transaction`. + * Retrieves balance information using the provided options. * * # Arguments * - * * `builder_params` - Transaction Builder parameters. - * * `transaction_params` - The transaction parameters. + * * `options` - An optional `QueryBalanceDetailsOptions` struct containing retrieval options. * * # Returns * - * A `Result` containing the created `Transaction` or a `JsError` in case of an error. - * @param {TransactionBuilderParams} builder_params - * @param {TransactionStrParams} transaction_params - * @returns {Transaction} + * A `Result` containing either a `QueryBalanceDetailsResult` or a `JsError` in case of an error. + * + * # Errors + * + * Returns a `JsError` if there is an error during the retrieval process. + * @param {queryBalanceDetailsOptions | undefined} [options] + * @returns {Promise} */ - make_transaction(builder_params: TransactionBuilderParams, transaction_params: TransactionStrParams): Transaction; + query_balance_details(options?: queryBalanceDetailsOptions): Promise; /** - * JS function for `sign_transaction`. + * Parses query global state options from a JsValue. * * # Arguments * - * * `transaction` - The transaction to sign. - * * `secret_key` - The secret key for signing. + * * `options` - A JsValue containing query global state options to be parsed. * * # Returns * - * The signed `Transaction`. - * @param {Transaction} transaction - * @param {string} secret_key - * @returns {Transaction} - */ - sign_transaction(transaction: Transaction, secret_key: string): Transaction; - /** - * Deserialize query_contract_key_options from a JavaScript object. + * Parsed query global state options as a `QueryGlobalStateOptions` struct. * @param {any} options - * @returns {queryContractKeyOptions} - */ - query_contract_key_options(options: any): queryContractKeyOptions; - /** - * JavaScript function for query_contract_key with deserialized options. - * @param {queryContractKeyOptions | undefined} [options] - * @returns {Promise} + * @returns {queryGlobalStateOptions} */ - query_contract_key(options?: queryContractKeyOptions): Promise; + query_global_state_options(options: any): queryGlobalStateOptions; /** - * Parses state root hash options from a JsValue. + * Retrieves global state information using the provided options. * * # Arguments * - * * `options` - A JsValue containing state root hash options to be parsed. + * * `options` - An optional `QueryGlobalStateOptions` struct containing retrieval options. * * # Returns * - * Parsed state root hash options as a `GetStateRootHashOptions` struct. - * @param {any} options - * @returns {getStateRootHashOptions} + * A `Result` containing either a `QueryGlobalStateResult` or a `JsError` in case of an error. + * + * # Errors + * + * Returns a `JsError` if there is an error during the retrieval process. + * @param {queryGlobalStateOptions | undefined} [options] + * @returns {Promise} */ - get_state_root_hash_options(options: any): getStateRootHashOptions; + query_global_state(options?: queryGlobalStateOptions): Promise; /** - * Retrieves state root hash information using the provided options. + * Installs a smart contract with the specified parameters and returns the result. * * # Arguments - * - * * `options` - An optional `GetStateRootHashOptions` struct containing retrieval options. + *. + * * `transaction_params` - Transaction parameters. + * * `transaction_bytes` - Transaction Bytes to install + * * `rpc_address` - An optional rpc address to send the request to. * * # Returns * - * A `Result` containing either a `GetStateRootHashResult` or a `JsError` in case of an error. + * A `Result` containing either a `PutTransactionResult` or a `JsError` in case of an error. * * # Errors * - * Returns a `JsError` if there is an error during the retrieval process. - * @param {getStateRootHashOptions | undefined} [options] - * @returns {Promise} + * Returns a `JsError` if there is an error during the installation. + * @param {TransactionStrParams} transaction_params + * @param {Bytes} transaction_bytes + * @param {string | undefined} [rpc_address] + * @returns {Promise} */ - get_state_root_hash(options?: getStateRootHashOptions): Promise; + install(transaction_params: TransactionStrParams, transaction_bytes: Bytes, rpc_address?: string): Promise; /** - * Retrieves state root hash information using the provided options (alias for `get_state_root_hash`). + * Installs a smart contract with the specified parameters and returns the result. * * # Arguments * - * * `options` - An optional `GetStateRootHashOptions` struct containing retrieval options. + * * `deploy_params` - The deploy parameters. + * * `session_params` - The session parameters. + * * `payment_amount` - The payment amount as a string. + * * `rpc_address` - An optional rpc address to send the request to. * * # Returns * - * A `Result` containing either a `GetStateRootHashResult` or a `JsError` in case of an error. + * A `Result` containing either a `PutDeployResult` or a `JsError` in case of an error. * * # Errors * - * Returns a `JsError` if there is an error during the retrieval process. - * @param {getStateRootHashOptions | undefined} [options] - * @returns {Promise} + * Returns a `JsError` if there is an error during the installation. + * @param {DeployStrParams} deploy_params + * @param {SessionStrParams} session_params + * @param {string} payment_amount + * @param {string | undefined} [rpc_address] + * @returns {Promise} */ - chain_get_state_root_hash(options?: getStateRootHashOptions): Promise; + install_deploy(deploy_params: DeployStrParams, session_params: SessionStrParams, payment_amount: string, rpc_address?: string): Promise; /** - * Creates a new Watcher instance to watch deploys (JavaScript-friendly). - * Legacy alias + * This function allows executing a deploy speculatively. * * # Arguments * - * * `events_url` - The URL to monitor for transaction events. - * * `timeout_duration` - An optional timeout duration in seconds. + * * `deploy_params` - Deployment parameters for the deploy. + * * `session_params` - Session parameters for the deploy. + * * `payment_params` - Payment parameters for the deploy. + * * `verbosity` - Optional verbosity level. + * * `rpc_address` - Optional rpc address. * * # Returns * - * A `Watcher` instance. - * @param {string} events_url - * @param {number | undefined} [timeout_duration] - * @returns {Watcher} + * A `Result` containing either a `SpeculativeExecResult` or a `JsError` in case of an error. + * @param {DeployStrParams} deploy_params + * @param {SessionStrParams} session_params + * @param {PaymentStrParams} payment_params + * @param {Verbosity | undefined} [verbosity] + * @param {string | undefined} [rpc_address] + * @returns {Promise} */ - watchDeploy(events_url: string, timeout_duration?: number): Watcher; + speculative_deploy(deploy_params: DeployStrParams, session_params: SessionStrParams, payment_params: PaymentStrParams, verbosity?: Verbosity, rpc_address?: string): Promise; /** - * Creates a new Watcher instance to watch deploys (JavaScript-friendly). + * Parses block transfers options from a JsValue. * * # Arguments * - * * `events_url` - The URL to monitor for transaction events. - * * `timeout_duration` - An optional timeout duration in seconds. + * * `options` - A JsValue containing block transfers options to be parsed. * * # Returns * - * A `Watcher` instance. - * @param {string} events_url - * @param {number | undefined} [timeout_duration] - * @returns {Watcher} + * Parsed block transfers options as a `GetBlockTransfersOptions` struct. + * @param {any} options + * @returns {getBlockTransfersOptions} */ - watchTransaction(events_url: string, timeout_duration?: number): Watcher; + get_block_transfers_options(options: any): getBlockTransfersOptions; /** - * Waits for a deploy event to be processed asynchronously (JavaScript-friendly). - * Legacy alias + * Retrieves block transfers information using the provided options. * * # Arguments * - * * `events_url` - The URL to monitor for transaction events. - * * `deploy_hash` - The deploy hash to wait for. - * * `timeout_duration` - An optional timeout duration in seconds. + * * `options` - An optional `GetBlockTransfersOptions` struct containing retrieval options. * * # Returns * - * A JavaScript `Promise` resolving to either the processed `EventParseResult` or an error message. - * @param {string} events_url - * @param {string} deploy_hash - * @param {number | undefined} [timeout_duration] - * @returns {Promise>} + * A `Result` containing either a `GetBlockTransfersResult` or a `JsError` in case of an error. + * + * # Errors + * + * Returns a `JsError` if there is an error during the retrieval process. + * @param {getBlockTransfersOptions | undefined} [options] + * @returns {Promise} */ - waitDeploy(events_url: string, deploy_hash: string, timeout_duration?: number): Promise>; + get_block_transfers(options?: getBlockTransfersOptions): Promise; /** - * Waits for a deploy event to be processed asynchronously (JavaScript-friendly). + * @param {getBlockTransfersOptions | undefined} [options] + * @returns {Promise} + */ + chain_get_block_transfers(options?: getBlockTransfersOptions): Promise; + /** + * Parses query balance options from a JsValue. * * # Arguments * - * * `events_url` - The URL to monitor for transaction events. - * * `target_hash` - The transaction hash to wait for. - * * `timeout_duration` - An optional timeout duration in seconds. + * * `options` - A JsValue containing query balance options to be parsed. * * # Returns * - * A JavaScript `Promise` resolving to either the processed `EventParseResult` or an error message. - * @param {string} events_url - * @param {string} target_hash - * @param {number | undefined} [timeout_duration] - * @returns {Promise>} + * Parsed query balance options as a `QueryBalanceOptions` struct. + * @param {any} options + * @returns {queryBalanceOptions} */ - waitTransaction(events_url: string, target_hash: string, timeout_duration?: number): Promise>; + query_balance_options(options: any): queryBalanceOptions; /** - * JavaScript function for deploying with deserialized parameters. + * Retrieves balance information using the provided options. * * # Arguments * - * * `deploy_params` - Deploy parameters. - * * `session_params` - Session parameters. - * * `payment_params` - Payment parameters. - * * `verbosity` - An optional verbosity level. - * * `rpc_address` - An optional rpc address. + * * `options` - An optional `QueryBalanceOptions` struct containing retrieval options. * * # Returns * - * A result containing PutDeployResult or a JsError. - * @param {DeployStrParams} deploy_params - * @param {SessionStrParams} session_params - * @param {PaymentStrParams} payment_params - * @param {Verbosity | undefined} [verbosity] - * @param {string | undefined} [rpc_address] - * @returns {Promise} + * A `Result` containing either a `QueryBalanceResult` or a `JsError` in case of an error. + * + * # Errors + * + * Returns a `JsError` if there is an error during the retrieval process. + * @param {queryBalanceOptions | undefined} [options] + * @returns {Promise} */ - deploy(deploy_params: DeployStrParams, session_params: SessionStrParams, payment_params: PaymentStrParams, verbosity?: Verbosity, rpc_address?: string): Promise; + query_balance(options?: queryBalanceOptions): Promise; /** - * JS function for speculative transfer. + * Get options for speculative execution from a JavaScript value. + * @param {any} options + * @returns {getSpeculativeExecDeployOptions} + */ + get_speculative_exec_deploy_options(options: any): getSpeculativeExecDeployOptions; + /** + * JS function for speculative execution. * * # Arguments * - * * `amount` - The amount to transfer. - * * `target_account` - The target account. - * * `transfer_id` - An optional transfer ID (defaults to a random number). - * * `deploy_params` - The deployment parameters. - * * `payment_params` - The payment parameters. - * * `verbosity` - The verbosity level for logging (optional). - * * `rpc_address` - The address of the node to connect to (optional). + * * `options` - The options for speculative execution. * * # Returns * - * A `Result` containing the result of the speculative transfer or a `JsError` in case of an error. - * @param {string} amount - * @param {string} target_account - * @param {string | undefined} transfer_id - * @param {DeployStrParams} deploy_params - * @param {PaymentStrParams} payment_params - * @param {Verbosity | undefined} [verbosity] - * @param {string | undefined} [rpc_address] + * A `Result` containing the result of the speculative execution or a `JsError` in case of an error. + * @param {getSpeculativeExecDeployOptions | undefined} [options] * @returns {Promise} */ - speculative_transfer(amount: string, target_account: string, transfer_id: string | undefined, deploy_params: DeployStrParams, payment_params: PaymentStrParams, verbosity?: Verbosity, rpc_address?: string): Promise; + speculative_exec_deploy(options?: getSpeculativeExecDeployOptions): Promise; /** - * Parses deploy options from a JsValue. + * Calls a smart contract entry point with the specified parameters and returns the result. * * # Arguments * - * * `options` - A JsValue containing deploy options to be parsed. + * * `transaction_params` - Transaction parameters. + * * `builder_params` - Transaction Builder parameters. + * * `rpc_address` - An optional rpc address to send the request to. * * # Returns * - * Parsed deploy options as a `GetDeployOptions` struct. - * @param {any} options - * @returns {getDeployOptions} - */ - get_deploy_options(options: any): getDeployOptions; - /** - * Retrieves deploy information using the provided options. - * - * # Arguments - * - * * `options` - An optional `GetDeployOptions` struct containing retrieval options. + * A `Result` containing either a `PutTransactionResult` or a `JsError` in case of an error. * - * # Returns + * # Errors * - * A `Result` containing either a `GetDeployResult` or an error. - * @param {getDeployOptions | undefined} [options] - * @returns {Promise} + * Returns a `JsError` if there is an error during the call. + * @param {TransactionBuilderParams} builder_params + * @param {TransactionStrParams} transaction_params + * @param {string | undefined} [rpc_address] + * @returns {Promise} */ - get_deploy(options?: getDeployOptions): Promise; + call_entrypoint(builder_params: TransactionBuilderParams, transaction_params: TransactionStrParams, rpc_address?: string): Promise; /** - * Retrieves deploy information using the provided options, alias for `get_deploy`. - * @param {getDeployOptions | undefined} [options] - * @returns {Promise} + * @param {string | undefined} [rpc_address] + * @param {string | undefined} [node_address] + * @param {Verbosity | undefined} [verbosity] */ - info_get_deploy(options?: getDeployOptions): Promise; + constructor(rpc_address?: string, node_address?: string, verbosity?: Verbosity); /** - * Parses transaction options from a JsValue. - * - * # Arguments - * - * * `options` - A JsValue containing transaction options to be parsed. - * - * # Returns - * - * Parsed transaction options as a `GetTransactionOptions` struct. - * @param {any} options - * @returns {getTransactionOptions} + * @param {string | undefined} [rpc_address] + * @returns {string} */ - get_transaction_options(options: any): getTransactionOptions; + getRPCAddress(rpc_address?: string): string; /** - * Retrieves transaction information using the provided options. - * - * # Arguments - * - * * `options` - An optional `GetTransactionOptions` struct containing retrieval options. - * - * # Returns - * - * A `Result` containing either a `GetTransactionResult` or an error. - * @param {getTransactionOptions | undefined} [options] - * @returns {Promise} + * @param {string | undefined} [rpc_address] */ - get_transaction(options?: getTransactionOptions): Promise; + setRPCAddress(rpc_address?: string): void; /** - * Retrieves transaction information using the provided options, alias for `get_transaction`. - * @param {getTransactionOptions | undefined} [options] - * @returns {Promise} + * @param {string | undefined} [node_address] + * @returns {string} */ - info_get_transaction(options?: getTransactionOptions): Promise; + getNodeAddress(node_address?: string): string; /** - * Get options for speculative execution from a JavaScript value. - * @param {any} options - * @returns {getSpeculativeExecTxnOptions} + * @param {string | undefined} [node_address] */ - get_speculative_exec_options(options: any): getSpeculativeExecTxnOptions; + setNodeAddress(node_address?: string): void; /** - * JS function for speculative execution. - * - * # Arguments - * - * * `options` - The options for speculative execution. - * - * # Returns - * - * A `Result` containing the result of the speculative execution or a `JsError` in case of an error. - * @param {getSpeculativeExecTxnOptions | undefined} [options] - * @returns {Promise} + * @param {Verbosity | undefined} [verbosity] + * @returns {Verbosity} */ - speculative_exec(options?: getSpeculativeExecTxnOptions): Promise; + getVerbosity(verbosity?: Verbosity): Verbosity; /** - * JS function for `make_transfer`. + * @param {Verbosity | undefined} [verbosity] + */ + setVerbosity(verbosity?: Verbosity): void; + /** + * JS function for speculative transfer. * * # Arguments * - * * `amount` - The transfer amount. + * * `amount` - The amount to transfer. * * `target_account` - The target account. - * * `transfer_id` - Optional transfer identifier. - * * `deploy_params` - The deploy parameters. + * * `transfer_id` - An optional transfer ID (defaults to a random number). + * * `deploy_params` - The deployment parameters. * * `payment_params` - The payment parameters. + * * `verbosity` - The verbosity level for logging (optional). + * * `rpc_address` - The address of the node to connect to (optional). * * # Returns * - * A `Result` containing the created `Deploy` or a `JsError` in case of an error. + * A `Result` containing the result of the speculative transfer or a `JsError` in case of an error. * @param {string} amount * @param {string} target_account * @param {string | undefined} transfer_id * @param {DeployStrParams} deploy_params * @param {PaymentStrParams} payment_params - * @returns {Deploy} + * @param {Verbosity | undefined} [verbosity] + * @param {string | undefined} [rpc_address] + * @returns {Promise} */ - make_transfer(amount: string, target_account: string, transfer_id: string | undefined, deploy_params: DeployStrParams, payment_params: PaymentStrParams): Deploy; + speculative_transfer(amount: string, target_account: string, transfer_id: string | undefined, deploy_params: DeployStrParams, payment_params: PaymentStrParams, verbosity?: Verbosity, rpc_address?: string): Promise; /** - * JS function for `make_transfer_transaction`. + * Parses state root hash options from a JsValue. * * # Arguments * - * * `maybe_source` - Optional transfer source uref. - * * `amount` - The transfer amount. - * * `target` - The target account. - * * `transaction_params` - The transaction parameters. - * * `maybe_id` - Optional transfer identifier. + * * `options` - A JsValue containing state root hash options to be parsed. * * # Returns * - * A `Result` containing the created `Transaction` or a `JsError` in case of an error. - * @param {URef | undefined} maybe_source - * @param {string} target - * @param {string} amount - * @param {TransactionStrParams} transaction_params - * @param {string | undefined} [maybe_id] - * @returns {Transaction} + * Parsed state root hash options as a `GetStateRootHashOptions` struct. + * @param {any} options + * @returns {getStateRootHashOptions} */ - make_transfer_transaction(maybe_source: URef | undefined, target: string, amount: string, transaction_params: TransactionStrParams, maybe_id?: string): Transaction; + get_state_root_hash_options(options: any): getStateRootHashOptions; /** - * Calls a smart contract entry point with the specified parameters and returns the result. + * Retrieves state root hash information using the provided options. * * # Arguments * - * * `deploy_params` - The deploy parameters. - * * `session_params` - The session parameters. - * * `payment_amount` - The payment amount as a string. - * * `rpc_address` - An optional rpc address to send the request to. + * * `options` - An optional `GetStateRootHashOptions` struct containing retrieval options. * * # Returns * - * A `Result` containing either a `PutDeployResult` or a `JsError` in case of an error. + * A `Result` containing either a `GetStateRootHashResult` or a `JsError` in case of an error. * * # Errors * - * Returns a `JsError` if there is an error during the call. - * @param {DeployStrParams} deploy_params - * @param {SessionStrParams} session_params - * @param {string} payment_amount - * @param {string | undefined} [rpc_address] - * @returns {Promise} + * Returns a `JsError` if there is an error during the retrieval process. + * @param {getStateRootHashOptions | undefined} [options] + * @returns {Promise} */ - call_entrypoint_deploy(deploy_params: DeployStrParams, session_params: SessionStrParams, payment_amount: string, rpc_address?: string): Promise; + get_state_root_hash(options?: getStateRootHashOptions): Promise; /** - * Installs a smart contract with the specified parameters and returns the result. + * Retrieves state root hash information using the provided options (alias for `get_state_root_hash`). * * # Arguments - *. - * * `transaction_params` - Transaction parameters. - * * `transaction_bytes` - Transaction Bytes to install - * * `rpc_address` - An optional rpc address to send the request to. + * + * * `options` - An optional `GetStateRootHashOptions` struct containing retrieval options. * * # Returns * - * A `Result` containing either a `PutTransactionResult` or a `JsError` in case of an error. + * A `Result` containing either a `GetStateRootHashResult` or a `JsError` in case of an error. * * # Errors * - * Returns a `JsError` if there is an error during the installation. - * @param {TransactionStrParams} transaction_params - * @param {Bytes} transaction_bytes - * @param {string | undefined} [rpc_address] - * @returns {Promise} - */ - install(transaction_params: TransactionStrParams, transaction_bytes: Bytes, rpc_address?: string): Promise; - /** - * @param {any} options - * @returns {getAccountOptions} + * Returns a `JsError` if there is an error during the retrieval process. + * @param {getStateRootHashOptions | undefined} [options] + * @returns {Promise} */ - get_account_options(options: any): getAccountOptions; + chain_get_state_root_hash(options?: getStateRootHashOptions): Promise; /** - * Retrieves account information using the provided options. - * - * This function is an asynchronous JavaScript binding for the Rust `get_account` method. + * Puts a deploy using the provided options. * * # Arguments * - * * `options` - An optional `GetAccountOptions` struct containing retrieval options, such as: - * - `account_identifier`: Identifier for the account. - * - `account_identifier_as_string`: String representation of the account identifier. - * - `maybe_block_id_as_string`: Optional string representation of the block ID. - * - `maybe_block_identifier`: Optional `BlockIdentifierInput` for specifying the block. - * - `verbosity`: Verbosity level for the output. - * - `rpc_address`: Address of the node to query. + * * `deploy` - The `Deploy` object to be sent. + * * `verbosity` - An optional `Verbosity` level for controlling the output verbosity. + * * `rpc_address` - An optional string specifying the rpc address to use for the request. * * # Returns * - * A `Result` containing either a `GetAccountResult` on success or a `JsError` on failure. + * A `Result` containing either a `PutDeployResult` or a `JsError` in case of an error. * * # Errors * - * Returns a `JsError` if there is an error during the retrieval process, such as issues with the provided options or network errors. - * ``` - * @param {getAccountOptions | undefined} [options] - * @returns {Promise} + * Returns a `JsError` if there is an error during the deploy process. + * @param {Deploy} deploy + * @param {Verbosity | undefined} [verbosity] + * @param {string | undefined} [rpc_address] + * @returns {Promise} */ - get_account(options?: getAccountOptions): Promise; + put_deploy(deploy: Deploy, verbosity?: Verbosity, rpc_address?: string): Promise; /** - * @param {getAccountOptions | undefined} [options] - * @returns {Promise} + * JavaScript Alias for `put_deploy`. + * @param {Deploy} deploy + * @param {Verbosity | undefined} [verbosity] + * @param {string | undefined} [rpc_address] + * @returns {Promise} */ - state_get_account_info(options?: getAccountOptions): Promise; + account_put_deploy(deploy: Deploy, verbosity?: Verbosity, rpc_address?: string): Promise; /** - * Parses era summary options from a JsValue. + * This function allows executing a transaction speculatively. * * # Arguments * - * * `options` - A JsValue containing era summary options to be parsed. + * * `builder_params` - Transaction Builder parameters. + * * `transaction_params` - Transactionment parameters for the transaction. + * * `verbosity` - Optional verbosity level. + * * `rpc_address` - Optional rpc address. * * # Returns * - * Parsed era summary options as a `GetEraSummaryOptions` struct. - * @param {any} options - * @returns {getEraSummaryOptions} + * A `Result` containing either a `SpeculativeExecTxnResult` or a `JsError` in case of an error. + * @param {TransactionBuilderParams} builder_params + * @param {TransactionStrParams} transaction_params + * @param {Verbosity | undefined} [verbosity] + * @param {string | undefined} [rpc_address] + * @returns {Promise} */ - get_era_summary_options(options: any): getEraSummaryOptions; + speculative_transaction(builder_params: TransactionBuilderParams, transaction_params: TransactionStrParams, verbosity?: Verbosity, rpc_address?: string): Promise; /** - * Retrieves era summary information using the provided options. - * + * Creates a new Watcher instance to watch deploys (JavaScript-friendly). + * Legacy alias + * * # Arguments * - * * `options` - An optional `GetEraSummaryOptions` struct containing retrieval options. + * * `events_url` - The URL to monitor for transaction events. + * * `timeout_duration` - An optional timeout duration in seconds. * * # Returns * - * A `Result` containing either a `GetEraSummaryResult` or a `JsError` in case of an error. - * - * # Errors - * - * Returns a `JsError` if there is an error during the retrieval process. - * @param {getEraSummaryOptions | undefined} [options] - * @returns {Promise} - */ - get_era_summary(options?: getEraSummaryOptions): Promise; - /** - * @param {getEraSummaryOptions | undefined} [options] - * @returns {Promise} + * A `Watcher` instance. + * @param {string} events_url + * @param {number | undefined} [timeout_duration] + * @returns {Watcher} */ - chain_get_era_summary(options?: getEraSummaryOptions): Promise; + watchDeploy(events_url: string, timeout_duration?: number): Watcher; /** - * Puts a deploy using the provided options. + * Creates a new Watcher instance to watch deploys (JavaScript-friendly). * * # Arguments * - * * `deploy` - The `Deploy` object to be sent. - * * `verbosity` - An optional `Verbosity` level for controlling the output verbosity. - * * `rpc_address` - An optional string specifying the rpc address to use for the request. + * * `events_url` - The URL to monitor for transaction events. + * * `timeout_duration` - An optional timeout duration in seconds. * * # Returns * - * A `Result` containing either a `PutDeployResult` or a `JsError` in case of an error. - * - * # Errors - * - * Returns a `JsError` if there is an error during the deploy process. - * @param {Deploy} deploy - * @param {Verbosity | undefined} [verbosity] - * @param {string | undefined} [rpc_address] - * @returns {Promise} - */ - put_deploy(deploy: Deploy, verbosity?: Verbosity, rpc_address?: string): Promise; - /** - * JavaScript Alias for `put_deploy`. - * @param {Deploy} deploy - * @param {Verbosity | undefined} [verbosity] - * @param {string | undefined} [rpc_address] - * @returns {Promise} + * A `Watcher` instance. + * @param {string} events_url + * @param {number | undefined} [timeout_duration] + * @returns {Watcher} */ - account_put_deploy(deploy: Deploy, verbosity?: Verbosity, rpc_address?: string): Promise; + watchTransaction(events_url: string, timeout_duration?: number): Watcher; /** - * Installs a smart contract with the specified parameters and returns the result. + * Waits for a deploy event to be processed asynchronously (JavaScript-friendly). + * Legacy alias * * # Arguments * - * * `deploy_params` - The deploy parameters. - * * `session_params` - The session parameters. - * * `payment_amount` - The payment amount as a string. - * * `rpc_address` - An optional rpc address to send the request to. + * * `events_url` - The URL to monitor for transaction events. + * * `deploy_hash` - The deploy hash to wait for. + * * `timeout_duration` - An optional timeout duration in seconds. * * # Returns * - * A `Result` containing either a `PutDeployResult` or a `JsError` in case of an error. - * - * # Errors - * - * Returns a `JsError` if there is an error during the installation. - * @param {DeployStrParams} deploy_params - * @param {SessionStrParams} session_params - * @param {string} payment_amount - * @param {string | undefined} [rpc_address] - * @returns {Promise} + * A JavaScript `Promise` resolving to either the processed `EventParseResult` or an error message. + * @param {string} events_url + * @param {string} deploy_hash + * @param {number | undefined} [timeout_duration] + * @returns {Promise>} */ - install_deploy(deploy_params: DeployStrParams, session_params: SessionStrParams, payment_amount: string, rpc_address?: string): Promise; + waitDeploy(events_url: string, deploy_hash: string, timeout_duration?: number): Promise>; /** - * Parses block transfers options from a JsValue. + * Waits for a deploy event to be processed asynchronously (JavaScript-friendly). * * # Arguments * - * * `options` - A JsValue containing block transfers options to be parsed. + * * `events_url` - The URL to monitor for transaction events. + * * `target_hash` - The transaction hash to wait for. + * * `timeout_duration` - An optional timeout duration in seconds. * * # Returns * - * Parsed block transfers options as a `GetBlockTransfersOptions` struct. - * @param {any} options - * @returns {getBlockTransfersOptions} + * A JavaScript `Promise` resolving to either the processed `EventParseResult` or an error message. + * @param {string} events_url + * @param {string} target_hash + * @param {number | undefined} [timeout_duration] + * @returns {Promise>} */ - get_block_transfers_options(options: any): getBlockTransfersOptions; + waitTransaction(events_url: string, target_hash: string, timeout_duration?: number): Promise>; /** - * Retrieves block transfers information using the provided options. - * - * # Arguments - * - * * `options` - An optional `GetBlockTransfersOptions` struct containing retrieval options. - * - * # Returns - * - * A `Result` containing either a `GetBlockTransfersResult` or a `JsError` in case of an error. - * - * # Errors - * - * Returns a `JsError` if there is an error during the retrieval process. - * @param {getBlockTransfersOptions | undefined} [options] - * @returns {Promise} + * @param {string | undefined} [node_address] + * @returns {Promise} */ - get_block_transfers(options?: getBlockTransfersOptions): Promise; + get_binary_latest_switch_block_header(node_address?: string): Promise; /** - * @param {getBlockTransfersOptions | undefined} [options] - * @returns {Promise} + * @param {string | undefined} [node_address] + * @returns {Promise} */ - chain_get_block_transfers(options?: getBlockTransfersOptions): Promise; + get_binary_latest_block_header(node_address?: string): Promise; /** - * Parses query balance options from a JsValue. - * - * # Arguments - * - * * `options` - A JsValue containing query balance options to be parsed. - * - * # Returns - * - * Parsed query balance options as a `QueryBalanceOptions` struct. - * @param {any} options - * @returns {queryBalanceOptions} + * @param {string | undefined} node_address + * @param {bigint} height + * @returns {Promise} */ - query_balance_options(options: any): queryBalanceOptions; + get_binary_block_header_by_height(node_address: string | undefined, height: bigint): Promise; /** - * Retrieves balance information using the provided options. - * - * # Arguments - * - * * `options` - An optional `QueryBalanceOptions` struct containing retrieval options. - * - * # Returns - * - * A `Result` containing either a `QueryBalanceResult` or a `JsError` in case of an error. - * - * # Errors - * - * Returns a `JsError` if there is an error during the retrieval process. - * @param {queryBalanceOptions | undefined} [options] - * @returns {Promise} + * @param {string | undefined} node_address + * @param {BlockHash} block_hash + * @returns {Promise} */ - query_balance(options?: queryBalanceOptions): Promise; + get_binary_block_header_by_hash(node_address: string | undefined, block_hash: BlockHash): Promise; /** - * Get options for speculative execution from a JavaScript value. - * @param {any} options - * @returns {getSpeculativeExecDeployOptions} + * @param {string | undefined} [node_address] + * @returns {Promise} */ - get_speculative_exec_deploy_options(options: any): getSpeculativeExecDeployOptions; + get_binary_latest_signed_block(node_address?: string): Promise; /** - * JS function for speculative execution. - * - * # Arguments - * - * * `options` - The options for speculative execution. - * - * # Returns - * - * A `Result` containing the result of the speculative execution or a `JsError` in case of an error. - * @param {getSpeculativeExecDeployOptions | undefined} [options] - * @returns {Promise} + * @param {string | undefined} node_address + * @param {bigint} height + * @returns {Promise} */ - speculative_exec_deploy(options?: getSpeculativeExecDeployOptions): Promise; + get_binary_signed_block_by_height(node_address: string | undefined, height: bigint): Promise; /** - * JS function for transaction transferring funds. - * - * # Arguments - * - * * `maybe_source` - Optional transfer source uref. - * * `target_account` - The target account. - * * `amount` - The amount to transfer. - * * `transaction_params` - The transaction parameters. - * * `maybe_id` - An optional transfer ID (defaults to a random number). - * * `verbosity` - The verbosity level for logging (optional). - * * `rpc_address` - The address of the node to connect to (optional). - * - * # Returns - * - * A `Result` containing the result of the transfer or a `JsError` in case of an error. - * @param {URef | undefined} maybe_source - * @param {string} target_account - * @param {string} amount - * @param {TransactionStrParams} transaction_params - * @param {string | undefined} [maybe_id] - * @param {Verbosity | undefined} [verbosity] - * @param {string | undefined} [rpc_address] - * @returns {Promise} + * @param {string | undefined} node_address + * @param {BlockHash} block_hash + * @returns {Promise} */ - transfer_transaction(maybe_source: URef | undefined, target_account: string, amount: string, transaction_params: TransactionStrParams, maybe_id?: string, verbosity?: Verbosity, rpc_address?: string): Promise; + get_binary_signed_block_by_hash(node_address: string | undefined, block_hash: BlockHash): Promise; + /** + * @param {string | undefined} node_address + * @param {TransactionHash} hash + * @param {boolean} with_finalized_approvals + * @returns {Promise} + */ + get_binary_transaction_by_hash(node_address: string | undefined, hash: TransactionHash, with_finalized_approvals: boolean): Promise; /** - * @param {string | undefined} [rpc_address] * @param {string | undefined} [node_address] - * @param {Verbosity | undefined} [verbosity] + * @returns {Promise} */ - constructor(rpc_address?: string, node_address?: string, verbosity?: Verbosity); + get_binary_peers(node_address?: string): Promise; /** - * @param {string | undefined} [rpc_address] - * @returns {string} + * @param {string | undefined} [node_address] + * @returns {Promise} */ - getRPCAddress(rpc_address?: string): string; + get_binary_uptime(node_address?: string): Promise; /** - * @param {string | undefined} [rpc_address] + * @param {string | undefined} [node_address] + * @returns {Promise} */ - setRPCAddress(rpc_address?: string): void; + get_binary_last_progress(node_address?: string): Promise; /** * @param {string | undefined} [node_address] - * @returns {string} + * @returns {Promise} */ - getNodeAddress(node_address?: string): string; + get_binary_reactor_state(node_address?: string): Promise; /** * @param {string | undefined} [node_address] + * @returns {Promise} */ - setNodeAddress(node_address?: string): void; + get_binary_network_name(node_address?: string): Promise; /** - * @param {Verbosity | undefined} [verbosity] - * @returns {Verbosity} + * @param {string | undefined} [node_address] + * @returns {Promise} */ - getVerbosity(verbosity?: Verbosity): Verbosity; + get_binary_consensus_validator_changes(node_address?: string): Promise; /** - * @param {Verbosity | undefined} [verbosity] + * @param {string | undefined} [node_address] + * @returns {Promise} */ - setVerbosity(verbosity?: Verbosity): void; + get_binary_block_synchronizer_status(node_address?: string): Promise; /** - * JS function for transferring funds. - * - * # Arguments - * - * * `amount` - The amount to transfer. - * * `target_account` - The target account. - * * `transfer_id` - An optional transfer ID (defaults to a random number). - * * `deploy_params` - The deployment parameters. - * * `payment_params` - The payment parameters. - * * `verbosity` - The verbosity level for logging (optional). - * * `rpc_address` - The address of the node to connect to (optional). - * - * # Returns - * - * A `Result` containing the result of the transfer or a `JsError` in case of an error. - * @param {string} amount - * @param {string} target_account - * @param {string | undefined} transfer_id - * @param {DeployStrParams} deploy_params - * @param {PaymentStrParams} payment_params - * @param {Verbosity | undefined} [verbosity] - * @param {string | undefined} [rpc_address] - * @returns {Promise} + * @param {string | undefined} [node_address] + * @returns {Promise} */ - transfer(amount: string, target_account: string, transfer_id: string | undefined, deploy_params: DeployStrParams, payment_params: PaymentStrParams, verbosity?: Verbosity, rpc_address?: string): Promise; + get_binary_available_block_range(node_address?: string): Promise; /** - * @param {any} options - * @returns {getEntityOptions} + * @param {string | undefined} [node_address] + * @returns {Promise} */ - get_entity_options(options: any): getEntityOptions; + get_binary_next_upgrade(node_address?: string): Promise; /** - * Retrieves entity information using the provided options. - * - * This function is an asynchronous JavaScript binding for the Rust `get_entity` method. - * - * # Arguments - * - * * `options` - An optional `GetEntityOptions` struct containing retrieval options, such as: - * - `entity_identifier`: Identifier for the entity. - * - `entity_identifier_as_string`: String representation of the entity identifier. - * - `maybe_block_id_as_string`: Optional string representation of the block ID. - * - `maybe_block_identifier`: Optional `BlockIdentifierInput` for specifying the block. - * - `verbosity`: Verbosity level for the output. - * - `rpc_address`: Address of the node to query. - * - * # Returns - * - * A `Result` containing either a `GetAddressableEntityResult` on success or a `JsError` on failure. - * - * # Errors - * - * Returns a `JsError` if there is an error during the retrieval process, such as issues with the provided options or network errors. - * ``` - * @param {getEntityOptions | undefined} [options] - * @returns {Promise} + * @param {string | undefined} [node_address] + * @returns {Promise} */ - get_entity(options?: getEntityOptions): Promise; + get_binary_consensus_status(node_address?: string): Promise; /** - * @param {getEntityOptions | undefined} [options] - * @returns {Promise} + * @param {string | undefined} [node_address] + * @returns {Promise} */ - state_get_entity(options?: getEntityOptions): Promise; + get_binary_chainspec_raw_bytes(node_address?: string): Promise; /** - * Puts a transaction using the provided options. - * - * # Arguments - * - * * `transaction` - The `Transaction` object to be sent. - * * `verbosity` - An optional `Verbosity` level for controlling the output verbosity. - * * `rpc_address` - An optional string specifying the rpc address to use for the request. - * - * # Returns - * - * A `Result` containing either a `PutTransactionResult` or a `JsError` in case of an error. - * - * # Errors - * - * Returns a `JsError` if there is an error during the transaction process. + * @param {string | undefined} [node_address] + * @returns {Promise} + */ + get_binary_node_status(node_address?: string): Promise; + /** + * @param {string | undefined} node_address + * @param {PublicKey} validator_key + * @param {EraId} era + * @returns {Promise} + */ + get_binary_get_validator_reward_by_era(node_address: string | undefined, validator_key: PublicKey, era: EraId): Promise; + /** + * @param {string | undefined} node_address + * @param {PublicKey} validator_key + * @param {bigint} block_height + * @returns {Promise} + */ + get_binary_get_validator_reward_by_block_height(node_address: string | undefined, validator_key: PublicKey, block_height: bigint): Promise; + /** + * @param {string | undefined} node_address + * @param {PublicKey} validator_key + * @param {BlockHash} block_hash + * @returns {Promise} + */ + get_binary_get_validator_reward_by_block_hash(node_address: string | undefined, validator_key: PublicKey, block_hash: BlockHash): Promise; + /** + * @param {string | undefined} node_address + * @param {PublicKey} validator_key + * @param {PublicKey} delegator_key + * @param {EraId} era + * @returns {Promise} + */ + get_binary_get_delegator_reward_by_era(node_address: string | undefined, validator_key: PublicKey, delegator_key: PublicKey, era: EraId): Promise; + /** + * @param {string | undefined} node_address + * @param {PublicKey} validator_key + * @param {PublicKey} delegator_key + * @param {bigint} block_height + * @returns {Promise} + */ + get_binary_get_delegator_reward_by_block_height(node_address: string | undefined, validator_key: PublicKey, delegator_key: PublicKey, block_height: bigint): Promise; + /** + * @param {string | undefined} node_address + * @param {PublicKey} validator_key + * @param {PublicKey} delegator_key + * @param {BlockHash} block_hash + * @returns {Promise} + */ + get_binary_get_delegator_reward_by_block_hash(node_address: string | undefined, validator_key: PublicKey, delegator_key: PublicKey, block_hash: BlockHash): Promise; + /** + * @param {string | undefined} node_address + * @param {RecordId} record_id + * @param {Uint8Array} key + * @returns {Promise} + */ + get_binary_read_record(node_address: string | undefined, record_id: RecordId, key: Uint8Array): Promise; + /** + * @param {string | undefined} node_address + * @param {Key} key + * @param {(string)[]} path + * @returns {Promise} + */ + get_binary_global_state_item(node_address: string | undefined, key: Key, path: (string)[]): Promise; + /** + * @param {string | undefined} node_address + * @param {Digest} state_root_hash + * @param {Key} key + * @param {(string)[]} path + * @returns {Promise} + */ + get_binary_global_state_item_by_state_root_hash(node_address: string | undefined, state_root_hash: Digest, key: Key, path: (string)[]): Promise; + /** + * @param {string | undefined} node_address + * @param {BlockHash} block_hash + * @param {Key} key + * @param {(string)[]} path + * @returns {Promise} + */ + get_binary_global_state_item_by_block_hash(node_address: string | undefined, block_hash: BlockHash, key: Key, path: (string)[]): Promise; + /** + * @param {string | undefined} node_address + * @param {bigint} block_height + * @param {Key} key + * @param {(string)[]} path + * @returns {Promise} + */ + get_binary_global_state_item_by_block_height(node_address: string | undefined, block_height: bigint, key: Key, path: (string)[]): Promise; + /** + * @param {string | undefined} node_address * @param {Transaction} transaction - * @param {Verbosity | undefined} [verbosity] - * @param {string | undefined} [rpc_address] - * @returns {Promise} + * @returns {Promise} */ - put_transaction(transaction: Transaction, verbosity?: Verbosity, rpc_address?: string): Promise; + get_binary_try_accept_transaction(node_address: string | undefined, transaction: Transaction): Promise; /** - * JavaScript Alias for `put_transaction`. + * @param {string | undefined} node_address * @param {Transaction} transaction - * @param {Verbosity | undefined} [verbosity] - * @param {string | undefined} [rpc_address] - * @returns {Promise} + * @returns {Promise} */ - account_put_transaction(transaction: Transaction, verbosity?: Verbosity, rpc_address?: string): Promise; + get_binary_try_speculative_execution(node_address: string | undefined, transaction: Transaction): Promise; /** - * Parses query balance options from a JsValue. + * @param {string | undefined} [node_address] + * @returns {Promise} + */ + get_binary_get_protocol_version(node_address?: string): Promise; + /** + * Parses auction info options from a JsValue. * * # Arguments * - * * `options` - A JsValue containing query balance options to be parsed. + * * `options` - A JsValue containing auction info options to be parsed. * * # Returns * - * Parsed query balance options as a `QueryBalanceDetailsOptions` struct. + * Result containing parsed auction info options as a `GetAuctionInfoOptions` struct, + * or a `JsError` if deserialization fails. * @param {any} options - * @returns {queryBalanceDetailsOptions} + * @returns {getAuctionInfoOptions} */ - query_balance_details_options(options: any): queryBalanceDetailsOptions; + get_auction_info_options(options: any): getAuctionInfoOptions; /** - * Retrieves balance information using the provided options. + * Retrieves auction information using the provided options. * * # Arguments * - * * `options` - An optional `QueryBalanceDetailsOptions` struct containing retrieval options. + * * `options` - An optional `GetAuctionInfoOptions` struct containing retrieval options. * * # Returns * - * A `Result` containing either a `QueryBalanceDetailsResult` or a `JsError` in case of an error. + * A `Result` containing either a `GetAuctionInfoResult` or a `JsError` in case of an error. * * # Errors * * Returns a `JsError` if there is an error during the retrieval process. - * @param {queryBalanceDetailsOptions | undefined} [options] - * @returns {Promise} + * @param {getAuctionInfoOptions | undefined} [options] + * @returns {Promise} */ - query_balance_details(options?: queryBalanceDetailsOptions): Promise; + get_auction_info(options?: getAuctionInfoOptions): Promise; /** - * Parses query global state options from a JsValue. + * @param {getAuctionInfoOptions | undefined} [options] + * @returns {Promise} + */ + state_get_auction_info_js_alias(options?: getAuctionInfoOptions): Promise; + /** + * Parses block options from a JsValue. * * # Arguments * - * * `options` - A JsValue containing query global state options to be parsed. + * * `options` - A JsValue containing block options to be parsed. * * # Returns * - * Parsed query global state options as a `QueryGlobalStateOptions` struct. + * Parsed block options as a `GetBlockOptions` struct. * @param {any} options - * @returns {queryGlobalStateOptions} + * @returns {getBlockOptions} */ - query_global_state_options(options: any): queryGlobalStateOptions; + get_block_options(options: any): getBlockOptions; /** - * Retrieves global state information using the provided options. + * Retrieves block information using the provided options. * * # Arguments * - * * `options` - An optional `QueryGlobalStateOptions` struct containing retrieval options. + * * `options` - An optional `GetBlockOptions` struct containing retrieval options. * * # Returns * - * A `Result` containing either a `QueryGlobalStateResult` or a `JsError` in case of an error. + * A `Result` containing either a `GetBlockResult` or a `JsError` in case of an error. * * # Errors * * Returns a `JsError` if there is an error during the retrieval process. - * @param {queryGlobalStateOptions | undefined} [options] - * @returns {Promise} + * @param {getBlockOptions | undefined} [options] + * @returns {Promise} */ - query_global_state(options?: queryGlobalStateOptions): Promise; + get_block(options?: getBlockOptions): Promise; /** - * This function allows executing a transaction speculatively. + * JavaScript Alias for the `get_block`. * * # Arguments * - * * `builder_params` - Transaction Builder parameters. - * * `transaction_params` - Transactionment parameters for the transaction. - * * `verbosity` - Optional verbosity level. - * * `rpc_address` - Optional rpc address. + * * `options` - An optional `GetBlockOptions` struct containing retrieval options. * * # Returns * - * A `Result` containing either a `SpeculativeExecTxnResult` or a `JsError` in case of an error. - * @param {TransactionBuilderParams} builder_params - * @param {TransactionStrParams} transaction_params - * @param {Verbosity | undefined} [verbosity] - * @param {string | undefined} [rpc_address] - * @returns {Promise} - */ - speculative_transaction(builder_params: TransactionBuilderParams, transaction_params: TransactionStrParams, verbosity?: Verbosity, rpc_address?: string): Promise; - /** - * JS function for speculative transfer transaction. + * A `Result` containing either a `GetBlockResult` or a `JsError` in case of an error. * - * # Arguments + * # Errors * - * * `maybe_source` - Optional transfer source uref. - * * `target_account` - The target account. - * * `amount` - The amount to transfer. - * * `maybe_id` - An optional transfer ID (defaults to a random number). - * * `transaction_params` - The transactionment parameters. - * * `verbosity` - The verbosity level for logging (optional). - * * `rpc_address` - The address of the node to connect to (optional). + * Returns a `JsError` if there is an error during the retrieval process. + * @param {getBlockOptions | undefined} [options] + * @returns {Promise} + */ + chain_get_block(options?: getBlockOptions): Promise; + /** + * Asynchronously retrieves the chainspec. + * + * # Arguments + * + * * `verbosity` - An optional `Verbosity` parameter. + * * `rpc_address` - An optional rpc address as a string. * * # Returns * - * A `Result` containing the result of the speculative transfer or a `JsError` in case of an error. - * @param {URef | undefined} maybe_source - * @param {string} target_account - * @param {string} amount - * @param {TransactionStrParams} transaction_params - * @param {string | undefined} [maybe_id] + * A `Result` containing either a `GetChainspecResult` or a `JsError` in case of an error. * @param {Verbosity | undefined} [verbosity] * @param {string | undefined} [rpc_address] - * @returns {Promise} - */ - speculative_transfer_transaction(maybe_source: URef | undefined, target_account: string, amount: string, transaction_params: TransactionStrParams, maybe_id?: string, verbosity?: Verbosity, rpc_address?: string): Promise; - /** - * @param {string | undefined} [node_address] - * @returns {Promise} - */ - get_binary_latest_switch_block_header(node_address?: string): Promise; - /** - * @param {string | undefined} [node_address] - * @returns {Promise} - */ - get_binary_latest_block_header(node_address?: string): Promise; - /** - * @param {string | undefined} node_address - * @param {bigint} height - * @returns {Promise} - */ - get_binary_block_header_by_height(node_address: string | undefined, height: bigint): Promise; - /** - * @param {string | undefined} node_address - * @param {BlockHash} block_hash - * @returns {Promise} - */ - get_binary_block_header_by_hash(node_address: string | undefined, block_hash: BlockHash): Promise; - /** - * @param {string | undefined} [node_address] - * @returns {Promise} - */ - get_binary_latest_signed_block(node_address?: string): Promise; - /** - * @param {string | undefined} node_address - * @param {bigint} height - * @returns {Promise} - */ - get_binary_signed_block_by_height(node_address: string | undefined, height: bigint): Promise; - /** - * @param {string | undefined} node_address - * @param {BlockHash} block_hash - * @returns {Promise} - */ - get_binary_signed_block_by_hash(node_address: string | undefined, block_hash: BlockHash): Promise; - /** - * @param {string | undefined} node_address - * @param {TransactionHash} hash - * @param {boolean} with_finalized_approvals - * @returns {Promise} - */ - get_binary_transaction_by_hash(node_address: string | undefined, hash: TransactionHash, with_finalized_approvals: boolean): Promise; - /** - * @param {string | undefined} [node_address] - * @returns {Promise} - */ - get_binary_peers(node_address?: string): Promise; - /** - * @param {string | undefined} [node_address] - * @returns {Promise} - */ - get_binary_uptime(node_address?: string): Promise; - /** - * @param {string | undefined} [node_address] - * @returns {Promise} - */ - get_binary_last_progress(node_address?: string): Promise; - /** - * @param {string | undefined} [node_address] - * @returns {Promise} - */ - get_binary_reactor_state(node_address?: string): Promise; - /** - * @param {string | undefined} [node_address] - * @returns {Promise} - */ - get_binary_network_name(node_address?: string): Promise; - /** - * @param {string | undefined} [node_address] - * @returns {Promise} - */ - get_binary_consensus_validator_changes(node_address?: string): Promise; - /** - * @param {string | undefined} [node_address] - * @returns {Promise} + * @returns {Promise} */ - get_binary_block_synchronizer_status(node_address?: string): Promise; + get_chainspec(verbosity?: Verbosity, rpc_address?: string): Promise; /** - * @param {string | undefined} [node_address] - * @returns {Promise} + * @param {Verbosity | undefined} [verbosity] + * @param {string | undefined} [rpc_address] + * @returns {Promise} */ - get_binary_available_block_range(node_address?: string): Promise; + info_get_chainspec(verbosity?: Verbosity, rpc_address?: string): Promise; /** - * @param {string | undefined} [node_address] - * @returns {Promise} + * Retrieves node status information using the provided options. + * + * # Arguments + * + * * `verbosity` - An optional `Verbosity` level for controlling the output verbosity. + * * `rpc_address` - An optional string specifying the rpc address to use for the request. + * + * # Returns + * + * A `Result` containing either a `GetNodeStatusResult` or a `JsError` in case of an error. + * + * # Errors + * + * Returns a `JsError` if there is an error during the retrieval process. + * @param {Verbosity | undefined} [verbosity] + * @param {string | undefined} [rpc_address] + * @returns {Promise} */ - get_binary_next_upgrade(node_address?: string): Promise; + get_node_status(verbosity?: Verbosity, rpc_address?: string): Promise; /** - * @param {string | undefined} [node_address] - * @returns {Promise} + * @param {Verbosity | undefined} [verbosity] + * @param {string | undefined} [rpc_address] + * @returns {Promise} */ - get_binary_consensus_status(node_address?: string): Promise; + info_get_status(verbosity?: Verbosity, rpc_address?: string): Promise; /** - * @param {string | undefined} [node_address] - * @returns {Promise} + * Retrieves peers asynchronously. + * + * # Arguments + * + * * `verbosity` - Optional verbosity level. + * * `rpc_address` - Optional rpc address. + * + * # Returns + * + * A `Result` containing `GetPeersResult` or a `JsError` if an error occurs. + * @param {Verbosity | undefined} [verbosity] + * @param {string | undefined} [rpc_address] + * @returns {Promise} */ - get_binary_chainspec_raw_bytes(node_address?: string): Promise; + get_peers(verbosity?: Verbosity, rpc_address?: string): Promise; /** - * @param {string | undefined} [node_address] - * @returns {Promise} + * @param {Verbosity | undefined} [verbosity] + * @param {string | undefined} [rpc_address] + * @returns {Promise} */ - get_binary_node_status(node_address?: string): Promise; + info_get_peers(verbosity?: Verbosity, rpc_address?: string): Promise; /** - * @param {string | undefined} node_address - * @param {PublicKey} validator_key - * @param {EraId} era - * @returns {Promise} + * Retrieves validator changes using the provided options. + * + * # Arguments + * + * * `verbosity` - An optional `Verbosity` level for controlling the output verbosity. + * * `rpc_address` - An optional string specifying the rpc address to use for the request. + * + * # Returns + * + * A `Result` containing either a `GetValidatorChangesResult` or a `JsError` in case of an error. + * + * # Errors + * + * Returns a `JsError` if there is an error during the retrieval process. + * @param {Verbosity | undefined} [verbosity] + * @param {string | undefined} [rpc_address] + * @returns {Promise} */ - get_binary_get_validator_reward_by_era(node_address: string | undefined, validator_key: PublicKey, era: EraId): Promise; + get_validator_changes(verbosity?: Verbosity, rpc_address?: string): Promise; /** - * @param {string | undefined} node_address - * @param {PublicKey} validator_key - * @param {bigint} block_height - * @returns {Promise} + * @param {Verbosity | undefined} [verbosity] + * @param {string | undefined} [rpc_address] + * @returns {Promise} */ - get_binary_get_validator_reward_by_block_height(node_address: string | undefined, validator_key: PublicKey, block_height: bigint): Promise; + info_get_validator_change(verbosity?: Verbosity, rpc_address?: string): Promise; /** - * @param {string | undefined} node_address - * @param {PublicKey} validator_key - * @param {BlockHash} block_hash - * @returns {Promise} + * Lists available RPCs using the provided options. + * + * # Arguments + * + * * `verbosity` - An optional `Verbosity` level for controlling the output verbosity. + * * `rpc_address` - An optional string specifying the rpc address to use for the request. + * + * # Returns + * + * A `Result` containing either a `ListRpcsResult` or a `JsError` in case of an error. + * + * # Errors + * + * Returns a `JsError` if there is an error during the listing process. + * @param {Verbosity | undefined} [verbosity] + * @param {string | undefined} [rpc_address] + * @returns {Promise} */ - get_binary_get_validator_reward_by_block_hash(node_address: string | undefined, validator_key: PublicKey, block_hash: BlockHash): Promise; + list_rpcs(verbosity?: Verbosity, rpc_address?: string): Promise; /** - * @param {string | undefined} node_address - * @param {PublicKey} validator_key - * @param {PublicKey} delegator_key - * @param {EraId} era - * @returns {Promise} + * JS function for speculative transfer transaction. + * + * # Arguments + * + * * `maybe_source` - Optional transfer source uref. + * * `target_account` - The target account. + * * `amount` - The amount to transfer. + * * `maybe_id` - An optional transfer ID (defaults to a random number). + * * `transaction_params` - The transactionment parameters. + * * `verbosity` - The verbosity level for logging (optional). + * * `rpc_address` - The address of the node to connect to (optional). + * + * # Returns + * + * A `Result` containing the result of the speculative transfer or a `JsError` in case of an error. + * @param {URef | undefined} maybe_source + * @param {string} target_account + * @param {string} amount + * @param {TransactionStrParams} transaction_params + * @param {string | undefined} [maybe_id] + * @param {Verbosity | undefined} [verbosity] + * @param {string | undefined} [rpc_address] + * @returns {Promise} */ - get_binary_get_delegator_reward_by_era(node_address: string | undefined, validator_key: PublicKey, delegator_key: PublicKey, era: EraId): Promise; + speculative_transfer_transaction(maybe_source: URef | undefined, target_account: string, amount: string, transaction_params: TransactionStrParams, maybe_id?: string, verbosity?: Verbosity, rpc_address?: string): Promise; /** - * @param {string | undefined} node_address - * @param {PublicKey} validator_key - * @param {PublicKey} delegator_key - * @param {bigint} block_height - * @returns {Promise} + * JS function for `make_deploy`. + * + * # Arguments + * + * * `deploy_params` - The deploy parameters. + * * `session_params` - The session parameters. + * * `payment_params` - The payment parameters. + * + * # Returns + * + * A `Result` containing the created `Deploy` or a `JsError` in case of an error. + * @param {DeployStrParams} deploy_params + * @param {SessionStrParams} session_params + * @param {PaymentStrParams} payment_params + * @returns {Deploy} */ - get_binary_get_delegator_reward_by_block_height(node_address: string | undefined, validator_key: PublicKey, delegator_key: PublicKey, block_height: bigint): Promise; + make_deploy(deploy_params: DeployStrParams, session_params: SessionStrParams, payment_params: PaymentStrParams): Deploy; /** - * @param {string | undefined} node_address - * @param {PublicKey} validator_key - * @param {PublicKey} delegator_key - * @param {BlockHash} block_hash - * @returns {Promise} + * JS function for `sign_deploy`. + * + * # Arguments + * + * * `deploy` - The deploy to sign. + * * `secret_key` - The secret key for signing. + * + * # Returns + * + * The signed `Deploy`. + * @param {Deploy} deploy + * @param {string} secret_key + * @returns {Deploy} */ - get_binary_get_delegator_reward_by_block_hash(node_address: string | undefined, validator_key: PublicKey, delegator_key: PublicKey, block_hash: BlockHash): Promise; + sign_deploy(deploy: Deploy, secret_key: string): Deploy; /** - * @param {string | undefined} node_address - * @param {RecordId} record_id - * @param {Uint8Array} key - * @returns {Promise} + * JS function for `make_transaction`. + * + * # Arguments + * + * * `builder_params` - Transaction Builder parameters. + * * `transaction_params` - The transaction parameters. + * + * # Returns + * + * A `Result` containing the created `Transaction` or a `JsError` in case of an error. + * @param {TransactionBuilderParams} builder_params + * @param {TransactionStrParams} transaction_params + * @returns {Transaction} */ - get_binary_read_record(node_address: string | undefined, record_id: RecordId, key: Uint8Array): Promise; + make_transaction(builder_params: TransactionBuilderParams, transaction_params: TransactionStrParams): Transaction; /** - * @param {string | undefined} node_address - * @param {Key} key - * @param {(string)[]} path - * @returns {Promise} + * JS function for `sign_transaction`. + * + * # Arguments + * + * * `transaction` - The transaction to sign. + * * `secret_key` - The secret key for signing. + * + * # Returns + * + * The signed `Transaction`. + * @param {Transaction} transaction + * @param {string} secret_key + * @returns {Transaction} */ - get_binary_global_state_item(node_address: string | undefined, key: Key, path: (string)[]): Promise; + sign_transaction(transaction: Transaction, secret_key: string): Transaction; /** - * @param {string | undefined} node_address - * @param {Digest} state_root_hash - * @param {Key} key - * @param {(string)[]} path - * @returns {Promise} + * Calls a smart contract entry point with the specified parameters and returns the result. + * + * # Arguments + * + * * `deploy_params` - The deploy parameters. + * * `session_params` - The session parameters. + * * `payment_amount` - The payment amount as a string. + * * `rpc_address` - An optional rpc address to send the request to. + * + * # Returns + * + * A `Result` containing either a `PutDeployResult` or a `JsError` in case of an error. + * + * # Errors + * + * Returns a `JsError` if there is an error during the call. + * @param {DeployStrParams} deploy_params + * @param {SessionStrParams} session_params + * @param {string} payment_amount + * @param {string | undefined} [rpc_address] + * @returns {Promise} */ - get_binary_global_state_item_by_state_root_hash(node_address: string | undefined, state_root_hash: Digest, key: Key, path: (string)[]): Promise; + call_entrypoint_deploy(deploy_params: DeployStrParams, session_params: SessionStrParams, payment_amount: string, rpc_address?: string): Promise; /** - * @param {string | undefined} node_address - * @param {BlockHash} block_hash - * @param {Key} key - * @param {(string)[]} path - * @returns {Promise} + * Deserialize query_contract_key_options from a JavaScript object. + * @param {any} options + * @returns {queryContractKeyOptions} */ - get_binary_global_state_item_by_block_hash(node_address: string | undefined, block_hash: BlockHash, key: Key, path: (string)[]): Promise; + query_contract_key_options(options: any): queryContractKeyOptions; /** - * @param {string | undefined} node_address - * @param {bigint} block_height - * @param {Key} key - * @param {(string)[]} path - * @returns {Promise} + * JavaScript function for query_contract_key with deserialized options. + * @param {queryContractKeyOptions | undefined} [options] + * @returns {Promise} */ - get_binary_global_state_item_by_block_height(node_address: string | undefined, block_height: bigint, key: Key, path: (string)[]): Promise; + query_contract_key(options?: queryContractKeyOptions): Promise; /** - * @param {string | undefined} node_address - * @param {Transaction} transaction - * @returns {Promise} + * @param {any} options + * @returns {getAccountOptions} */ - get_binary_try_accept_transaction(node_address: string | undefined, transaction: Transaction): Promise; + get_account_options(options: any): getAccountOptions; /** - * @param {string | undefined} node_address - * @param {Transaction} transaction - * @returns {Promise} + * Retrieves account information using the provided options. + * + * This function is an asynchronous JavaScript binding for the Rust `get_account` method. + * + * # Arguments + * + * * `options` - An optional `GetAccountOptions` struct containing retrieval options, such as: + * - `account_identifier`: Identifier for the account. + * - `account_identifier_as_string`: String representation of the account identifier. + * - `maybe_block_id_as_string`: Optional string representation of the block ID. + * - `maybe_block_identifier`: Optional `BlockIdentifierInput` for specifying the block. + * - `verbosity`: Verbosity level for the output. + * - `rpc_address`: Address of the node to query. + * + * # Returns + * + * A `Result` containing either a `GetAccountResult` on success or a `JsError` on failure. + * + * # Errors + * + * Returns a `JsError` if there is an error during the retrieval process, such as issues with the provided options or network errors. + * ``` + * @param {getAccountOptions | undefined} [options] + * @returns {Promise} */ - get_binary_try_speculative_execution(node_address: string | undefined, transaction: Transaction): Promise; + get_account(options?: getAccountOptions): Promise; /** - * @param {string | undefined} [node_address] - * @returns {Promise} + * @param {getAccountOptions | undefined} [options] + * @returns {Promise} */ - get_binary_get_protocol_version(node_address?: string): Promise; + state_get_account_info(options?: getAccountOptions): Promise; /** - * This function allows executing a deploy speculatively. + * Parses era summary options from a JsValue. * * # Arguments * - * * `deploy_params` - Deployment parameters for the deploy. - * * `session_params` - Session parameters for the deploy. - * * `payment_params` - Payment parameters for the deploy. - * * `verbosity` - Optional verbosity level. - * * `rpc_address` - Optional rpc address. + * * `options` - A JsValue containing era summary options to be parsed. * * # Returns * - * A `Result` containing either a `SpeculativeExecResult` or a `JsError` in case of an error. - * @param {DeployStrParams} deploy_params - * @param {SessionStrParams} session_params - * @param {PaymentStrParams} payment_params - * @param {Verbosity | undefined} [verbosity] - * @param {string | undefined} [rpc_address] - * @returns {Promise} + * Parsed era summary options as a `GetEraSummaryOptions` struct. + * @param {any} options + * @returns {getEraSummaryOptions} */ - speculative_deploy(deploy_params: DeployStrParams, session_params: SessionStrParams, payment_params: PaymentStrParams, verbosity?: Verbosity, rpc_address?: string): Promise; + get_era_summary_options(options: any): getEraSummaryOptions; /** - * Calls a smart contract entry point with the specified parameters and returns the result. + * Retrieves era summary information using the provided options. * * # Arguments * - * * `transaction_params` - Transaction parameters. - * * `builder_params` - Transaction Builder parameters. - * * `rpc_address` - An optional rpc address to send the request to. + * * `options` - An optional `GetEraSummaryOptions` struct containing retrieval options. * * # Returns * - * A `Result` containing either a `PutTransactionResult` or a `JsError` in case of an error. + * A `Result` containing either a `GetEraSummaryResult` or a `JsError` in case of an error. * * # Errors * - * Returns a `JsError` if there is an error during the call. - * @param {TransactionBuilderParams} builder_params + * Returns a `JsError` if there is an error during the retrieval process. + * @param {getEraSummaryOptions | undefined} [options] + * @returns {Promise} + */ + get_era_summary(options?: getEraSummaryOptions): Promise; + /** + * @param {getEraSummaryOptions | undefined} [options] + * @returns {Promise} + */ + chain_get_era_summary(options?: getEraSummaryOptions): Promise; + /** + * JS function for transaction transferring funds. + * + * # Arguments + * + * * `maybe_source` - Optional transfer source uref. + * * `target_account` - The target account. + * * `amount` - The amount to transfer. + * * `transaction_params` - The transaction parameters. + * * `maybe_id` - An optional transfer ID (defaults to a random number). + * * `verbosity` - The verbosity level for logging (optional). + * * `rpc_address` - The address of the node to connect to (optional). + * + * # Returns + * + * A `Result` containing the result of the transfer or a `JsError` in case of an error. + * @param {URef | undefined} maybe_source + * @param {string} target_account + * @param {string} amount * @param {TransactionStrParams} transaction_params + * @param {string | undefined} [maybe_id] + * @param {Verbosity | undefined} [verbosity] * @param {string | undefined} [rpc_address] * @returns {Promise} */ - call_entrypoint(builder_params: TransactionBuilderParams, transaction_params: TransactionStrParams, rpc_address?: string): Promise; + transfer_transaction(maybe_source: URef | undefined, target_account: string, amount: string, transaction_params: TransactionStrParams, maybe_id?: string, verbosity?: Verbosity, rpc_address?: string): Promise; } export class SessionStrParams { free(): void; diff --git a/pkg-nodejs/casper_rust_wasm_sdk.js b/pkg-nodejs/casper_rust_wasm_sdk.js index f4abeba79..f2f05dfb0 100644 --- a/pkg-nodejs/casper_rust_wasm_sdk.js +++ b/pkg-nodejs/casper_rust_wasm_sdk.js @@ -187,19 +187,19 @@ function makeMutClosure(arg0, arg1, dtor, f) { return real; } function __wbg_adapter_38(arg0, arg1, arg2) { - wasm.closure820_externref_shim(arg0, arg1, arg2); + wasm.closure937_externref_shim(arg0, arg1, arg2); } -function __wbg_adapter_45(arg0, arg1) { - wasm._dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hbccf68cb4005f2b4(arg0, arg1); +function __wbg_adapter_43(arg0, arg1) { + wasm._dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h6b87dddcaa71d61d(arg0, arg1); } function __wbg_adapter_48(arg0, arg1, arg2) { - wasm.closure1141_externref_shim(arg0, arg1, arg2); + wasm.closure1139_externref_shim(arg0, arg1, arg2); } function __wbg_adapter_51(arg0, arg1, arg2) { - wasm.closure1155_externref_shim(arg0, arg1, arg2); + wasm.closure1153_externref_shim(arg0, arg1, arg2); } function _assertClass(instance, klass) { @@ -215,6 +215,12 @@ function takeFromExternrefTable0(idx) { return value; } +function addToExternrefTable0(obj) { + const idx = wasm.__externref_table_alloc(); + wasm.__wbindgen_export_2.set(idx, obj); + return idx; +} + function passArray8ToWasm0(arg, malloc) { const ptr = malloc(arg.length * 1, 1) >>> 0; getUint8ArrayMemory0().set(arg, ptr / 1); @@ -222,17 +228,6 @@ function passArray8ToWasm0(arg, malloc) { return ptr; } -function getArrayU8FromWasm0(ptr, len) { - ptr = ptr >>> 0; - return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len); -} - -function addToExternrefTable0(obj) { - const idx = wasm.__externref_table_alloc(); - wasm.__wbindgen_export_2.set(idx, obj); - return idx; -} - function passArrayJsValueToWasm0(array, malloc) { const ptr = malloc(array.length * 4, 4) >>> 0; const mem = getDataViewMemory0(); @@ -243,17 +238,6 @@ function passArrayJsValueToWasm0(array, malloc) { return ptr; } -function getArrayJsValueFromWasm0(ptr, len) { - ptr = ptr >>> 0; - const mem = getDataViewMemory0(); - const result = []; - for (let i = ptr; i < ptr + 4 * len; i += 4) { - result.push(wasm.__wbindgen_export_2.get(mem.getUint32(i, true))); - } - wasm.__externref_drop_slice(ptr, len); - return result; -} - function notDefined(what) { return () => { throw new Error(`${what} is not defined`); }; } function handleError(f, args) { @@ -264,6 +248,11 @@ function handleError(f, args) { wasm.__wbindgen_exn_store(idx); } } + +function getArrayU8FromWasm0(ptr, len) { + ptr = ptr >>> 0; + return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len); +} /** * Converts a hexadecimal string to a regular string. * @@ -561,8 +550,18 @@ module.exports.makeDictionaryItemKey = function(key, value) { } }; +function getArrayJsValueFromWasm0(ptr, len) { + ptr = ptr >>> 0; + const mem = getDataViewMemory0(); + const result = []; + for (let i = ptr; i < ptr + 4 * len; i += 4) { + result.push(wasm.__wbindgen_export_2.get(mem.getUint32(i, true))); + } + wasm.__externref_drop_slice(ptr, len); + return result; +} function __wbg_adapter_1203(arg0, arg1, arg2, arg3) { - wasm.closure1703_externref_shim(arg0, arg1, arg2, arg3); + wasm.closure1701_externref_shim(arg0, arg1, arg2, arg3); } module.exports.PricingMode = Object.freeze({ Fixed:0,"0":"Fixed",Classic:1,"1":"Classic",Reserved:2,"2":"Reserved", }); @@ -6348,826 +6347,751 @@ class SDK { return ret; } /** + * JavaScript function for deploying with deserialized parameters. + * + * # Arguments + * + * * `deploy_params` - Deploy parameters. + * * `session_params` - Session parameters. + * * `payment_params` - Payment parameters. + * * `verbosity` - An optional verbosity level. + * * `rpc_address` - An optional rpc address. + * + * # Returns + * + * A result containing PutDeployResult or a JsError. + * @param {DeployStrParams} deploy_params + * @param {SessionStrParams} session_params + * @param {PaymentStrParams} payment_params + * @param {Verbosity | undefined} [verbosity] + * @param {string | undefined} [rpc_address] + * @returns {Promise} + */ + deploy(deploy_params, session_params, payment_params, verbosity, rpc_address) { + _assertClass(deploy_params, DeployStrParams); + var ptr0 = deploy_params.__destroy_into_raw(); + _assertClass(session_params, SessionStrParams); + var ptr1 = session_params.__destroy_into_raw(); + _assertClass(payment_params, PaymentStrParams); + var ptr2 = payment_params.__destroy_into_raw(); + var ptr3 = isLikeNone(rpc_address) ? 0 : passStringToWasm0(rpc_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + var len3 = WASM_VECTOR_LEN; + const ret = wasm.sdk_deploy(this.__wbg_ptr, ptr0, ptr1, ptr2, isLikeNone(verbosity) ? 3 : verbosity, ptr3, len3); + return ret; + } + /** + * Parses deploy options from a JsValue. + * + * # Arguments + * + * * `options` - A JsValue containing deploy options to be parsed. + * + * # Returns + * + * Parsed deploy options as a `GetDeployOptions` struct. * @param {any} options - * @returns {getEraInfoOptions} + * @returns {getDeployOptions} */ - get_era_info_options(options) { - const ret = wasm.sdk_get_era_info_options(this.__wbg_ptr, options); + get_deploy_options(options) { + const ret = wasm.sdk_get_deploy_options(this.__wbg_ptr, options); if (ret[2]) { throw takeFromExternrefTable0(ret[1]); } - return getEraInfoOptions.__wrap(ret[0]); + return getDeployOptions.__wrap(ret[0]); } /** - * @param {getEraInfoOptions | undefined} [options] - * @returns {Promise} + * Retrieves deploy information using the provided options. + * + * # Arguments + * + * * `options` - An optional `GetDeployOptions` struct containing retrieval options. + * + * # Returns + * + * A `Result` containing either a `GetDeployResult` or an error. + * @param {getDeployOptions | undefined} [options] + * @returns {Promise} */ - get_era_info(options) { + get_deploy(options) { let ptr0 = 0; if (!isLikeNone(options)) { - _assertClass(options, getEraInfoOptions); + _assertClass(options, getDeployOptions); ptr0 = options.__destroy_into_raw(); } - const ret = wasm.sdk_get_era_info(this.__wbg_ptr, ptr0); + const ret = wasm.sdk_get_deploy(this.__wbg_ptr, ptr0); return ret; } /** - * @param {getEraInfoOptions | undefined} [options] - * @returns {Promise} + * Retrieves deploy information using the provided options, alias for `get_deploy`. + * @param {getDeployOptions | undefined} [options] + * @returns {Promise} */ - chain_get_era_info_by_switch_block(options) { + info_get_deploy(options) { let ptr0 = 0; if (!isLikeNone(options)) { - _assertClass(options, getEraInfoOptions); + _assertClass(options, getDeployOptions); ptr0 = options.__destroy_into_raw(); } - const ret = wasm.sdk_chain_get_era_info_by_switch_block(this.__wbg_ptr, ptr0); + const ret = wasm.sdk_info_get_deploy(this.__wbg_ptr, ptr0); return ret; } /** - * Parses auction info options from a JsValue. + * Parses transaction options from a JsValue. * * # Arguments * - * * `options` - A JsValue containing auction info options to be parsed. + * * `options` - A JsValue containing transaction options to be parsed. * * # Returns * - * Result containing parsed auction info options as a `GetAuctionInfoOptions` struct, - * or a `JsError` if deserialization fails. + * Parsed transaction options as a `GetTransactionOptions` struct. * @param {any} options - * @returns {getAuctionInfoOptions} + * @returns {getTransactionOptions} */ - get_auction_info_options(options) { - const ret = wasm.sdk_get_auction_info_options(this.__wbg_ptr, options); + get_transaction_options(options) { + const ret = wasm.sdk_get_transaction_options(this.__wbg_ptr, options); if (ret[2]) { throw takeFromExternrefTable0(ret[1]); } - return getAuctionInfoOptions.__wrap(ret[0]); + return getTransactionOptions.__wrap(ret[0]); } /** - * Retrieves auction information using the provided options. + * Retrieves transaction information using the provided options. * * # Arguments * - * * `options` - An optional `GetAuctionInfoOptions` struct containing retrieval options. + * * `options` - An optional `GetTransactionOptions` struct containing retrieval options. * * # Returns * - * A `Result` containing either a `GetAuctionInfoResult` or a `JsError` in case of an error. - * - * # Errors - * - * Returns a `JsError` if there is an error during the retrieval process. - * @param {getAuctionInfoOptions | undefined} [options] - * @returns {Promise} + * A `Result` containing either a `GetTransactionResult` or an error. + * @param {getTransactionOptions | undefined} [options] + * @returns {Promise} */ - get_auction_info(options) { + get_transaction(options) { let ptr0 = 0; if (!isLikeNone(options)) { - _assertClass(options, getAuctionInfoOptions); + _assertClass(options, getTransactionOptions); ptr0 = options.__destroy_into_raw(); } - const ret = wasm.sdk_get_auction_info(this.__wbg_ptr, ptr0); + const ret = wasm.sdk_get_transaction(this.__wbg_ptr, ptr0); return ret; } /** - * @param {getAuctionInfoOptions | undefined} [options] - * @returns {Promise} + * Retrieves transaction information using the provided options, alias for `get_transaction`. + * @param {getTransactionOptions | undefined} [options] + * @returns {Promise} */ - state_get_auction_info_js_alias(options) { + info_get_transaction(options) { let ptr0 = 0; if (!isLikeNone(options)) { - _assertClass(options, getAuctionInfoOptions); + _assertClass(options, getTransactionOptions); ptr0 = options.__destroy_into_raw(); } - const ret = wasm.sdk_state_get_auction_info_js_alias(this.__wbg_ptr, ptr0); + const ret = wasm.sdk_info_get_transaction(this.__wbg_ptr, ptr0); return ret; } /** - * Parses block options from a JsValue. - * - * # Arguments - * - * * `options` - A JsValue containing block options to be parsed. - * - * # Returns - * - * Parsed block options as a `GetBlockOptions` struct. + * Get options for speculative execution from a JavaScript value. * @param {any} options - * @returns {getBlockOptions} + * @returns {getSpeculativeExecTxnOptions} */ - get_block_options(options) { - const ret = wasm.sdk_get_block_options(this.__wbg_ptr, options); + get_speculative_exec_options(options) { + const ret = wasm.sdk_get_speculative_exec_options(this.__wbg_ptr, options); if (ret[2]) { throw takeFromExternrefTable0(ret[1]); } - return getBlockOptions.__wrap(ret[0]); + return getSpeculativeExecTxnOptions.__wrap(ret[0]); } /** - * Retrieves block information using the provided options. + * JS function for speculative execution. * * # Arguments * - * * `options` - An optional `GetBlockOptions` struct containing retrieval options. + * * `options` - The options for speculative execution. * * # Returns * - * A `Result` containing either a `GetBlockResult` or a `JsError` in case of an error. - * - * # Errors - * - * Returns a `JsError` if there is an error during the retrieval process. - * @param {getBlockOptions | undefined} [options] - * @returns {Promise} + * A `Result` containing the result of the speculative execution or a `JsError` in case of an error. + * @param {getSpeculativeExecTxnOptions | undefined} [options] + * @returns {Promise} */ - get_block(options) { + speculative_exec(options) { let ptr0 = 0; if (!isLikeNone(options)) { - _assertClass(options, getBlockOptions); + _assertClass(options, getSpeculativeExecTxnOptions); ptr0 = options.__destroy_into_raw(); } - const ret = wasm.sdk_get_block(this.__wbg_ptr, ptr0); + const ret = wasm.sdk_speculative_exec(this.__wbg_ptr, ptr0); return ret; } /** - * JavaScript Alias for the `get_block`. + * JS function for `make_transfer`. * * # Arguments * - * * `options` - An optional `GetBlockOptions` struct containing retrieval options. + * * `amount` - The transfer amount. + * * `target_account` - The target account. + * * `transfer_id` - Optional transfer identifier. + * * `deploy_params` - The deploy parameters. + * * `payment_params` - The payment parameters. * * # Returns * - * A `Result` containing either a `GetBlockResult` or a `JsError` in case of an error. - * - * # Errors - * - * Returns a `JsError` if there is an error during the retrieval process. - * @param {getBlockOptions | undefined} [options] - * @returns {Promise} + * A `Result` containing the created `Deploy` or a `JsError` in case of an error. + * @param {string} amount + * @param {string} target_account + * @param {string | undefined} transfer_id + * @param {DeployStrParams} deploy_params + * @param {PaymentStrParams} payment_params + * @returns {Deploy} */ - chain_get_block(options) { - let ptr0 = 0; - if (!isLikeNone(options)) { - _assertClass(options, getBlockOptions); - ptr0 = options.__destroy_into_raw(); + make_transfer(amount, target_account, transfer_id, deploy_params, payment_params) { + const ptr0 = passStringToWasm0(amount, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + const len0 = WASM_VECTOR_LEN; + const ptr1 = passStringToWasm0(target_account, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + const len1 = WASM_VECTOR_LEN; + var ptr2 = isLikeNone(transfer_id) ? 0 : passStringToWasm0(transfer_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + var len2 = WASM_VECTOR_LEN; + _assertClass(deploy_params, DeployStrParams); + var ptr3 = deploy_params.__destroy_into_raw(); + _assertClass(payment_params, PaymentStrParams); + var ptr4 = payment_params.__destroy_into_raw(); + const ret = wasm.sdk_make_transfer(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, ptr4); + if (ret[2]) { + throw takeFromExternrefTable0(ret[1]); } - const ret = wasm.sdk_chain_get_block(this.__wbg_ptr, ptr0); - return ret; + return Deploy.__wrap(ret[0]); } /** - * Asynchronously retrieves the chainspec. + * JS function for `make_transfer_transaction`. * * # Arguments * - * * `verbosity` - An optional `Verbosity` parameter. - * * `rpc_address` - An optional rpc address as a string. - * + * * `maybe_source` - Optional transfer source uref. + * * `amount` - The transfer amount. + * * `target` - The target account. + * * `transaction_params` - The transaction parameters. + * * `maybe_id` - Optional transfer identifier. + * * # Returns * - * A `Result` containing either a `GetChainspecResult` or a `JsError` in case of an error. - * @param {Verbosity | undefined} [verbosity] - * @param {string | undefined} [rpc_address] - * @returns {Promise} + * A `Result` containing the created `Transaction` or a `JsError` in case of an error. + * @param {URef | undefined} maybe_source + * @param {string} target + * @param {string} amount + * @param {TransactionStrParams} transaction_params + * @param {string | undefined} [maybe_id] + * @returns {Transaction} */ - get_chainspec(verbosity, rpc_address) { - var ptr0 = isLikeNone(rpc_address) ? 0 : passStringToWasm0(rpc_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - var len0 = WASM_VECTOR_LEN; - const ret = wasm.sdk_get_chainspec(this.__wbg_ptr, isLikeNone(verbosity) ? 3 : verbosity, ptr0, len0); + make_transfer_transaction(maybe_source, target, amount, transaction_params, maybe_id) { + let ptr0 = 0; + if (!isLikeNone(maybe_source)) { + _assertClass(maybe_source, URef); + ptr0 = maybe_source.__destroy_into_raw(); + } + const ptr1 = passStringToWasm0(target, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + const len1 = WASM_VECTOR_LEN; + const ptr2 = passStringToWasm0(amount, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + const len2 = WASM_VECTOR_LEN; + _assertClass(transaction_params, TransactionStrParams); + var ptr3 = transaction_params.__destroy_into_raw(); + var ptr4 = isLikeNone(maybe_id) ? 0 : passStringToWasm0(maybe_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + var len4 = WASM_VECTOR_LEN; + const ret = wasm.sdk_make_transfer_transaction(this.__wbg_ptr, ptr0, ptr1, len1, ptr2, len2, ptr3, ptr4, len4); + if (ret[2]) { + throw takeFromExternrefTable0(ret[1]); + } + return Transaction.__wrap(ret[0]); + } + /** + * @param {any} options + * @returns {getEraInfoOptions} + */ + get_era_info_options(options) { + const ret = wasm.sdk_get_era_info_options(this.__wbg_ptr, options); + if (ret[2]) { + throw takeFromExternrefTable0(ret[1]); + } + return getEraInfoOptions.__wrap(ret[0]); + } + /** + * @param {getEraInfoOptions | undefined} [options] + * @returns {Promise} + */ + get_era_info(options) { + let ptr0 = 0; + if (!isLikeNone(options)) { + _assertClass(options, getEraInfoOptions); + ptr0 = options.__destroy_into_raw(); + } + const ret = wasm.sdk_get_era_info(this.__wbg_ptr, ptr0); return ret; } /** - * @param {Verbosity | undefined} [verbosity] - * @param {string | undefined} [rpc_address] - * @returns {Promise} + * @param {getEraInfoOptions | undefined} [options] + * @returns {Promise} */ - info_get_chainspec(verbosity, rpc_address) { - var ptr0 = isLikeNone(rpc_address) ? 0 : passStringToWasm0(rpc_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - var len0 = WASM_VECTOR_LEN; - const ret = wasm.sdk_info_get_chainspec(this.__wbg_ptr, isLikeNone(verbosity) ? 3 : verbosity, ptr0, len0); + chain_get_era_info_by_switch_block(options) { + let ptr0 = 0; + if (!isLikeNone(options)) { + _assertClass(options, getEraInfoOptions); + ptr0 = options.__destroy_into_raw(); + } + const ret = wasm.sdk_chain_get_era_info_by_switch_block(this.__wbg_ptr, ptr0); return ret; } /** - * Retrieves node status information using the provided options. + * JS function for transferring funds. * * # Arguments * - * * `verbosity` - An optional `Verbosity` level for controlling the output verbosity. - * * `rpc_address` - An optional string specifying the rpc address to use for the request. + * * `amount` - The amount to transfer. + * * `target_account` - The target account. + * * `transfer_id` - An optional transfer ID (defaults to a random number). + * * `deploy_params` - The deployment parameters. + * * `payment_params` - The payment parameters. + * * `verbosity` - The verbosity level for logging (optional). + * * `rpc_address` - The address of the node to connect to (optional). * * # Returns * - * A `Result` containing either a `GetNodeStatusResult` or a `JsError` in case of an error. - * - * # Errors - * - * Returns a `JsError` if there is an error during the retrieval process. + * A `Result` containing the result of the transfer or a `JsError` in case of an error. + * @param {string} amount + * @param {string} target_account + * @param {string | undefined} transfer_id + * @param {DeployStrParams} deploy_params + * @param {PaymentStrParams} payment_params * @param {Verbosity | undefined} [verbosity] * @param {string | undefined} [rpc_address] - * @returns {Promise} + * @returns {Promise} */ - get_node_status(verbosity, rpc_address) { - var ptr0 = isLikeNone(rpc_address) ? 0 : passStringToWasm0(rpc_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - var len0 = WASM_VECTOR_LEN; - const ret = wasm.sdk_get_node_status(this.__wbg_ptr, isLikeNone(verbosity) ? 3 : verbosity, ptr0, len0); + transfer(amount, target_account, transfer_id, deploy_params, payment_params, verbosity, rpc_address) { + const ptr0 = passStringToWasm0(amount, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + const len0 = WASM_VECTOR_LEN; + const ptr1 = passStringToWasm0(target_account, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + const len1 = WASM_VECTOR_LEN; + var ptr2 = isLikeNone(transfer_id) ? 0 : passStringToWasm0(transfer_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + var len2 = WASM_VECTOR_LEN; + _assertClass(deploy_params, DeployStrParams); + var ptr3 = deploy_params.__destroy_into_raw(); + _assertClass(payment_params, PaymentStrParams); + var ptr4 = payment_params.__destroy_into_raw(); + var ptr5 = isLikeNone(rpc_address) ? 0 : passStringToWasm0(rpc_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + var len5 = WASM_VECTOR_LEN; + const ret = wasm.sdk_transfer(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, ptr4, isLikeNone(verbosity) ? 3 : verbosity, ptr5, len5); return ret; } /** - * @param {Verbosity | undefined} [verbosity] - * @param {string | undefined} [rpc_address] - * @returns {Promise} + * @param {any} options + * @returns {getEntityOptions} */ - info_get_status(verbosity, rpc_address) { - var ptr0 = isLikeNone(rpc_address) ? 0 : passStringToWasm0(rpc_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - var len0 = WASM_VECTOR_LEN; - const ret = wasm.sdk_info_get_status(this.__wbg_ptr, isLikeNone(verbosity) ? 3 : verbosity, ptr0, len0); - return ret; + get_entity_options(options) { + const ret = wasm.sdk_get_entity_options(this.__wbg_ptr, options); + if (ret[2]) { + throw takeFromExternrefTable0(ret[1]); + } + return getEntityOptions.__wrap(ret[0]); } /** - * Retrieves peers asynchronously. + * Retrieves entity information using the provided options. + * + * This function is an asynchronous JavaScript binding for the Rust `get_entity` method. * * # Arguments * - * * `verbosity` - Optional verbosity level. - * * `rpc_address` - Optional rpc address. + * * `options` - An optional `GetEntityOptions` struct containing retrieval options, such as: + * - `entity_identifier`: Identifier for the entity. + * - `entity_identifier_as_string`: String representation of the entity identifier. + * - `maybe_block_id_as_string`: Optional string representation of the block ID. + * - `maybe_block_identifier`: Optional `BlockIdentifierInput` for specifying the block. + * - `verbosity`: Verbosity level for the output. + * - `rpc_address`: Address of the node to query. * * # Returns * - * A `Result` containing `GetPeersResult` or a `JsError` if an error occurs. - * @param {Verbosity | undefined} [verbosity] - * @param {string | undefined} [rpc_address] - * @returns {Promise} + * A `Result` containing either a `GetAddressableEntityResult` on success or a `JsError` on failure. + * + * # Errors + * + * Returns a `JsError` if there is an error during the retrieval process, such as issues with the provided options or network errors. + * ``` + * @param {getEntityOptions | undefined} [options] + * @returns {Promise} */ - get_peers(verbosity, rpc_address) { - var ptr0 = isLikeNone(rpc_address) ? 0 : passStringToWasm0(rpc_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - var len0 = WASM_VECTOR_LEN; - const ret = wasm.sdk_get_peers(this.__wbg_ptr, isLikeNone(verbosity) ? 3 : verbosity, ptr0, len0); + get_entity(options) { + let ptr0 = 0; + if (!isLikeNone(options)) { + _assertClass(options, getEntityOptions); + ptr0 = options.__destroy_into_raw(); + } + const ret = wasm.sdk_get_entity(this.__wbg_ptr, ptr0); return ret; } /** - * @param {Verbosity | undefined} [verbosity] - * @param {string | undefined} [rpc_address] - * @returns {Promise} + * @param {getEntityOptions | undefined} [options] + * @returns {Promise} */ - info_get_peers(verbosity, rpc_address) { - var ptr0 = isLikeNone(rpc_address) ? 0 : passStringToWasm0(rpc_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - var len0 = WASM_VECTOR_LEN; - const ret = wasm.sdk_info_get_peers(this.__wbg_ptr, isLikeNone(verbosity) ? 3 : verbosity, ptr0, len0); + state_get_entity(options) { + let ptr0 = 0; + if (!isLikeNone(options)) { + _assertClass(options, getEntityOptions); + ptr0 = options.__destroy_into_raw(); + } + const ret = wasm.sdk_state_get_entity(this.__wbg_ptr, ptr0); return ret; } /** - * Retrieves validator changes using the provided options. + * Puts a transaction using the provided options. * * # Arguments * + * * `transaction` - The `Transaction` object to be sent. * * `verbosity` - An optional `Verbosity` level for controlling the output verbosity. * * `rpc_address` - An optional string specifying the rpc address to use for the request. * * # Returns * - * A `Result` containing either a `GetValidatorChangesResult` or a `JsError` in case of an error. + * A `Result` containing either a `PutTransactionResult` or a `JsError` in case of an error. * * # Errors * - * Returns a `JsError` if there is an error during the retrieval process. + * Returns a `JsError` if there is an error during the transaction process. + * @param {Transaction} transaction * @param {Verbosity | undefined} [verbosity] * @param {string | undefined} [rpc_address] - * @returns {Promise} + * @returns {Promise} */ - get_validator_changes(verbosity, rpc_address) { - var ptr0 = isLikeNone(rpc_address) ? 0 : passStringToWasm0(rpc_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - var len0 = WASM_VECTOR_LEN; - const ret = wasm.sdk_get_validator_changes(this.__wbg_ptr, isLikeNone(verbosity) ? 3 : verbosity, ptr0, len0); + put_transaction(transaction, verbosity, rpc_address) { + _assertClass(transaction, Transaction); + var ptr0 = transaction.__destroy_into_raw(); + var ptr1 = isLikeNone(rpc_address) ? 0 : passStringToWasm0(rpc_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + var len1 = WASM_VECTOR_LEN; + const ret = wasm.sdk_put_transaction(this.__wbg_ptr, ptr0, isLikeNone(verbosity) ? 3 : verbosity, ptr1, len1); return ret; } /** + * JavaScript Alias for `put_transaction`. + * @param {Transaction} transaction * @param {Verbosity | undefined} [verbosity] * @param {string | undefined} [rpc_address] - * @returns {Promise} + * @returns {Promise} */ - info_get_validator_change(verbosity, rpc_address) { - var ptr0 = isLikeNone(rpc_address) ? 0 : passStringToWasm0(rpc_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - var len0 = WASM_VECTOR_LEN; - const ret = wasm.sdk_info_get_validator_change(this.__wbg_ptr, isLikeNone(verbosity) ? 3 : verbosity, ptr0, len0); + account_put_transaction(transaction, verbosity, rpc_address) { + _assertClass(transaction, Transaction); + var ptr0 = transaction.__destroy_into_raw(); + var ptr1 = isLikeNone(rpc_address) ? 0 : passStringToWasm0(rpc_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + var len1 = WASM_VECTOR_LEN; + const ret = wasm.sdk_account_put_transaction(this.__wbg_ptr, ptr0, isLikeNone(verbosity) ? 3 : verbosity, ptr1, len1); return ret; } /** - * Lists available RPCs using the provided options. + * Parses query balance options from a JsValue. * * # Arguments * - * * `verbosity` - An optional `Verbosity` level for controlling the output verbosity. - * * `rpc_address` - An optional string specifying the rpc address to use for the request. + * * `options` - A JsValue containing query balance options to be parsed. * * # Returns * - * A `Result` containing either a `ListRpcsResult` or a `JsError` in case of an error. - * - * # Errors - * - * Returns a `JsError` if there is an error during the listing process. - * @param {Verbosity | undefined} [verbosity] - * @param {string | undefined} [rpc_address] - * @returns {Promise} + * Parsed query balance options as a `QueryBalanceDetailsOptions` struct. + * @param {any} options + * @returns {queryBalanceDetailsOptions} */ - list_rpcs(verbosity, rpc_address) { - var ptr0 = isLikeNone(rpc_address) ? 0 : passStringToWasm0(rpc_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - var len0 = WASM_VECTOR_LEN; - const ret = wasm.sdk_list_rpcs(this.__wbg_ptr, isLikeNone(verbosity) ? 3 : verbosity, ptr0, len0); - return ret; + query_balance_details_options(options) { + const ret = wasm.sdk_query_balance_details_options(this.__wbg_ptr, options); + if (ret[2]) { + throw takeFromExternrefTable0(ret[1]); + } + return queryBalanceDetailsOptions.__wrap(ret[0]); } /** - * JS function for `make_deploy`. + * Retrieves balance information using the provided options. * * # Arguments * - * * `deploy_params` - The deploy parameters. - * * `session_params` - The session parameters. - * * `payment_params` - The payment parameters. + * * `options` - An optional `QueryBalanceDetailsOptions` struct containing retrieval options. * * # Returns * - * A `Result` containing the created `Deploy` or a `JsError` in case of an error. - * @param {DeployStrParams} deploy_params - * @param {SessionStrParams} session_params - * @param {PaymentStrParams} payment_params - * @returns {Deploy} - */ - make_deploy(deploy_params, session_params, payment_params) { - _assertClass(deploy_params, DeployStrParams); - var ptr0 = deploy_params.__destroy_into_raw(); - _assertClass(session_params, SessionStrParams); - var ptr1 = session_params.__destroy_into_raw(); - _assertClass(payment_params, PaymentStrParams); - var ptr2 = payment_params.__destroy_into_raw(); - const ret = wasm.sdk_make_deploy(this.__wbg_ptr, ptr0, ptr1, ptr2); - if (ret[2]) { - throw takeFromExternrefTable0(ret[1]); - } - return Deploy.__wrap(ret[0]); - } - /** - * JS function for `sign_deploy`. - * - * # Arguments - * - * * `deploy` - The deploy to sign. - * * `secret_key` - The secret key for signing. + * A `Result` containing either a `QueryBalanceDetailsResult` or a `JsError` in case of an error. * - * # Returns + * # Errors * - * The signed `Deploy`. - * @param {Deploy} deploy - * @param {string} secret_key - * @returns {Deploy} + * Returns a `JsError` if there is an error during the retrieval process. + * @param {queryBalanceDetailsOptions | undefined} [options] + * @returns {Promise} */ - sign_deploy(deploy, secret_key) { - _assertClass(deploy, Deploy); - var ptr0 = deploy.__destroy_into_raw(); - const ptr1 = passStringToWasm0(secret_key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - const len1 = WASM_VECTOR_LEN; - const ret = wasm.sdk_sign_deploy(this.__wbg_ptr, ptr0, ptr1, len1); - return Deploy.__wrap(ret); + query_balance_details(options) { + let ptr0 = 0; + if (!isLikeNone(options)) { + _assertClass(options, queryBalanceDetailsOptions); + ptr0 = options.__destroy_into_raw(); + } + const ret = wasm.sdk_query_balance_details(this.__wbg_ptr, ptr0); + return ret; } /** - * JS function for `make_transaction`. + * Parses query global state options from a JsValue. * * # Arguments * - * * `builder_params` - Transaction Builder parameters. - * * `transaction_params` - The transaction parameters. + * * `options` - A JsValue containing query global state options to be parsed. * * # Returns * - * A `Result` containing the created `Transaction` or a `JsError` in case of an error. - * @param {TransactionBuilderParams} builder_params - * @param {TransactionStrParams} transaction_params - * @returns {Transaction} + * Parsed query global state options as a `QueryGlobalStateOptions` struct. + * @param {any} options + * @returns {queryGlobalStateOptions} */ - make_transaction(builder_params, transaction_params) { - _assertClass(builder_params, TransactionBuilderParams); - var ptr0 = builder_params.__destroy_into_raw(); - _assertClass(transaction_params, TransactionStrParams); - var ptr1 = transaction_params.__destroy_into_raw(); - const ret = wasm.sdk_make_transaction(this.__wbg_ptr, ptr0, ptr1); + query_global_state_options(options) { + const ret = wasm.sdk_query_global_state_options(this.__wbg_ptr, options); if (ret[2]) { throw takeFromExternrefTable0(ret[1]); } - return Transaction.__wrap(ret[0]); + return queryGlobalStateOptions.__wrap(ret[0]); } /** - * JS function for `sign_transaction`. + * Retrieves global state information using the provided options. * * # Arguments * - * * `transaction` - The transaction to sign. - * * `secret_key` - The secret key for signing. + * * `options` - An optional `QueryGlobalStateOptions` struct containing retrieval options. * * # Returns * - * The signed `Transaction`. - * @param {Transaction} transaction - * @param {string} secret_key - * @returns {Transaction} - */ - sign_transaction(transaction, secret_key) { - _assertClass(transaction, Transaction); - var ptr0 = transaction.__destroy_into_raw(); - const ptr1 = passStringToWasm0(secret_key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - const len1 = WASM_VECTOR_LEN; - const ret = wasm.sdk_sign_transaction(this.__wbg_ptr, ptr0, ptr1, len1); - return Transaction.__wrap(ret); - } - /** - * Deserialize query_contract_key_options from a JavaScript object. - * @param {any} options - * @returns {queryContractKeyOptions} - */ - query_contract_key_options(options) { - const ret = wasm.sdk_query_contract_key_options(this.__wbg_ptr, options); - if (ret[2]) { - throw takeFromExternrefTable0(ret[1]); - } - return queryContractKeyOptions.__wrap(ret[0]); - } - /** - * JavaScript function for query_contract_key with deserialized options. - * @param {queryContractKeyOptions | undefined} [options] + * A `Result` containing either a `QueryGlobalStateResult` or a `JsError` in case of an error. + * + * # Errors + * + * Returns a `JsError` if there is an error during the retrieval process. + * @param {queryGlobalStateOptions | undefined} [options] * @returns {Promise} */ - query_contract_key(options) { + query_global_state(options) { let ptr0 = 0; if (!isLikeNone(options)) { - _assertClass(options, queryContractKeyOptions); + _assertClass(options, queryGlobalStateOptions); ptr0 = options.__destroy_into_raw(); } - const ret = wasm.sdk_query_contract_key(this.__wbg_ptr, ptr0); + const ret = wasm.sdk_query_global_state(this.__wbg_ptr, ptr0); return ret; } /** - * Parses state root hash options from a JsValue. + * Installs a smart contract with the specified parameters and returns the result. * * # Arguments - * - * * `options` - A JsValue containing state root hash options to be parsed. + *. + * * `transaction_params` - Transaction parameters. + * * `transaction_bytes` - Transaction Bytes to install + * * `rpc_address` - An optional rpc address to send the request to. * * # Returns * - * Parsed state root hash options as a `GetStateRootHashOptions` struct. - * @param {any} options - * @returns {getStateRootHashOptions} + * A `Result` containing either a `PutTransactionResult` or a `JsError` in case of an error. + * + * # Errors + * + * Returns a `JsError` if there is an error during the installation. + * @param {TransactionStrParams} transaction_params + * @param {Bytes} transaction_bytes + * @param {string | undefined} [rpc_address] + * @returns {Promise} */ - get_state_root_hash_options(options) { - const ret = wasm.sdk_get_state_root_hash_options(this.__wbg_ptr, options); - if (ret[2]) { - throw takeFromExternrefTable0(ret[1]); - } - return getStateRootHashOptions.__wrap(ret[0]); + install(transaction_params, transaction_bytes, rpc_address) { + _assertClass(transaction_params, TransactionStrParams); + var ptr0 = transaction_params.__destroy_into_raw(); + _assertClass(transaction_bytes, Bytes); + var ptr1 = transaction_bytes.__destroy_into_raw(); + var ptr2 = isLikeNone(rpc_address) ? 0 : passStringToWasm0(rpc_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + var len2 = WASM_VECTOR_LEN; + const ret = wasm.sdk_install(this.__wbg_ptr, ptr0, ptr1, ptr2, len2); + return ret; } /** - * Retrieves state root hash information using the provided options. + * Installs a smart contract with the specified parameters and returns the result. * * # Arguments * - * * `options` - An optional `GetStateRootHashOptions` struct containing retrieval options. + * * `deploy_params` - The deploy parameters. + * * `session_params` - The session parameters. + * * `payment_amount` - The payment amount as a string. + * * `rpc_address` - An optional rpc address to send the request to. * * # Returns * - * A `Result` containing either a `GetStateRootHashResult` or a `JsError` in case of an error. + * A `Result` containing either a `PutDeployResult` or a `JsError` in case of an error. * * # Errors * - * Returns a `JsError` if there is an error during the retrieval process. - * @param {getStateRootHashOptions | undefined} [options] - * @returns {Promise} + * Returns a `JsError` if there is an error during the installation. + * @param {DeployStrParams} deploy_params + * @param {SessionStrParams} session_params + * @param {string} payment_amount + * @param {string | undefined} [rpc_address] + * @returns {Promise} */ - get_state_root_hash(options) { - let ptr0 = 0; - if (!isLikeNone(options)) { - _assertClass(options, getStateRootHashOptions); - ptr0 = options.__destroy_into_raw(); - } - const ret = wasm.sdk_get_state_root_hash(this.__wbg_ptr, ptr0); + install_deploy(deploy_params, session_params, payment_amount, rpc_address) { + _assertClass(deploy_params, DeployStrParams); + var ptr0 = deploy_params.__destroy_into_raw(); + _assertClass(session_params, SessionStrParams); + var ptr1 = session_params.__destroy_into_raw(); + const ptr2 = passStringToWasm0(payment_amount, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + const len2 = WASM_VECTOR_LEN; + var ptr3 = isLikeNone(rpc_address) ? 0 : passStringToWasm0(rpc_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + var len3 = WASM_VECTOR_LEN; + const ret = wasm.sdk_install_deploy(this.__wbg_ptr, ptr0, ptr1, ptr2, len2, ptr3, len3); return ret; } /** - * Retrieves state root hash information using the provided options (alias for `get_state_root_hash`). + * This function allows executing a deploy speculatively. * * # Arguments * - * * `options` - An optional `GetStateRootHashOptions` struct containing retrieval options. + * * `deploy_params` - Deployment parameters for the deploy. + * * `session_params` - Session parameters for the deploy. + * * `payment_params` - Payment parameters for the deploy. + * * `verbosity` - Optional verbosity level. + * * `rpc_address` - Optional rpc address. * * # Returns * - * A `Result` containing either a `GetStateRootHashResult` or a `JsError` in case of an error. - * - * # Errors - * - * Returns a `JsError` if there is an error during the retrieval process. - * @param {getStateRootHashOptions | undefined} [options] - * @returns {Promise} + * A `Result` containing either a `SpeculativeExecResult` or a `JsError` in case of an error. + * @param {DeployStrParams} deploy_params + * @param {SessionStrParams} session_params + * @param {PaymentStrParams} payment_params + * @param {Verbosity | undefined} [verbosity] + * @param {string | undefined} [rpc_address] + * @returns {Promise} */ - chain_get_state_root_hash(options) { - let ptr0 = 0; - if (!isLikeNone(options)) { - _assertClass(options, getStateRootHashOptions); - ptr0 = options.__destroy_into_raw(); - } - const ret = wasm.sdk_chain_get_state_root_hash(this.__wbg_ptr, ptr0); + speculative_deploy(deploy_params, session_params, payment_params, verbosity, rpc_address) { + _assertClass(deploy_params, DeployStrParams); + var ptr0 = deploy_params.__destroy_into_raw(); + _assertClass(session_params, SessionStrParams); + var ptr1 = session_params.__destroy_into_raw(); + _assertClass(payment_params, PaymentStrParams); + var ptr2 = payment_params.__destroy_into_raw(); + var ptr3 = isLikeNone(rpc_address) ? 0 : passStringToWasm0(rpc_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + var len3 = WASM_VECTOR_LEN; + const ret = wasm.sdk_speculative_deploy(this.__wbg_ptr, ptr0, ptr1, ptr2, isLikeNone(verbosity) ? 3 : verbosity, ptr3, len3); return ret; } /** - * Creates a new Watcher instance to watch deploys (JavaScript-friendly). - * Legacy alias + * Parses block transfers options from a JsValue. * * # Arguments * - * * `events_url` - The URL to monitor for transaction events. - * * `timeout_duration` - An optional timeout duration in seconds. + * * `options` - A JsValue containing block transfers options to be parsed. * * # Returns * - * A `Watcher` instance. - * @param {string} events_url - * @param {number | undefined} [timeout_duration] - * @returns {Watcher} + * Parsed block transfers options as a `GetBlockTransfersOptions` struct. + * @param {any} options + * @returns {getBlockTransfersOptions} */ - watchDeploy(events_url, timeout_duration) { - const ptr0 = passStringToWasm0(events_url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - const len0 = WASM_VECTOR_LEN; - const ret = wasm.sdk_watchDeploy(this.__wbg_ptr, ptr0, len0, !isLikeNone(timeout_duration), isLikeNone(timeout_duration) ? 0 : timeout_duration); - return Watcher.__wrap(ret); + get_block_transfers_options(options) { + const ret = wasm.sdk_get_block_transfers_options(this.__wbg_ptr, options); + if (ret[2]) { + throw takeFromExternrefTable0(ret[1]); + } + return getBlockTransfersOptions.__wrap(ret[0]); } /** - * Creates a new Watcher instance to watch deploys (JavaScript-friendly). + * Retrieves block transfers information using the provided options. * * # Arguments * - * * `events_url` - The URL to monitor for transaction events. - * * `timeout_duration` - An optional timeout duration in seconds. + * * `options` - An optional `GetBlockTransfersOptions` struct containing retrieval options. * * # Returns * - * A `Watcher` instance. - * @param {string} events_url - * @param {number | undefined} [timeout_duration] - * @returns {Watcher} - */ - watchTransaction(events_url, timeout_duration) { - const ptr0 = passStringToWasm0(events_url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - const len0 = WASM_VECTOR_LEN; - const ret = wasm.sdk_watchTransaction(this.__wbg_ptr, ptr0, len0, !isLikeNone(timeout_duration), isLikeNone(timeout_duration) ? 0 : timeout_duration); - return Watcher.__wrap(ret); - } - /** - * Waits for a deploy event to be processed asynchronously (JavaScript-friendly). - * Legacy alias - * - * # Arguments - * - * * `events_url` - The URL to monitor for transaction events. - * * `deploy_hash` - The deploy hash to wait for. - * * `timeout_duration` - An optional timeout duration in seconds. - * - * # Returns - * - * A JavaScript `Promise` resolving to either the processed `EventParseResult` or an error message. - * @param {string} events_url - * @param {string} deploy_hash - * @param {number | undefined} [timeout_duration] - * @returns {Promise>} - */ - waitDeploy(events_url, deploy_hash, timeout_duration) { - const ptr0 = passStringToWasm0(events_url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - const len0 = WASM_VECTOR_LEN; - const ptr1 = passStringToWasm0(deploy_hash, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - const len1 = WASM_VECTOR_LEN; - const ret = wasm.sdk_waitDeploy(this.__wbg_ptr, ptr0, len0, ptr1, len1, !isLikeNone(timeout_duration), isLikeNone(timeout_duration) ? 0 : timeout_duration); - return ret; - } - /** - * Waits for a deploy event to be processed asynchronously (JavaScript-friendly). - * - * # Arguments - * - * * `events_url` - The URL to monitor for transaction events. - * * `target_hash` - The transaction hash to wait for. - * * `timeout_duration` - An optional timeout duration in seconds. - * - * # Returns - * - * A JavaScript `Promise` resolving to either the processed `EventParseResult` or an error message. - * @param {string} events_url - * @param {string} target_hash - * @param {number | undefined} [timeout_duration] - * @returns {Promise>} - */ - waitTransaction(events_url, target_hash, timeout_duration) { - const ptr0 = passStringToWasm0(events_url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - const len0 = WASM_VECTOR_LEN; - const ptr1 = passStringToWasm0(target_hash, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - const len1 = WASM_VECTOR_LEN; - const ret = wasm.sdk_waitTransaction(this.__wbg_ptr, ptr0, len0, ptr1, len1, !isLikeNone(timeout_duration), isLikeNone(timeout_duration) ? 0 : timeout_duration); - return ret; - } - /** - * JavaScript function for deploying with deserialized parameters. - * - * # Arguments - * - * * `deploy_params` - Deploy parameters. - * * `session_params` - Session parameters. - * * `payment_params` - Payment parameters. - * * `verbosity` - An optional verbosity level. - * * `rpc_address` - An optional rpc address. - * - * # Returns - * - * A result containing PutDeployResult or a JsError. - * @param {DeployStrParams} deploy_params - * @param {SessionStrParams} session_params - * @param {PaymentStrParams} payment_params - * @param {Verbosity | undefined} [verbosity] - * @param {string | undefined} [rpc_address] - * @returns {Promise} - */ - deploy(deploy_params, session_params, payment_params, verbosity, rpc_address) { - _assertClass(deploy_params, DeployStrParams); - var ptr0 = deploy_params.__destroy_into_raw(); - _assertClass(session_params, SessionStrParams); - var ptr1 = session_params.__destroy_into_raw(); - _assertClass(payment_params, PaymentStrParams); - var ptr2 = payment_params.__destroy_into_raw(); - var ptr3 = isLikeNone(rpc_address) ? 0 : passStringToWasm0(rpc_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - var len3 = WASM_VECTOR_LEN; - const ret = wasm.sdk_deploy(this.__wbg_ptr, ptr0, ptr1, ptr2, isLikeNone(verbosity) ? 3 : verbosity, ptr3, len3); - return ret; - } - /** - * JS function for speculative transfer. - * - * # Arguments - * - * * `amount` - The amount to transfer. - * * `target_account` - The target account. - * * `transfer_id` - An optional transfer ID (defaults to a random number). - * * `deploy_params` - The deployment parameters. - * * `payment_params` - The payment parameters. - * * `verbosity` - The verbosity level for logging (optional). - * * `rpc_address` - The address of the node to connect to (optional). - * - * # Returns - * - * A `Result` containing the result of the speculative transfer or a `JsError` in case of an error. - * @param {string} amount - * @param {string} target_account - * @param {string | undefined} transfer_id - * @param {DeployStrParams} deploy_params - * @param {PaymentStrParams} payment_params - * @param {Verbosity | undefined} [verbosity] - * @param {string | undefined} [rpc_address] - * @returns {Promise} - */ - speculative_transfer(amount, target_account, transfer_id, deploy_params, payment_params, verbosity, rpc_address) { - const ptr0 = passStringToWasm0(amount, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - const len0 = WASM_VECTOR_LEN; - const ptr1 = passStringToWasm0(target_account, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - const len1 = WASM_VECTOR_LEN; - var ptr2 = isLikeNone(transfer_id) ? 0 : passStringToWasm0(transfer_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - var len2 = WASM_VECTOR_LEN; - _assertClass(deploy_params, DeployStrParams); - var ptr3 = deploy_params.__destroy_into_raw(); - _assertClass(payment_params, PaymentStrParams); - var ptr4 = payment_params.__destroy_into_raw(); - var ptr5 = isLikeNone(rpc_address) ? 0 : passStringToWasm0(rpc_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - var len5 = WASM_VECTOR_LEN; - const ret = wasm.sdk_speculative_transfer(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, ptr4, isLikeNone(verbosity) ? 3 : verbosity, ptr5, len5); - return ret; - } - /** - * Parses deploy options from a JsValue. - * - * # Arguments - * - * * `options` - A JsValue containing deploy options to be parsed. - * - * # Returns - * - * Parsed deploy options as a `GetDeployOptions` struct. - * @param {any} options - * @returns {getDeployOptions} - */ - get_deploy_options(options) { - const ret = wasm.sdk_get_deploy_options(this.__wbg_ptr, options); - if (ret[2]) { - throw takeFromExternrefTable0(ret[1]); - } - return getDeployOptions.__wrap(ret[0]); - } - /** - * Retrieves deploy information using the provided options. - * - * # Arguments - * - * * `options` - An optional `GetDeployOptions` struct containing retrieval options. + * A `Result` containing either a `GetBlockTransfersResult` or a `JsError` in case of an error. * - * # Returns + * # Errors * - * A `Result` containing either a `GetDeployResult` or an error. - * @param {getDeployOptions | undefined} [options] - * @returns {Promise} + * Returns a `JsError` if there is an error during the retrieval process. + * @param {getBlockTransfersOptions | undefined} [options] + * @returns {Promise} */ - get_deploy(options) { + get_block_transfers(options) { let ptr0 = 0; if (!isLikeNone(options)) { - _assertClass(options, getDeployOptions); + _assertClass(options, getBlockTransfersOptions); ptr0 = options.__destroy_into_raw(); } - const ret = wasm.sdk_get_deploy(this.__wbg_ptr, ptr0); + const ret = wasm.sdk_get_block_transfers(this.__wbg_ptr, ptr0); return ret; } /** - * Retrieves deploy information using the provided options, alias for `get_deploy`. - * @param {getDeployOptions | undefined} [options] - * @returns {Promise} + * @param {getBlockTransfersOptions | undefined} [options] + * @returns {Promise} */ - info_get_deploy(options) { + chain_get_block_transfers(options) { let ptr0 = 0; if (!isLikeNone(options)) { - _assertClass(options, getDeployOptions); + _assertClass(options, getBlockTransfersOptions); ptr0 = options.__destroy_into_raw(); } - const ret = wasm.sdk_info_get_deploy(this.__wbg_ptr, ptr0); + const ret = wasm.sdk_chain_get_block_transfers(this.__wbg_ptr, ptr0); return ret; } /** - * Parses transaction options from a JsValue. + * Parses query balance options from a JsValue. * * # Arguments * - * * `options` - A JsValue containing transaction options to be parsed. + * * `options` - A JsValue containing query balance options to be parsed. * * # Returns * - * Parsed transaction options as a `GetTransactionOptions` struct. + * Parsed query balance options as a `QueryBalanceOptions` struct. * @param {any} options - * @returns {getTransactionOptions} + * @returns {queryBalanceOptions} */ - get_transaction_options(options) { - const ret = wasm.sdk_get_transaction_options(this.__wbg_ptr, options); + query_balance_options(options) { + const ret = wasm.sdk_query_balance_options(this.__wbg_ptr, options); if (ret[2]) { throw takeFromExternrefTable0(ret[1]); } - return getTransactionOptions.__wrap(ret[0]); + return queryBalanceOptions.__wrap(ret[0]); } /** - * Retrieves transaction information using the provided options. + * Retrieves balance information using the provided options. * * # Arguments * - * * `options` - An optional `GetTransactionOptions` struct containing retrieval options. + * * `options` - An optional `QueryBalanceOptions` struct containing retrieval options. * * # Returns * - * A `Result` containing either a `GetTransactionResult` or an error. - * @param {getTransactionOptions | undefined} [options] - * @returns {Promise} - */ - get_transaction(options) { - let ptr0 = 0; - if (!isLikeNone(options)) { - _assertClass(options, getTransactionOptions); - ptr0 = options.__destroy_into_raw(); - } - const ret = wasm.sdk_get_transaction(this.__wbg_ptr, ptr0); - return ret; - } - /** - * Retrieves transaction information using the provided options, alias for `get_transaction`. - * @param {getTransactionOptions | undefined} [options] - * @returns {Promise} + * A `Result` containing either a `QueryBalanceResult` or a `JsError` in case of an error. + * + * # Errors + * + * Returns a `JsError` if there is an error during the retrieval process. + * @param {queryBalanceOptions | undefined} [options] + * @returns {Promise} */ - info_get_transaction(options) { + query_balance(options) { let ptr0 = 0; if (!isLikeNone(options)) { - _assertClass(options, getTransactionOptions); + _assertClass(options, queryBalanceOptions); ptr0 = options.__destroy_into_raw(); } - const ret = wasm.sdk_info_get_transaction(this.__wbg_ptr, ptr0); + const ret = wasm.sdk_query_balance(this.__wbg_ptr, ptr0); return ret; } /** * Get options for speculative execution from a JavaScript value. * @param {any} options - * @returns {getSpeculativeExecTxnOptions} + * @returns {getSpeculativeExecDeployOptions} */ - get_speculative_exec_options(options) { - const ret = wasm.sdk_get_speculative_exec_options(this.__wbg_ptr, options); + get_speculative_exec_deploy_options(options) { + const ret = wasm.sdk_get_speculative_exec_deploy_options(this.__wbg_ptr, options); if (ret[2]) { throw takeFromExternrefTable0(ret[1]); } - return getSpeculativeExecTxnOptions.__wrap(ret[0]); + return getSpeculativeExecDeployOptions.__wrap(ret[0]); } /** * JS function for speculative execution. @@ -7179,40 +7103,165 @@ class SDK { * # Returns * * A `Result` containing the result of the speculative execution or a `JsError` in case of an error. - * @param {getSpeculativeExecTxnOptions | undefined} [options] - * @returns {Promise} + * @param {getSpeculativeExecDeployOptions | undefined} [options] + * @returns {Promise} */ - speculative_exec(options) { + speculative_exec_deploy(options) { let ptr0 = 0; if (!isLikeNone(options)) { - _assertClass(options, getSpeculativeExecTxnOptions); + _assertClass(options, getSpeculativeExecDeployOptions); ptr0 = options.__destroy_into_raw(); } - const ret = wasm.sdk_speculative_exec(this.__wbg_ptr, ptr0); + const ret = wasm.sdk_speculative_exec_deploy(this.__wbg_ptr, ptr0); return ret; } /** - * JS function for `make_transfer`. + * Calls a smart contract entry point with the specified parameters and returns the result. * * # Arguments * - * * `amount` - The transfer amount. + * * `transaction_params` - Transaction parameters. + * * `builder_params` - Transaction Builder parameters. + * * `rpc_address` - An optional rpc address to send the request to. + * + * # Returns + * + * A `Result` containing either a `PutTransactionResult` or a `JsError` in case of an error. + * + * # Errors + * + * Returns a `JsError` if there is an error during the call. + * @param {TransactionBuilderParams} builder_params + * @param {TransactionStrParams} transaction_params + * @param {string | undefined} [rpc_address] + * @returns {Promise} + */ + call_entrypoint(builder_params, transaction_params, rpc_address) { + _assertClass(builder_params, TransactionBuilderParams); + var ptr0 = builder_params.__destroy_into_raw(); + _assertClass(transaction_params, TransactionStrParams); + var ptr1 = transaction_params.__destroy_into_raw(); + var ptr2 = isLikeNone(rpc_address) ? 0 : passStringToWasm0(rpc_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + var len2 = WASM_VECTOR_LEN; + const ret = wasm.sdk_call_entrypoint(this.__wbg_ptr, ptr0, ptr1, ptr2, len2); + return ret; + } + /** + * @param {string | undefined} [rpc_address] + * @param {string | undefined} [node_address] + * @param {Verbosity | undefined} [verbosity] + */ + constructor(rpc_address, node_address, verbosity) { + var ptr0 = isLikeNone(rpc_address) ? 0 : passStringToWasm0(rpc_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + var len0 = WASM_VECTOR_LEN; + var ptr1 = isLikeNone(node_address) ? 0 : passStringToWasm0(node_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + var len1 = WASM_VECTOR_LEN; + const ret = wasm.sdk_new(ptr0, len0, ptr1, len1, isLikeNone(verbosity) ? 3 : verbosity); + this.__wbg_ptr = ret >>> 0; + SDKFinalization.register(this, this.__wbg_ptr, this); + return this; + } + /** + * @param {string | undefined} [rpc_address] + * @returns {string} + */ + getRPCAddress(rpc_address) { + let deferred2_0; + let deferred2_1; + try { + var ptr0 = isLikeNone(rpc_address) ? 0 : passStringToWasm0(rpc_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + var len0 = WASM_VECTOR_LEN; + const ret = wasm.sdk_getRPCAddress(this.__wbg_ptr, ptr0, len0); + deferred2_0 = ret[0]; + deferred2_1 = ret[1]; + return getStringFromWasm0(ret[0], ret[1]); + } finally { + wasm.__wbindgen_free(deferred2_0, deferred2_1, 1); + } + } + /** + * @param {string | undefined} [rpc_address] + */ + setRPCAddress(rpc_address) { + var ptr0 = isLikeNone(rpc_address) ? 0 : passStringToWasm0(rpc_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + var len0 = WASM_VECTOR_LEN; + const ret = wasm.sdk_setRPCAddress(this.__wbg_ptr, ptr0, len0); + if (ret[1]) { + throw takeFromExternrefTable0(ret[0]); + } + } + /** + * @param {string | undefined} [node_address] + * @returns {string} + */ + getNodeAddress(node_address) { + let deferred2_0; + let deferred2_1; + try { + var ptr0 = isLikeNone(node_address) ? 0 : passStringToWasm0(node_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + var len0 = WASM_VECTOR_LEN; + const ret = wasm.sdk_getNodeAddress(this.__wbg_ptr, ptr0, len0); + deferred2_0 = ret[0]; + deferred2_1 = ret[1]; + return getStringFromWasm0(ret[0], ret[1]); + } finally { + wasm.__wbindgen_free(deferred2_0, deferred2_1, 1); + } + } + /** + * @param {string | undefined} [node_address] + */ + setNodeAddress(node_address) { + var ptr0 = isLikeNone(node_address) ? 0 : passStringToWasm0(node_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + var len0 = WASM_VECTOR_LEN; + const ret = wasm.sdk_setNodeAddress(this.__wbg_ptr, ptr0, len0); + if (ret[1]) { + throw takeFromExternrefTable0(ret[0]); + } + } + /** + * @param {Verbosity | undefined} [verbosity] + * @returns {Verbosity} + */ + getVerbosity(verbosity) { + const ret = wasm.sdk_getVerbosity(this.__wbg_ptr, isLikeNone(verbosity) ? 3 : verbosity); + return ret; + } + /** + * @param {Verbosity | undefined} [verbosity] + */ + setVerbosity(verbosity) { + const ret = wasm.sdk_setVerbosity(this.__wbg_ptr, isLikeNone(verbosity) ? 3 : verbosity); + if (ret[1]) { + throw takeFromExternrefTable0(ret[0]); + } + } + /** + * JS function for speculative transfer. + * + * # Arguments + * + * * `amount` - The amount to transfer. * * `target_account` - The target account. - * * `transfer_id` - Optional transfer identifier. - * * `deploy_params` - The deploy parameters. + * * `transfer_id` - An optional transfer ID (defaults to a random number). + * * `deploy_params` - The deployment parameters. * * `payment_params` - The payment parameters. + * * `verbosity` - The verbosity level for logging (optional). + * * `rpc_address` - The address of the node to connect to (optional). * * # Returns * - * A `Result` containing the created `Deploy` or a `JsError` in case of an error. + * A `Result` containing the result of the speculative transfer or a `JsError` in case of an error. * @param {string} amount * @param {string} target_account * @param {string | undefined} transfer_id * @param {DeployStrParams} deploy_params * @param {PaymentStrParams} payment_params - * @returns {Deploy} + * @param {Verbosity | undefined} [verbosity] + * @param {string | undefined} [rpc_address] + * @returns {Promise} */ - make_transfer(amount, target_account, transfer_id, deploy_params, payment_params) { + speculative_transfer(amount, target_account, transfer_id, deploy_params, payment_params, verbosity, rpc_address) { const ptr0 = passStringToWasm0(amount, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); const len0 = WASM_VECTOR_LEN; const ptr1 = passStringToWasm0(target_account, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); @@ -7223,235 +7272,81 @@ class SDK { var ptr3 = deploy_params.__destroy_into_raw(); _assertClass(payment_params, PaymentStrParams); var ptr4 = payment_params.__destroy_into_raw(); - const ret = wasm.sdk_make_transfer(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, ptr4); - if (ret[2]) { - throw takeFromExternrefTable0(ret[1]); - } - return Deploy.__wrap(ret[0]); + var ptr5 = isLikeNone(rpc_address) ? 0 : passStringToWasm0(rpc_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + var len5 = WASM_VECTOR_LEN; + const ret = wasm.sdk_speculative_transfer(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, ptr4, isLikeNone(verbosity) ? 3 : verbosity, ptr5, len5); + return ret; } /** - * JS function for `make_transfer_transaction`. + * Parses state root hash options from a JsValue. * * # Arguments * - * * `maybe_source` - Optional transfer source uref. - * * `amount` - The transfer amount. - * * `target` - The target account. - * * `transaction_params` - The transaction parameters. - * * `maybe_id` - Optional transfer identifier. + * * `options` - A JsValue containing state root hash options to be parsed. * * # Returns * - * A `Result` containing the created `Transaction` or a `JsError` in case of an error. - * @param {URef | undefined} maybe_source - * @param {string} target - * @param {string} amount - * @param {TransactionStrParams} transaction_params - * @param {string | undefined} [maybe_id] - * @returns {Transaction} + * Parsed state root hash options as a `GetStateRootHashOptions` struct. + * @param {any} options + * @returns {getStateRootHashOptions} */ - make_transfer_transaction(maybe_source, target, amount, transaction_params, maybe_id) { - let ptr0 = 0; - if (!isLikeNone(maybe_source)) { - _assertClass(maybe_source, URef); - ptr0 = maybe_source.__destroy_into_raw(); - } - const ptr1 = passStringToWasm0(target, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - const len1 = WASM_VECTOR_LEN; - const ptr2 = passStringToWasm0(amount, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - const len2 = WASM_VECTOR_LEN; - _assertClass(transaction_params, TransactionStrParams); - var ptr3 = transaction_params.__destroy_into_raw(); - var ptr4 = isLikeNone(maybe_id) ? 0 : passStringToWasm0(maybe_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - var len4 = WASM_VECTOR_LEN; - const ret = wasm.sdk_make_transfer_transaction(this.__wbg_ptr, ptr0, ptr1, len1, ptr2, len2, ptr3, ptr4, len4); + get_state_root_hash_options(options) { + const ret = wasm.sdk_get_state_root_hash_options(this.__wbg_ptr, options); if (ret[2]) { throw takeFromExternrefTable0(ret[1]); } - return Transaction.__wrap(ret[0]); + return getStateRootHashOptions.__wrap(ret[0]); } /** - * Calls a smart contract entry point with the specified parameters and returns the result. + * Retrieves state root hash information using the provided options. * * # Arguments * - * * `deploy_params` - The deploy parameters. - * * `session_params` - The session parameters. - * * `payment_amount` - The payment amount as a string. - * * `rpc_address` - An optional rpc address to send the request to. + * * `options` - An optional `GetStateRootHashOptions` struct containing retrieval options. * * # Returns * - * A `Result` containing either a `PutDeployResult` or a `JsError` in case of an error. + * A `Result` containing either a `GetStateRootHashResult` or a `JsError` in case of an error. * * # Errors * - * Returns a `JsError` if there is an error during the call. - * @param {DeployStrParams} deploy_params - * @param {SessionStrParams} session_params - * @param {string} payment_amount - * @param {string | undefined} [rpc_address] - * @returns {Promise} + * Returns a `JsError` if there is an error during the retrieval process. + * @param {getStateRootHashOptions | undefined} [options] + * @returns {Promise} */ - call_entrypoint_deploy(deploy_params, session_params, payment_amount, rpc_address) { - _assertClass(deploy_params, DeployStrParams); - var ptr0 = deploy_params.__destroy_into_raw(); - _assertClass(session_params, SessionStrParams); - var ptr1 = session_params.__destroy_into_raw(); - const ptr2 = passStringToWasm0(payment_amount, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - const len2 = WASM_VECTOR_LEN; - var ptr3 = isLikeNone(rpc_address) ? 0 : passStringToWasm0(rpc_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - var len3 = WASM_VECTOR_LEN; - const ret = wasm.sdk_call_entrypoint_deploy(this.__wbg_ptr, ptr0, ptr1, ptr2, len2, ptr3, len3); + get_state_root_hash(options) { + let ptr0 = 0; + if (!isLikeNone(options)) { + _assertClass(options, getStateRootHashOptions); + ptr0 = options.__destroy_into_raw(); + } + const ret = wasm.sdk_get_state_root_hash(this.__wbg_ptr, ptr0); return ret; } /** - * Installs a smart contract with the specified parameters and returns the result. + * Retrieves state root hash information using the provided options (alias for `get_state_root_hash`). * * # Arguments - *. - * * `transaction_params` - Transaction parameters. - * * `transaction_bytes` - Transaction Bytes to install - * * `rpc_address` - An optional rpc address to send the request to. + * + * * `options` - An optional `GetStateRootHashOptions` struct containing retrieval options. * * # Returns * - * A `Result` containing either a `PutTransactionResult` or a `JsError` in case of an error. + * A `Result` containing either a `GetStateRootHashResult` or a `JsError` in case of an error. * * # Errors * - * Returns a `JsError` if there is an error during the installation. - * @param {TransactionStrParams} transaction_params - * @param {Bytes} transaction_bytes - * @param {string | undefined} [rpc_address] - * @returns {Promise} + * Returns a `JsError` if there is an error during the retrieval process. + * @param {getStateRootHashOptions | undefined} [options] + * @returns {Promise} */ - install(transaction_params, transaction_bytes, rpc_address) { - _assertClass(transaction_params, TransactionStrParams); - var ptr0 = transaction_params.__destroy_into_raw(); - _assertClass(transaction_bytes, Bytes); - var ptr1 = transaction_bytes.__destroy_into_raw(); - var ptr2 = isLikeNone(rpc_address) ? 0 : passStringToWasm0(rpc_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - var len2 = WASM_VECTOR_LEN; - const ret = wasm.sdk_install(this.__wbg_ptr, ptr0, ptr1, ptr2, len2); - return ret; - } - /** - * @param {any} options - * @returns {getAccountOptions} - */ - get_account_options(options) { - const ret = wasm.sdk_get_account_options(this.__wbg_ptr, options); - if (ret[2]) { - throw takeFromExternrefTable0(ret[1]); - } - return getAccountOptions.__wrap(ret[0]); - } - /** - * Retrieves account information using the provided options. - * - * This function is an asynchronous JavaScript binding for the Rust `get_account` method. - * - * # Arguments - * - * * `options` - An optional `GetAccountOptions` struct containing retrieval options, such as: - * - `account_identifier`: Identifier for the account. - * - `account_identifier_as_string`: String representation of the account identifier. - * - `maybe_block_id_as_string`: Optional string representation of the block ID. - * - `maybe_block_identifier`: Optional `BlockIdentifierInput` for specifying the block. - * - `verbosity`: Verbosity level for the output. - * - `rpc_address`: Address of the node to query. - * - * # Returns - * - * A `Result` containing either a `GetAccountResult` on success or a `JsError` on failure. - * - * # Errors - * - * Returns a `JsError` if there is an error during the retrieval process, such as issues with the provided options or network errors. - * ``` - * @param {getAccountOptions | undefined} [options] - * @returns {Promise} - */ - get_account(options) { - let ptr0 = 0; - if (!isLikeNone(options)) { - _assertClass(options, getAccountOptions); - ptr0 = options.__destroy_into_raw(); - } - const ret = wasm.sdk_get_account(this.__wbg_ptr, ptr0); - return ret; - } - /** - * @param {getAccountOptions | undefined} [options] - * @returns {Promise} - */ - state_get_account_info(options) { - let ptr0 = 0; - if (!isLikeNone(options)) { - _assertClass(options, getAccountOptions); - ptr0 = options.__destroy_into_raw(); - } - const ret = wasm.sdk_state_get_account_info(this.__wbg_ptr, ptr0); - return ret; - } - /** - * Parses era summary options from a JsValue. - * - * # Arguments - * - * * `options` - A JsValue containing era summary options to be parsed. - * - * # Returns - * - * Parsed era summary options as a `GetEraSummaryOptions` struct. - * @param {any} options - * @returns {getEraSummaryOptions} - */ - get_era_summary_options(options) { - const ret = wasm.sdk_get_era_summary_options(this.__wbg_ptr, options); - if (ret[2]) { - throw takeFromExternrefTable0(ret[1]); - } - return getEraSummaryOptions.__wrap(ret[0]); - } - /** - * Retrieves era summary information using the provided options. - * - * # Arguments - * - * * `options` - An optional `GetEraSummaryOptions` struct containing retrieval options. - * - * # Returns - * - * A `Result` containing either a `GetEraSummaryResult` or a `JsError` in case of an error. - * - * # Errors - * - * Returns a `JsError` if there is an error during the retrieval process. - * @param {getEraSummaryOptions | undefined} [options] - * @returns {Promise} - */ - get_era_summary(options) { - let ptr0 = 0; - if (!isLikeNone(options)) { - _assertClass(options, getEraSummaryOptions); - ptr0 = options.__destroy_into_raw(); - } - const ret = wasm.sdk_get_era_summary(this.__wbg_ptr, ptr0); - return ret; - } - /** - * @param {getEraSummaryOptions | undefined} [options] - * @returns {Promise} - */ - chain_get_era_summary(options) { - let ptr0 = 0; - if (!isLikeNone(options)) { - _assertClass(options, getEraSummaryOptions); - ptr0 = options.__destroy_into_raw(); - } - const ret = wasm.sdk_chain_get_era_summary(this.__wbg_ptr, ptr0); + chain_get_state_root_hash(options) { + let ptr0 = 0; + if (!isLikeNone(options)) { + _assertClass(options, getStateRootHashOptions); + ptr0 = options.__destroy_into_raw(); + } + const ret = wasm.sdk_chain_get_state_root_hash(this.__wbg_ptr, ptr0); return ret; } /** @@ -7499,1120 +7394,1224 @@ class SDK { return ret; } /** - * Installs a smart contract with the specified parameters and returns the result. + * This function allows executing a transaction speculatively. * * # Arguments * - * * `deploy_params` - The deploy parameters. - * * `session_params` - The session parameters. - * * `payment_amount` - The payment amount as a string. - * * `rpc_address` - An optional rpc address to send the request to. + * * `builder_params` - Transaction Builder parameters. + * * `transaction_params` - Transactionment parameters for the transaction. + * * `verbosity` - Optional verbosity level. + * * `rpc_address` - Optional rpc address. * * # Returns * - * A `Result` containing either a `PutDeployResult` or a `JsError` in case of an error. - * - * # Errors - * - * Returns a `JsError` if there is an error during the installation. - * @param {DeployStrParams} deploy_params - * @param {SessionStrParams} session_params - * @param {string} payment_amount + * A `Result` containing either a `SpeculativeExecTxnResult` or a `JsError` in case of an error. + * @param {TransactionBuilderParams} builder_params + * @param {TransactionStrParams} transaction_params + * @param {Verbosity | undefined} [verbosity] * @param {string | undefined} [rpc_address] - * @returns {Promise} + * @returns {Promise} */ - install_deploy(deploy_params, session_params, payment_amount, rpc_address) { - _assertClass(deploy_params, DeployStrParams); - var ptr0 = deploy_params.__destroy_into_raw(); - _assertClass(session_params, SessionStrParams); - var ptr1 = session_params.__destroy_into_raw(); - const ptr2 = passStringToWasm0(payment_amount, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - const len2 = WASM_VECTOR_LEN; - var ptr3 = isLikeNone(rpc_address) ? 0 : passStringToWasm0(rpc_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - var len3 = WASM_VECTOR_LEN; - const ret = wasm.sdk_install_deploy(this.__wbg_ptr, ptr0, ptr1, ptr2, len2, ptr3, len3); + speculative_transaction(builder_params, transaction_params, verbosity, rpc_address) { + _assertClass(builder_params, TransactionBuilderParams); + var ptr0 = builder_params.__destroy_into_raw(); + _assertClass(transaction_params, TransactionStrParams); + var ptr1 = transaction_params.__destroy_into_raw(); + var ptr2 = isLikeNone(rpc_address) ? 0 : passStringToWasm0(rpc_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + var len2 = WASM_VECTOR_LEN; + const ret = wasm.sdk_speculative_transaction(this.__wbg_ptr, ptr0, ptr1, isLikeNone(verbosity) ? 3 : verbosity, ptr2, len2); return ret; } /** - * Parses block transfers options from a JsValue. + * Creates a new Watcher instance to watch deploys (JavaScript-friendly). + * Legacy alias * * # Arguments * - * * `options` - A JsValue containing block transfers options to be parsed. + * * `events_url` - The URL to monitor for transaction events. + * * `timeout_duration` - An optional timeout duration in seconds. * * # Returns * - * Parsed block transfers options as a `GetBlockTransfersOptions` struct. - * @param {any} options - * @returns {getBlockTransfersOptions} + * A `Watcher` instance. + * @param {string} events_url + * @param {number | undefined} [timeout_duration] + * @returns {Watcher} */ - get_block_transfers_options(options) { - const ret = wasm.sdk_get_block_transfers_options(this.__wbg_ptr, options); - if (ret[2]) { - throw takeFromExternrefTable0(ret[1]); - } - return getBlockTransfersOptions.__wrap(ret[0]); + watchDeploy(events_url, timeout_duration) { + const ptr0 = passStringToWasm0(events_url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + const len0 = WASM_VECTOR_LEN; + const ret = wasm.sdk_watchDeploy(this.__wbg_ptr, ptr0, len0, !isLikeNone(timeout_duration), isLikeNone(timeout_duration) ? 0 : timeout_duration); + return Watcher.__wrap(ret); } /** - * Retrieves block transfers information using the provided options. + * Creates a new Watcher instance to watch deploys (JavaScript-friendly). * * # Arguments * - * * `options` - An optional `GetBlockTransfersOptions` struct containing retrieval options. + * * `events_url` - The URL to monitor for transaction events. + * * `timeout_duration` - An optional timeout duration in seconds. * * # Returns * - * A `Result` containing either a `GetBlockTransfersResult` or a `JsError` in case of an error. - * - * # Errors - * - * Returns a `JsError` if there is an error during the retrieval process. - * @param {getBlockTransfersOptions | undefined} [options] - * @returns {Promise} - */ - get_block_transfers(options) { - let ptr0 = 0; - if (!isLikeNone(options)) { - _assertClass(options, getBlockTransfersOptions); - ptr0 = options.__destroy_into_raw(); - } - const ret = wasm.sdk_get_block_transfers(this.__wbg_ptr, ptr0); - return ret; - } - /** - * @param {getBlockTransfersOptions | undefined} [options] - * @returns {Promise} + * A `Watcher` instance. + * @param {string} events_url + * @param {number | undefined} [timeout_duration] + * @returns {Watcher} */ - chain_get_block_transfers(options) { - let ptr0 = 0; - if (!isLikeNone(options)) { - _assertClass(options, getBlockTransfersOptions); - ptr0 = options.__destroy_into_raw(); - } - const ret = wasm.sdk_chain_get_block_transfers(this.__wbg_ptr, ptr0); - return ret; + watchTransaction(events_url, timeout_duration) { + const ptr0 = passStringToWasm0(events_url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + const len0 = WASM_VECTOR_LEN; + const ret = wasm.sdk_watchTransaction(this.__wbg_ptr, ptr0, len0, !isLikeNone(timeout_duration), isLikeNone(timeout_duration) ? 0 : timeout_duration); + return Watcher.__wrap(ret); } /** - * Parses query balance options from a JsValue. + * Waits for a deploy event to be processed asynchronously (JavaScript-friendly). + * Legacy alias * * # Arguments * - * * `options` - A JsValue containing query balance options to be parsed. + * * `events_url` - The URL to monitor for transaction events. + * * `deploy_hash` - The deploy hash to wait for. + * * `timeout_duration` - An optional timeout duration in seconds. * * # Returns * - * Parsed query balance options as a `QueryBalanceOptions` struct. - * @param {any} options - * @returns {queryBalanceOptions} + * A JavaScript `Promise` resolving to either the processed `EventParseResult` or an error message. + * @param {string} events_url + * @param {string} deploy_hash + * @param {number | undefined} [timeout_duration] + * @returns {Promise>} */ - query_balance_options(options) { - const ret = wasm.sdk_query_balance_options(this.__wbg_ptr, options); - if (ret[2]) { - throw takeFromExternrefTable0(ret[1]); - } - return queryBalanceOptions.__wrap(ret[0]); + waitDeploy(events_url, deploy_hash, timeout_duration) { + const ptr0 = passStringToWasm0(events_url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + const len0 = WASM_VECTOR_LEN; + const ptr1 = passStringToWasm0(deploy_hash, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + const len1 = WASM_VECTOR_LEN; + const ret = wasm.sdk_waitDeploy(this.__wbg_ptr, ptr0, len0, ptr1, len1, !isLikeNone(timeout_duration), isLikeNone(timeout_duration) ? 0 : timeout_duration); + return ret; } /** - * Retrieves balance information using the provided options. + * Waits for a deploy event to be processed asynchronously (JavaScript-friendly). * * # Arguments * - * * `options` - An optional `QueryBalanceOptions` struct containing retrieval options. + * * `events_url` - The URL to monitor for transaction events. + * * `target_hash` - The transaction hash to wait for. + * * `timeout_duration` - An optional timeout duration in seconds. * * # Returns * - * A `Result` containing either a `QueryBalanceResult` or a `JsError` in case of an error. - * - * # Errors - * - * Returns a `JsError` if there is an error during the retrieval process. - * @param {queryBalanceOptions | undefined} [options] - * @returns {Promise} + * A JavaScript `Promise` resolving to either the processed `EventParseResult` or an error message. + * @param {string} events_url + * @param {string} target_hash + * @param {number | undefined} [timeout_duration] + * @returns {Promise>} */ - query_balance(options) { - let ptr0 = 0; - if (!isLikeNone(options)) { - _assertClass(options, queryBalanceOptions); - ptr0 = options.__destroy_into_raw(); - } - const ret = wasm.sdk_query_balance(this.__wbg_ptr, ptr0); + waitTransaction(events_url, target_hash, timeout_duration) { + const ptr0 = passStringToWasm0(events_url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + const len0 = WASM_VECTOR_LEN; + const ptr1 = passStringToWasm0(target_hash, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + const len1 = WASM_VECTOR_LEN; + const ret = wasm.sdk_waitTransaction(this.__wbg_ptr, ptr0, len0, ptr1, len1, !isLikeNone(timeout_duration), isLikeNone(timeout_duration) ? 0 : timeout_duration); return ret; } /** - * Get options for speculative execution from a JavaScript value. - * @param {any} options - * @returns {getSpeculativeExecDeployOptions} + * @param {string | undefined} [node_address] + * @returns {Promise} */ - get_speculative_exec_deploy_options(options) { - const ret = wasm.sdk_get_speculative_exec_deploy_options(this.__wbg_ptr, options); - if (ret[2]) { - throw takeFromExternrefTable0(ret[1]); - } - return getSpeculativeExecDeployOptions.__wrap(ret[0]); + get_binary_latest_switch_block_header(node_address) { + var ptr0 = isLikeNone(node_address) ? 0 : passStringToWasm0(node_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + var len0 = WASM_VECTOR_LEN; + const ret = wasm.sdk_get_binary_latest_switch_block_header(this.__wbg_ptr, ptr0, len0); + return ret; } /** - * JS function for speculative execution. - * - * # Arguments - * - * * `options` - The options for speculative execution. - * - * # Returns - * - * A `Result` containing the result of the speculative execution or a `JsError` in case of an error. - * @param {getSpeculativeExecDeployOptions | undefined} [options] - * @returns {Promise} + * @param {string | undefined} [node_address] + * @returns {Promise} */ - speculative_exec_deploy(options) { - let ptr0 = 0; - if (!isLikeNone(options)) { - _assertClass(options, getSpeculativeExecDeployOptions); - ptr0 = options.__destroy_into_raw(); - } - const ret = wasm.sdk_speculative_exec_deploy(this.__wbg_ptr, ptr0); + get_binary_latest_block_header(node_address) { + var ptr0 = isLikeNone(node_address) ? 0 : passStringToWasm0(node_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + var len0 = WASM_VECTOR_LEN; + const ret = wasm.sdk_get_binary_latest_block_header(this.__wbg_ptr, ptr0, len0); return ret; } /** - * JS function for transaction transferring funds. - * - * # Arguments - * - * * `maybe_source` - Optional transfer source uref. - * * `target_account` - The target account. - * * `amount` - The amount to transfer. - * * `transaction_params` - The transaction parameters. - * * `maybe_id` - An optional transfer ID (defaults to a random number). - * * `verbosity` - The verbosity level for logging (optional). - * * `rpc_address` - The address of the node to connect to (optional). - * - * # Returns - * - * A `Result` containing the result of the transfer or a `JsError` in case of an error. - * @param {URef | undefined} maybe_source - * @param {string} target_account - * @param {string} amount - * @param {TransactionStrParams} transaction_params - * @param {string | undefined} [maybe_id] - * @param {Verbosity | undefined} [verbosity] - * @param {string | undefined} [rpc_address] - * @returns {Promise} + * @param {string | undefined} node_address + * @param {bigint} height + * @returns {Promise} */ - transfer_transaction(maybe_source, target_account, amount, transaction_params, maybe_id, verbosity, rpc_address) { - let ptr0 = 0; - if (!isLikeNone(maybe_source)) { - _assertClass(maybe_source, URef); - ptr0 = maybe_source.__destroy_into_raw(); - } - const ptr1 = passStringToWasm0(target_account, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - const len1 = WASM_VECTOR_LEN; - const ptr2 = passStringToWasm0(amount, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - const len2 = WASM_VECTOR_LEN; - _assertClass(transaction_params, TransactionStrParams); - var ptr3 = transaction_params.__destroy_into_raw(); - var ptr4 = isLikeNone(maybe_id) ? 0 : passStringToWasm0(maybe_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - var len4 = WASM_VECTOR_LEN; - var ptr5 = isLikeNone(rpc_address) ? 0 : passStringToWasm0(rpc_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - var len5 = WASM_VECTOR_LEN; - const ret = wasm.sdk_transfer_transaction(this.__wbg_ptr, ptr0, ptr1, len1, ptr2, len2, ptr3, ptr4, len4, isLikeNone(verbosity) ? 3 : verbosity, ptr5, len5); + get_binary_block_header_by_height(node_address, height) { + var ptr0 = isLikeNone(node_address) ? 0 : passStringToWasm0(node_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + var len0 = WASM_VECTOR_LEN; + const ret = wasm.sdk_get_binary_block_header_by_height(this.__wbg_ptr, ptr0, len0, height); + return ret; + } + /** + * @param {string | undefined} node_address + * @param {BlockHash} block_hash + * @returns {Promise} + */ + get_binary_block_header_by_hash(node_address, block_hash) { + var ptr0 = isLikeNone(node_address) ? 0 : passStringToWasm0(node_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + var len0 = WASM_VECTOR_LEN; + _assertClass(block_hash, BlockHash); + var ptr1 = block_hash.__destroy_into_raw(); + const ret = wasm.sdk_get_binary_block_header_by_hash(this.__wbg_ptr, ptr0, len0, ptr1); return ret; } /** - * @param {string | undefined} [rpc_address] * @param {string | undefined} [node_address] - * @param {Verbosity | undefined} [verbosity] + * @returns {Promise} */ - constructor(rpc_address, node_address, verbosity) { - var ptr0 = isLikeNone(rpc_address) ? 0 : passStringToWasm0(rpc_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + get_binary_latest_signed_block(node_address) { + var ptr0 = isLikeNone(node_address) ? 0 : passStringToWasm0(node_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); var len0 = WASM_VECTOR_LEN; - var ptr1 = isLikeNone(node_address) ? 0 : passStringToWasm0(node_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - var len1 = WASM_VECTOR_LEN; - const ret = wasm.sdk_new(ptr0, len0, ptr1, len1, isLikeNone(verbosity) ? 3 : verbosity); - this.__wbg_ptr = ret >>> 0; - SDKFinalization.register(this, this.__wbg_ptr, this); - return this; + const ret = wasm.sdk_get_binary_latest_signed_block(this.__wbg_ptr, ptr0, len0); + return ret; } /** - * @param {string | undefined} [rpc_address] - * @returns {string} + * @param {string | undefined} node_address + * @param {bigint} height + * @returns {Promise} */ - getRPCAddress(rpc_address) { - let deferred2_0; - let deferred2_1; - try { - var ptr0 = isLikeNone(rpc_address) ? 0 : passStringToWasm0(rpc_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - var len0 = WASM_VECTOR_LEN; - const ret = wasm.sdk_getRPCAddress(this.__wbg_ptr, ptr0, len0); - deferred2_0 = ret[0]; - deferred2_1 = ret[1]; - return getStringFromWasm0(ret[0], ret[1]); - } finally { - wasm.__wbindgen_free(deferred2_0, deferred2_1, 1); - } + get_binary_signed_block_by_height(node_address, height) { + var ptr0 = isLikeNone(node_address) ? 0 : passStringToWasm0(node_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + var len0 = WASM_VECTOR_LEN; + const ret = wasm.sdk_get_binary_signed_block_by_height(this.__wbg_ptr, ptr0, len0, height); + return ret; } /** - * @param {string | undefined} [rpc_address] + * @param {string | undefined} node_address + * @param {BlockHash} block_hash + * @returns {Promise} */ - setRPCAddress(rpc_address) { - var ptr0 = isLikeNone(rpc_address) ? 0 : passStringToWasm0(rpc_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + get_binary_signed_block_by_hash(node_address, block_hash) { + var ptr0 = isLikeNone(node_address) ? 0 : passStringToWasm0(node_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); var len0 = WASM_VECTOR_LEN; - const ret = wasm.sdk_setRPCAddress(this.__wbg_ptr, ptr0, len0); - if (ret[1]) { - throw takeFromExternrefTable0(ret[0]); - } + _assertClass(block_hash, BlockHash); + var ptr1 = block_hash.__destroy_into_raw(); + const ret = wasm.sdk_get_binary_signed_block_by_hash(this.__wbg_ptr, ptr0, len0, ptr1); + return ret; + } + /** + * @param {string | undefined} node_address + * @param {TransactionHash} hash + * @param {boolean} with_finalized_approvals + * @returns {Promise} + */ + get_binary_transaction_by_hash(node_address, hash, with_finalized_approvals) { + var ptr0 = isLikeNone(node_address) ? 0 : passStringToWasm0(node_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + var len0 = WASM_VECTOR_LEN; + _assertClass(hash, TransactionHash); + var ptr1 = hash.__destroy_into_raw(); + const ret = wasm.sdk_get_binary_transaction_by_hash(this.__wbg_ptr, ptr0, len0, ptr1, with_finalized_approvals); + return ret; } /** * @param {string | undefined} [node_address] - * @returns {string} + * @returns {Promise} */ - getNodeAddress(node_address) { - let deferred2_0; - let deferred2_1; - try { - var ptr0 = isLikeNone(node_address) ? 0 : passStringToWasm0(node_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - var len0 = WASM_VECTOR_LEN; - const ret = wasm.sdk_getNodeAddress(this.__wbg_ptr, ptr0, len0); - deferred2_0 = ret[0]; - deferred2_1 = ret[1]; - return getStringFromWasm0(ret[0], ret[1]); - } finally { - wasm.__wbindgen_free(deferred2_0, deferred2_1, 1); - } + get_binary_peers(node_address) { + var ptr0 = isLikeNone(node_address) ? 0 : passStringToWasm0(node_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + var len0 = WASM_VECTOR_LEN; + const ret = wasm.sdk_get_binary_peers(this.__wbg_ptr, ptr0, len0); + return ret; } /** * @param {string | undefined} [node_address] + * @returns {Promise} */ - setNodeAddress(node_address) { + get_binary_uptime(node_address) { var ptr0 = isLikeNone(node_address) ? 0 : passStringToWasm0(node_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); var len0 = WASM_VECTOR_LEN; - const ret = wasm.sdk_setNodeAddress(this.__wbg_ptr, ptr0, len0); - if (ret[1]) { - throw takeFromExternrefTable0(ret[0]); - } + const ret = wasm.sdk_get_binary_uptime(this.__wbg_ptr, ptr0, len0); + return ret; } /** - * @param {Verbosity | undefined} [verbosity] - * @returns {Verbosity} + * @param {string | undefined} [node_address] + * @returns {Promise} */ - getVerbosity(verbosity) { - const ret = wasm.sdk_getVerbosity(this.__wbg_ptr, isLikeNone(verbosity) ? 3 : verbosity); + get_binary_last_progress(node_address) { + var ptr0 = isLikeNone(node_address) ? 0 : passStringToWasm0(node_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + var len0 = WASM_VECTOR_LEN; + const ret = wasm.sdk_get_binary_last_progress(this.__wbg_ptr, ptr0, len0); return ret; } /** - * @param {Verbosity | undefined} [verbosity] + * @param {string | undefined} [node_address] + * @returns {Promise} */ - setVerbosity(verbosity) { - const ret = wasm.sdk_setVerbosity(this.__wbg_ptr, isLikeNone(verbosity) ? 3 : verbosity); - if (ret[1]) { - throw takeFromExternrefTable0(ret[0]); - } + get_binary_reactor_state(node_address) { + var ptr0 = isLikeNone(node_address) ? 0 : passStringToWasm0(node_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + var len0 = WASM_VECTOR_LEN; + const ret = wasm.sdk_get_binary_reactor_state(this.__wbg_ptr, ptr0, len0); + return ret; } /** - * JS function for transferring funds. - * - * # Arguments - * - * * `amount` - The amount to transfer. - * * `target_account` - The target account. - * * `transfer_id` - An optional transfer ID (defaults to a random number). - * * `deploy_params` - The deployment parameters. - * * `payment_params` - The payment parameters. - * * `verbosity` - The verbosity level for logging (optional). - * * `rpc_address` - The address of the node to connect to (optional). - * - * # Returns - * - * A `Result` containing the result of the transfer or a `JsError` in case of an error. - * @param {string} amount - * @param {string} target_account - * @param {string | undefined} transfer_id - * @param {DeployStrParams} deploy_params - * @param {PaymentStrParams} payment_params - * @param {Verbosity | undefined} [verbosity] - * @param {string | undefined} [rpc_address] - * @returns {Promise} + * @param {string | undefined} [node_address] + * @returns {Promise} */ - transfer(amount, target_account, transfer_id, deploy_params, payment_params, verbosity, rpc_address) { - const ptr0 = passStringToWasm0(amount, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - const len0 = WASM_VECTOR_LEN; - const ptr1 = passStringToWasm0(target_account, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - const len1 = WASM_VECTOR_LEN; - var ptr2 = isLikeNone(transfer_id) ? 0 : passStringToWasm0(transfer_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - var len2 = WASM_VECTOR_LEN; - _assertClass(deploy_params, DeployStrParams); - var ptr3 = deploy_params.__destroy_into_raw(); - _assertClass(payment_params, PaymentStrParams); - var ptr4 = payment_params.__destroy_into_raw(); - var ptr5 = isLikeNone(rpc_address) ? 0 : passStringToWasm0(rpc_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - var len5 = WASM_VECTOR_LEN; - const ret = wasm.sdk_transfer(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, ptr4, isLikeNone(verbosity) ? 3 : verbosity, ptr5, len5); + get_binary_network_name(node_address) { + var ptr0 = isLikeNone(node_address) ? 0 : passStringToWasm0(node_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + var len0 = WASM_VECTOR_LEN; + const ret = wasm.sdk_get_binary_network_name(this.__wbg_ptr, ptr0, len0); return ret; } /** - * @param {any} options - * @returns {getEntityOptions} - */ - get_entity_options(options) { - const ret = wasm.sdk_get_entity_options(this.__wbg_ptr, options); - if (ret[2]) { - throw takeFromExternrefTable0(ret[1]); - } - return getEntityOptions.__wrap(ret[0]); - } - /** - * Retrieves entity information using the provided options. - * - * This function is an asynchronous JavaScript binding for the Rust `get_entity` method. - * - * # Arguments - * - * * `options` - An optional `GetEntityOptions` struct containing retrieval options, such as: - * - `entity_identifier`: Identifier for the entity. - * - `entity_identifier_as_string`: String representation of the entity identifier. - * - `maybe_block_id_as_string`: Optional string representation of the block ID. - * - `maybe_block_identifier`: Optional `BlockIdentifierInput` for specifying the block. - * - `verbosity`: Verbosity level for the output. - * - `rpc_address`: Address of the node to query. - * - * # Returns - * - * A `Result` containing either a `GetAddressableEntityResult` on success or a `JsError` on failure. - * - * # Errors - * - * Returns a `JsError` if there is an error during the retrieval process, such as issues with the provided options or network errors. - * ``` - * @param {getEntityOptions | undefined} [options] - * @returns {Promise} + * @param {string | undefined} [node_address] + * @returns {Promise} */ - get_entity(options) { - let ptr0 = 0; - if (!isLikeNone(options)) { - _assertClass(options, getEntityOptions); - ptr0 = options.__destroy_into_raw(); - } - const ret = wasm.sdk_get_entity(this.__wbg_ptr, ptr0); + get_binary_consensus_validator_changes(node_address) { + var ptr0 = isLikeNone(node_address) ? 0 : passStringToWasm0(node_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + var len0 = WASM_VECTOR_LEN; + const ret = wasm.sdk_get_binary_consensus_validator_changes(this.__wbg_ptr, ptr0, len0); return ret; } /** - * @param {getEntityOptions | undefined} [options] - * @returns {Promise} + * @param {string | undefined} [node_address] + * @returns {Promise} */ - state_get_entity(options) { - let ptr0 = 0; - if (!isLikeNone(options)) { - _assertClass(options, getEntityOptions); - ptr0 = options.__destroy_into_raw(); - } - const ret = wasm.sdk_state_get_entity(this.__wbg_ptr, ptr0); + get_binary_block_synchronizer_status(node_address) { + var ptr0 = isLikeNone(node_address) ? 0 : passStringToWasm0(node_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + var len0 = WASM_VECTOR_LEN; + const ret = wasm.sdk_get_binary_block_synchronizer_status(this.__wbg_ptr, ptr0, len0); return ret; } /** - * Puts a transaction using the provided options. - * - * # Arguments - * - * * `transaction` - The `Transaction` object to be sent. - * * `verbosity` - An optional `Verbosity` level for controlling the output verbosity. - * * `rpc_address` - An optional string specifying the rpc address to use for the request. - * - * # Returns - * - * A `Result` containing either a `PutTransactionResult` or a `JsError` in case of an error. - * - * # Errors - * - * Returns a `JsError` if there is an error during the transaction process. - * @param {Transaction} transaction - * @param {Verbosity | undefined} [verbosity] - * @param {string | undefined} [rpc_address] - * @returns {Promise} + * @param {string | undefined} [node_address] + * @returns {Promise} */ - put_transaction(transaction, verbosity, rpc_address) { - _assertClass(transaction, Transaction); - var ptr0 = transaction.__destroy_into_raw(); - var ptr1 = isLikeNone(rpc_address) ? 0 : passStringToWasm0(rpc_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - var len1 = WASM_VECTOR_LEN; - const ret = wasm.sdk_put_transaction(this.__wbg_ptr, ptr0, isLikeNone(verbosity) ? 3 : verbosity, ptr1, len1); + get_binary_available_block_range(node_address) { + var ptr0 = isLikeNone(node_address) ? 0 : passStringToWasm0(node_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + var len0 = WASM_VECTOR_LEN; + const ret = wasm.sdk_get_binary_available_block_range(this.__wbg_ptr, ptr0, len0); return ret; } /** - * JavaScript Alias for `put_transaction`. - * @param {Transaction} transaction - * @param {Verbosity | undefined} [verbosity] - * @param {string | undefined} [rpc_address] - * @returns {Promise} + * @param {string | undefined} [node_address] + * @returns {Promise} */ - account_put_transaction(transaction, verbosity, rpc_address) { - _assertClass(transaction, Transaction); - var ptr0 = transaction.__destroy_into_raw(); - var ptr1 = isLikeNone(rpc_address) ? 0 : passStringToWasm0(rpc_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - var len1 = WASM_VECTOR_LEN; - const ret = wasm.sdk_account_put_transaction(this.__wbg_ptr, ptr0, isLikeNone(verbosity) ? 3 : verbosity, ptr1, len1); + get_binary_next_upgrade(node_address) { + var ptr0 = isLikeNone(node_address) ? 0 : passStringToWasm0(node_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + var len0 = WASM_VECTOR_LEN; + const ret = wasm.sdk_get_binary_next_upgrade(this.__wbg_ptr, ptr0, len0); return ret; } /** - * Parses query balance options from a JsValue. - * - * # Arguments - * - * * `options` - A JsValue containing query balance options to be parsed. - * - * # Returns - * - * Parsed query balance options as a `QueryBalanceDetailsOptions` struct. - * @param {any} options - * @returns {queryBalanceDetailsOptions} + * @param {string | undefined} [node_address] + * @returns {Promise} */ - query_balance_details_options(options) { - const ret = wasm.sdk_query_balance_details_options(this.__wbg_ptr, options); - if (ret[2]) { - throw takeFromExternrefTable0(ret[1]); - } - return queryBalanceDetailsOptions.__wrap(ret[0]); + get_binary_consensus_status(node_address) { + var ptr0 = isLikeNone(node_address) ? 0 : passStringToWasm0(node_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + var len0 = WASM_VECTOR_LEN; + const ret = wasm.sdk_get_binary_consensus_status(this.__wbg_ptr, ptr0, len0); + return ret; } /** - * Retrieves balance information using the provided options. - * - * # Arguments - * - * * `options` - An optional `QueryBalanceDetailsOptions` struct containing retrieval options. - * - * # Returns - * - * A `Result` containing either a `QueryBalanceDetailsResult` or a `JsError` in case of an error. - * - * # Errors - * - * Returns a `JsError` if there is an error during the retrieval process. - * @param {queryBalanceDetailsOptions | undefined} [options] - * @returns {Promise} + * @param {string | undefined} [node_address] + * @returns {Promise} */ - query_balance_details(options) { - let ptr0 = 0; - if (!isLikeNone(options)) { - _assertClass(options, queryBalanceDetailsOptions); - ptr0 = options.__destroy_into_raw(); - } - const ret = wasm.sdk_query_balance_details(this.__wbg_ptr, ptr0); + get_binary_chainspec_raw_bytes(node_address) { + var ptr0 = isLikeNone(node_address) ? 0 : passStringToWasm0(node_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + var len0 = WASM_VECTOR_LEN; + const ret = wasm.sdk_get_binary_chainspec_raw_bytes(this.__wbg_ptr, ptr0, len0); return ret; } /** - * Parses query global state options from a JsValue. - * - * # Arguments - * - * * `options` - A JsValue containing query global state options to be parsed. - * - * # Returns - * - * Parsed query global state options as a `QueryGlobalStateOptions` struct. - * @param {any} options - * @returns {queryGlobalStateOptions} + * @param {string | undefined} [node_address] + * @returns {Promise} */ - query_global_state_options(options) { - const ret = wasm.sdk_query_global_state_options(this.__wbg_ptr, options); - if (ret[2]) { - throw takeFromExternrefTable0(ret[1]); - } - return queryGlobalStateOptions.__wrap(ret[0]); + get_binary_node_status(node_address) { + var ptr0 = isLikeNone(node_address) ? 0 : passStringToWasm0(node_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + var len0 = WASM_VECTOR_LEN; + const ret = wasm.sdk_get_binary_node_status(this.__wbg_ptr, ptr0, len0); + return ret; } /** - * Retrieves global state information using the provided options. - * - * # Arguments - * - * * `options` - An optional `QueryGlobalStateOptions` struct containing retrieval options. - * - * # Returns - * - * A `Result` containing either a `QueryGlobalStateResult` or a `JsError` in case of an error. - * - * # Errors - * - * Returns a `JsError` if there is an error during the retrieval process. - * @param {queryGlobalStateOptions | undefined} [options] - * @returns {Promise} + * @param {string | undefined} node_address + * @param {PublicKey} validator_key + * @param {EraId} era + * @returns {Promise} */ - query_global_state(options) { - let ptr0 = 0; - if (!isLikeNone(options)) { - _assertClass(options, queryGlobalStateOptions); - ptr0 = options.__destroy_into_raw(); - } - const ret = wasm.sdk_query_global_state(this.__wbg_ptr, ptr0); + get_binary_get_validator_reward_by_era(node_address, validator_key, era) { + var ptr0 = isLikeNone(node_address) ? 0 : passStringToWasm0(node_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + var len0 = WASM_VECTOR_LEN; + _assertClass(validator_key, PublicKey); + var ptr1 = validator_key.__destroy_into_raw(); + _assertClass(era, EraId); + var ptr2 = era.__destroy_into_raw(); + const ret = wasm.sdk_get_binary_get_validator_reward_by_era(this.__wbg_ptr, ptr0, len0, ptr1, ptr2); return ret; } /** - * This function allows executing a transaction speculatively. - * - * # Arguments - * - * * `builder_params` - Transaction Builder parameters. - * * `transaction_params` - Transactionment parameters for the transaction. - * * `verbosity` - Optional verbosity level. - * * `rpc_address` - Optional rpc address. - * - * # Returns - * - * A `Result` containing either a `SpeculativeExecTxnResult` or a `JsError` in case of an error. - * @param {TransactionBuilderParams} builder_params - * @param {TransactionStrParams} transaction_params - * @param {Verbosity | undefined} [verbosity] - * @param {string | undefined} [rpc_address] - * @returns {Promise} + * @param {string | undefined} node_address + * @param {PublicKey} validator_key + * @param {bigint} block_height + * @returns {Promise} */ - speculative_transaction(builder_params, transaction_params, verbosity, rpc_address) { - _assertClass(builder_params, TransactionBuilderParams); - var ptr0 = builder_params.__destroy_into_raw(); - _assertClass(transaction_params, TransactionStrParams); - var ptr1 = transaction_params.__destroy_into_raw(); - var ptr2 = isLikeNone(rpc_address) ? 0 : passStringToWasm0(rpc_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - var len2 = WASM_VECTOR_LEN; - const ret = wasm.sdk_speculative_transaction(this.__wbg_ptr, ptr0, ptr1, isLikeNone(verbosity) ? 3 : verbosity, ptr2, len2); + get_binary_get_validator_reward_by_block_height(node_address, validator_key, block_height) { + var ptr0 = isLikeNone(node_address) ? 0 : passStringToWasm0(node_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + var len0 = WASM_VECTOR_LEN; + _assertClass(validator_key, PublicKey); + var ptr1 = validator_key.__destroy_into_raw(); + const ret = wasm.sdk_get_binary_get_validator_reward_by_block_height(this.__wbg_ptr, ptr0, len0, ptr1, block_height); return ret; } /** - * JS function for speculative transfer transaction. - * - * # Arguments - * - * * `maybe_source` - Optional transfer source uref. - * * `target_account` - The target account. - * * `amount` - The amount to transfer. - * * `maybe_id` - An optional transfer ID (defaults to a random number). - * * `transaction_params` - The transactionment parameters. - * * `verbosity` - The verbosity level for logging (optional). - * * `rpc_address` - The address of the node to connect to (optional). - * - * # Returns - * - * A `Result` containing the result of the speculative transfer or a `JsError` in case of an error. - * @param {URef | undefined} maybe_source - * @param {string} target_account - * @param {string} amount - * @param {TransactionStrParams} transaction_params - * @param {string | undefined} [maybe_id] - * @param {Verbosity | undefined} [verbosity] - * @param {string | undefined} [rpc_address] - * @returns {Promise} + * @param {string | undefined} node_address + * @param {PublicKey} validator_key + * @param {BlockHash} block_hash + * @returns {Promise} */ - speculative_transfer_transaction(maybe_source, target_account, amount, transaction_params, maybe_id, verbosity, rpc_address) { - let ptr0 = 0; - if (!isLikeNone(maybe_source)) { - _assertClass(maybe_source, URef); - ptr0 = maybe_source.__destroy_into_raw(); - } - const ptr1 = passStringToWasm0(target_account, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - const len1 = WASM_VECTOR_LEN; - const ptr2 = passStringToWasm0(amount, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - const len2 = WASM_VECTOR_LEN; - _assertClass(transaction_params, TransactionStrParams); - var ptr3 = transaction_params.__destroy_into_raw(); - var ptr4 = isLikeNone(maybe_id) ? 0 : passStringToWasm0(maybe_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - var len4 = WASM_VECTOR_LEN; - var ptr5 = isLikeNone(rpc_address) ? 0 : passStringToWasm0(rpc_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - var len5 = WASM_VECTOR_LEN; - const ret = wasm.sdk_speculative_transfer_transaction(this.__wbg_ptr, ptr0, ptr1, len1, ptr2, len2, ptr3, ptr4, len4, isLikeNone(verbosity) ? 3 : verbosity, ptr5, len5); + get_binary_get_validator_reward_by_block_hash(node_address, validator_key, block_hash) { + var ptr0 = isLikeNone(node_address) ? 0 : passStringToWasm0(node_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + var len0 = WASM_VECTOR_LEN; + _assertClass(validator_key, PublicKey); + var ptr1 = validator_key.__destroy_into_raw(); + _assertClass(block_hash, BlockHash); + var ptr2 = block_hash.__destroy_into_raw(); + const ret = wasm.sdk_get_binary_get_validator_reward_by_block_hash(this.__wbg_ptr, ptr0, len0, ptr1, ptr2); return ret; } /** - * @param {string | undefined} [node_address] + * @param {string | undefined} node_address + * @param {PublicKey} validator_key + * @param {PublicKey} delegator_key + * @param {EraId} era * @returns {Promise} */ - get_binary_latest_switch_block_header(node_address) { + get_binary_get_delegator_reward_by_era(node_address, validator_key, delegator_key, era) { var ptr0 = isLikeNone(node_address) ? 0 : passStringToWasm0(node_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); var len0 = WASM_VECTOR_LEN; - const ret = wasm.sdk_get_binary_latest_switch_block_header(this.__wbg_ptr, ptr0, len0); + _assertClass(validator_key, PublicKey); + var ptr1 = validator_key.__destroy_into_raw(); + _assertClass(delegator_key, PublicKey); + var ptr2 = delegator_key.__destroy_into_raw(); + _assertClass(era, EraId); + var ptr3 = era.__destroy_into_raw(); + const ret = wasm.sdk_get_binary_get_delegator_reward_by_era(this.__wbg_ptr, ptr0, len0, ptr1, ptr2, ptr3); return ret; } /** - * @param {string | undefined} [node_address] + * @param {string | undefined} node_address + * @param {PublicKey} validator_key + * @param {PublicKey} delegator_key + * @param {bigint} block_height * @returns {Promise} */ - get_binary_latest_block_header(node_address) { + get_binary_get_delegator_reward_by_block_height(node_address, validator_key, delegator_key, block_height) { var ptr0 = isLikeNone(node_address) ? 0 : passStringToWasm0(node_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); var len0 = WASM_VECTOR_LEN; - const ret = wasm.sdk_get_binary_latest_block_header(this.__wbg_ptr, ptr0, len0); + _assertClass(validator_key, PublicKey); + var ptr1 = validator_key.__destroy_into_raw(); + _assertClass(delegator_key, PublicKey); + var ptr2 = delegator_key.__destroy_into_raw(); + const ret = wasm.sdk_get_binary_get_delegator_reward_by_block_height(this.__wbg_ptr, ptr0, len0, ptr1, ptr2, block_height); return ret; } /** * @param {string | undefined} node_address - * @param {bigint} height + * @param {PublicKey} validator_key + * @param {PublicKey} delegator_key + * @param {BlockHash} block_hash * @returns {Promise} */ - get_binary_block_header_by_height(node_address, height) { + get_binary_get_delegator_reward_by_block_hash(node_address, validator_key, delegator_key, block_hash) { var ptr0 = isLikeNone(node_address) ? 0 : passStringToWasm0(node_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); var len0 = WASM_VECTOR_LEN; - const ret = wasm.sdk_get_binary_block_header_by_height(this.__wbg_ptr, ptr0, len0, height); + _assertClass(validator_key, PublicKey); + var ptr1 = validator_key.__destroy_into_raw(); + _assertClass(delegator_key, PublicKey); + var ptr2 = delegator_key.__destroy_into_raw(); + _assertClass(block_hash, BlockHash); + var ptr3 = block_hash.__destroy_into_raw(); + const ret = wasm.sdk_get_binary_get_delegator_reward_by_block_hash(this.__wbg_ptr, ptr0, len0, ptr1, ptr2, ptr3); return ret; } /** * @param {string | undefined} node_address - * @param {BlockHash} block_hash + * @param {RecordId} record_id + * @param {Uint8Array} key * @returns {Promise} */ - get_binary_block_header_by_hash(node_address, block_hash) { + get_binary_read_record(node_address, record_id, key) { var ptr0 = isLikeNone(node_address) ? 0 : passStringToWasm0(node_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); var len0 = WASM_VECTOR_LEN; - _assertClass(block_hash, BlockHash); - var ptr1 = block_hash.__destroy_into_raw(); - const ret = wasm.sdk_get_binary_block_header_by_hash(this.__wbg_ptr, ptr0, len0, ptr1); + _assertClass(record_id, RecordId); + var ptr1 = record_id.__destroy_into_raw(); + const ptr2 = passArray8ToWasm0(key, wasm.__wbindgen_malloc); + const len2 = WASM_VECTOR_LEN; + const ret = wasm.sdk_get_binary_read_record(this.__wbg_ptr, ptr0, len0, ptr1, ptr2, len2); return ret; } /** - * @param {string | undefined} [node_address] + * @param {string | undefined} node_address + * @param {Key} key + * @param {(string)[]} path * @returns {Promise} */ - get_binary_latest_signed_block(node_address) { + get_binary_global_state_item(node_address, key, path) { var ptr0 = isLikeNone(node_address) ? 0 : passStringToWasm0(node_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); var len0 = WASM_VECTOR_LEN; - const ret = wasm.sdk_get_binary_latest_signed_block(this.__wbg_ptr, ptr0, len0); + _assertClass(key, Key); + var ptr1 = key.__destroy_into_raw(); + const ptr2 = passArrayJsValueToWasm0(path, wasm.__wbindgen_malloc); + const len2 = WASM_VECTOR_LEN; + const ret = wasm.sdk_get_binary_global_state_item(this.__wbg_ptr, ptr0, len0, ptr1, ptr2, len2); return ret; } /** * @param {string | undefined} node_address - * @param {bigint} height + * @param {Digest} state_root_hash + * @param {Key} key + * @param {(string)[]} path * @returns {Promise} */ - get_binary_signed_block_by_height(node_address, height) { + get_binary_global_state_item_by_state_root_hash(node_address, state_root_hash, key, path) { var ptr0 = isLikeNone(node_address) ? 0 : passStringToWasm0(node_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); var len0 = WASM_VECTOR_LEN; - const ret = wasm.sdk_get_binary_signed_block_by_height(this.__wbg_ptr, ptr0, len0, height); + _assertClass(state_root_hash, Digest); + var ptr1 = state_root_hash.__destroy_into_raw(); + _assertClass(key, Key); + var ptr2 = key.__destroy_into_raw(); + const ptr3 = passArrayJsValueToWasm0(path, wasm.__wbindgen_malloc); + const len3 = WASM_VECTOR_LEN; + const ret = wasm.sdk_get_binary_global_state_item_by_state_root_hash(this.__wbg_ptr, ptr0, len0, ptr1, ptr2, ptr3, len3); return ret; } /** * @param {string | undefined} node_address * @param {BlockHash} block_hash + * @param {Key} key + * @param {(string)[]} path * @returns {Promise} */ - get_binary_signed_block_by_hash(node_address, block_hash) { + get_binary_global_state_item_by_block_hash(node_address, block_hash, key, path) { var ptr0 = isLikeNone(node_address) ? 0 : passStringToWasm0(node_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); var len0 = WASM_VECTOR_LEN; _assertClass(block_hash, BlockHash); var ptr1 = block_hash.__destroy_into_raw(); - const ret = wasm.sdk_get_binary_signed_block_by_hash(this.__wbg_ptr, ptr0, len0, ptr1); + _assertClass(key, Key); + var ptr2 = key.__destroy_into_raw(); + const ptr3 = passArrayJsValueToWasm0(path, wasm.__wbindgen_malloc); + const len3 = WASM_VECTOR_LEN; + const ret = wasm.sdk_get_binary_global_state_item_by_block_hash(this.__wbg_ptr, ptr0, len0, ptr1, ptr2, ptr3, len3); return ret; } /** * @param {string | undefined} node_address - * @param {TransactionHash} hash - * @param {boolean} with_finalized_approvals + * @param {bigint} block_height + * @param {Key} key + * @param {(string)[]} path * @returns {Promise} */ - get_binary_transaction_by_hash(node_address, hash, with_finalized_approvals) { + get_binary_global_state_item_by_block_height(node_address, block_height, key, path) { var ptr0 = isLikeNone(node_address) ? 0 : passStringToWasm0(node_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); var len0 = WASM_VECTOR_LEN; - _assertClass(hash, TransactionHash); - var ptr1 = hash.__destroy_into_raw(); - const ret = wasm.sdk_get_binary_transaction_by_hash(this.__wbg_ptr, ptr0, len0, ptr1, with_finalized_approvals); + _assertClass(key, Key); + var ptr1 = key.__destroy_into_raw(); + const ptr2 = passArrayJsValueToWasm0(path, wasm.__wbindgen_malloc); + const len2 = WASM_VECTOR_LEN; + const ret = wasm.sdk_get_binary_global_state_item_by_block_height(this.__wbg_ptr, ptr0, len0, block_height, ptr1, ptr2, len2); return ret; } /** - * @param {string | undefined} [node_address] + * @param {string | undefined} node_address + * @param {Transaction} transaction * @returns {Promise} */ - get_binary_peers(node_address) { + get_binary_try_accept_transaction(node_address, transaction) { var ptr0 = isLikeNone(node_address) ? 0 : passStringToWasm0(node_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); var len0 = WASM_VECTOR_LEN; - const ret = wasm.sdk_get_binary_peers(this.__wbg_ptr, ptr0, len0); + _assertClass(transaction, Transaction); + var ptr1 = transaction.__destroy_into_raw(); + const ret = wasm.sdk_get_binary_try_accept_transaction(this.__wbg_ptr, ptr0, len0, ptr1); return ret; } /** - * @param {string | undefined} [node_address] + * @param {string | undefined} node_address + * @param {Transaction} transaction * @returns {Promise} */ - get_binary_uptime(node_address) { + get_binary_try_speculative_execution(node_address, transaction) { var ptr0 = isLikeNone(node_address) ? 0 : passStringToWasm0(node_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); var len0 = WASM_VECTOR_LEN; - const ret = wasm.sdk_get_binary_uptime(this.__wbg_ptr, ptr0, len0); + _assertClass(transaction, Transaction); + var ptr1 = transaction.__destroy_into_raw(); + const ret = wasm.sdk_get_binary_try_speculative_execution(this.__wbg_ptr, ptr0, len0, ptr1); return ret; } /** * @param {string | undefined} [node_address] * @returns {Promise} */ - get_binary_last_progress(node_address) { + get_binary_get_protocol_version(node_address) { var ptr0 = isLikeNone(node_address) ? 0 : passStringToWasm0(node_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); var len0 = WASM_VECTOR_LEN; - const ret = wasm.sdk_get_binary_last_progress(this.__wbg_ptr, ptr0, len0); + const ret = wasm.sdk_get_binary_get_protocol_version(this.__wbg_ptr, ptr0, len0); return ret; } /** - * @param {string | undefined} [node_address] - * @returns {Promise} + * Parses auction info options from a JsValue. + * + * # Arguments + * + * * `options` - A JsValue containing auction info options to be parsed. + * + * # Returns + * + * Result containing parsed auction info options as a `GetAuctionInfoOptions` struct, + * or a `JsError` if deserialization fails. + * @param {any} options + * @returns {getAuctionInfoOptions} */ - get_binary_reactor_state(node_address) { - var ptr0 = isLikeNone(node_address) ? 0 : passStringToWasm0(node_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - var len0 = WASM_VECTOR_LEN; - const ret = wasm.sdk_get_binary_reactor_state(this.__wbg_ptr, ptr0, len0); + get_auction_info_options(options) { + const ret = wasm.sdk_get_auction_info_options(this.__wbg_ptr, options); + if (ret[2]) { + throw takeFromExternrefTable0(ret[1]); + } + return getAuctionInfoOptions.__wrap(ret[0]); + } + /** + * Retrieves auction information using the provided options. + * + * # Arguments + * + * * `options` - An optional `GetAuctionInfoOptions` struct containing retrieval options. + * + * # Returns + * + * A `Result` containing either a `GetAuctionInfoResult` or a `JsError` in case of an error. + * + * # Errors + * + * Returns a `JsError` if there is an error during the retrieval process. + * @param {getAuctionInfoOptions | undefined} [options] + * @returns {Promise} + */ + get_auction_info(options) { + let ptr0 = 0; + if (!isLikeNone(options)) { + _assertClass(options, getAuctionInfoOptions); + ptr0 = options.__destroy_into_raw(); + } + const ret = wasm.sdk_get_auction_info(this.__wbg_ptr, ptr0); return ret; } /** - * @param {string | undefined} [node_address] - * @returns {Promise} + * @param {getAuctionInfoOptions | undefined} [options] + * @returns {Promise} */ - get_binary_network_name(node_address) { - var ptr0 = isLikeNone(node_address) ? 0 : passStringToWasm0(node_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - var len0 = WASM_VECTOR_LEN; - const ret = wasm.sdk_get_binary_network_name(this.__wbg_ptr, ptr0, len0); + state_get_auction_info_js_alias(options) { + let ptr0 = 0; + if (!isLikeNone(options)) { + _assertClass(options, getAuctionInfoOptions); + ptr0 = options.__destroy_into_raw(); + } + const ret = wasm.sdk_state_get_auction_info_js_alias(this.__wbg_ptr, ptr0); return ret; } /** - * @param {string | undefined} [node_address] - * @returns {Promise} + * Parses block options from a JsValue. + * + * # Arguments + * + * * `options` - A JsValue containing block options to be parsed. + * + * # Returns + * + * Parsed block options as a `GetBlockOptions` struct. + * @param {any} options + * @returns {getBlockOptions} */ - get_binary_consensus_validator_changes(node_address) { - var ptr0 = isLikeNone(node_address) ? 0 : passStringToWasm0(node_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - var len0 = WASM_VECTOR_LEN; - const ret = wasm.sdk_get_binary_consensus_validator_changes(this.__wbg_ptr, ptr0, len0); + get_block_options(options) { + const ret = wasm.sdk_get_block_options(this.__wbg_ptr, options); + if (ret[2]) { + throw takeFromExternrefTable0(ret[1]); + } + return getBlockOptions.__wrap(ret[0]); + } + /** + * Retrieves block information using the provided options. + * + * # Arguments + * + * * `options` - An optional `GetBlockOptions` struct containing retrieval options. + * + * # Returns + * + * A `Result` containing either a `GetBlockResult` or a `JsError` in case of an error. + * + * # Errors + * + * Returns a `JsError` if there is an error during the retrieval process. + * @param {getBlockOptions | undefined} [options] + * @returns {Promise} + */ + get_block(options) { + let ptr0 = 0; + if (!isLikeNone(options)) { + _assertClass(options, getBlockOptions); + ptr0 = options.__destroy_into_raw(); + } + const ret = wasm.sdk_get_block(this.__wbg_ptr, ptr0); return ret; } /** - * @param {string | undefined} [node_address] - * @returns {Promise} + * JavaScript Alias for the `get_block`. + * + * # Arguments + * + * * `options` - An optional `GetBlockOptions` struct containing retrieval options. + * + * # Returns + * + * A `Result` containing either a `GetBlockResult` or a `JsError` in case of an error. + * + * # Errors + * + * Returns a `JsError` if there is an error during the retrieval process. + * @param {getBlockOptions | undefined} [options] + * @returns {Promise} */ - get_binary_block_synchronizer_status(node_address) { - var ptr0 = isLikeNone(node_address) ? 0 : passStringToWasm0(node_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + chain_get_block(options) { + let ptr0 = 0; + if (!isLikeNone(options)) { + _assertClass(options, getBlockOptions); + ptr0 = options.__destroy_into_raw(); + } + const ret = wasm.sdk_chain_get_block(this.__wbg_ptr, ptr0); + return ret; + } + /** + * Asynchronously retrieves the chainspec. + * + * # Arguments + * + * * `verbosity` - An optional `Verbosity` parameter. + * * `rpc_address` - An optional rpc address as a string. + * + * # Returns + * + * A `Result` containing either a `GetChainspecResult` or a `JsError` in case of an error. + * @param {Verbosity | undefined} [verbosity] + * @param {string | undefined} [rpc_address] + * @returns {Promise} + */ + get_chainspec(verbosity, rpc_address) { + var ptr0 = isLikeNone(rpc_address) ? 0 : passStringToWasm0(rpc_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); var len0 = WASM_VECTOR_LEN; - const ret = wasm.sdk_get_binary_block_synchronizer_status(this.__wbg_ptr, ptr0, len0); + const ret = wasm.sdk_get_chainspec(this.__wbg_ptr, isLikeNone(verbosity) ? 3 : verbosity, ptr0, len0); return ret; } /** - * @param {string | undefined} [node_address] - * @returns {Promise} + * @param {Verbosity | undefined} [verbosity] + * @param {string | undefined} [rpc_address] + * @returns {Promise} */ - get_binary_available_block_range(node_address) { - var ptr0 = isLikeNone(node_address) ? 0 : passStringToWasm0(node_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + info_get_chainspec(verbosity, rpc_address) { + var ptr0 = isLikeNone(rpc_address) ? 0 : passStringToWasm0(rpc_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); var len0 = WASM_VECTOR_LEN; - const ret = wasm.sdk_get_binary_available_block_range(this.__wbg_ptr, ptr0, len0); + const ret = wasm.sdk_info_get_chainspec(this.__wbg_ptr, isLikeNone(verbosity) ? 3 : verbosity, ptr0, len0); return ret; } /** - * @param {string | undefined} [node_address] - * @returns {Promise} + * Retrieves node status information using the provided options. + * + * # Arguments + * + * * `verbosity` - An optional `Verbosity` level for controlling the output verbosity. + * * `rpc_address` - An optional string specifying the rpc address to use for the request. + * + * # Returns + * + * A `Result` containing either a `GetNodeStatusResult` or a `JsError` in case of an error. + * + * # Errors + * + * Returns a `JsError` if there is an error during the retrieval process. + * @param {Verbosity | undefined} [verbosity] + * @param {string | undefined} [rpc_address] + * @returns {Promise} */ - get_binary_next_upgrade(node_address) { - var ptr0 = isLikeNone(node_address) ? 0 : passStringToWasm0(node_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + get_node_status(verbosity, rpc_address) { + var ptr0 = isLikeNone(rpc_address) ? 0 : passStringToWasm0(rpc_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); var len0 = WASM_VECTOR_LEN; - const ret = wasm.sdk_get_binary_next_upgrade(this.__wbg_ptr, ptr0, len0); + const ret = wasm.sdk_get_node_status(this.__wbg_ptr, isLikeNone(verbosity) ? 3 : verbosity, ptr0, len0); return ret; } /** - * @param {string | undefined} [node_address] - * @returns {Promise} + * @param {Verbosity | undefined} [verbosity] + * @param {string | undefined} [rpc_address] + * @returns {Promise} */ - get_binary_consensus_status(node_address) { - var ptr0 = isLikeNone(node_address) ? 0 : passStringToWasm0(node_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + info_get_status(verbosity, rpc_address) { + var ptr0 = isLikeNone(rpc_address) ? 0 : passStringToWasm0(rpc_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); var len0 = WASM_VECTOR_LEN; - const ret = wasm.sdk_get_binary_consensus_status(this.__wbg_ptr, ptr0, len0); + const ret = wasm.sdk_info_get_status(this.__wbg_ptr, isLikeNone(verbosity) ? 3 : verbosity, ptr0, len0); return ret; } /** - * @param {string | undefined} [node_address] - * @returns {Promise} + * Retrieves peers asynchronously. + * + * # Arguments + * + * * `verbosity` - Optional verbosity level. + * * `rpc_address` - Optional rpc address. + * + * # Returns + * + * A `Result` containing `GetPeersResult` or a `JsError` if an error occurs. + * @param {Verbosity | undefined} [verbosity] + * @param {string | undefined} [rpc_address] + * @returns {Promise} */ - get_binary_chainspec_raw_bytes(node_address) { - var ptr0 = isLikeNone(node_address) ? 0 : passStringToWasm0(node_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + get_peers(verbosity, rpc_address) { + var ptr0 = isLikeNone(rpc_address) ? 0 : passStringToWasm0(rpc_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); var len0 = WASM_VECTOR_LEN; - const ret = wasm.sdk_get_binary_chainspec_raw_bytes(this.__wbg_ptr, ptr0, len0); + const ret = wasm.sdk_get_peers(this.__wbg_ptr, isLikeNone(verbosity) ? 3 : verbosity, ptr0, len0); return ret; } /** - * @param {string | undefined} [node_address] - * @returns {Promise} + * @param {Verbosity | undefined} [verbosity] + * @param {string | undefined} [rpc_address] + * @returns {Promise} */ - get_binary_node_status(node_address) { - var ptr0 = isLikeNone(node_address) ? 0 : passStringToWasm0(node_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + info_get_peers(verbosity, rpc_address) { + var ptr0 = isLikeNone(rpc_address) ? 0 : passStringToWasm0(rpc_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); var len0 = WASM_VECTOR_LEN; - const ret = wasm.sdk_get_binary_node_status(this.__wbg_ptr, ptr0, len0); + const ret = wasm.sdk_info_get_peers(this.__wbg_ptr, isLikeNone(verbosity) ? 3 : verbosity, ptr0, len0); return ret; } /** - * @param {string | undefined} node_address - * @param {PublicKey} validator_key - * @param {EraId} era - * @returns {Promise} + * Retrieves validator changes using the provided options. + * + * # Arguments + * + * * `verbosity` - An optional `Verbosity` level for controlling the output verbosity. + * * `rpc_address` - An optional string specifying the rpc address to use for the request. + * + * # Returns + * + * A `Result` containing either a `GetValidatorChangesResult` or a `JsError` in case of an error. + * + * # Errors + * + * Returns a `JsError` if there is an error during the retrieval process. + * @param {Verbosity | undefined} [verbosity] + * @param {string | undefined} [rpc_address] + * @returns {Promise} */ - get_binary_get_validator_reward_by_era(node_address, validator_key, era) { - var ptr0 = isLikeNone(node_address) ? 0 : passStringToWasm0(node_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + get_validator_changes(verbosity, rpc_address) { + var ptr0 = isLikeNone(rpc_address) ? 0 : passStringToWasm0(rpc_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); var len0 = WASM_VECTOR_LEN; - _assertClass(validator_key, PublicKey); - var ptr1 = validator_key.__destroy_into_raw(); - _assertClass(era, EraId); - var ptr2 = era.__destroy_into_raw(); - const ret = wasm.sdk_get_binary_get_validator_reward_by_era(this.__wbg_ptr, ptr0, len0, ptr1, ptr2); + const ret = wasm.sdk_get_validator_changes(this.__wbg_ptr, isLikeNone(verbosity) ? 3 : verbosity, ptr0, len0); return ret; } /** - * @param {string | undefined} node_address - * @param {PublicKey} validator_key - * @param {bigint} block_height - * @returns {Promise} + * @param {Verbosity | undefined} [verbosity] + * @param {string | undefined} [rpc_address] + * @returns {Promise} */ - get_binary_get_validator_reward_by_block_height(node_address, validator_key, block_height) { - var ptr0 = isLikeNone(node_address) ? 0 : passStringToWasm0(node_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + info_get_validator_change(verbosity, rpc_address) { + var ptr0 = isLikeNone(rpc_address) ? 0 : passStringToWasm0(rpc_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); var len0 = WASM_VECTOR_LEN; - _assertClass(validator_key, PublicKey); - var ptr1 = validator_key.__destroy_into_raw(); - const ret = wasm.sdk_get_binary_get_validator_reward_by_block_height(this.__wbg_ptr, ptr0, len0, ptr1, block_height); + const ret = wasm.sdk_info_get_validator_change(this.__wbg_ptr, isLikeNone(verbosity) ? 3 : verbosity, ptr0, len0); return ret; } /** - * @param {string | undefined} node_address - * @param {PublicKey} validator_key - * @param {BlockHash} block_hash - * @returns {Promise} + * Lists available RPCs using the provided options. + * + * # Arguments + * + * * `verbosity` - An optional `Verbosity` level for controlling the output verbosity. + * * `rpc_address` - An optional string specifying the rpc address to use for the request. + * + * # Returns + * + * A `Result` containing either a `ListRpcsResult` or a `JsError` in case of an error. + * + * # Errors + * + * Returns a `JsError` if there is an error during the listing process. + * @param {Verbosity | undefined} [verbosity] + * @param {string | undefined} [rpc_address] + * @returns {Promise} */ - get_binary_get_validator_reward_by_block_hash(node_address, validator_key, block_hash) { - var ptr0 = isLikeNone(node_address) ? 0 : passStringToWasm0(node_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + list_rpcs(verbosity, rpc_address) { + var ptr0 = isLikeNone(rpc_address) ? 0 : passStringToWasm0(rpc_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); var len0 = WASM_VECTOR_LEN; - _assertClass(validator_key, PublicKey); - var ptr1 = validator_key.__destroy_into_raw(); - _assertClass(block_hash, BlockHash); - var ptr2 = block_hash.__destroy_into_raw(); - const ret = wasm.sdk_get_binary_get_validator_reward_by_block_hash(this.__wbg_ptr, ptr0, len0, ptr1, ptr2); + const ret = wasm.sdk_list_rpcs(this.__wbg_ptr, isLikeNone(verbosity) ? 3 : verbosity, ptr0, len0); return ret; } /** - * @param {string | undefined} node_address - * @param {PublicKey} validator_key - * @param {PublicKey} delegator_key - * @param {EraId} era - * @returns {Promise} + * JS function for speculative transfer transaction. + * + * # Arguments + * + * * `maybe_source` - Optional transfer source uref. + * * `target_account` - The target account. + * * `amount` - The amount to transfer. + * * `maybe_id` - An optional transfer ID (defaults to a random number). + * * `transaction_params` - The transactionment parameters. + * * `verbosity` - The verbosity level for logging (optional). + * * `rpc_address` - The address of the node to connect to (optional). + * + * # Returns + * + * A `Result` containing the result of the speculative transfer or a `JsError` in case of an error. + * @param {URef | undefined} maybe_source + * @param {string} target_account + * @param {string} amount + * @param {TransactionStrParams} transaction_params + * @param {string | undefined} [maybe_id] + * @param {Verbosity | undefined} [verbosity] + * @param {string | undefined} [rpc_address] + * @returns {Promise} */ - get_binary_get_delegator_reward_by_era(node_address, validator_key, delegator_key, era) { - var ptr0 = isLikeNone(node_address) ? 0 : passStringToWasm0(node_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - var len0 = WASM_VECTOR_LEN; - _assertClass(validator_key, PublicKey); - var ptr1 = validator_key.__destroy_into_raw(); - _assertClass(delegator_key, PublicKey); - var ptr2 = delegator_key.__destroy_into_raw(); - _assertClass(era, EraId); - var ptr3 = era.__destroy_into_raw(); - const ret = wasm.sdk_get_binary_get_delegator_reward_by_era(this.__wbg_ptr, ptr0, len0, ptr1, ptr2, ptr3); + speculative_transfer_transaction(maybe_source, target_account, amount, transaction_params, maybe_id, verbosity, rpc_address) { + let ptr0 = 0; + if (!isLikeNone(maybe_source)) { + _assertClass(maybe_source, URef); + ptr0 = maybe_source.__destroy_into_raw(); + } + const ptr1 = passStringToWasm0(target_account, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + const len1 = WASM_VECTOR_LEN; + const ptr2 = passStringToWasm0(amount, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + const len2 = WASM_VECTOR_LEN; + _assertClass(transaction_params, TransactionStrParams); + var ptr3 = transaction_params.__destroy_into_raw(); + var ptr4 = isLikeNone(maybe_id) ? 0 : passStringToWasm0(maybe_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + var len4 = WASM_VECTOR_LEN; + var ptr5 = isLikeNone(rpc_address) ? 0 : passStringToWasm0(rpc_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + var len5 = WASM_VECTOR_LEN; + const ret = wasm.sdk_speculative_transfer_transaction(this.__wbg_ptr, ptr0, ptr1, len1, ptr2, len2, ptr3, ptr4, len4, isLikeNone(verbosity) ? 3 : verbosity, ptr5, len5); return ret; } /** - * @param {string | undefined} node_address - * @param {PublicKey} validator_key - * @param {PublicKey} delegator_key - * @param {bigint} block_height - * @returns {Promise} + * JS function for `make_deploy`. + * + * # Arguments + * + * * `deploy_params` - The deploy parameters. + * * `session_params` - The session parameters. + * * `payment_params` - The payment parameters. + * + * # Returns + * + * A `Result` containing the created `Deploy` or a `JsError` in case of an error. + * @param {DeployStrParams} deploy_params + * @param {SessionStrParams} session_params + * @param {PaymentStrParams} payment_params + * @returns {Deploy} */ - get_binary_get_delegator_reward_by_block_height(node_address, validator_key, delegator_key, block_height) { - var ptr0 = isLikeNone(node_address) ? 0 : passStringToWasm0(node_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - var len0 = WASM_VECTOR_LEN; - _assertClass(validator_key, PublicKey); - var ptr1 = validator_key.__destroy_into_raw(); - _assertClass(delegator_key, PublicKey); - var ptr2 = delegator_key.__destroy_into_raw(); - const ret = wasm.sdk_get_binary_get_delegator_reward_by_block_height(this.__wbg_ptr, ptr0, len0, ptr1, ptr2, block_height); - return ret; + make_deploy(deploy_params, session_params, payment_params) { + _assertClass(deploy_params, DeployStrParams); + var ptr0 = deploy_params.__destroy_into_raw(); + _assertClass(session_params, SessionStrParams); + var ptr1 = session_params.__destroy_into_raw(); + _assertClass(payment_params, PaymentStrParams); + var ptr2 = payment_params.__destroy_into_raw(); + const ret = wasm.sdk_make_deploy(this.__wbg_ptr, ptr0, ptr1, ptr2); + if (ret[2]) { + throw takeFromExternrefTable0(ret[1]); + } + return Deploy.__wrap(ret[0]); } /** - * @param {string | undefined} node_address - * @param {PublicKey} validator_key - * @param {PublicKey} delegator_key - * @param {BlockHash} block_hash - * @returns {Promise} + * JS function for `sign_deploy`. + * + * # Arguments + * + * * `deploy` - The deploy to sign. + * * `secret_key` - The secret key for signing. + * + * # Returns + * + * The signed `Deploy`. + * @param {Deploy} deploy + * @param {string} secret_key + * @returns {Deploy} */ - get_binary_get_delegator_reward_by_block_hash(node_address, validator_key, delegator_key, block_hash) { - var ptr0 = isLikeNone(node_address) ? 0 : passStringToWasm0(node_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - var len0 = WASM_VECTOR_LEN; - _assertClass(validator_key, PublicKey); - var ptr1 = validator_key.__destroy_into_raw(); - _assertClass(delegator_key, PublicKey); - var ptr2 = delegator_key.__destroy_into_raw(); - _assertClass(block_hash, BlockHash); - var ptr3 = block_hash.__destroy_into_raw(); - const ret = wasm.sdk_get_binary_get_delegator_reward_by_block_hash(this.__wbg_ptr, ptr0, len0, ptr1, ptr2, ptr3); - return ret; + sign_deploy(deploy, secret_key) { + _assertClass(deploy, Deploy); + var ptr0 = deploy.__destroy_into_raw(); + const ptr1 = passStringToWasm0(secret_key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + const len1 = WASM_VECTOR_LEN; + const ret = wasm.sdk_sign_deploy(this.__wbg_ptr, ptr0, ptr1, len1); + return Deploy.__wrap(ret); } /** - * @param {string | undefined} node_address - * @param {RecordId} record_id - * @param {Uint8Array} key - * @returns {Promise} + * JS function for `make_transaction`. + * + * # Arguments + * + * * `builder_params` - Transaction Builder parameters. + * * `transaction_params` - The transaction parameters. + * + * # Returns + * + * A `Result` containing the created `Transaction` or a `JsError` in case of an error. + * @param {TransactionBuilderParams} builder_params + * @param {TransactionStrParams} transaction_params + * @returns {Transaction} */ - get_binary_read_record(node_address, record_id, key) { - var ptr0 = isLikeNone(node_address) ? 0 : passStringToWasm0(node_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - var len0 = WASM_VECTOR_LEN; - _assertClass(record_id, RecordId); - var ptr1 = record_id.__destroy_into_raw(); - const ptr2 = passArray8ToWasm0(key, wasm.__wbindgen_malloc); - const len2 = WASM_VECTOR_LEN; - const ret = wasm.sdk_get_binary_read_record(this.__wbg_ptr, ptr0, len0, ptr1, ptr2, len2); - return ret; + make_transaction(builder_params, transaction_params) { + _assertClass(builder_params, TransactionBuilderParams); + var ptr0 = builder_params.__destroy_into_raw(); + _assertClass(transaction_params, TransactionStrParams); + var ptr1 = transaction_params.__destroy_into_raw(); + const ret = wasm.sdk_make_transaction(this.__wbg_ptr, ptr0, ptr1); + if (ret[2]) { + throw takeFromExternrefTable0(ret[1]); + } + return Transaction.__wrap(ret[0]); } /** - * @param {string | undefined} node_address - * @param {Key} key - * @param {(string)[]} path - * @returns {Promise} + * JS function for `sign_transaction`. + * + * # Arguments + * + * * `transaction` - The transaction to sign. + * * `secret_key` - The secret key for signing. + * + * # Returns + * + * The signed `Transaction`. + * @param {Transaction} transaction + * @param {string} secret_key + * @returns {Transaction} */ - get_binary_global_state_item(node_address, key, path) { - var ptr0 = isLikeNone(node_address) ? 0 : passStringToWasm0(node_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - var len0 = WASM_VECTOR_LEN; - _assertClass(key, Key); - var ptr1 = key.__destroy_into_raw(); - const ptr2 = passArrayJsValueToWasm0(path, wasm.__wbindgen_malloc); - const len2 = WASM_VECTOR_LEN; - const ret = wasm.sdk_get_binary_global_state_item(this.__wbg_ptr, ptr0, len0, ptr1, ptr2, len2); - return ret; + sign_transaction(transaction, secret_key) { + _assertClass(transaction, Transaction); + var ptr0 = transaction.__destroy_into_raw(); + const ptr1 = passStringToWasm0(secret_key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + const len1 = WASM_VECTOR_LEN; + const ret = wasm.sdk_sign_transaction(this.__wbg_ptr, ptr0, ptr1, len1); + return Transaction.__wrap(ret); } /** - * @param {string | undefined} node_address - * @param {Digest} state_root_hash - * @param {Key} key - * @param {(string)[]} path - * @returns {Promise} + * Calls a smart contract entry point with the specified parameters and returns the result. + * + * # Arguments + * + * * `deploy_params` - The deploy parameters. + * * `session_params` - The session parameters. + * * `payment_amount` - The payment amount as a string. + * * `rpc_address` - An optional rpc address to send the request to. + * + * # Returns + * + * A `Result` containing either a `PutDeployResult` or a `JsError` in case of an error. + * + * # Errors + * + * Returns a `JsError` if there is an error during the call. + * @param {DeployStrParams} deploy_params + * @param {SessionStrParams} session_params + * @param {string} payment_amount + * @param {string | undefined} [rpc_address] + * @returns {Promise} */ - get_binary_global_state_item_by_state_root_hash(node_address, state_root_hash, key, path) { - var ptr0 = isLikeNone(node_address) ? 0 : passStringToWasm0(node_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - var len0 = WASM_VECTOR_LEN; - _assertClass(state_root_hash, Digest); - var ptr1 = state_root_hash.__destroy_into_raw(); - _assertClass(key, Key); - var ptr2 = key.__destroy_into_raw(); - const ptr3 = passArrayJsValueToWasm0(path, wasm.__wbindgen_malloc); - const len3 = WASM_VECTOR_LEN; - const ret = wasm.sdk_get_binary_global_state_item_by_state_root_hash(this.__wbg_ptr, ptr0, len0, ptr1, ptr2, ptr3, len3); + call_entrypoint_deploy(deploy_params, session_params, payment_amount, rpc_address) { + _assertClass(deploy_params, DeployStrParams); + var ptr0 = deploy_params.__destroy_into_raw(); + _assertClass(session_params, SessionStrParams); + var ptr1 = session_params.__destroy_into_raw(); + const ptr2 = passStringToWasm0(payment_amount, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + const len2 = WASM_VECTOR_LEN; + var ptr3 = isLikeNone(rpc_address) ? 0 : passStringToWasm0(rpc_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + var len3 = WASM_VECTOR_LEN; + const ret = wasm.sdk_call_entrypoint_deploy(this.__wbg_ptr, ptr0, ptr1, ptr2, len2, ptr3, len3); return ret; } /** - * @param {string | undefined} node_address - * @param {BlockHash} block_hash - * @param {Key} key - * @param {(string)[]} path - * @returns {Promise} + * Deserialize query_contract_key_options from a JavaScript object. + * @param {any} options + * @returns {queryContractKeyOptions} */ - get_binary_global_state_item_by_block_hash(node_address, block_hash, key, path) { - var ptr0 = isLikeNone(node_address) ? 0 : passStringToWasm0(node_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - var len0 = WASM_VECTOR_LEN; - _assertClass(block_hash, BlockHash); - var ptr1 = block_hash.__destroy_into_raw(); - _assertClass(key, Key); - var ptr2 = key.__destroy_into_raw(); - const ptr3 = passArrayJsValueToWasm0(path, wasm.__wbindgen_malloc); - const len3 = WASM_VECTOR_LEN; - const ret = wasm.sdk_get_binary_global_state_item_by_block_hash(this.__wbg_ptr, ptr0, len0, ptr1, ptr2, ptr3, len3); - return ret; + query_contract_key_options(options) { + const ret = wasm.sdk_query_contract_key_options(this.__wbg_ptr, options); + if (ret[2]) { + throw takeFromExternrefTable0(ret[1]); + } + return queryContractKeyOptions.__wrap(ret[0]); } /** - * @param {string | undefined} node_address - * @param {bigint} block_height - * @param {Key} key - * @param {(string)[]} path - * @returns {Promise} + * JavaScript function for query_contract_key with deserialized options. + * @param {queryContractKeyOptions | undefined} [options] + * @returns {Promise} */ - get_binary_global_state_item_by_block_height(node_address, block_height, key, path) { - var ptr0 = isLikeNone(node_address) ? 0 : passStringToWasm0(node_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - var len0 = WASM_VECTOR_LEN; - _assertClass(key, Key); - var ptr1 = key.__destroy_into_raw(); - const ptr2 = passArrayJsValueToWasm0(path, wasm.__wbindgen_malloc); - const len2 = WASM_VECTOR_LEN; - const ret = wasm.sdk_get_binary_global_state_item_by_block_height(this.__wbg_ptr, ptr0, len0, block_height, ptr1, ptr2, len2); + query_contract_key(options) { + let ptr0 = 0; + if (!isLikeNone(options)) { + _assertClass(options, queryContractKeyOptions); + ptr0 = options.__destroy_into_raw(); + } + const ret = wasm.sdk_query_contract_key(this.__wbg_ptr, ptr0); return ret; } /** - * @param {string | undefined} node_address - * @param {Transaction} transaction - * @returns {Promise} + * @param {any} options + * @returns {getAccountOptions} */ - get_binary_try_accept_transaction(node_address, transaction) { - var ptr0 = isLikeNone(node_address) ? 0 : passStringToWasm0(node_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - var len0 = WASM_VECTOR_LEN; - _assertClass(transaction, Transaction); - var ptr1 = transaction.__destroy_into_raw(); - const ret = wasm.sdk_get_binary_try_accept_transaction(this.__wbg_ptr, ptr0, len0, ptr1); - return ret; + get_account_options(options) { + const ret = wasm.sdk_get_account_options(this.__wbg_ptr, options); + if (ret[2]) { + throw takeFromExternrefTable0(ret[1]); + } + return getAccountOptions.__wrap(ret[0]); } /** - * @param {string | undefined} node_address - * @param {Transaction} transaction - * @returns {Promise} + * Retrieves account information using the provided options. + * + * This function is an asynchronous JavaScript binding for the Rust `get_account` method. + * + * # Arguments + * + * * `options` - An optional `GetAccountOptions` struct containing retrieval options, such as: + * - `account_identifier`: Identifier for the account. + * - `account_identifier_as_string`: String representation of the account identifier. + * - `maybe_block_id_as_string`: Optional string representation of the block ID. + * - `maybe_block_identifier`: Optional `BlockIdentifierInput` for specifying the block. + * - `verbosity`: Verbosity level for the output. + * - `rpc_address`: Address of the node to query. + * + * # Returns + * + * A `Result` containing either a `GetAccountResult` on success or a `JsError` on failure. + * + * # Errors + * + * Returns a `JsError` if there is an error during the retrieval process, such as issues with the provided options or network errors. + * ``` + * @param {getAccountOptions | undefined} [options] + * @returns {Promise} */ - get_binary_try_speculative_execution(node_address, transaction) { - var ptr0 = isLikeNone(node_address) ? 0 : passStringToWasm0(node_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - var len0 = WASM_VECTOR_LEN; - _assertClass(transaction, Transaction); - var ptr1 = transaction.__destroy_into_raw(); - const ret = wasm.sdk_get_binary_try_speculative_execution(this.__wbg_ptr, ptr0, len0, ptr1); + get_account(options) { + let ptr0 = 0; + if (!isLikeNone(options)) { + _assertClass(options, getAccountOptions); + ptr0 = options.__destroy_into_raw(); + } + const ret = wasm.sdk_get_account(this.__wbg_ptr, ptr0); return ret; } /** - * @param {string | undefined} [node_address] - * @returns {Promise} + * @param {getAccountOptions | undefined} [options] + * @returns {Promise} */ - get_binary_get_protocol_version(node_address) { - var ptr0 = isLikeNone(node_address) ? 0 : passStringToWasm0(node_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - var len0 = WASM_VECTOR_LEN; - const ret = wasm.sdk_get_binary_get_protocol_version(this.__wbg_ptr, ptr0, len0); + state_get_account_info(options) { + let ptr0 = 0; + if (!isLikeNone(options)) { + _assertClass(options, getAccountOptions); + ptr0 = options.__destroy_into_raw(); + } + const ret = wasm.sdk_state_get_account_info(this.__wbg_ptr, ptr0); return ret; } /** - * This function allows executing a deploy speculatively. + * Parses era summary options from a JsValue. * * # Arguments * - * * `deploy_params` - Deployment parameters for the deploy. - * * `session_params` - Session parameters for the deploy. - * * `payment_params` - Payment parameters for the deploy. - * * `verbosity` - Optional verbosity level. - * * `rpc_address` - Optional rpc address. + * * `options` - A JsValue containing era summary options to be parsed. * * # Returns * - * A `Result` containing either a `SpeculativeExecResult` or a `JsError` in case of an error. - * @param {DeployStrParams} deploy_params - * @param {SessionStrParams} session_params - * @param {PaymentStrParams} payment_params - * @param {Verbosity | undefined} [verbosity] - * @param {string | undefined} [rpc_address] - * @returns {Promise} + * Parsed era summary options as a `GetEraSummaryOptions` struct. + * @param {any} options + * @returns {getEraSummaryOptions} */ - speculative_deploy(deploy_params, session_params, payment_params, verbosity, rpc_address) { - _assertClass(deploy_params, DeployStrParams); - var ptr0 = deploy_params.__destroy_into_raw(); - _assertClass(session_params, SessionStrParams); - var ptr1 = session_params.__destroy_into_raw(); - _assertClass(payment_params, PaymentStrParams); - var ptr2 = payment_params.__destroy_into_raw(); - var ptr3 = isLikeNone(rpc_address) ? 0 : passStringToWasm0(rpc_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - var len3 = WASM_VECTOR_LEN; - const ret = wasm.sdk_speculative_deploy(this.__wbg_ptr, ptr0, ptr1, ptr2, isLikeNone(verbosity) ? 3 : verbosity, ptr3, len3); - return ret; + get_era_summary_options(options) { + const ret = wasm.sdk_get_era_summary_options(this.__wbg_ptr, options); + if (ret[2]) { + throw takeFromExternrefTable0(ret[1]); + } + return getEraSummaryOptions.__wrap(ret[0]); } /** - * Calls a smart contract entry point with the specified parameters and returns the result. + * Retrieves era summary information using the provided options. * * # Arguments * - * * `transaction_params` - Transaction parameters. - * * `builder_params` - Transaction Builder parameters. - * * `rpc_address` - An optional rpc address to send the request to. + * * `options` - An optional `GetEraSummaryOptions` struct containing retrieval options. * * # Returns * - * A `Result` containing either a `PutTransactionResult` or a `JsError` in case of an error. + * A `Result` containing either a `GetEraSummaryResult` or a `JsError` in case of an error. * * # Errors * - * Returns a `JsError` if there is an error during the call. - * @param {TransactionBuilderParams} builder_params + * Returns a `JsError` if there is an error during the retrieval process. + * @param {getEraSummaryOptions | undefined} [options] + * @returns {Promise} + */ + get_era_summary(options) { + let ptr0 = 0; + if (!isLikeNone(options)) { + _assertClass(options, getEraSummaryOptions); + ptr0 = options.__destroy_into_raw(); + } + const ret = wasm.sdk_get_era_summary(this.__wbg_ptr, ptr0); + return ret; + } + /** + * @param {getEraSummaryOptions | undefined} [options] + * @returns {Promise} + */ + chain_get_era_summary(options) { + let ptr0 = 0; + if (!isLikeNone(options)) { + _assertClass(options, getEraSummaryOptions); + ptr0 = options.__destroy_into_raw(); + } + const ret = wasm.sdk_chain_get_era_summary(this.__wbg_ptr, ptr0); + return ret; + } + /** + * JS function for transaction transferring funds. + * + * # Arguments + * + * * `maybe_source` - Optional transfer source uref. + * * `target_account` - The target account. + * * `amount` - The amount to transfer. + * * `transaction_params` - The transaction parameters. + * * `maybe_id` - An optional transfer ID (defaults to a random number). + * * `verbosity` - The verbosity level for logging (optional). + * * `rpc_address` - The address of the node to connect to (optional). + * + * # Returns + * + * A `Result` containing the result of the transfer or a `JsError` in case of an error. + * @param {URef | undefined} maybe_source + * @param {string} target_account + * @param {string} amount * @param {TransactionStrParams} transaction_params + * @param {string | undefined} [maybe_id] + * @param {Verbosity | undefined} [verbosity] * @param {string | undefined} [rpc_address] * @returns {Promise} */ - call_entrypoint(builder_params, transaction_params, rpc_address) { - _assertClass(builder_params, TransactionBuilderParams); - var ptr0 = builder_params.__destroy_into_raw(); + transfer_transaction(maybe_source, target_account, amount, transaction_params, maybe_id, verbosity, rpc_address) { + let ptr0 = 0; + if (!isLikeNone(maybe_source)) { + _assertClass(maybe_source, URef); + ptr0 = maybe_source.__destroy_into_raw(); + } + const ptr1 = passStringToWasm0(target_account, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + const len1 = WASM_VECTOR_LEN; + const ptr2 = passStringToWasm0(amount, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + const len2 = WASM_VECTOR_LEN; _assertClass(transaction_params, TransactionStrParams); - var ptr1 = transaction_params.__destroy_into_raw(); - var ptr2 = isLikeNone(rpc_address) ? 0 : passStringToWasm0(rpc_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - var len2 = WASM_VECTOR_LEN; - const ret = wasm.sdk_call_entrypoint(this.__wbg_ptr, ptr0, ptr1, ptr2, len2); + var ptr3 = transaction_params.__destroy_into_raw(); + var ptr4 = isLikeNone(maybe_id) ? 0 : passStringToWasm0(maybe_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + var len4 = WASM_VECTOR_LEN; + var ptr5 = isLikeNone(rpc_address) ? 0 : passStringToWasm0(rpc_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + var len5 = WASM_VECTOR_LEN; + const ret = wasm.sdk_transfer_transaction(this.__wbg_ptr, ptr0, ptr1, len1, ptr2, len2, ptr3, ptr4, len4, isLikeNone(verbosity) ? 3 : verbosity, ptr5, len5); return ret; } } @@ -13630,11 +13629,6 @@ class queryGlobalStateOptions { } module.exports.queryGlobalStateOptions = queryGlobalStateOptions; -module.exports.__wbindgen_string_new = function(arg0, arg1) { - const ret = getStringFromWasm0(arg0, arg1); - return ret; -}; - module.exports.__wbindgen_error_new = function(arg0, arg1) { const ret = new Error(getStringFromWasm0(arg0, arg1)); return ret; @@ -13650,43 +13644,28 @@ module.exports.__wbg_puttransactionresult_new = function(arg0) { return ret; }; -module.exports.__wbg_getbalanceresult_new = function(arg0) { - const ret = GetBalanceResult.__wrap(arg0); - return ret; -}; - -module.exports.__wbg_listrpcsresult_new = function(arg0) { - const ret = ListRpcsResult.__wrap(arg0); - return ret; -}; - -module.exports.__wbg_getstateroothashresult_new = function(arg0) { - const ret = GetStateRootHashResult.__wrap(arg0); - return ret; -}; - -module.exports.__wbg_speculativeexectxnresult_new = function(arg0) { - const ret = SpeculativeExecTxnResult.__wrap(arg0); +module.exports.__wbg_queryglobalstateresult_new = function(arg0) { + const ret = QueryGlobalStateResult.__wrap(arg0); return ret; }; -module.exports.__wbg_putdeployresult_new = function(arg0) { - const ret = PutDeployResult.__wrap(arg0); +module.exports.__wbindgen_string_new = function(arg0, arg1) { + const ret = getStringFromWasm0(arg0, arg1); return ret; }; -module.exports.__wbg_speculativeexecresult_new = function(arg0) { - const ret = SpeculativeExecResult.__wrap(arg0); +module.exports.__wbg_getnodestatusresult_new = function(arg0) { + const ret = GetNodeStatusResult.__wrap(arg0); return ret; }; -module.exports.__wbg_geterasummaryresult_new = function(arg0) { - const ret = GetEraSummaryResult.__wrap(arg0); +module.exports.__wbg_deploy_new = function(arg0) { + const ret = Deploy.__wrap(arg0); return ret; }; -module.exports.__wbg_getblockresult_new = function(arg0) { - const ret = GetBlockResult.__wrap(arg0); +module.exports.__wbg_speculativeexectxnresult_new = function(arg0) { + const ret = SpeculativeExecTxnResult.__wrap(arg0); return ret; }; @@ -13695,23 +13674,18 @@ module.exports.__wbg_getvalidatorchangesresult_new = function(arg0) { return ret; }; -module.exports.__wbg_deploy_new = function(arg0) { - const ret = Deploy.__wrap(arg0); - return ret; -}; - -module.exports.__wbg_querybalancedetailsresult_new = function(arg0) { - const ret = QueryBalanceDetailsResult.__wrap(arg0); +module.exports.__wbg_putdeployresult_new = function(arg0) { + const ret = PutDeployResult.__wrap(arg0); return ret; }; -module.exports.__wbg_gettransactionresult_new = function(arg0) { - const ret = GetTransactionResult.__wrap(arg0); +module.exports.__wbg_getblocktransfersresult_new = function(arg0) { + const ret = GetBlockTransfersResult.__wrap(arg0); return ret; }; -module.exports.__wbg_queryglobalstateresult_new = function(arg0) { - const ret = QueryGlobalStateResult.__wrap(arg0); +module.exports.__wbg_getchainspecresult_new = function(arg0) { + const ret = GetChainspecResult.__wrap(arg0); return ret; }; @@ -13720,23 +13694,18 @@ module.exports.__wbg_geterainforesult_new = function(arg0) { return ret; }; -module.exports.__wbg_getchainspecresult_new = function(arg0) { - const ret = GetChainspecResult.__wrap(arg0); - return ret; -}; - module.exports.__wbg_getdeployresult_new = function(arg0) { const ret = GetDeployResult.__wrap(arg0); return ret; }; -module.exports.__wbg_getaccountresult_new = function(arg0) { - const ret = GetAccountResult.__wrap(arg0); +module.exports.__wbg_listrpcsresult_new = function(arg0) { + const ret = ListRpcsResult.__wrap(arg0); return ret; }; -module.exports.__wbg_getaddressableentityresult_new = function(arg0) { - const ret = GetAddressableEntityResult.__wrap(arg0); +module.exports.__wbg_querybalanceresult_new = function(arg0) { + const ret = QueryBalanceResult.__wrap(arg0); return ret; }; @@ -13751,20 +13720,35 @@ module.exports.__wbindgen_boolean_get = function(arg0) { return ret; }; -module.exports.__wbg_transaction_new = function(arg0) { - const ret = Transaction.__wrap(arg0); +module.exports.__wbg_getaddressableentityresult_new = function(arg0) { + const ret = GetAddressableEntityResult.__wrap(arg0); return ret; }; -module.exports.__wbg_querybalanceresult_new = function(arg0) { - const ret = QueryBalanceResult.__wrap(arg0); +module.exports.__wbg_gettransactionresult_new = function(arg0) { + const ret = GetTransactionResult.__wrap(arg0); return ret; }; -module.exports.__wbg_disconnectFromSite_2d2501f4e00e57c8 = function() { return handleError(function (arg0) { - const ret = arg0.disconnectFromSite(); +module.exports.__wbg_getbalanceresult_new = function(arg0) { + const ret = GetBalanceResult.__wrap(arg0); return ret; -}, arguments) }; +}; + +module.exports.__wbg_getauctioninforesult_new = function(arg0) { + const ret = GetAuctionInfoResult.__wrap(arg0); + return ret; +}; + +module.exports.__wbg_speculativeexecresult_new = function(arg0) { + const ret = SpeculativeExecResult.__wrap(arg0); + return ret; +}; + +module.exports.__wbg_getstateroothashresult_new = function(arg0) { + const ret = GetStateRootHashResult.__wrap(arg0); + return ret; +}; module.exports.__wbg_getVersion_821280958b37ff1f = function() { return handleError(function (arg0) { const ret = arg0.getVersion(); @@ -13780,23 +13764,23 @@ module.exports.__wbindgen_string_get = function(arg0, arg1) { getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true); }; -module.exports.__wbg_getauctioninforesult_new = function(arg0) { - const ret = GetAuctionInfoResult.__wrap(arg0); +module.exports.__wbg_getaccountresult_new = function(arg0) { + const ret = GetAccountResult.__wrap(arg0); return ret; }; -module.exports.__wbg_getblocktransfersresult_new = function(arg0) { - const ret = GetBlockTransfersResult.__wrap(arg0); +module.exports.__wbg_geterasummaryresult_new = function(arg0) { + const ret = GetEraSummaryResult.__wrap(arg0); return ret; }; -module.exports.__wbg_getnodestatusresult_new = function(arg0) { - const ret = GetNodeStatusResult.__wrap(arg0); +module.exports.__wbg_querybalancedetailsresult_new = function(arg0) { + const ret = QueryBalanceDetailsResult.__wrap(arg0); return ret; }; -module.exports.__wbg_getpeersresult_new = function(arg0) { - const ret = GetPeersResult.__wrap(arg0); +module.exports.__wbg_transaction_new = function(arg0) { + const ret = Transaction.__wrap(arg0); return ret; }; @@ -13805,6 +13789,21 @@ module.exports.__wbg_isConnected_f84ffbccb9898623 = function() { return handleEr return ret; }, arguments) }; +module.exports.__wbg_getblockresult_new = function(arg0) { + const ret = GetBlockResult.__wrap(arg0); + return ret; +}; + +module.exports.__wbg_getpeersresult_new = function(arg0) { + const ret = GetPeersResult.__wrap(arg0); + return ret; +}; + +module.exports.__wbg_disconnectFromSite_2d2501f4e00e57c8 = function() { return handleError(function (arg0) { + const ret = arg0.disconnectFromSite(); + return ret; +}, arguments) }; + module.exports.__wbindgen_is_function = function(arg0) { const ret = typeof(arg0) === 'function'; return ret; @@ -13825,11 +13824,6 @@ module.exports.__wbg_getActivePublicKey_7cd2af2b4a2b810f = function() { return h return ret; }, arguments) }; -module.exports.__wbg_messages_new = function(arg0) { - const ret = Messages.__wrap(arg0); - return ret; -}; - module.exports.__wbindgen_number_get = function(arg0, arg1) { const obj = arg1; const ret = typeof(obj) === 'number' ? obj : undefined; @@ -13837,23 +13831,8 @@ module.exports.__wbindgen_number_get = function(arg0, arg1) { getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true); }; -module.exports.__wbg_messages_unwrap = function(arg0) { - const ret = Messages.__unwrap(arg0); - return ret; -}; - -module.exports.__wbg_subscription_unwrap = function(arg0) { - const ret = Subscription.__unwrap(arg0); - return ret; -}; - -module.exports.__wbindgen_cb_drop = function(arg0) { - const obj = arg0.original; - if (obj.cnt-- == 1) { - obj.a = 0; - return true; - } - const ret = false; +module.exports.__wbg_messages_new = function(arg0) { + const ret = Messages.__wrap(arg0); return ret; }; @@ -13872,6 +13851,16 @@ module.exports.__wbg_sign_5740ada8ba2ef8c3 = function() { return handleError(fun return ret; }, arguments) }; +module.exports.__wbg_subscription_unwrap = function(arg0) { + const ret = Subscription.__unwrap(arg0); + return ret; +}; + +module.exports.__wbg_messages_unwrap = function(arg0) { + const ret = Messages.__unwrap(arg0); + return ret; +}; + module.exports.__wbindgen_is_undefined = function(arg0) { const ret = arg0 === undefined; return ret; @@ -13887,6 +13876,16 @@ module.exports.__wbindgen_jsval_eq = function(arg0, arg1) { return ret; }; +module.exports.__wbindgen_cb_drop = function(arg0) { + const obj = arg0.original; + if (obj.cnt-- == 1) { + obj.a = 0; + return true; + } + const ret = false; + return ret; +}; + module.exports.__wbg_log_a4ea4344db098de3 = function(arg0, arg1) { console.log(getStringFromWasm0(arg0, arg1)); }; @@ -14429,33 +14428,33 @@ module.exports.__wbindgen_memory = function() { return ret; }; -module.exports.__wbindgen_closure_wrapper3777 = function(arg0, arg1, arg2) { - const ret = makeMutClosure(arg0, arg1, 821, __wbg_adapter_38); +module.exports.__wbindgen_closure_wrapper5161 = function(arg0, arg1, arg2) { + const ret = makeMutClosure(arg0, arg1, 938, __wbg_adapter_38); return ret; }; -module.exports.__wbindgen_closure_wrapper3779 = function(arg0, arg1, arg2) { - const ret = makeMutClosure(arg0, arg1, 821, __wbg_adapter_38); +module.exports.__wbindgen_closure_wrapper5163 = function(arg0, arg1, arg2) { + const ret = makeMutClosure(arg0, arg1, 938, __wbg_adapter_38); return ret; }; -module.exports.__wbindgen_closure_wrapper3781 = function(arg0, arg1, arg2) { - const ret = makeMutClosure(arg0, arg1, 821, __wbg_adapter_38); +module.exports.__wbindgen_closure_wrapper5165 = function(arg0, arg1, arg2) { + const ret = makeMutClosure(arg0, arg1, 938, __wbg_adapter_43); return ret; }; -module.exports.__wbindgen_closure_wrapper3783 = function(arg0, arg1, arg2) { - const ret = makeMutClosure(arg0, arg1, 821, __wbg_adapter_45); +module.exports.__wbindgen_closure_wrapper5167 = function(arg0, arg1, arg2) { + const ret = makeMutClosure(arg0, arg1, 938, __wbg_adapter_38); return ret; }; -module.exports.__wbindgen_closure_wrapper6007 = function(arg0, arg1, arg2) { - const ret = makeMutClosure(arg0, arg1, 1142, __wbg_adapter_48); +module.exports.__wbindgen_closure_wrapper6001 = function(arg0, arg1, arg2) { + const ret = makeMutClosure(arg0, arg1, 1140, __wbg_adapter_48); return ret; }; -module.exports.__wbindgen_closure_wrapper6059 = function(arg0, arg1, arg2) { - const ret = makeMutClosure(arg0, arg1, 1156, __wbg_adapter_51); +module.exports.__wbindgen_closure_wrapper6053 = function(arg0, arg1, arg2) { + const ret = makeMutClosure(arg0, arg1, 1154, __wbg_adapter_51); return ret; }; diff --git a/pkg-nodejs/casper_rust_wasm_sdk_bg.wasm b/pkg-nodejs/casper_rust_wasm_sdk_bg.wasm index b8e658376..64604a89f 100644 Binary files a/pkg-nodejs/casper_rust_wasm_sdk_bg.wasm and b/pkg-nodejs/casper_rust_wasm_sdk_bg.wasm differ diff --git a/pkg-nodejs/casper_rust_wasm_sdk_bg.wasm.d.ts b/pkg-nodejs/casper_rust_wasm_sdk_bg.wasm.d.ts index 9dd69cf15..a83aac2c5 100644 --- a/pkg-nodejs/casper_rust_wasm_sdk_bg.wasm.d.ts +++ b/pkg-nodejs/casper_rust_wasm_sdk_bg.wasm.d.ts @@ -1,9 +1,6 @@ /* tslint:disable */ /* eslint-disable */ export const memory: WebAssembly.Memory; -export function __wbg_peerentry_free(a: number, b: number): void; -export function peerentry_node_id(a: number): Array; -export function peerentry_address(a: number): Array; export function __wbg_getbalanceresult_free(a: number, b: number): void; export function getbalanceresult_api_version(a: number): number; export function getbalanceresult_balance_value(a: number): number; @@ -67,6 +64,230 @@ export function __wbg_get_querycontractdictoptions_rpc_address(a: number): Array export function __wbg_get_querycontractdictoptions_verbosity(a: number): number; export function __wbg_set_querycontractdictoptions_dictionary_item_params(a: number, b: number): void; export function __wbg_set_querycontractdictoptions_dictionary_item_identifier(a: number, b: number): void; +export function __wbg_paymentstrparams_free(a: number, b: number): void; +export function paymentstrparams_new(a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number, n: number, o: number, p: number, q: number, r: number, s: number): number; +export function paymentstrparams_payment_amount(a: number): Array; +export function paymentstrparams_set_payment_amount(a: number, b: number, c: number): void; +export function paymentstrparams_payment_hash(a: number): Array; +export function paymentstrparams_set_payment_hash(a: number, b: number, c: number): void; +export function paymentstrparams_payment_name(a: number): Array; +export function paymentstrparams_set_payment_name(a: number, b: number, c: number): void; +export function paymentstrparams_payment_package_hash(a: number): Array; +export function paymentstrparams_set_payment_package_hash(a: number, b: number, c: number): void; +export function paymentstrparams_payment_package_name(a: number): Array; +export function paymentstrparams_set_payment_package_name(a: number, b: number, c: number): void; +export function paymentstrparams_payment_path(a: number): Array; +export function paymentstrparams_set_payment_path(a: number, b: number, c: number): void; +export function paymentstrparams_payment_args_simple(a: number): number; +export function paymentstrparams_set_payment_args_simple(a: number, b: number): void; +export function paymentstrparams_payment_args_json(a: number): Array; +export function paymentstrparams_set_payment_args_json(a: number, b: number, c: number): void; +export function paymentstrparams_payment_version(a: number): Array; +export function paymentstrparams_set_payment_version(a: number, b: number, c: number): void; +export function paymentstrparams_payment_entry_point(a: number): Array; +export function paymentstrparams_set_payment_entry_point(a: number, b: number, c: number): void; +export function __wbg_sessionstrparams_free(a: number, b: number): void; +export function sessionstrparams_new(a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number, n: number, o: number, p: number, q: number, r: number, s: number): number; +export function sessionstrparams_session_hash(a: number): Array; +export function sessionstrparams_set_session_hash(a: number, b: number, c: number): void; +export function sessionstrparams_session_name(a: number): Array; +export function sessionstrparams_set_session_name(a: number, b: number, c: number): void; +export function sessionstrparams_session_package_hash(a: number): Array; +export function sessionstrparams_set_session_package_hash(a: number, b: number, c: number): void; +export function sessionstrparams_session_package_name(a: number): Array; +export function sessionstrparams_set_session_package_name(a: number, b: number, c: number): void; +export function sessionstrparams_session_path(a: number): Array; +export function sessionstrparams_set_session_path(a: number, b: number, c: number): void; +export function sessionstrparams_session_bytes(a: number): number; +export function sessionstrparams_set_session_bytes(a: number, b: number): void; +export function sessionstrparams_session_args_simple(a: number): number; +export function sessionstrparams_set_session_args_simple(a: number, b: number): void; +export function sessionstrparams_session_args_json(a: number): Array; +export function sessionstrparams_set_session_args_json(a: number, b: number, c: number): void; +export function sessionstrparams_session_version(a: number): Array; +export function sessionstrparams_set_session_version(a: number, b: number, c: number): void; +export function sessionstrparams_session_entry_point(a: number): Array; +export function sessionstrparams_set_session_entry_point(a: number, b: number, c: number): void; +export function sessionstrparams_is_session_transfer(a: number): number; +export function sessionstrparams_set_is_session_transfer(a: number, b: number): void; +export function digest_new_js_alias(a: number, b: number): Array; +export function digest_fromString(a: number, b: number): Array; +export function digest_fromRaw(a: number, b: number): Array; +export function digest_toJson(a: number): number; +export function digest_toString(a: number): Array; +export function __wbg_addressableentityhash_free(a: number, b: number): void; +export function addressableentityhash_new_js_alias(a: number, b: number): Array; +export function addressableentityhash_fromFormattedStr(a: number, b: number): Array; +export function addressableentityhash_toFormattedString(a: number): Array; +export function addressableentityhash_fromUint8Array(a: number, b: number): number; +export function blockhash_new_js_alias(a: number, b: number): Array; +export function blockhash_fromDigest(a: number): Array; +export function blockhash_toJson(a: number): number; +export function blockhash_toString(a: number): Array; +export function contractpackagehash_new_js_alias(a: number, b: number): Array; +export function contractpackagehash_fromFormattedStr(a: number, b: number): Array; +export function contractpackagehash_toFormattedString(a: number): Array; +export function contractpackagehash_fromUint8Array(a: number, b: number): number; +export function deployhash_new_js_alias(a: number, b: number): Array; +export function deployhash_toJson(a: number): number; +export function deployhash_toString(a: number): Array; +export function __wbg_dictionaryitemidentifier_free(a: number, b: number): void; +export function dictionaryitemidentifier_newFromAccountInfo(a: number, b: number, c: number, d: number, e: number, f: number): Array; +export function dictionaryitemidentifier_newFromContractInfo(a: number, b: number, c: number, d: number, e: number, f: number): Array; +export function dictionaryitemidentifier_newFromEntityInfo(a: number, b: number, c: number, d: number, e: number, f: number): Array; +export function dictionaryitemidentifier_newFromSeedUref(a: number, b: number, c: number, d: number): Array; +export function dictionaryitemidentifier_newFromDictionaryKey(a: number, b: number): Array; +export function dictionaryitemidentifier_toJson(a: number): number; +export function __wbg_publickey_free(a: number, b: number): void; +export function publickey_new_js_alias(a: number, b: number): Array; +export function publickey_fromUint8Array(a: number, b: number): Array; +export function publickey_toAccountHash(a: number): number; +export function publickey_toPurseUref(a: number): number; +export function publickey_toJson(a: number): number; +export function __wbg_transaction_free(a: number, b: number): void; +export function transaction_new(a: number): number; +export function transaction_toJson(a: number): number; +export function transaction_newSession(a: number, b: number): Array; +export function transaction_newTransfer(a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number): Array; +export function transaction_withTTL(a: number, b: number, c: number, d: number, e: number): number; +export function transaction_withTimestamp(a: number, b: number, c: number, d: number, e: number): number; +export function transaction_withChainName(a: number, b: number, c: number, d: number, e: number): number; +export function transaction_withPublicKey(a: number, b: number, c: number, d: number): number; +export function transaction_withAccountHash(a: number, b: number, c: number, d: number): number; +export function transaction_withEntryPoint(a: number, b: number, c: number, d: number, e: number): number; +export function transaction_withEntityHash(a: number, b: number, c: number, d: number): number; +export function transaction_withPackageHash(a: number, b: number, c: number, d: number): number; +export function transaction_withTransactionBytes(a: number, b: number, c: number, d: number, e: number): number; +export function transaction_withSecretKey(a: number, b: number, c: number): number; +export function transaction_verify(a: number): number; +export function transaction_hash(a: number): number; +export function transaction_expired(a: number): number; +export function transaction_expires(a: number): number; +export function transaction_signers(a: number): number; +export function transaction_authorization_keys(a: number): number; +export function transaction_sign(a: number, b: number, c: number): number; +export function transaction_approvalsHash(a: number): number; +export function transaction_approvals(a: number): number; +export function transaction_is_native(a: number): number; +export function transaction_target(a: number): number; +export function transaction_is_standard_payment(a: number): number; +export function transaction_session_args(a: number): number; +export function transaction_addSignature(a: number, b: number, c: number, d: number, e: number): number; +export function transaction_entry_point(a: number): Array; +export function transaction_ttl(a: number): Array; +export function transaction_timestamp(a: number): Array; +export function transaction_size_estimate(a: number): number; +export function transaction_chain_name(a: number): Array; +export function transaction_initiator_addr(a: number): Array; +export function transaction_pricing_mode(a: number): number; +export function transaction_additional_computation_factor(a: number): number; +export function transaction_receipt(a: number): number; +export function transaction_gas_price_tolerance(a: number): number; +export function transaction_account_hash(a: number): number; +export function transaction_addArg(a: number, b: number, c: number, d: number): Array; +export function __wbg_transactionstrparams_free(a: number, b: number): void; +export function transactionstrparams_new(a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number, n: number, o: number, p: number, q: number, r: number, s: number, t: number, u: number, v: number, w: number, x: number): number; +export function transactionstrparams_new_with_defaults(a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number): number; +export function transactionstrparams_secret_key(a: number): Array; +export function transactionstrparams_set_secret_key(a: number, b: number, c: number): void; +export function transactionstrparams_timestamp(a: number): Array; +export function transactionstrparams_set_timestamp(a: number, b: number, c: number): void; +export function transactionstrparams_setDefaultTimestamp(a: number): void; +export function transactionstrparams_ttl(a: number): Array; +export function transactionstrparams_set_ttl(a: number, b: number, c: number): void; +export function transactionstrparams_setDefaultTTL(a: number): void; +export function transactionstrparams_chain_name(a: number): Array; +export function transactionstrparams_set_chain_name(a: number, b: number, c: number): void; +export function transactionstrparams_initiator_addr(a: number): Array; +export function transactionstrparams_set_initiator_addr(a: number, b: number, c: number): void; +export function transactionstrparams_session_args_simple(a: number): number; +export function transactionstrparams_set_session_args_simple(a: number, b: number, c: number): void; +export function transactionstrparams_session_args_json(a: number): Array; +export function transactionstrparams_set_session_args_json(a: number, b: number, c: number): void; +export function transactionstrparams_pricing_mode(a: number): number; +export function transactionstrparams_set_pricing_mode(a: number, b: number): void; +export function transactionstrparams_additional_computation_factor(a: number): Array; +export function transactionstrparams_set_additional_computation_factor(a: number, b: number, c: number): void; +export function transactionstrparams_payment_amount(a: number): Array; +export function transactionstrparams_set_payment_amount(a: number, b: number, c: number): void; +export function transactionstrparams_gas_price_tolerance(a: number): Array; +export function transactionstrparams_set_gas_price_tolerance(a: number, b: number, c: number): void; +export function transactionstrparams_receipt(a: number): Array; +export function transactionstrparams_set_receipt(a: number, b: number, c: number): void; +export function transactionstrparams_standard_payment(a: number): number; +export function transactionstrparams_set_standard_payment(a: number, b: number): void; +export function __wbg_uref_free(a: number, b: number): void; +export function uref_new_js_alias(a: number, b: number, c: number): Array; +export function uref_fromFormattedStr(a: number, b: number): Array; +export function uref_fromUint8Array(a: number, b: number, c: number): number; +export function uref_toFormattedString(a: number): Array; +export function uref_toJson(a: number): number; +export function __wbg_putdeployresult_free(a: number, b: number): void; +export function putdeployresult_api_version(a: number): number; +export function putdeployresult_deploy_hash(a: number): number; +export function putdeployresult_toJson(a: number): number; +export function sdk_deploy(a: number, b: number, c: number, d: number, e: number, f: number, g: number): number; +export function __wbg_getdeployresult_free(a: number, b: number): void; +export function getdeployresult_api_version(a: number): number; +export function getdeployresult_deploy(a: number): number; +export function getdeployresult_execution_info(a: number): number; +export function getdeployresult_toJson(a: number): number; +export function __wbg_getdeployoptions_free(a: number, b: number): void; +export function __wbg_get_getdeployoptions_deploy_hash_as_string(a: number): Array; +export function __wbg_set_getdeployoptions_deploy_hash_as_string(a: number, b: number, c: number): void; +export function __wbg_get_getdeployoptions_deploy_hash(a: number): number; +export function __wbg_set_getdeployoptions_deploy_hash(a: number, b: number): void; +export function __wbg_get_getdeployoptions_finalized_approvals(a: number): number; +export function __wbg_set_getdeployoptions_finalized_approvals(a: number, b: number): void; +export function __wbg_get_getdeployoptions_rpc_address(a: number): Array; +export function __wbg_set_getdeployoptions_rpc_address(a: number, b: number, c: number): void; +export function __wbg_get_getdeployoptions_verbosity(a: number): number; +export function __wbg_set_getdeployoptions_verbosity(a: number, b: number): void; +export function sdk_get_deploy_options(a: number, b: number): Array; +export function sdk_get_deploy(a: number, b: number): number; +export function sdk_info_get_deploy(a: number, b: number): number; +export function __wbg_gettransactionresult_free(a: number, b: number): void; +export function gettransactionresult_api_version(a: number): number; +export function gettransactionresult_transaction(a: number): number; +export function gettransactionresult_execution_info(a: number): number; +export function gettransactionresult_toJson(a: number): number; +export function __wbg_get_gettransactionoptions_transaction_hash(a: number): number; +export function __wbg_set_gettransactionoptions_transaction_hash(a: number, b: number): void; +export function sdk_get_transaction_options(a: number, b: number): Array; +export function sdk_get_transaction(a: number, b: number): number; +export function sdk_info_get_transaction(a: number, b: number): number; +export function __wbg_speculativeexectxnresult_free(a: number, b: number): void; +export function speculativeexectxnresult_api_version(a: number): number; +export function speculativeexectxnresult_block_hash(a: number): number; +export function speculativeexectxnresult_execution_result(a: number): number; +export function speculativeexectxnresult_toJson(a: number): number; +export function __wbg_getspeculativeexectxnoptions_free(a: number, b: number): void; +export function __wbg_get_getspeculativeexectxnoptions_transaction_as_string(a: number): Array; +export function __wbg_set_getspeculativeexectxnoptions_transaction_as_string(a: number, b: number, c: number): void; +export function __wbg_get_getspeculativeexectxnoptions_transaction(a: number): number; +export function __wbg_set_getspeculativeexectxnoptions_transaction(a: number, b: number): void; +export function __wbg_get_getspeculativeexectxnoptions_rpc_address(a: number): Array; +export function __wbg_set_getspeculativeexectxnoptions_rpc_address(a: number, b: number, c: number): void; +export function __wbg_get_getspeculativeexectxnoptions_verbosity(a: number): number; +export function __wbg_set_getspeculativeexectxnoptions_verbosity(a: number, b: number): void; +export function sdk_get_speculative_exec_options(a: number, b: number): Array; +export function sdk_speculative_exec(a: number, b: number): number; +export function sdk_make_transfer(a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number): Array; +export function sdk_make_transfer_transaction(a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number): Array; +export function __wbg_gettransactionoptions_free(a: number, b: number): void; +export function __wbg_set_gettransactionoptions_verbosity(a: number, b: number): void; +export function __wbg_set_gettransactionoptions_transaction_hash_as_string(a: number, b: number, c: number): void; +export function __wbg_set_gettransactionoptions_rpc_address(a: number, b: number, c: number): void; +export function deployhash_fromDigest(a: number): Array; +export function __wbg_get_gettransactionoptions_finalized_approvals(a: number): number; +export function __wbg_set_gettransactionoptions_finalized_approvals(a: number, b: number): void; +export function __wbg_get_gettransactionoptions_transaction_hash_as_string(a: number): Array; +export function __wbg_get_gettransactionoptions_rpc_address(a: number): Array; +export function __wbg_get_gettransactionoptions_verbosity(a: number): number; +export function __wbg_digest_free(a: number, b: number): void; +export function __wbg_blockhash_free(a: number, b: number): void; +export function __wbg_contractpackagehash_free(a: number, b: number): void; +export function __wbg_deployhash_free(a: number, b: number): void; export function __wbg_geterainforesult_free(a: number, b: number): void; export function geterainforesult_api_version(a: number): number; export function geterainforesult_era_summary(a: number): number; @@ -83,558 +304,115 @@ export function __wbg_set_geterainfooptions_verbosity(a: number, b: number): voi export function sdk_get_era_info_options(a: number, b: number): Array; export function sdk_get_era_info(a: number, b: number): number; export function sdk_chain_get_era_info_by_switch_block(a: number, b: number): number; -export function __wbg_accessrights_free(a: number, b: number): void; -export function accessrights_NONE(): number; -export function accessrights_READ(): number; -export function accessrights_WRITE(): number; -export function accessrights_ADD(): number; -export function accessrights_READ_ADD(): number; -export function accessrights_READ_WRITE(): number; -export function accessrights_ADD_WRITE(): number; -export function accessrights_READ_ADD_WRITE(): number; -export function accessrights_new(a: number): Array; -export function accessrights_from_bits(a: number, b: number, c: number): number; -export function accessrights_is_readable(a: number): number; -export function accessrights_is_writeable(a: number): number; -export function accessrights_is_addable(a: number): number; -export function accessrights_is_none(a: number): number; -export function __wbg_dictionaryaddr_free(a: number, b: number): void; -export function dictionaryaddr_new(a: number, b: number): Array; -export function transferaddr_new(a: number, b: number): Array; -export function urefaddr_new(a: number, b: number): Array; -export function __wbg_blockidentifier_free(a: number, b: number): void; -export function blockidentifier_new(a: number): number; -export function blockidentifier_from_hash(a: number): number; -export function blockidentifier_fromHeight(a: number): number; -export function blockidentifier_toJson(a: number): number; -export function __wbg_eraid_free(a: number, b: number): void; -export function eraid_new(a: number): number; -export function eraid_value(a: number): number; -export function __wbg_getauctioninforesult_free(a: number, b: number): void; -export function getauctioninforesult_api_version(a: number): number; -export function getauctioninforesult_auction_state(a: number): number; -export function getauctioninforesult_toJson(a: number): number; -export function __wbg_getauctioninfooptions_free(a: number, b: number): void; -export function __wbg_get_getauctioninfooptions_maybe_block_id_as_string(a: number): Array; -export function __wbg_set_getauctioninfooptions_maybe_block_id_as_string(a: number, b: number, c: number): void; -export function __wbg_get_getauctioninfooptions_maybe_block_identifier(a: number): number; -export function __wbg_set_getauctioninfooptions_maybe_block_identifier(a: number, b: number): void; -export function __wbg_get_getauctioninfooptions_rpc_address(a: number): Array; -export function __wbg_set_getauctioninfooptions_rpc_address(a: number, b: number, c: number): void; -export function __wbg_get_getauctioninfooptions_verbosity(a: number): number; -export function __wbg_set_getauctioninfooptions_verbosity(a: number, b: number): void; -export function sdk_get_auction_info_options(a: number, b: number): Array; -export function sdk_get_auction_info(a: number, b: number): number; -export function sdk_state_get_auction_info_js_alias(a: number, b: number): number; -export function __wbg_getblockresult_free(a: number, b: number): void; -export function getblockresult_api_version(a: number): number; -export function getblockresult_block(a: number): number; -export function getblockresult_toJson(a: number): number; -export function sdk_get_block_options(a: number, b: number): Array; -export function sdk_get_block(a: number, b: number): number; -export function sdk_chain_get_block(a: number, b: number): number; -export function __wbg_getchainspecresult_free(a: number, b: number): void; -export function getchainspecresult_api_version(a: number): number; -export function getchainspecresult_chainspec_bytes(a: number): number; -export function getchainspecresult_toJson(a: number): number; -export function sdk_get_chainspec(a: number, b: number, c: number, d: number): number; -export function sdk_info_get_chainspec(a: number, b: number, c: number, d: number): number; -export function __wbg_getnodestatusresult_free(a: number, b: number): void; -export function getnodestatusresult_api_version(a: number): number; -export function getnodestatusresult_chainspec_name(a: number): Array; -export function getnodestatusresult_starting_state_root_hash(a: number): number; -export function getnodestatusresult_peers(a: number): number; -export function getnodestatusresult_last_added_block_info(a: number): number; -export function getnodestatusresult_our_public_signing_key(a: number): number; -export function getnodestatusresult_round_length(a: number): number; -export function getnodestatusresult_next_upgrade(a: number): number; -export function getnodestatusresult_build_version(a: number): Array; -export function getnodestatusresult_uptime(a: number): number; -export function getnodestatusresult_reactor_state(a: number): number; -export function getnodestatusresult_last_progress(a: number): number; -export function getnodestatusresult_available_block_range(a: number): number; -export function getnodestatusresult_block_sync(a: number): number; -export function getnodestatusresult_toJson(a: number): number; -export function sdk_get_node_status(a: number, b: number, c: number, d: number): number; -export function sdk_info_get_status(a: number, b: number, c: number, d: number): number; -export function __wbg_getpeersresult_free(a: number, b: number): void; -export function getpeersresult_api_version(a: number): number; -export function getpeersresult_peers(a: number): number; -export function getpeersresult_toJson(a: number): number; -export function sdk_get_peers(a: number, b: number, c: number, d: number): number; -export function sdk_info_get_peers(a: number, b: number, c: number, d: number): number; -export function __wbg_getvalidatorchangesresult_free(a: number, b: number): void; -export function getvalidatorchangesresult_api_version(a: number): number; -export function getvalidatorchangesresult_changes(a: number): number; -export function getvalidatorchangesresult_toJson(a: number): number; -export function sdk_get_validator_changes(a: number, b: number, c: number, d: number): number; -export function sdk_info_get_validator_change(a: number, b: number, c: number, d: number): number; -export function __wbg_listrpcsresult_free(a: number, b: number): void; -export function listrpcsresult_api_version(a: number): number; -export function listrpcsresult_name(a: number): Array; -export function listrpcsresult_schema(a: number): number; -export function listrpcsresult_toJson(a: number): number; -export function sdk_list_rpcs(a: number, b: number, c: number, d: number): number; -export function sdk_make_deploy(a: number, b: number, c: number, d: number): Array; -export function sdk_sign_deploy(a: number, b: number, c: number, d: number): number; -export function sdk_make_transaction(a: number, b: number, c: number): Array; -export function sdk_sign_transaction(a: number, b: number, c: number, d: number): number; -export function __wbg_querycontractkeyoptions_free(a: number, b: number): void; -export function __wbg_get_querycontractkeyoptions_entity_identifier(a: number): number; -export function __wbg_set_querycontractkeyoptions_entity_identifier(a: number, b: number): void; -export function __wbg_get_querycontractkeyoptions_entity_identifier_as_string(a: number): Array; -export function __wbg_set_querycontractkeyoptions_entity_identifier_as_string(a: number, b: number, c: number): void; -export function __wbg_get_querycontractkeyoptions_maybe_block_id_as_string(a: number): Array; -export function __wbg_set_querycontractkeyoptions_maybe_block_id_as_string(a: number, b: number, c: number): void; -export function __wbg_get_querycontractkeyoptions_path_as_string(a: number): Array; -export function __wbg_set_querycontractkeyoptions_path_as_string(a: number, b: number, c: number): void; -export function __wbg_get_querycontractkeyoptions_path(a: number): number; -export function __wbg_set_querycontractkeyoptions_path(a: number, b: number): void; -export function __wbg_get_querycontractkeyoptions_rpc_address(a: number): Array; -export function __wbg_set_querycontractkeyoptions_rpc_address(a: number, b: number, c: number): void; -export function __wbg_get_querycontractkeyoptions_verbosity(a: number): number; -export function __wbg_set_querycontractkeyoptions_verbosity(a: number, b: number): void; -export function sdk_query_contract_key_options(a: number, b: number): Array; -export function sdk_query_contract_key(a: number, b: number): number; -export function __wbg_getblockoptions_free(a: number, b: number): void; -export function __wbg_set_getblockoptions_verbosity(a: number, b: number): void; -export function __wbg_get_getblockoptions_maybe_block_identifier(a: number): number; -export function __wbg_get_querycontractkeyoptions_maybe_block_identifier(a: number): number; -export function __wbg_set_getblockoptions_maybe_block_id_as_string(a: number, b: number, c: number): void; -export function __wbg_set_getblockoptions_rpc_address(a: number, b: number, c: number): void; -export function __wbg_get_getblockoptions_maybe_block_id_as_string(a: number): Array; -export function __wbg_get_getblockoptions_rpc_address(a: number): Array; -export function __wbg_get_getblockoptions_verbosity(a: number): number; -export function __wbg_set_getblockoptions_maybe_block_identifier(a: number, b: number): void; -export function __wbg_set_querycontractkeyoptions_maybe_block_identifier(a: number, b: number): void; -export function __wbg_transferaddr_free(a: number, b: number): void; -export function __wbg_urefaddr_free(a: number, b: number): void; -export function __wbg_accounthash_free(a: number, b: number): void; -export function accounthash_new_js_alias(a: number, b: number): Array; -export function accounthash_fromFormattedStr(a: number, b: number): Array; -export function accounthash_fromPublicKey(a: number): number; -export function accounthash_toFormattedString(a: number): Array; -export function accounthash_toHexString(a: number): Array; -export function accounthash_fromUint8Array(a: number, b: number): number; -export function accounthash_toJson(a: number): number; -export function __wbg_accountidentifier_free(a: number, b: number): void; -export function accountidentifier_fromFormattedStr(a: number, b: number): Array; -export function accountidentifier_fromPublicKey(a: number): number; -export function accountidentifier_fromAccountHash(a: number): number; -export function accountidentifier_toJson(a: number): number; -export function hashaddr_new(a: number, b: number): Array; -export function hashaddr_toBytes(a: number): Array; -export function hashaddr_toHexString(a: number): Array; -export function __wbg_dictionaryitemstrparams_free(a: number, b: number): void; -export function dictionaryitemstrparams_new(): number; -export function dictionaryitemstrparams_setAccountNamedKey(a: number, b: number, c: number, d: number, e: number, f: number, g: number): void; -export function dictionaryitemstrparams_setContractNamedKey(a: number, b: number, c: number, d: number, e: number, f: number, g: number): void; -export function dictionaryitemstrparams_setEntityNamedKey(a: number, b: number, c: number, d: number, e: number, f: number, g: number): void; -export function dictionaryitemstrparams_setUref(a: number, b: number, c: number, d: number, e: number): void; -export function dictionaryitemstrparams_setDictionary(a: number, b: number, c: number): void; -export function dictionaryitemstrparams_toJson(a: number): number; -export function packagehash_new_js_alias(a: number, b: number): Array; -export function packagehash_fromFormattedStr(a: number, b: number): Array; -export function packagehash_toFormattedString(a: number): Array; -export function packagehash_fromUint8Array(a: number, b: number): number; -export function __wbg_transactionhash_free(a: number, b: number): void; -export function transactionhash_new_js_alias(a: number, b: number): Array; -export function transactionhash_fromRaw(a: number, b: number): Array; -export function transactionhash_digest(a: number): Array; -export function transactionhash_toJson(a: number): number; -export function transactionhash_toString(a: number): Array; -export function __wbg_getstateroothashresult_free(a: number, b: number): void; -export function getstateroothashresult_api_version(a: number): number; -export function getstateroothashresult_state_root_hash(a: number): number; -export function getstateroothashresult_state_root_hash_as_string(a: number): Array; -export function getstateroothashresult_toString(a: number): Array; -export function getstateroothashresult_toJson(a: number): number; -export function __wbg_getstateroothashoptions_free(a: number, b: number): void; -export function __wbg_get_getstateroothashoptions_maybe_block_id_as_string(a: number): Array; -export function __wbg_set_getstateroothashoptions_maybe_block_id_as_string(a: number, b: number, c: number): void; -export function __wbg_get_getstateroothashoptions_maybe_block_identifier(a: number): number; -export function __wbg_set_getstateroothashoptions_maybe_block_identifier(a: number, b: number): void; -export function __wbg_get_getstateroothashoptions_rpc_address(a: number): Array; -export function __wbg_set_getstateroothashoptions_rpc_address(a: number, b: number, c: number): void; -export function __wbg_get_getstateroothashoptions_verbosity(a: number): number; -export function __wbg_set_getstateroothashoptions_verbosity(a: number, b: number): void; -export function sdk_get_state_root_hash_options(a: number, b: number): Array; -export function sdk_get_state_root_hash(a: number, b: number): number; -export function sdk_chain_get_state_root_hash(a: number, b: number): number; -export function sdk_watchDeploy(a: number, b: number, c: number, d: number, e: number): number; -export function sdk_watchTransaction(a: number, b: number, c: number, d: number, e: number): number; -export function sdk_waitDeploy(a: number, b: number, c: number, d: number, e: number, f: number, g: number): number; -export function sdk_waitTransaction(a: number, b: number, c: number, d: number, e: number, f: number, g: number): number; -export function __wbg_watcher_free(a: number, b: number): void; -export function watcher_new(a: number, b: number, c: number, d: number): number; -export function watcher_subscribe(a: number, b: number, c: number): Array; -export function watcher_unsubscribe(a: number, b: number, c: number): void; -export function watcher_start(a: number): number; -export function watcher_stop(a: number): void; -export function __wbg_subscription_free(a: number, b: number): void; -export function __wbg_get_subscription_eventHandlerFn(a: number): number; -export function __wbg_set_subscription_eventHandlerFn(a: number, b: number): void; -export function subscription_new(a: number, b: number, c: number): number; -export function __wbg_failure_free(a: number, b: number): void; -export function __wbg_get_failure_cost(a: number): Array; -export function __wbg_set_failure_cost(a: number, b: number, c: number): void; -export function __wbg_get_failure_error_message(a: number): Array; -export function __wbg_set_failure_error_message(a: number, b: number, c: number): void; -export function __wbg_version2_free(a: number, b: number): void; -export function __wbg_get_version2_error_message(a: number): Array; -export function __wbg_set_version2_error_message(a: number, b: number, c: number): void; -export function __wbg_executionresult_free(a: number, b: number): void; -export function __wbg_get_executionresult_Success(a: number): number; -export function __wbg_set_executionresult_Success(a: number, b: number): void; -export function __wbg_get_executionresult_Failure(a: number): number; -export function __wbg_set_executionresult_Failure(a: number, b: number): void; -export function __wbg_hashstring_free(a: number, b: number): void; -export function hashstring_Deploy(a: number): Array; -export function hashstring_toString(a: number): Array; -export function __wbg_messages_free(a: number, b: number): void; -export function __wbg_set_messages_entity_hash(a: number, b: number, c: number): void; -export function __wbg_get_messages_message(a: number): number; -export function __wbg_set_messages_message(a: number, b: number): void; -export function __wbg_get_messages_topic_name(a: number): Array; -export function __wbg_set_messages_topic_name(a: number, b: number, c: number): void; -export function __wbg_get_messages_topic_name_hash(a: number): Array; -export function __wbg_set_messages_topic_name_hash(a: number, b: number, c: number): void; -export function __wbg_get_messages_topic_index(a: number): number; -export function __wbg_set_messages_topic_index(a: number, b: number): void; -export function __wbg_get_messages_block_index(a: number): number; -export function __wbg_set_messages_block_index(a: number, b: number): void; -export function __wbg_transactionprocessed_free(a: number, b: number): void; -export function __wbg_get_transactionprocessed_hash(a: number): number; -export function __wbg_set_transactionprocessed_hash(a: number, b: number): void; -export function __wbg_get_transactionprocessed_initiator_addr(a: number): number; -export function __wbg_set_transactionprocessed_initiator_addr(a: number, b: number): void; -export function __wbg_get_transactionprocessed_timestamp(a: number): Array; -export function __wbg_set_transactionprocessed_timestamp(a: number, b: number, c: number): void; -export function __wbg_set_transactionprocessed_ttl(a: number, b: number, c: number): void; -export function __wbg_get_transactionprocessed_execution_result(a: number): number; -export function __wbg_set_transactionprocessed_execution_result(a: number, b: number): void; -export function __wbg_get_transactionprocessed_messages(a: number): Array; -export function __wbg_set_transactionprocessed_messages(a: number, b: number, c: number): void; -export function __wbg_body_free(a: number, b: number): void; -export function __wbg_get_body_transaction_processed(a: number): number; -export function __wbg_set_body_transaction_processed(a: number, b: number): void; -export function body_get_deploy_processed(a: number): number; -export function __wbg_eventparseresult_free(a: number, b: number): void; -export function __wbg_get_eventparseresult_err(a: number): Array; -export function __wbg_set_eventparseresult_err(a: number, b: number, c: number): void; -export function __wbg_get_eventparseresult_body(a: number): number; -export function __wbg_set_eventparseresult_body(a: number, b: number): void; -export function __wbg_payment_free(a: number, b: number): void; -export function __wbg_publickeystring_free(a: number, b: number): void; -export function __wbg_message_free(a: number, b: number): void; -export function __wbg_get_version2_initiator(a: number): number; -export function accountidentifier_new(a: number, b: number): Array; -export function __wbg_set_subscription_targetHash(a: number, b: number, c: number): void; -export function __wbg_set_version2_limit(a: number, b: number, c: number): void; -export function __wbg_set_payment_source(a: number, b: number, c: number): void; -export function __wbg_set_hashstring_hash(a: number, b: number, c: number): void; -export function __wbg_set_publickeystring_PublicKey(a: number, b: number, c: number): void; -export function __wbg_set_message_String(a: number, b: number, c: number): void; -export function __wbg_set_version2_consumed(a: number, b: number, c: number): void; -export function __wbg_set_version2_cost(a: number, b: number, c: number): void; -export function __wbg_set_transactionprocessed_block_hash(a: number, b: number, c: number): void; -export function body_get_transaction_processed(a: number): number; -export function hashstring_Version1(a: number): Array; -export function __wbg_set_version2_initiator(a: number, b: number): void; -export function __wbg_hashaddr_free(a: number, b: number): void; -export function __wbg_packagehash_free(a: number, b: number): void; -export function __wbg_get_subscription_targetHash(a: number): Array; -export function __wbg_get_version2_limit(a: number): Array; -export function __wbg_get_payment_source(a: number): Array; -export function __wbg_get_hashstring_hash(a: number): Array; -export function __wbg_get_publickeystring_PublicKey(a: number): Array; -export function __wbg_get_message_String(a: number): Array; -export function __wbg_get_messages_entity_hash(a: number): Array; -export function __wbg_get_version2_cost(a: number): Array; -export function __wbg_get_version2_consumed(a: number): Array; -export function __wbg_get_transactionprocessed_ttl(a: number): Array; -export function __wbg_get_transactionprocessed_block_hash(a: number): Array; -export function __wbg_addressableentityhash_free(a: number, b: number): void; -export function addressableentityhash_new_js_alias(a: number, b: number): Array; -export function addressableentityhash_fromFormattedStr(a: number, b: number): Array; -export function addressableentityhash_toFormattedString(a: number): Array; -export function addressableentityhash_fromUint8Array(a: number, b: number): number; -export function blockhash_new_js_alias(a: number, b: number): Array; -export function blockhash_fromDigest(a: number): Array; -export function blockhash_toJson(a: number): number; -export function blockhash_toString(a: number): Array; -export function contractpackagehash_new_js_alias(a: number, b: number): Array; -export function contractpackagehash_fromFormattedStr(a: number, b: number): Array; -export function contractpackagehash_toFormattedString(a: number): Array; -export function contractpackagehash_fromUint8Array(a: number, b: number): number; -export function deployhash_new_js_alias(a: number, b: number): Array; -export function deployhash_toJson(a: number): number; -export function deployhash_toString(a: number): Array; -export function __wbg_paymentstrparams_free(a: number, b: number): void; -export function paymentstrparams_new(a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number, n: number, o: number, p: number, q: number, r: number, s: number): number; -export function paymentstrparams_payment_amount(a: number): Array; -export function paymentstrparams_set_payment_amount(a: number, b: number, c: number): void; -export function paymentstrparams_payment_hash(a: number): Array; -export function paymentstrparams_set_payment_hash(a: number, b: number, c: number): void; -export function paymentstrparams_payment_name(a: number): Array; -export function paymentstrparams_set_payment_name(a: number, b: number, c: number): void; -export function paymentstrparams_payment_package_hash(a: number): Array; -export function paymentstrparams_set_payment_package_hash(a: number, b: number, c: number): void; -export function paymentstrparams_payment_package_name(a: number): Array; -export function paymentstrparams_set_payment_package_name(a: number, b: number, c: number): void; -export function paymentstrparams_payment_path(a: number): Array; -export function paymentstrparams_set_payment_path(a: number, b: number, c: number): void; -export function paymentstrparams_payment_args_simple(a: number): number; -export function paymentstrparams_set_payment_args_simple(a: number, b: number): void; -export function paymentstrparams_payment_args_json(a: number): Array; -export function paymentstrparams_set_payment_args_json(a: number, b: number, c: number): void; -export function paymentstrparams_payment_version(a: number): Array; -export function paymentstrparams_set_payment_version(a: number, b: number, c: number): void; -export function paymentstrparams_payment_entry_point(a: number): Array; -export function paymentstrparams_set_payment_entry_point(a: number, b: number, c: number): void; -export function __wbg_sessionstrparams_free(a: number, b: number): void; -export function sessionstrparams_new(a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number, n: number, o: number, p: number, q: number, r: number, s: number): number; -export function sessionstrparams_session_hash(a: number): Array; -export function sessionstrparams_set_session_hash(a: number, b: number, c: number): void; -export function sessionstrparams_session_name(a: number): Array; -export function sessionstrparams_set_session_name(a: number, b: number, c: number): void; -export function sessionstrparams_session_package_hash(a: number): Array; -export function sessionstrparams_set_session_package_hash(a: number, b: number, c: number): void; -export function sessionstrparams_session_package_name(a: number): Array; -export function sessionstrparams_set_session_package_name(a: number, b: number, c: number): void; -export function sessionstrparams_session_path(a: number): Array; -export function sessionstrparams_set_session_path(a: number, b: number, c: number): void; -export function sessionstrparams_session_bytes(a: number): number; -export function sessionstrparams_set_session_bytes(a: number, b: number): void; -export function sessionstrparams_session_args_simple(a: number): number; -export function sessionstrparams_set_session_args_simple(a: number, b: number): void; -export function sessionstrparams_session_args_json(a: number): Array; -export function sessionstrparams_set_session_args_json(a: number, b: number, c: number): void; -export function sessionstrparams_session_version(a: number): Array; -export function sessionstrparams_set_session_version(a: number, b: number, c: number): void; -export function sessionstrparams_session_entry_point(a: number): Array; -export function sessionstrparams_set_session_entry_point(a: number, b: number, c: number): void; -export function sessionstrparams_is_session_transfer(a: number): number; -export function sessionstrparams_set_is_session_transfer(a: number, b: number): void; -export function __wbg_dictionaryitemidentifier_free(a: number, b: number): void; -export function dictionaryitemidentifier_newFromAccountInfo(a: number, b: number, c: number, d: number, e: number, f: number): Array; -export function dictionaryitemidentifier_newFromContractInfo(a: number, b: number, c: number, d: number, e: number, f: number): Array; -export function dictionaryitemidentifier_newFromEntityInfo(a: number, b: number, c: number, d: number, e: number, f: number): Array; -export function dictionaryitemidentifier_newFromSeedUref(a: number, b: number, c: number, d: number): Array; -export function dictionaryitemidentifier_newFromDictionaryKey(a: number, b: number): Array; -export function dictionaryitemidentifier_toJson(a: number): number; -export function digest_new_js_alias(a: number, b: number): Array; -export function digest_fromString(a: number, b: number): Array; -export function digest_fromRaw(a: number, b: number): Array; -export function digest_toJson(a: number): number; -export function digest_toString(a: number): Array; -export function __wbg_publickey_free(a: number, b: number): void; -export function publickey_new_js_alias(a: number, b: number): Array; -export function publickey_fromUint8Array(a: number, b: number): Array; -export function publickey_toAccountHash(a: number): number; -export function publickey_toPurseUref(a: number): number; -export function publickey_toJson(a: number): number; -export function __wbg_transaction_free(a: number, b: number): void; -export function transaction_new(a: number): number; -export function transaction_toJson(a: number): number; -export function transaction_newSession(a: number, b: number): Array; -export function transaction_newTransfer(a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number): Array; -export function transaction_withTTL(a: number, b: number, c: number, d: number, e: number): number; -export function transaction_withTimestamp(a: number, b: number, c: number, d: number, e: number): number; -export function transaction_withChainName(a: number, b: number, c: number, d: number, e: number): number; -export function transaction_withPublicKey(a: number, b: number, c: number, d: number): number; -export function transaction_withAccountHash(a: number, b: number, c: number, d: number): number; -export function transaction_withEntryPoint(a: number, b: number, c: number, d: number, e: number): number; -export function transaction_withEntityHash(a: number, b: number, c: number, d: number): number; -export function transaction_withPackageHash(a: number, b: number, c: number, d: number): number; -export function transaction_withTransactionBytes(a: number, b: number, c: number, d: number, e: number): number; -export function transaction_withSecretKey(a: number, b: number, c: number): number; -export function transaction_verify(a: number): number; -export function transaction_hash(a: number): number; -export function transaction_expired(a: number): number; -export function transaction_expires(a: number): number; -export function transaction_signers(a: number): number; -export function transaction_authorization_keys(a: number): number; -export function transaction_sign(a: number, b: number, c: number): number; -export function transaction_approvalsHash(a: number): number; -export function transaction_approvals(a: number): number; -export function transaction_is_native(a: number): number; -export function transaction_target(a: number): number; -export function transaction_is_standard_payment(a: number): number; -export function transaction_session_args(a: number): number; -export function transaction_addSignature(a: number, b: number, c: number, d: number, e: number): number; -export function transaction_entry_point(a: number): Array; -export function transaction_ttl(a: number): Array; -export function transaction_timestamp(a: number): Array; -export function transaction_size_estimate(a: number): number; -export function transaction_chain_name(a: number): Array; -export function transaction_initiator_addr(a: number): Array; -export function transaction_pricing_mode(a: number): number; -export function transaction_additional_computation_factor(a: number): number; -export function transaction_receipt(a: number): number; -export function transaction_gas_price_tolerance(a: number): number; -export function transaction_account_hash(a: number): number; -export function transaction_addArg(a: number, b: number, c: number, d: number): Array; -export function __wbg_transactionstrparams_free(a: number, b: number): void; -export function transactionstrparams_new(a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number, n: number, o: number, p: number, q: number, r: number, s: number, t: number, u: number, v: number, w: number, x: number): number; -export function transactionstrparams_new_with_defaults(a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number): number; -export function transactionstrparams_secret_key(a: number): Array; -export function transactionstrparams_set_secret_key(a: number, b: number, c: number): void; -export function transactionstrparams_timestamp(a: number): Array; -export function transactionstrparams_set_timestamp(a: number, b: number, c: number): void; -export function transactionstrparams_setDefaultTimestamp(a: number): void; -export function transactionstrparams_ttl(a: number): Array; -export function transactionstrparams_set_ttl(a: number, b: number, c: number): void; -export function transactionstrparams_setDefaultTTL(a: number): void; -export function transactionstrparams_chain_name(a: number): Array; -export function transactionstrparams_set_chain_name(a: number, b: number, c: number): void; -export function transactionstrparams_initiator_addr(a: number): Array; -export function transactionstrparams_set_initiator_addr(a: number, b: number, c: number): void; -export function transactionstrparams_session_args_simple(a: number): number; -export function transactionstrparams_set_session_args_simple(a: number, b: number, c: number): void; -export function transactionstrparams_session_args_json(a: number): Array; -export function transactionstrparams_set_session_args_json(a: number, b: number, c: number): void; -export function transactionstrparams_pricing_mode(a: number): number; -export function transactionstrparams_set_pricing_mode(a: number, b: number): void; -export function transactionstrparams_additional_computation_factor(a: number): Array; -export function transactionstrparams_set_additional_computation_factor(a: number, b: number, c: number): void; -export function transactionstrparams_payment_amount(a: number): Array; -export function transactionstrparams_set_payment_amount(a: number, b: number, c: number): void; -export function transactionstrparams_gas_price_tolerance(a: number): Array; -export function transactionstrparams_set_gas_price_tolerance(a: number, b: number, c: number): void; -export function transactionstrparams_receipt(a: number): Array; -export function transactionstrparams_set_receipt(a: number, b: number, c: number): void; -export function transactionstrparams_standard_payment(a: number): number; -export function transactionstrparams_set_standard_payment(a: number, b: number): void; -export function __wbg_uref_free(a: number, b: number): void; -export function uref_new_js_alias(a: number, b: number, c: number): Array; -export function uref_fromFormattedStr(a: number, b: number): Array; -export function uref_fromUint8Array(a: number, b: number, c: number): number; -export function uref_toFormattedString(a: number): Array; -export function uref_toJson(a: number): number; -export function __wbg_putdeployresult_free(a: number, b: number): void; -export function putdeployresult_api_version(a: number): number; -export function putdeployresult_deploy_hash(a: number): number; -export function putdeployresult_toJson(a: number): number; -export function sdk_deploy(a: number, b: number, c: number, d: number, e: number, f: number, g: number): number; -export function sdk_speculative_transfer(a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number): number; -export function __wbg_getdeployresult_free(a: number, b: number): void; -export function getdeployresult_api_version(a: number): number; -export function getdeployresult_deploy(a: number): number; -export function getdeployresult_execution_info(a: number): number; -export function getdeployresult_toJson(a: number): number; -export function __wbg_getdeployoptions_free(a: number, b: number): void; -export function __wbg_get_getdeployoptions_deploy_hash_as_string(a: number): Array; -export function __wbg_set_getdeployoptions_deploy_hash_as_string(a: number, b: number, c: number): void; -export function __wbg_get_getdeployoptions_deploy_hash(a: number): number; -export function __wbg_set_getdeployoptions_deploy_hash(a: number, b: number): void; -export function __wbg_get_getdeployoptions_finalized_approvals(a: number): number; -export function __wbg_set_getdeployoptions_finalized_approvals(a: number, b: number): void; -export function __wbg_get_getdeployoptions_rpc_address(a: number): Array; -export function __wbg_set_getdeployoptions_rpc_address(a: number, b: number, c: number): void; -export function __wbg_get_getdeployoptions_verbosity(a: number): number; -export function __wbg_set_getdeployoptions_verbosity(a: number, b: number): void; -export function sdk_get_deploy_options(a: number, b: number): Array; -export function sdk_get_deploy(a: number, b: number): number; -export function sdk_info_get_deploy(a: number, b: number): number; -export function __wbg_gettransactionresult_free(a: number, b: number): void; -export function gettransactionresult_api_version(a: number): number; -export function gettransactionresult_transaction(a: number): number; -export function gettransactionresult_execution_info(a: number): number; -export function gettransactionresult_toJson(a: number): number; -export function __wbg_get_gettransactionoptions_transaction_hash(a: number): number; -export function __wbg_set_gettransactionoptions_transaction_hash(a: number, b: number): void; -export function sdk_get_transaction_options(a: number, b: number): Array; -export function sdk_get_transaction(a: number, b: number): number; -export function sdk_info_get_transaction(a: number, b: number): number; -export function __wbg_speculativeexectxnresult_free(a: number, b: number): void; -export function speculativeexectxnresult_api_version(a: number): number; -export function speculativeexectxnresult_block_hash(a: number): number; -export function speculativeexectxnresult_execution_result(a: number): number; -export function speculativeexectxnresult_toJson(a: number): number; -export function __wbg_getspeculativeexectxnoptions_free(a: number, b: number): void; -export function __wbg_get_getspeculativeexectxnoptions_transaction_as_string(a: number): Array; -export function __wbg_set_getspeculativeexectxnoptions_transaction_as_string(a: number, b: number, c: number): void; -export function __wbg_get_getspeculativeexectxnoptions_transaction(a: number): number; -export function __wbg_set_getspeculativeexectxnoptions_transaction(a: number, b: number): void; -export function __wbg_get_getspeculativeexectxnoptions_rpc_address(a: number): Array; -export function __wbg_set_getspeculativeexectxnoptions_rpc_address(a: number, b: number, c: number): void; -export function __wbg_get_getspeculativeexectxnoptions_verbosity(a: number): number; -export function __wbg_set_getspeculativeexectxnoptions_verbosity(a: number, b: number): void; -export function sdk_get_speculative_exec_options(a: number, b: number): Array; -export function sdk_speculative_exec(a: number, b: number): number; -export function sdk_make_transfer(a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number): Array; -export function sdk_make_transfer_transaction(a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number): Array; -export function sdk_call_entrypoint_deploy(a: number, b: number, c: number, d: number, e: number, f: number, g: number): number; -export function sdk_install(a: number, b: number, c: number, d: number, e: number): number; -export function __wbg_gettransactionoptions_free(a: number, b: number): void; -export function __wbg_set_gettransactionoptions_verbosity(a: number, b: number): void; -export function __wbg_set_gettransactionoptions_transaction_hash_as_string(a: number, b: number, c: number): void; -export function __wbg_set_gettransactionoptions_rpc_address(a: number, b: number, c: number): void; -export function deployhash_fromDigest(a: number): Array; -export function __wbg_get_gettransactionoptions_finalized_approvals(a: number): number; -export function __wbg_set_gettransactionoptions_finalized_approvals(a: number, b: number): void; -export function __wbg_get_gettransactionoptions_transaction_hash_as_string(a: number): Array; -export function __wbg_get_gettransactionoptions_rpc_address(a: number): Array; -export function __wbg_get_gettransactionoptions_verbosity(a: number): number; -export function __wbg_blockhash_free(a: number, b: number): void; -export function __wbg_contractpackagehash_free(a: number, b: number): void; -export function __wbg_deployhash_free(a: number, b: number): void; -export function __wbg_digest_free(a: number, b: number): void; -export function __wbg_bytes_free(a: number, b: number): void; -export function bytes_new(): number; -export function bytes_fromUint8Array(a: number): number; -export function __wbg_argssimple_free(a: number, b: number): void; -export function __wbg_getaccountresult_free(a: number, b: number): void; -export function getaccountresult_api_version(a: number): number; -export function getaccountresult_account(a: number): number; -export function getaccountresult_merkle_proof(a: number): Array; -export function getaccountresult_toJson(a: number): number; -export function __wbg_getaccountoptions_free(a: number, b: number): void; -export function __wbg_get_getaccountoptions_account_identifier(a: number): number; -export function __wbg_set_getaccountoptions_account_identifier(a: number, b: number): void; -export function __wbg_get_getaccountoptions_account_identifier_as_string(a: number): Array; -export function __wbg_set_getaccountoptions_account_identifier_as_string(a: number, b: number, c: number): void; -export function __wbg_get_getaccountoptions_maybe_block_id_as_string(a: number): Array; -export function __wbg_set_getaccountoptions_maybe_block_id_as_string(a: number, b: number, c: number): void; -export function __wbg_get_getaccountoptions_maybe_block_identifier(a: number): number; -export function __wbg_set_getaccountoptions_maybe_block_identifier(a: number, b: number): void; -export function __wbg_get_getaccountoptions_rpc_address(a: number): Array; -export function __wbg_set_getaccountoptions_rpc_address(a: number, b: number, c: number): void; -export function __wbg_get_getaccountoptions_verbosity(a: number): number; -export function __wbg_set_getaccountoptions_verbosity(a: number, b: number): void; -export function sdk_get_account_options(a: number, b: number): Array; -export function sdk_get_account(a: number, b: number): number; -export function sdk_state_get_account_info(a: number, b: number): number; -export function __wbg_geterasummaryresult_free(a: number, b: number): void; -export function geterasummaryresult_api_version(a: number): number; -export function geterasummaryresult_era_summary(a: number): number; -export function geterasummaryresult_toJson(a: number): number; -export function __wbg_geterasummaryoptions_free(a: number, b: number): void; -export function __wbg_get_geterasummaryoptions_maybe_block_id_as_string(a: number): Array; -export function __wbg_set_geterasummaryoptions_maybe_block_id_as_string(a: number, b: number, c: number): void; -export function __wbg_get_geterasummaryoptions_rpc_address(a: number): Array; -export function __wbg_set_geterasummaryoptions_rpc_address(a: number, b: number, c: number): void; -export function __wbg_get_geterasummaryoptions_verbosity(a: number): number; -export function __wbg_set_geterasummaryoptions_verbosity(a: number, b: number): void; -export function sdk_get_era_summary_options(a: number, b: number): Array; -export function sdk_get_era_summary(a: number, b: number): number; -export function sdk_chain_get_era_summary(a: number, b: number): number; -export function sdk_put_deploy(a: number, b: number, c: number, d: number, e: number): number; -export function sdk_account_put_deploy(a: number, b: number, c: number, d: number, e: number): number; +export function __wbg_globalstateidentifier_free(a: number, b: number): void; +export function globalstateidentifier_new(a: number): number; +export function globalstateidentifier_fromBlockHash(a: number): number; +export function globalstateidentifier_fromBlockHeight(a: number): number; +export function globalstateidentifier_fromStateRootHash(a: number): number; +export function globalstateidentifier_toJson(a: number): number; +export function __wbg_signatureresponse_free(a: number, b: number): void; +export function signatureresponse_is_cancelled(a: number): number; +export function signatureresponse_get_signature_hex(a: number): Array; +export function signatureresponse_get_signature(a: number): Array; +export function sdk_transfer(a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number): number; +export function __wbg_getaddressableentityresult_free(a: number, b: number): void; +export function getaddressableentityresult_api_version(a: number): number; +export function getaddressableentityresult_entity_result(a: number): number; +export function getaddressableentityresult_merkle_proof(a: number): Array; +export function getaddressableentityresult_toJson(a: number): number; +export function __wbg_getentityoptions_free(a: number, b: number): void; +export function __wbg_get_getentityoptions_entity_identifier(a: number): number; +export function __wbg_set_getentityoptions_entity_identifier(a: number, b: number): void; +export function __wbg_get_getentityoptions_entity_identifier_as_string(a: number): Array; +export function __wbg_set_getentityoptions_entity_identifier_as_string(a: number, b: number, c: number): void; +export function __wbg_get_getentityoptions_maybe_block_id_as_string(a: number): Array; +export function __wbg_set_getentityoptions_maybe_block_id_as_string(a: number, b: number, c: number): void; +export function __wbg_get_getentityoptions_maybe_block_identifier(a: number): number; +export function __wbg_set_getentityoptions_maybe_block_identifier(a: number, b: number): void; +export function __wbg_get_getentityoptions_rpc_address(a: number): Array; +export function __wbg_set_getentityoptions_rpc_address(a: number, b: number, c: number): void; +export function __wbg_get_getentityoptions_verbosity(a: number): number; +export function __wbg_set_getentityoptions_verbosity(a: number, b: number): void; +export function sdk_get_entity_options(a: number, b: number): Array; +export function sdk_get_entity(a: number, b: number): number; +export function sdk_state_get_entity(a: number, b: number): number; +export function sdk_put_transaction(a: number, b: number, c: number, d: number, e: number): number; +export function sdk_account_put_transaction(a: number, b: number, c: number, d: number, e: number): number; +export function __wbg_querybalancedetailsresult_free(a: number, b: number): void; +export function querybalancedetailsresult_api_version(a: number): number; +export function querybalancedetailsresult_total_balance(a: number): number; +export function querybalancedetailsresult_available_balance(a: number): number; +export function querybalancedetailsresult_total_balance_proof(a: number): number; +export function querybalancedetailsresult_holds(a: number): number; +export function querybalancedetailsresult_toJson(a: number): number; +export function __wbg_querybalancedetailsoptions_free(a: number, b: number): void; +export function __wbg_get_querybalancedetailsoptions_purse_identifier(a: number): number; +export function __wbg_set_querybalancedetailsoptions_purse_identifier(a: number, b: number): void; +export function __wbg_get_querybalancedetailsoptions_global_state_identifier(a: number): number; +export function __wbg_set_querybalancedetailsoptions_global_state_identifier(a: number, b: number): void; +export function __wbg_get_querybalancedetailsoptions_state_root_hash(a: number): number; +export function __wbg_set_querybalancedetailsoptions_state_root_hash(a: number, b: number): void; +export function __wbg_get_querybalancedetailsoptions_rpc_address(a: number): Array; +export function __wbg_set_querybalancedetailsoptions_rpc_address(a: number, b: number, c: number): void; +export function __wbg_get_querybalancedetailsoptions_verbosity(a: number): number; +export function __wbg_set_querybalancedetailsoptions_verbosity(a: number, b: number): void; +export function sdk_query_balance_details_options(a: number, b: number): Array; +export function sdk_query_balance_details(a: number, b: number): number; +export function __wbg_queryglobalstateresult_free(a: number, b: number): void; +export function queryglobalstateresult_api_version(a: number): number; +export function queryglobalstateresult_block_header(a: number): number; +export function queryglobalstateresult_stored_value(a: number): number; +export function queryglobalstateresult_merkle_proof(a: number): Array; +export function queryglobalstateresult_toJson(a: number): number; +export function __wbg_queryglobalstateoptions_free(a: number, b: number): void; +export function __wbg_get_queryglobalstateoptions_global_state_identifier(a: number): number; +export function __wbg_set_queryglobalstateoptions_global_state_identifier(a: number, b: number): void; +export function __wbg_get_queryglobalstateoptions_state_root_hash_as_string(a: number): Array; +export function __wbg_set_queryglobalstateoptions_state_root_hash_as_string(a: number, b: number, c: number): void; +export function __wbg_get_queryglobalstateoptions_state_root_hash(a: number): number; +export function __wbg_set_queryglobalstateoptions_state_root_hash(a: number, b: number): void; +export function __wbg_get_queryglobalstateoptions_maybe_block_id_as_string(a: number): Array; +export function __wbg_set_queryglobalstateoptions_maybe_block_id_as_string(a: number, b: number, c: number): void; +export function __wbg_get_queryglobalstateoptions_key_as_string(a: number): Array; +export function __wbg_set_queryglobalstateoptions_key_as_string(a: number, b: number, c: number): void; +export function __wbg_get_queryglobalstateoptions_key(a: number): number; +export function __wbg_set_queryglobalstateoptions_key(a: number, b: number): void; +export function __wbg_get_queryglobalstateoptions_path_as_string(a: number): Array; +export function __wbg_set_queryglobalstateoptions_path_as_string(a: number, b: number, c: number): void; +export function __wbg_get_queryglobalstateoptions_path(a: number): number; +export function __wbg_set_queryglobalstateoptions_path(a: number, b: number): void; +export function __wbg_get_queryglobalstateoptions_rpc_address(a: number): Array; +export function __wbg_set_queryglobalstateoptions_rpc_address(a: number, b: number, c: number): void; +export function __wbg_get_queryglobalstateoptions_verbosity(a: number): number; +export function __wbg_set_queryglobalstateoptions_verbosity(a: number, b: number): void; +export function sdk_query_global_state_options(a: number, b: number): Array; +export function sdk_query_global_state(a: number, b: number): number; +export function sdk_install(a: number, b: number, c: number, d: number, e: number): number; export function sdk_install_deploy(a: number, b: number, c: number, d: number, e: number, f: number, g: number): number; -export function __wbg_get_geterasummaryoptions_maybe_block_identifier(a: number): number; -export function __wbg_set_geterasummaryoptions_maybe_block_identifier(a: number, b: number): void; +export function __wbg_casperwallet_free(a: number, b: number): void; +export function casperwallet_new(): number; +export function casperwallet_signDeploy(a: number, b: number, c: number, d: number): number; +export function casperwallet_signTransaction(a: number, b: number, c: number, d: number): number; +export function casperwallet_signDeployHash(a: number, b: number, c: number, d: number, e: number): number; +export function casperwallet_signTransactionHash(a: number, b: number, c: number, d: number, e: number): number; +export function casperwallet_signMessage(a: number, b: number, c: number, d: number, e: number): number; +export function casperwallet_connect(a: number): number; +export function casperwallet_disconnect(a: number): number; +export function casperwallet_isConnected(a: number): number; +export function casperwallet_getVersion(a: number): number; +export function casperwallet_getActivePublicKey(a: number): number; +export function casperwallet_switchAccount(a: number): number; +export function __wbg_set_querybalancedetailsoptions_purse_identifier_as_string(a: number, b: number, c: number): void; +export function __wbg_set_querybalancedetailsoptions_state_root_hash_as_string(a: number, b: number, c: number): void; +export function __wbg_set_querybalancedetailsoptions_maybe_block_id_as_string(a: number, b: number, c: number): void; +export function __wbg_get_querybalancedetailsoptions_purse_identifier_as_string(a: number): Array; +export function __wbg_get_querybalancedetailsoptions_state_root_hash_as_string(a: number): Array; +export function __wbg_get_querybalancedetailsoptions_maybe_block_id_as_string(a: number): Array; export function __wbg_entityaddr_free(a: number, b: number): void; export function entityaddr_fromFormattedStr(a: number, b: number): Array; export function entityaddr_toFormattedString(a: number): Array; export function entityaddr_toHexString(a: number): Array; export function entityaddr_toJson(a: number): number; -export function __wbg_contracthash_free(a: number, b: number): void; -export function contracthash_new_js_alias(a: number, b: number): Array; -export function contracthash_fromFormattedStr(a: number, b: number): Array; -export function contracthash_toFormattedString(a: number): Array; -export function contracthash_fromUint8Array(a: number, b: number): number; export function __wbg_deploy_free(a: number, b: number): void; export function deploy_new(a: number): number; export function deploy_toJson(a: number): number; @@ -692,12 +470,19 @@ export function deploystrparams_session_account(a: number): Array; export function deploystrparams_set_session_account(a: number, b: number, c: number): void; export function deploystrparams_gas_price_tolerance(a: number): Array; export function deploystrparams_set_gas_price_tolerance(a: number, b: number, c: number): void; +export function __wbg_contracthash_free(a: number, b: number): void; +export function contracthash_new_js_alias(a: number, b: number): Array; +export function contracthash_fromFormattedStr(a: number, b: number): Array; +export function contracthash_toFormattedString(a: number): Array; +export function contracthash_fromUint8Array(a: number, b: number): number; export function __wbg_entityidentifier_free(a: number, b: number): void; export function entityidentifier_fromFormattedStr(a: number, b: number): Array; export function entityidentifier_fromPublicKey(a: number): number; export function entityidentifier_fromAccountHash(a: number): number; export function entityidentifier_fromEntityAddr(a: number): number; export function entityidentifier_toJson(a: number): number; +export function purseidentifier_fromURef(a: number): number; +export function purseidentifier_toJson(a: number): number; export function __wbg_key_free(a: number, b: number): void; export function key_new(a: number): Array; export function key_toJson(a: number): number; @@ -733,8 +518,9 @@ export function path_fromArray(a: number): number; export function path_toJson(a: number): number; export function path_toString(a: number): Array; export function path_is_empty(a: number): number; -export function purseidentifier_fromURef(a: number): number; -export function purseidentifier_toJson(a: number): number; +export function __wbg_peerentry_free(a: number, b: number): void; +export function peerentry_node_id(a: number): Array; +export function peerentry_address(a: number): Array; export function __wbg_recordid_free(a: number, b: number): void; export function recordid_new_js_alias(a: number): Array; export function __wbg_transfertarget_free(a: number, b: number): void; @@ -789,6 +575,7 @@ export function transactionbuilderparams_maximum_delegation_amount(a: number): A export function transactionbuilderparams_set_maximum_delegation_amount(a: number, b: number): void; export function transactionbuilderparams_is_install_upgrade(a: number): number; export function transactionbuilderparams_set_is_install_upgrade(a: number, b: number): void; +export function sdk_speculative_deploy(a: number, b: number, c: number, d: number, e: number, f: number, g: number): number; export function __wbg_getblocktransfersresult_free(a: number, b: number): void; export function getblocktransfersresult_api_version(a: number): number; export function getblocktransfersresult_block_hash(a: number): number; @@ -844,7 +631,7 @@ export function __wbg_get_getspeculativeexecdeployoptions_verbosity(a: number): export function __wbg_set_getspeculativeexecdeployoptions_verbosity(a: number, b: number): void; export function sdk_get_speculative_exec_deploy_options(a: number, b: number): Array; export function sdk_speculative_exec_deploy(a: number, b: number): number; -export function sdk_transfer_transaction(a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number): number; +export function sdk_call_entrypoint(a: number, b: number, c: number, d: number, e: number): number; export function __wbg_sdk_free(a: number, b: number): void; export function sdk_new(a: number, b: number, c: number, d: number, e: number): number; export function sdk_getRPCAddress(a: number, b: number, c: number): Array; @@ -865,115 +652,187 @@ export function accountHashToBase64Key(a: number, b: number): Array; export function getTimestamp(): number; export function encodeLowerBlake2b(a: number, b: number): number; export function makeDictionaryItemKey(a: number, b: number, c: number): Array; -export function __wbg_casperwallet_free(a: number, b: number): void; -export function casperwallet_new(): number; -export function casperwallet_signDeploy(a: number, b: number, c: number, d: number): number; -export function casperwallet_signTransaction(a: number, b: number, c: number, d: number): number; -export function casperwallet_signDeployHash(a: number, b: number, c: number, d: number, e: number): number; -export function casperwallet_signTransactionHash(a: number, b: number, c: number, d: number, e: number): number; -export function casperwallet_signMessage(a: number, b: number, c: number, d: number, e: number): number; -export function casperwallet_connect(a: number): number; -export function casperwallet_disconnect(a: number): number; -export function casperwallet_isConnected(a: number): number; -export function casperwallet_getVersion(a: number): number; -export function casperwallet_getActivePublicKey(a: number): number; -export function casperwallet_switchAccount(a: number): number; export function purseidentifier_fromPublicKey(a: number): number; export function purseidentifier_fromAccountHash(a: number): number; export function __wbg_purseidentifier_free(a: number, b: number): void; export function __wbg_querybalanceresult_free(a: number, b: number): void; export function entityidentifier_new_js_alias(a: number, b: number): Array; -export function __wbg_globalstateidentifier_free(a: number, b: number): void; -export function globalstateidentifier_new(a: number): number; -export function globalstateidentifier_fromBlockHash(a: number): number; -export function globalstateidentifier_fromBlockHeight(a: number): number; -export function globalstateidentifier_fromStateRootHash(a: number): number; -export function globalstateidentifier_toJson(a: number): number; -export function __wbg_signatureresponse_free(a: number, b: number): void; -export function signatureresponse_is_cancelled(a: number): number; -export function signatureresponse_get_signature_hex(a: number): Array; -export function signatureresponse_get_signature(a: number): Array; -export function sdk_transfer(a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number): number; -export function __wbg_getaddressableentityresult_free(a: number, b: number): void; -export function getaddressableentityresult_api_version(a: number): number; -export function getaddressableentityresult_entity_result(a: number): number; -export function getaddressableentityresult_merkle_proof(a: number): Array; -export function getaddressableentityresult_toJson(a: number): number; -export function __wbg_getentityoptions_free(a: number, b: number): void; -export function __wbg_get_getentityoptions_entity_identifier(a: number): number; -export function __wbg_set_getentityoptions_entity_identifier(a: number, b: number): void; -export function __wbg_get_getentityoptions_entity_identifier_as_string(a: number): Array; -export function __wbg_set_getentityoptions_entity_identifier_as_string(a: number, b: number, c: number): void; -export function __wbg_get_getentityoptions_maybe_block_id_as_string(a: number): Array; -export function __wbg_set_getentityoptions_maybe_block_id_as_string(a: number, b: number, c: number): void; -export function __wbg_get_getentityoptions_maybe_block_identifier(a: number): number; -export function __wbg_set_getentityoptions_maybe_block_identifier(a: number, b: number): void; -export function __wbg_get_getentityoptions_rpc_address(a: number): Array; -export function __wbg_set_getentityoptions_rpc_address(a: number, b: number, c: number): void; -export function __wbg_get_getentityoptions_verbosity(a: number): number; -export function __wbg_set_getentityoptions_verbosity(a: number, b: number): void; -export function sdk_get_entity_options(a: number, b: number): Array; -export function sdk_get_entity(a: number, b: number): number; -export function sdk_state_get_entity(a: number, b: number): number; -export function sdk_put_transaction(a: number, b: number, c: number, d: number, e: number): number; -export function sdk_account_put_transaction(a: number, b: number, c: number, d: number, e: number): number; -export function __wbg_querybalancedetailsresult_free(a: number, b: number): void; -export function querybalancedetailsresult_api_version(a: number): number; -export function querybalancedetailsresult_total_balance(a: number): number; -export function querybalancedetailsresult_available_balance(a: number): number; -export function querybalancedetailsresult_total_balance_proof(a: number): number; -export function querybalancedetailsresult_holds(a: number): number; -export function querybalancedetailsresult_toJson(a: number): number; -export function __wbg_querybalancedetailsoptions_free(a: number, b: number): void; -export function __wbg_get_querybalancedetailsoptions_purse_identifier(a: number): number; -export function __wbg_set_querybalancedetailsoptions_purse_identifier(a: number, b: number): void; -export function __wbg_get_querybalancedetailsoptions_global_state_identifier(a: number): number; -export function __wbg_set_querybalancedetailsoptions_global_state_identifier(a: number, b: number): void; -export function __wbg_get_querybalancedetailsoptions_state_root_hash(a: number): number; -export function __wbg_set_querybalancedetailsoptions_state_root_hash(a: number, b: number): void; -export function __wbg_get_querybalancedetailsoptions_rpc_address(a: number): Array; -export function __wbg_set_querybalancedetailsoptions_rpc_address(a: number, b: number, c: number): void; -export function __wbg_get_querybalancedetailsoptions_verbosity(a: number): number; -export function __wbg_set_querybalancedetailsoptions_verbosity(a: number, b: number): void; -export function sdk_query_balance_details_options(a: number, b: number): Array; -export function sdk_query_balance_details(a: number, b: number): number; -export function __wbg_queryglobalstateresult_free(a: number, b: number): void; -export function queryglobalstateresult_api_version(a: number): number; -export function queryglobalstateresult_block_header(a: number): number; -export function queryglobalstateresult_stored_value(a: number): number; -export function queryglobalstateresult_merkle_proof(a: number): Array; -export function queryglobalstateresult_toJson(a: number): number; -export function __wbg_queryglobalstateoptions_free(a: number, b: number): void; -export function __wbg_get_queryglobalstateoptions_global_state_identifier(a: number): number; -export function __wbg_set_queryglobalstateoptions_global_state_identifier(a: number, b: number): void; -export function __wbg_get_queryglobalstateoptions_state_root_hash_as_string(a: number): Array; -export function __wbg_set_queryglobalstateoptions_state_root_hash_as_string(a: number, b: number, c: number): void; -export function __wbg_get_queryglobalstateoptions_state_root_hash(a: number): number; -export function __wbg_set_queryglobalstateoptions_state_root_hash(a: number, b: number): void; -export function __wbg_get_queryglobalstateoptions_maybe_block_id_as_string(a: number): Array; -export function __wbg_set_queryglobalstateoptions_maybe_block_id_as_string(a: number, b: number, c: number): void; -export function __wbg_get_queryglobalstateoptions_key_as_string(a: number): Array; -export function __wbg_set_queryglobalstateoptions_key_as_string(a: number, b: number, c: number): void; -export function __wbg_get_queryglobalstateoptions_key(a: number): number; -export function __wbg_set_queryglobalstateoptions_key(a: number, b: number): void; -export function __wbg_get_queryglobalstateoptions_path_as_string(a: number): Array; -export function __wbg_set_queryglobalstateoptions_path_as_string(a: number, b: number, c: number): void; -export function __wbg_get_queryglobalstateoptions_path(a: number): number; -export function __wbg_set_queryglobalstateoptions_path(a: number, b: number): void; -export function __wbg_get_queryglobalstateoptions_rpc_address(a: number): Array; -export function __wbg_set_queryglobalstateoptions_rpc_address(a: number, b: number, c: number): void; -export function __wbg_get_queryglobalstateoptions_verbosity(a: number): number; -export function __wbg_set_queryglobalstateoptions_verbosity(a: number, b: number): void; -export function sdk_query_global_state_options(a: number, b: number): Array; -export function sdk_query_global_state(a: number, b: number): number; +export function hashaddr_new(a: number, b: number): Array; +export function hashaddr_toBytes(a: number): Array; +export function hashaddr_toHexString(a: number): Array; +export function __wbg_dictionaryitemstrparams_free(a: number, b: number): void; +export function dictionaryitemstrparams_new(): number; +export function dictionaryitemstrparams_setAccountNamedKey(a: number, b: number, c: number, d: number, e: number, f: number, g: number): void; +export function dictionaryitemstrparams_setContractNamedKey(a: number, b: number, c: number, d: number, e: number, f: number, g: number): void; +export function dictionaryitemstrparams_setEntityNamedKey(a: number, b: number, c: number, d: number, e: number, f: number, g: number): void; +export function dictionaryitemstrparams_setUref(a: number, b: number, c: number, d: number, e: number): void; +export function dictionaryitemstrparams_setDictionary(a: number, b: number, c: number): void; +export function dictionaryitemstrparams_toJson(a: number): number; +export function __wbg_accounthash_free(a: number, b: number): void; +export function accounthash_new_js_alias(a: number, b: number): Array; +export function accounthash_fromFormattedStr(a: number, b: number): Array; +export function accounthash_fromPublicKey(a: number): number; +export function accounthash_toFormattedString(a: number): Array; +export function accounthash_toHexString(a: number): Array; +export function accounthash_fromUint8Array(a: number, b: number): number; +export function accounthash_toJson(a: number): number; +export function packagehash_new_js_alias(a: number, b: number): Array; +export function packagehash_fromFormattedStr(a: number, b: number): Array; +export function packagehash_toFormattedString(a: number): Array; +export function packagehash_fromUint8Array(a: number, b: number): number; +export function __wbg_transactionhash_free(a: number, b: number): void; +export function transactionhash_new_js_alias(a: number, b: number): Array; +export function transactionhash_fromRaw(a: number, b: number): Array; +export function transactionhash_digest(a: number): Array; +export function transactionhash_toJson(a: number): number; +export function transactionhash_toString(a: number): Array; +export function __wbg_accountidentifier_free(a: number, b: number): void; +export function accountidentifier_fromFormattedStr(a: number, b: number): Array; +export function accountidentifier_fromPublicKey(a: number): number; +export function accountidentifier_fromAccountHash(a: number): number; +export function accountidentifier_toJson(a: number): number; +export function sdk_speculative_transfer(a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number): number; +export function __wbg_getstateroothashresult_free(a: number, b: number): void; +export function getstateroothashresult_api_version(a: number): number; +export function getstateroothashresult_state_root_hash(a: number): number; +export function getstateroothashresult_state_root_hash_as_string(a: number): Array; +export function getstateroothashresult_toString(a: number): Array; +export function getstateroothashresult_toJson(a: number): number; +export function __wbg_getstateroothashoptions_free(a: number, b: number): void; +export function __wbg_get_getstateroothashoptions_maybe_block_id_as_string(a: number): Array; +export function __wbg_set_getstateroothashoptions_maybe_block_id_as_string(a: number, b: number, c: number): void; +export function __wbg_get_getstateroothashoptions_maybe_block_identifier(a: number): number; +export function __wbg_set_getstateroothashoptions_maybe_block_identifier(a: number, b: number): void; +export function __wbg_get_getstateroothashoptions_rpc_address(a: number): Array; +export function __wbg_set_getstateroothashoptions_rpc_address(a: number, b: number, c: number): void; +export function __wbg_get_getstateroothashoptions_verbosity(a: number): number; +export function __wbg_set_getstateroothashoptions_verbosity(a: number, b: number): void; +export function sdk_get_state_root_hash_options(a: number, b: number): Array; +export function sdk_get_state_root_hash(a: number, b: number): number; +export function sdk_chain_get_state_root_hash(a: number, b: number): number; +export function sdk_put_deploy(a: number, b: number, c: number, d: number, e: number): number; +export function sdk_account_put_deploy(a: number, b: number, c: number, d: number, e: number): number; export function sdk_speculative_transaction(a: number, b: number, c: number, d: number, e: number, f: number): number; -export function sdk_speculative_transfer_transaction(a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number): number; -export function __wbg_set_querybalancedetailsoptions_purse_identifier_as_string(a: number, b: number, c: number): void; -export function __wbg_set_querybalancedetailsoptions_state_root_hash_as_string(a: number, b: number, c: number): void; -export function __wbg_set_querybalancedetailsoptions_maybe_block_id_as_string(a: number, b: number, c: number): void; -export function __wbg_get_querybalancedetailsoptions_purse_identifier_as_string(a: number): Array; -export function __wbg_get_querybalancedetailsoptions_state_root_hash_as_string(a: number): Array; -export function __wbg_get_querybalancedetailsoptions_maybe_block_id_as_string(a: number): Array; +export function sdk_watchDeploy(a: number, b: number, c: number, d: number, e: number): number; +export function sdk_watchTransaction(a: number, b: number, c: number, d: number, e: number): number; +export function sdk_waitDeploy(a: number, b: number, c: number, d: number, e: number, f: number, g: number): number; +export function sdk_waitTransaction(a: number, b: number, c: number, d: number, e: number, f: number, g: number): number; +export function __wbg_watcher_free(a: number, b: number): void; +export function watcher_new(a: number, b: number, c: number, d: number): number; +export function watcher_subscribe(a: number, b: number, c: number): Array; +export function watcher_unsubscribe(a: number, b: number, c: number): void; +export function watcher_start(a: number): number; +export function watcher_stop(a: number): void; +export function __wbg_subscription_free(a: number, b: number): void; +export function __wbg_get_subscription_eventHandlerFn(a: number): number; +export function __wbg_set_subscription_eventHandlerFn(a: number, b: number): void; +export function subscription_new(a: number, b: number, c: number): number; +export function __wbg_failure_free(a: number, b: number): void; +export function __wbg_get_failure_cost(a: number): Array; +export function __wbg_set_failure_cost(a: number, b: number, c: number): void; +export function __wbg_get_failure_error_message(a: number): Array; +export function __wbg_set_failure_error_message(a: number, b: number, c: number): void; +export function __wbg_version2_free(a: number, b: number): void; +export function __wbg_get_version2_error_message(a: number): Array; +export function __wbg_set_version2_error_message(a: number, b: number, c: number): void; +export function __wbg_executionresult_free(a: number, b: number): void; +export function __wbg_get_executionresult_Success(a: number): number; +export function __wbg_set_executionresult_Success(a: number, b: number): void; +export function __wbg_get_executionresult_Failure(a: number): number; +export function __wbg_set_executionresult_Failure(a: number, b: number): void; +export function __wbg_hashstring_free(a: number, b: number): void; +export function hashstring_Deploy(a: number): Array; +export function hashstring_toString(a: number): Array; +export function __wbg_messages_free(a: number, b: number): void; +export function __wbg_set_messages_entity_hash(a: number, b: number, c: number): void; +export function __wbg_get_messages_message(a: number): number; +export function __wbg_set_messages_message(a: number, b: number): void; +export function __wbg_get_messages_topic_name(a: number): Array; +export function __wbg_set_messages_topic_name(a: number, b: number, c: number): void; +export function __wbg_get_messages_topic_name_hash(a: number): Array; +export function __wbg_set_messages_topic_name_hash(a: number, b: number, c: number): void; +export function __wbg_get_messages_topic_index(a: number): number; +export function __wbg_set_messages_topic_index(a: number, b: number): void; +export function __wbg_get_messages_block_index(a: number): number; +export function __wbg_set_messages_block_index(a: number, b: number): void; +export function __wbg_transactionprocessed_free(a: number, b: number): void; +export function __wbg_get_transactionprocessed_hash(a: number): number; +export function __wbg_set_transactionprocessed_hash(a: number, b: number): void; +export function __wbg_get_transactionprocessed_initiator_addr(a: number): number; +export function __wbg_set_transactionprocessed_initiator_addr(a: number, b: number): void; +export function __wbg_get_transactionprocessed_timestamp(a: number): Array; +export function __wbg_set_transactionprocessed_timestamp(a: number, b: number, c: number): void; +export function __wbg_set_transactionprocessed_ttl(a: number, b: number, c: number): void; +export function __wbg_get_transactionprocessed_execution_result(a: number): number; +export function __wbg_set_transactionprocessed_execution_result(a: number, b: number): void; +export function __wbg_get_transactionprocessed_messages(a: number): Array; +export function __wbg_set_transactionprocessed_messages(a: number, b: number, c: number): void; +export function __wbg_body_free(a: number, b: number): void; +export function __wbg_get_body_transaction_processed(a: number): number; +export function __wbg_set_body_transaction_processed(a: number, b: number): void; +export function body_get_deploy_processed(a: number): number; +export function __wbg_eventparseresult_free(a: number, b: number): void; +export function __wbg_get_eventparseresult_err(a: number): Array; +export function __wbg_set_eventparseresult_err(a: number, b: number, c: number): void; +export function __wbg_get_eventparseresult_body(a: number): number; +export function __wbg_set_eventparseresult_body(a: number, b: number): void; +export function __wbg_payment_free(a: number, b: number): void; +export function __wbg_publickeystring_free(a: number, b: number): void; +export function __wbg_message_free(a: number, b: number): void; +export function __wbg_get_version2_initiator(a: number): number; +export function accountidentifier_new(a: number, b: number): Array; +export function __wbg_set_subscription_targetHash(a: number, b: number, c: number): void; +export function __wbg_set_version2_limit(a: number, b: number, c: number): void; +export function __wbg_set_payment_source(a: number, b: number, c: number): void; +export function __wbg_set_hashstring_hash(a: number, b: number, c: number): void; +export function __wbg_set_publickeystring_PublicKey(a: number, b: number, c: number): void; +export function __wbg_set_message_String(a: number, b: number, c: number): void; +export function __wbg_set_version2_consumed(a: number, b: number, c: number): void; +export function __wbg_set_version2_cost(a: number, b: number, c: number): void; +export function __wbg_set_transactionprocessed_block_hash(a: number, b: number, c: number): void; +export function body_get_transaction_processed(a: number): number; +export function hashstring_Version1(a: number): Array; +export function __wbg_set_version2_initiator(a: number, b: number): void; +export function __wbg_hashaddr_free(a: number, b: number): void; +export function __wbg_packagehash_free(a: number, b: number): void; +export function __wbg_get_subscription_targetHash(a: number): Array; +export function __wbg_get_version2_limit(a: number): Array; +export function __wbg_get_payment_source(a: number): Array; +export function __wbg_get_hashstring_hash(a: number): Array; +export function __wbg_get_publickeystring_PublicKey(a: number): Array; +export function __wbg_get_message_String(a: number): Array; +export function __wbg_get_messages_entity_hash(a: number): Array; +export function __wbg_get_version2_cost(a: number): Array; +export function __wbg_get_version2_consumed(a: number): Array; +export function __wbg_get_transactionprocessed_ttl(a: number): Array; +export function __wbg_get_transactionprocessed_block_hash(a: number): Array; +export function __wbg_accessrights_free(a: number, b: number): void; +export function accessrights_NONE(): number; +export function accessrights_READ(): number; +export function accessrights_WRITE(): number; +export function accessrights_ADD(): number; +export function accessrights_READ_ADD(): number; +export function accessrights_READ_WRITE(): number; +export function accessrights_ADD_WRITE(): number; +export function accessrights_READ_ADD_WRITE(): number; +export function accessrights_new(a: number): Array; +export function accessrights_from_bits(a: number, b: number, c: number): number; +export function accessrights_is_readable(a: number): number; +export function accessrights_is_writeable(a: number): number; +export function accessrights_is_addable(a: number): number; +export function accessrights_is_none(a: number): number; +export function __wbg_dictionaryaddr_free(a: number, b: number): void; +export function dictionaryaddr_new(a: number, b: number): Array; +export function transferaddr_new(a: number, b: number): Array; +export function urefaddr_new(a: number, b: number): Array; +export function __wbg_eraid_free(a: number, b: number): void; +export function eraid_new(a: number): number; +export function eraid_value(a: number): number; +export function __wbg_blockidentifier_free(a: number, b: number): void; +export function blockidentifier_new(a: number): number; +export function blockidentifier_from_hash(a: number): number; +export function blockidentifier_fromHeight(a: number): number; +export function blockidentifier_toJson(a: number): number; export function sdk_get_binary_latest_switch_block_header(a: number, b: number, c: number): number; export function sdk_get_binary_latest_block_header(a: number, b: number, c: number): number; export function sdk_get_binary_block_header_by_height(a: number, b: number, c: number, d: number): number; @@ -1008,8 +867,149 @@ export function sdk_get_binary_global_state_item_by_block_height(a: number, b: n export function sdk_get_binary_try_accept_transaction(a: number, b: number, c: number, d: number): number; export function sdk_get_binary_try_speculative_execution(a: number, b: number, c: number, d: number): number; export function sdk_get_binary_get_protocol_version(a: number, b: number, c: number): number; -export function sdk_speculative_deploy(a: number, b: number, c: number, d: number, e: number, f: number, g: number): number; -export function sdk_call_entrypoint(a: number, b: number, c: number, d: number, e: number): number; +export function __wbg_getauctioninforesult_free(a: number, b: number): void; +export function getauctioninforesult_api_version(a: number): number; +export function getauctioninforesult_auction_state(a: number): number; +export function getauctioninforesult_toJson(a: number): number; +export function __wbg_getauctioninfooptions_free(a: number, b: number): void; +export function __wbg_get_getauctioninfooptions_maybe_block_id_as_string(a: number): Array; +export function __wbg_set_getauctioninfooptions_maybe_block_id_as_string(a: number, b: number, c: number): void; +export function __wbg_get_getauctioninfooptions_maybe_block_identifier(a: number): number; +export function __wbg_set_getauctioninfooptions_maybe_block_identifier(a: number, b: number): void; +export function __wbg_get_getauctioninfooptions_rpc_address(a: number): Array; +export function __wbg_set_getauctioninfooptions_rpc_address(a: number, b: number, c: number): void; +export function __wbg_get_getauctioninfooptions_verbosity(a: number): number; +export function __wbg_set_getauctioninfooptions_verbosity(a: number, b: number): void; +export function sdk_get_auction_info_options(a: number, b: number): Array; +export function sdk_get_auction_info(a: number, b: number): number; +export function sdk_state_get_auction_info_js_alias(a: number, b: number): number; +export function __wbg_getblockresult_free(a: number, b: number): void; +export function getblockresult_api_version(a: number): number; +export function getblockresult_block(a: number): number; +export function getblockresult_toJson(a: number): number; +export function sdk_get_block_options(a: number, b: number): Array; +export function sdk_get_block(a: number, b: number): number; +export function sdk_chain_get_block(a: number, b: number): number; +export function __wbg_getchainspecresult_free(a: number, b: number): void; +export function getchainspecresult_api_version(a: number): number; +export function getchainspecresult_chainspec_bytes(a: number): number; +export function getchainspecresult_toJson(a: number): number; +export function sdk_get_chainspec(a: number, b: number, c: number, d: number): number; +export function sdk_info_get_chainspec(a: number, b: number, c: number, d: number): number; +export function __wbg_getnodestatusresult_free(a: number, b: number): void; +export function getnodestatusresult_api_version(a: number): number; +export function getnodestatusresult_chainspec_name(a: number): Array; +export function getnodestatusresult_starting_state_root_hash(a: number): number; +export function getnodestatusresult_peers(a: number): number; +export function getnodestatusresult_last_added_block_info(a: number): number; +export function getnodestatusresult_our_public_signing_key(a: number): number; +export function getnodestatusresult_round_length(a: number): number; +export function getnodestatusresult_next_upgrade(a: number): number; +export function getnodestatusresult_build_version(a: number): Array; +export function getnodestatusresult_uptime(a: number): number; +export function getnodestatusresult_reactor_state(a: number): number; +export function getnodestatusresult_last_progress(a: number): number; +export function getnodestatusresult_available_block_range(a: number): number; +export function getnodestatusresult_block_sync(a: number): number; +export function getnodestatusresult_toJson(a: number): number; +export function sdk_get_node_status(a: number, b: number, c: number, d: number): number; +export function sdk_info_get_status(a: number, b: number, c: number, d: number): number; +export function __wbg_getpeersresult_free(a: number, b: number): void; +export function getpeersresult_api_version(a: number): number; +export function getpeersresult_peers(a: number): number; +export function getpeersresult_toJson(a: number): number; +export function sdk_get_peers(a: number, b: number, c: number, d: number): number; +export function sdk_info_get_peers(a: number, b: number, c: number, d: number): number; +export function __wbg_getvalidatorchangesresult_free(a: number, b: number): void; +export function getvalidatorchangesresult_api_version(a: number): number; +export function getvalidatorchangesresult_changes(a: number): number; +export function getvalidatorchangesresult_toJson(a: number): number; +export function sdk_get_validator_changes(a: number, b: number, c: number, d: number): number; +export function sdk_info_get_validator_change(a: number, b: number, c: number, d: number): number; +export function __wbg_listrpcsresult_free(a: number, b: number): void; +export function listrpcsresult_api_version(a: number): number; +export function listrpcsresult_name(a: number): Array; +export function listrpcsresult_schema(a: number): number; +export function listrpcsresult_toJson(a: number): number; +export function sdk_list_rpcs(a: number, b: number, c: number, d: number): number; +export function sdk_speculative_transfer_transaction(a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number): number; +export function sdk_make_deploy(a: number, b: number, c: number, d: number): Array; +export function sdk_sign_deploy(a: number, b: number, c: number, d: number): number; +export function sdk_make_transaction(a: number, b: number, c: number): Array; +export function sdk_sign_transaction(a: number, b: number, c: number, d: number): number; +export function sdk_call_entrypoint_deploy(a: number, b: number, c: number, d: number, e: number, f: number, g: number): number; +export function __wbg_querycontractkeyoptions_free(a: number, b: number): void; +export function __wbg_get_querycontractkeyoptions_entity_identifier(a: number): number; +export function __wbg_set_querycontractkeyoptions_entity_identifier(a: number, b: number): void; +export function __wbg_get_querycontractkeyoptions_entity_identifier_as_string(a: number): Array; +export function __wbg_set_querycontractkeyoptions_entity_identifier_as_string(a: number, b: number, c: number): void; +export function __wbg_get_querycontractkeyoptions_maybe_block_id_as_string(a: number): Array; +export function __wbg_set_querycontractkeyoptions_maybe_block_id_as_string(a: number, b: number, c: number): void; +export function __wbg_get_querycontractkeyoptions_path_as_string(a: number): Array; +export function __wbg_set_querycontractkeyoptions_path_as_string(a: number, b: number, c: number): void; +export function __wbg_get_querycontractkeyoptions_path(a: number): number; +export function __wbg_set_querycontractkeyoptions_path(a: number, b: number): void; +export function __wbg_get_querycontractkeyoptions_rpc_address(a: number): Array; +export function __wbg_set_querycontractkeyoptions_rpc_address(a: number, b: number, c: number): void; +export function __wbg_get_querycontractkeyoptions_verbosity(a: number): number; +export function __wbg_set_querycontractkeyoptions_verbosity(a: number, b: number): void; +export function sdk_query_contract_key_options(a: number, b: number): Array; +export function sdk_query_contract_key(a: number, b: number): number; +export function __wbg_getblockoptions_free(a: number, b: number): void; +export function __wbg_set_getblockoptions_verbosity(a: number, b: number): void; +export function __wbg_get_getblockoptions_maybe_block_identifier(a: number): number; +export function __wbg_get_querycontractkeyoptions_maybe_block_identifier(a: number): number; +export function __wbg_set_getblockoptions_maybe_block_id_as_string(a: number, b: number, c: number): void; +export function __wbg_set_getblockoptions_rpc_address(a: number, b: number, c: number): void; +export function __wbg_get_getblockoptions_maybe_block_id_as_string(a: number): Array; +export function __wbg_get_getblockoptions_rpc_address(a: number): Array; +export function __wbg_get_getblockoptions_verbosity(a: number): number; +export function __wbg_set_getblockoptions_maybe_block_identifier(a: number, b: number): void; +export function __wbg_set_querycontractkeyoptions_maybe_block_identifier(a: number, b: number): void; +export function __wbg_transferaddr_free(a: number, b: number): void; +export function __wbg_urefaddr_free(a: number, b: number): void; +export function __wbg_bytes_free(a: number, b: number): void; +export function bytes_new(): number; +export function bytes_fromUint8Array(a: number): number; +export function __wbg_argssimple_free(a: number, b: number): void; +export function __wbg_getaccountresult_free(a: number, b: number): void; +export function getaccountresult_api_version(a: number): number; +export function getaccountresult_account(a: number): number; +export function getaccountresult_merkle_proof(a: number): Array; +export function getaccountresult_toJson(a: number): number; +export function __wbg_getaccountoptions_free(a: number, b: number): void; +export function __wbg_get_getaccountoptions_account_identifier(a: number): number; +export function __wbg_set_getaccountoptions_account_identifier(a: number, b: number): void; +export function __wbg_get_getaccountoptions_account_identifier_as_string(a: number): Array; +export function __wbg_set_getaccountoptions_account_identifier_as_string(a: number, b: number, c: number): void; +export function __wbg_get_getaccountoptions_maybe_block_id_as_string(a: number): Array; +export function __wbg_set_getaccountoptions_maybe_block_id_as_string(a: number, b: number, c: number): void; +export function __wbg_get_getaccountoptions_maybe_block_identifier(a: number): number; +export function __wbg_set_getaccountoptions_maybe_block_identifier(a: number, b: number): void; +export function __wbg_get_getaccountoptions_rpc_address(a: number): Array; +export function __wbg_set_getaccountoptions_rpc_address(a: number, b: number, c: number): void; +export function __wbg_get_getaccountoptions_verbosity(a: number): number; +export function __wbg_set_getaccountoptions_verbosity(a: number, b: number): void; +export function sdk_get_account_options(a: number, b: number): Array; +export function sdk_get_account(a: number, b: number): number; +export function sdk_state_get_account_info(a: number, b: number): number; +export function __wbg_geterasummaryresult_free(a: number, b: number): void; +export function geterasummaryresult_api_version(a: number): number; +export function geterasummaryresult_era_summary(a: number): number; +export function geterasummaryresult_toJson(a: number): number; +export function __wbg_geterasummaryoptions_free(a: number, b: number): void; +export function __wbg_get_geterasummaryoptions_maybe_block_id_as_string(a: number): Array; +export function __wbg_set_geterasummaryoptions_maybe_block_id_as_string(a: number, b: number, c: number): void; +export function __wbg_get_geterasummaryoptions_rpc_address(a: number): Array; +export function __wbg_set_geterasummaryoptions_rpc_address(a: number, b: number, c: number): void; +export function __wbg_get_geterasummaryoptions_verbosity(a: number): number; +export function __wbg_set_geterasummaryoptions_verbosity(a: number, b: number): void; +export function sdk_get_era_summary_options(a: number, b: number): Array; +export function sdk_get_era_summary(a: number, b: number): number; +export function sdk_chain_get_era_summary(a: number, b: number): number; +export function sdk_transfer_transaction(a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number): number; +export function __wbg_get_geterasummaryoptions_maybe_block_identifier(a: number): number; +export function __wbg_set_geterasummaryoptions_maybe_block_identifier(a: number, b: number): void; export function __wbg_intounderlyingbytesource_free(a: number, b: number): void; export function intounderlyingbytesource_type(a: number): number; export function intounderlyingbytesource_autoAllocateChunkSize(a: number): number; @@ -1027,14 +1027,14 @@ export function __wbindgen_malloc(a: number, b: number): number; export function __wbindgen_realloc(a: number, b: number, c: number, d: number): number; export const __wbindgen_export_2: WebAssembly.Table; export const __wbindgen_export_3: WebAssembly.Table; -export function closure820_externref_shim(a: number, b: number, c: number): void; -export function _dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hbccf68cb4005f2b4(a: number, b: number): void; -export function closure1141_externref_shim(a: number, b: number, c: number): void; -export function closure1155_externref_shim(a: number, b: number, c: number): void; +export function closure937_externref_shim(a: number, b: number, c: number): void; +export function _dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h6b87dddcaa71d61d(a: number, b: number): void; +export function closure1139_externref_shim(a: number, b: number, c: number): void; +export function closure1153_externref_shim(a: number, b: number, c: number): void; export function __wbindgen_free(a: number, b: number, c: number): void; export function __externref_table_dealloc(a: number): void; export function __externref_table_alloc(): number; -export function __externref_drop_slice(a: number, b: number): void; export function __wbindgen_exn_store(a: number): void; -export function closure1703_externref_shim(a: number, b: number, c: number, d: number): void; +export function __externref_drop_slice(a: number, b: number): void; +export function closure1701_externref_shim(a: number, b: number, c: number, d: number): void; export function __wbindgen_start(): void; diff --git a/pkg/README.md b/pkg/README.md index a68705fc2..a4ed43f8f 100644 --- a/pkg/README.md +++ b/pkg/README.md @@ -293,7 +293,7 @@ You can find all RPC methods on the [RPC doc](https://casper-ecosystem.github.io ```rust use casper_rust_wasm_sdk::types::{ - transaction::Transaction, transaction_hash::TransactionHash, + transaction::Transaction, hash::transaction_hash::TransactionHash, }; let transaction_hash = @@ -314,7 +314,7 @@ println!("{timestamp} {hash}"); #### Get deploy by deploy hash (legacy) ```rust -use casper_rust_wasm_sdk::types::deploy_hash::DeployHash; +use casper_rust_wasm_sdk::types::hash::deploy_hash::DeployHash; let deploy_hash = DeployHash::new("a8778b2e4bd1ad02c168329a1f6f3674513f4d350da1b5f078e058a3422ad0b9") @@ -633,7 +633,7 @@ console.log(transaction_hash); ```rust use casper_rust_wasm_sdk::types::{ addr::entity_addr::EntityAddr, - addressable_entity_hash::AddressableEntityHash, + hash::addressable_entity_hash::AddressableEntityHash, transaction_params::{ transaction_builder_params::TransactionBuilderParams, transaction_str_params::TransactionStrParams, @@ -712,7 +712,7 @@ let sdk = SDK::new( ); use casper_rust_wasm_sdk::types::{ - addressable_entity_hash::AddressableEntityHash, + hash::addressable_entity_hash::AddressableEntityHash, transaction_params::{ transaction_builder_params::TransactionBuilderParams, transaction_str_params::TransactionStrParams, @@ -798,7 +798,7 @@ Puts a [`Transaction`] to the network for execution. ```rust use casper_rust_wasm_sdk::types::{ - addressable_entity_hash::AddressableEntityHash, + hash::addressable_entity_hash::AddressableEntityHash, transaction_params::{ transaction_builder_params::TransactionBuilderParams, transaction_str_params::TransactionStrParams, @@ -1128,7 +1128,7 @@ console.log(results); use casper_rust_wasm_sdk::{ helpers::json_pretty_print, types::{ - transaction_hash::TransactionHash, + hash::transaction_hash::TransactionHash, transaction_params::transaction_str_params::TransactionStrParams, }, }; @@ -1290,7 +1290,7 @@ async function loadFile() { ```rust use casper_rust_wasm_sdk::types::{ - addressable_entity_hash::AddressableEntityHash, + hash::addressable_entity_hash::AddressableEntityHash, transaction_params::{ transaction_builder_params::TransactionBuilderParams, transaction_str_params::TransactionStrParams, @@ -2061,7 +2061,7 @@ console.log(results); use casper_rust_wasm_sdk::{ helpers::json_pretty_print, types::{ - deploy_hash::DeployHash, + hash::deploy_hash::DeployHash, deploy_params::{ deploy_str_params::DeployStrParams, payment_str_params::PaymentStrParams, session_str_params::SessionStrParams, @@ -2225,7 +2225,7 @@ async function loadFile() { ```rust use casper_rust_wasm_sdk::types::{ - deploy_hash::DeployHash, + hash::deploy_hash::DeployHash, deploy_params::{ deploy_str_params::DeployStrParams, payment_str_params::PaymentStrParams, session_str_params::SessionStrParams, diff --git a/pkg/casper_rust_wasm_sdk.d.ts b/pkg/casper_rust_wasm_sdk.d.ts index 783af0859..afa49649e 100644 --- a/pkg/casper_rust_wasm_sdk.d.ts +++ b/pkg/casper_rust_wasm_sdk.d.ts @@ -1950,1108 +1950,1156 @@ export class SDK { */ query_contract_dict(options?: queryContractDictOptions): Promise; /** - * @param {any} options - * @returns {getEraInfoOptions} - */ - get_era_info_options(options: any): getEraInfoOptions; - /** - * @param {getEraInfoOptions | undefined} [options] - * @returns {Promise} - */ - get_era_info(options?: getEraInfoOptions): Promise; - /** - * @param {getEraInfoOptions | undefined} [options] - * @returns {Promise} + * JavaScript function for deploying with deserialized parameters. + * + * # Arguments + * + * * `deploy_params` - Deploy parameters. + * * `session_params` - Session parameters. + * * `payment_params` - Payment parameters. + * * `verbosity` - An optional verbosity level. + * * `rpc_address` - An optional rpc address. + * + * # Returns + * + * A result containing PutDeployResult or a JsError. + * @param {DeployStrParams} deploy_params + * @param {SessionStrParams} session_params + * @param {PaymentStrParams} payment_params + * @param {Verbosity | undefined} [verbosity] + * @param {string | undefined} [rpc_address] + * @returns {Promise} */ - chain_get_era_info_by_switch_block(options?: getEraInfoOptions): Promise; + deploy(deploy_params: DeployStrParams, session_params: SessionStrParams, payment_params: PaymentStrParams, verbosity?: Verbosity, rpc_address?: string): Promise; /** - * Parses auction info options from a JsValue. + * Parses deploy options from a JsValue. * * # Arguments * - * * `options` - A JsValue containing auction info options to be parsed. + * * `options` - A JsValue containing deploy options to be parsed. * * # Returns * - * Result containing parsed auction info options as a `GetAuctionInfoOptions` struct, - * or a `JsError` if deserialization fails. + * Parsed deploy options as a `GetDeployOptions` struct. * @param {any} options - * @returns {getAuctionInfoOptions} + * @returns {getDeployOptions} */ - get_auction_info_options(options: any): getAuctionInfoOptions; + get_deploy_options(options: any): getDeployOptions; /** - * Retrieves auction information using the provided options. + * Retrieves deploy information using the provided options. * * # Arguments * - * * `options` - An optional `GetAuctionInfoOptions` struct containing retrieval options. + * * `options` - An optional `GetDeployOptions` struct containing retrieval options. * * # Returns * - * A `Result` containing either a `GetAuctionInfoResult` or a `JsError` in case of an error. - * - * # Errors - * - * Returns a `JsError` if there is an error during the retrieval process. - * @param {getAuctionInfoOptions | undefined} [options] - * @returns {Promise} + * A `Result` containing either a `GetDeployResult` or an error. + * @param {getDeployOptions | undefined} [options] + * @returns {Promise} */ - get_auction_info(options?: getAuctionInfoOptions): Promise; + get_deploy(options?: getDeployOptions): Promise; /** - * @param {getAuctionInfoOptions | undefined} [options] - * @returns {Promise} + * Retrieves deploy information using the provided options, alias for `get_deploy`. + * @param {getDeployOptions | undefined} [options] + * @returns {Promise} */ - state_get_auction_info_js_alias(options?: getAuctionInfoOptions): Promise; + info_get_deploy(options?: getDeployOptions): Promise; /** - * Parses block options from a JsValue. + * Parses transaction options from a JsValue. * * # Arguments * - * * `options` - A JsValue containing block options to be parsed. + * * `options` - A JsValue containing transaction options to be parsed. * * # Returns * - * Parsed block options as a `GetBlockOptions` struct. + * Parsed transaction options as a `GetTransactionOptions` struct. * @param {any} options - * @returns {getBlockOptions} + * @returns {getTransactionOptions} */ - get_block_options(options: any): getBlockOptions; + get_transaction_options(options: any): getTransactionOptions; /** - * Retrieves block information using the provided options. + * Retrieves transaction information using the provided options. * * # Arguments * - * * `options` - An optional `GetBlockOptions` struct containing retrieval options. + * * `options` - An optional `GetTransactionOptions` struct containing retrieval options. * * # Returns * - * A `Result` containing either a `GetBlockResult` or a `JsError` in case of an error. - * - * # Errors - * - * Returns a `JsError` if there is an error during the retrieval process. - * @param {getBlockOptions | undefined} [options] - * @returns {Promise} + * A `Result` containing either a `GetTransactionResult` or an error. + * @param {getTransactionOptions | undefined} [options] + * @returns {Promise} */ - get_block(options?: getBlockOptions): Promise; + get_transaction(options?: getTransactionOptions): Promise; /** - * JavaScript Alias for the `get_block`. + * Retrieves transaction information using the provided options, alias for `get_transaction`. + * @param {getTransactionOptions | undefined} [options] + * @returns {Promise} + */ + info_get_transaction(options?: getTransactionOptions): Promise; + /** + * Get options for speculative execution from a JavaScript value. + * @param {any} options + * @returns {getSpeculativeExecTxnOptions} + */ + get_speculative_exec_options(options: any): getSpeculativeExecTxnOptions; + /** + * JS function for speculative execution. * * # Arguments * - * * `options` - An optional `GetBlockOptions` struct containing retrieval options. + * * `options` - The options for speculative execution. * * # Returns * - * A `Result` containing either a `GetBlockResult` or a `JsError` in case of an error. - * - * # Errors - * - * Returns a `JsError` if there is an error during the retrieval process. - * @param {getBlockOptions | undefined} [options] - * @returns {Promise} + * A `Result` containing the result of the speculative execution or a `JsError` in case of an error. + * @param {getSpeculativeExecTxnOptions | undefined} [options] + * @returns {Promise} */ - chain_get_block(options?: getBlockOptions): Promise; + speculative_exec(options?: getSpeculativeExecTxnOptions): Promise; /** - * Asynchronously retrieves the chainspec. + * JS function for `make_transfer`. * * # Arguments * - * * `verbosity` - An optional `Verbosity` parameter. - * * `rpc_address` - An optional rpc address as a string. + * * `amount` - The transfer amount. + * * `target_account` - The target account. + * * `transfer_id` - Optional transfer identifier. + * * `deploy_params` - The deploy parameters. + * * `payment_params` - The payment parameters. * * # Returns * - * A `Result` containing either a `GetChainspecResult` or a `JsError` in case of an error. - * @param {Verbosity | undefined} [verbosity] - * @param {string | undefined} [rpc_address] - * @returns {Promise} - */ - get_chainspec(verbosity?: Verbosity, rpc_address?: string): Promise; - /** - * @param {Verbosity | undefined} [verbosity] - * @param {string | undefined} [rpc_address] - * @returns {Promise} + * A `Result` containing the created `Deploy` or a `JsError` in case of an error. + * @param {string} amount + * @param {string} target_account + * @param {string | undefined} transfer_id + * @param {DeployStrParams} deploy_params + * @param {PaymentStrParams} payment_params + * @returns {Deploy} */ - info_get_chainspec(verbosity?: Verbosity, rpc_address?: string): Promise; + make_transfer(amount: string, target_account: string, transfer_id: string | undefined, deploy_params: DeployStrParams, payment_params: PaymentStrParams): Deploy; /** - * Retrieves node status information using the provided options. + * JS function for `make_transfer_transaction`. * * # Arguments * - * * `verbosity` - An optional `Verbosity` level for controlling the output verbosity. - * * `rpc_address` - An optional string specifying the rpc address to use for the request. + * * `maybe_source` - Optional transfer source uref. + * * `amount` - The transfer amount. + * * `target` - The target account. + * * `transaction_params` - The transaction parameters. + * * `maybe_id` - Optional transfer identifier. * * # Returns * - * A `Result` containing either a `GetNodeStatusResult` or a `JsError` in case of an error. - * - * # Errors - * - * Returns a `JsError` if there is an error during the retrieval process. - * @param {Verbosity | undefined} [verbosity] - * @param {string | undefined} [rpc_address] - * @returns {Promise} + * A `Result` containing the created `Transaction` or a `JsError` in case of an error. + * @param {URef | undefined} maybe_source + * @param {string} target + * @param {string} amount + * @param {TransactionStrParams} transaction_params + * @param {string | undefined} [maybe_id] + * @returns {Transaction} */ - get_node_status(verbosity?: Verbosity, rpc_address?: string): Promise; + make_transfer_transaction(maybe_source: URef | undefined, target: string, amount: string, transaction_params: TransactionStrParams, maybe_id?: string): Transaction; /** - * @param {Verbosity | undefined} [verbosity] - * @param {string | undefined} [rpc_address] - * @returns {Promise} + * @param {any} options + * @returns {getEraInfoOptions} */ - info_get_status(verbosity?: Verbosity, rpc_address?: string): Promise; + get_era_info_options(options: any): getEraInfoOptions; /** - * Retrieves peers asynchronously. + * @param {getEraInfoOptions | undefined} [options] + * @returns {Promise} + */ + get_era_info(options?: getEraInfoOptions): Promise; + /** + * @param {getEraInfoOptions | undefined} [options] + * @returns {Promise} + */ + chain_get_era_info_by_switch_block(options?: getEraInfoOptions): Promise; + /** + * JS function for transferring funds. * * # Arguments * - * * `verbosity` - Optional verbosity level. - * * `rpc_address` - Optional rpc address. + * * `amount` - The amount to transfer. + * * `target_account` - The target account. + * * `transfer_id` - An optional transfer ID (defaults to a random number). + * * `deploy_params` - The deployment parameters. + * * `payment_params` - The payment parameters. + * * `verbosity` - The verbosity level for logging (optional). + * * `rpc_address` - The address of the node to connect to (optional). * * # Returns * - * A `Result` containing `GetPeersResult` or a `JsError` if an error occurs. + * A `Result` containing the result of the transfer or a `JsError` in case of an error. + * @param {string} amount + * @param {string} target_account + * @param {string | undefined} transfer_id + * @param {DeployStrParams} deploy_params + * @param {PaymentStrParams} payment_params * @param {Verbosity | undefined} [verbosity] * @param {string | undefined} [rpc_address] - * @returns {Promise} + * @returns {Promise} */ - get_peers(verbosity?: Verbosity, rpc_address?: string): Promise; + transfer(amount: string, target_account: string, transfer_id: string | undefined, deploy_params: DeployStrParams, payment_params: PaymentStrParams, verbosity?: Verbosity, rpc_address?: string): Promise; /** - * @param {Verbosity | undefined} [verbosity] - * @param {string | undefined} [rpc_address] - * @returns {Promise} + * @param {any} options + * @returns {getEntityOptions} */ - info_get_peers(verbosity?: Verbosity, rpc_address?: string): Promise; + get_entity_options(options: any): getEntityOptions; /** - * Retrieves validator changes using the provided options. + * Retrieves entity information using the provided options. + * + * This function is an asynchronous JavaScript binding for the Rust `get_entity` method. * * # Arguments * - * * `verbosity` - An optional `Verbosity` level for controlling the output verbosity. - * * `rpc_address` - An optional string specifying the rpc address to use for the request. + * * `options` - An optional `GetEntityOptions` struct containing retrieval options, such as: + * - `entity_identifier`: Identifier for the entity. + * - `entity_identifier_as_string`: String representation of the entity identifier. + * - `maybe_block_id_as_string`: Optional string representation of the block ID. + * - `maybe_block_identifier`: Optional `BlockIdentifierInput` for specifying the block. + * - `verbosity`: Verbosity level for the output. + * - `rpc_address`: Address of the node to query. * * # Returns * - * A `Result` containing either a `GetValidatorChangesResult` or a `JsError` in case of an error. + * A `Result` containing either a `GetAddressableEntityResult` on success or a `JsError` on failure. * * # Errors * - * Returns a `JsError` if there is an error during the retrieval process. - * @param {Verbosity | undefined} [verbosity] - * @param {string | undefined} [rpc_address] - * @returns {Promise} + * Returns a `JsError` if there is an error during the retrieval process, such as issues with the provided options or network errors. + * ``` + * @param {getEntityOptions | undefined} [options] + * @returns {Promise} */ - get_validator_changes(verbosity?: Verbosity, rpc_address?: string): Promise; + get_entity(options?: getEntityOptions): Promise; /** - * @param {Verbosity | undefined} [verbosity] - * @param {string | undefined} [rpc_address] - * @returns {Promise} + * @param {getEntityOptions | undefined} [options] + * @returns {Promise} */ - info_get_validator_change(verbosity?: Verbosity, rpc_address?: string): Promise; + state_get_entity(options?: getEntityOptions): Promise; /** - * Lists available RPCs using the provided options. + * Puts a transaction using the provided options. * * # Arguments * + * * `transaction` - The `Transaction` object to be sent. * * `verbosity` - An optional `Verbosity` level for controlling the output verbosity. * * `rpc_address` - An optional string specifying the rpc address to use for the request. * * # Returns * - * A `Result` containing either a `ListRpcsResult` or a `JsError` in case of an error. + * A `Result` containing either a `PutTransactionResult` or a `JsError` in case of an error. * * # Errors * - * Returns a `JsError` if there is an error during the listing process. + * Returns a `JsError` if there is an error during the transaction process. + * @param {Transaction} transaction * @param {Verbosity | undefined} [verbosity] * @param {string | undefined} [rpc_address] - * @returns {Promise} + * @returns {Promise} */ - list_rpcs(verbosity?: Verbosity, rpc_address?: string): Promise; + put_transaction(transaction: Transaction, verbosity?: Verbosity, rpc_address?: string): Promise; /** - * JS function for `make_deploy`. - * - * # Arguments - * - * * `deploy_params` - The deploy parameters. - * * `session_params` - The session parameters. - * * `payment_params` - The payment parameters. - * - * # Returns - * - * A `Result` containing the created `Deploy` or a `JsError` in case of an error. - * @param {DeployStrParams} deploy_params - * @param {SessionStrParams} session_params - * @param {PaymentStrParams} payment_params - * @returns {Deploy} + * JavaScript Alias for `put_transaction`. + * @param {Transaction} transaction + * @param {Verbosity | undefined} [verbosity] + * @param {string | undefined} [rpc_address] + * @returns {Promise} */ - make_deploy(deploy_params: DeployStrParams, session_params: SessionStrParams, payment_params: PaymentStrParams): Deploy; + account_put_transaction(transaction: Transaction, verbosity?: Verbosity, rpc_address?: string): Promise; /** - * JS function for `sign_deploy`. + * Parses query balance options from a JsValue. * * # Arguments * - * * `deploy` - The deploy to sign. - * * `secret_key` - The secret key for signing. + * * `options` - A JsValue containing query balance options to be parsed. * * # Returns * - * The signed `Deploy`. - * @param {Deploy} deploy - * @param {string} secret_key - * @returns {Deploy} + * Parsed query balance options as a `QueryBalanceDetailsOptions` struct. + * @param {any} options + * @returns {queryBalanceDetailsOptions} */ - sign_deploy(deploy: Deploy, secret_key: string): Deploy; + query_balance_details_options(options: any): queryBalanceDetailsOptions; /** - * JS function for `make_transaction`. + * Retrieves balance information using the provided options. * * # Arguments * - * * `builder_params` - Transaction Builder parameters. - * * `transaction_params` - The transaction parameters. + * * `options` - An optional `QueryBalanceDetailsOptions` struct containing retrieval options. * * # Returns * - * A `Result` containing the created `Transaction` or a `JsError` in case of an error. - * @param {TransactionBuilderParams} builder_params - * @param {TransactionStrParams} transaction_params - * @returns {Transaction} + * A `Result` containing either a `QueryBalanceDetailsResult` or a `JsError` in case of an error. + * + * # Errors + * + * Returns a `JsError` if there is an error during the retrieval process. + * @param {queryBalanceDetailsOptions | undefined} [options] + * @returns {Promise} */ - make_transaction(builder_params: TransactionBuilderParams, transaction_params: TransactionStrParams): Transaction; + query_balance_details(options?: queryBalanceDetailsOptions): Promise; /** - * JS function for `sign_transaction`. + * Parses query global state options from a JsValue. * * # Arguments * - * * `transaction` - The transaction to sign. - * * `secret_key` - The secret key for signing. + * * `options` - A JsValue containing query global state options to be parsed. * * # Returns * - * The signed `Transaction`. - * @param {Transaction} transaction - * @param {string} secret_key - * @returns {Transaction} - */ - sign_transaction(transaction: Transaction, secret_key: string): Transaction; - /** - * Deserialize query_contract_key_options from a JavaScript object. + * Parsed query global state options as a `QueryGlobalStateOptions` struct. * @param {any} options - * @returns {queryContractKeyOptions} - */ - query_contract_key_options(options: any): queryContractKeyOptions; - /** - * JavaScript function for query_contract_key with deserialized options. - * @param {queryContractKeyOptions | undefined} [options] - * @returns {Promise} + * @returns {queryGlobalStateOptions} */ - query_contract_key(options?: queryContractKeyOptions): Promise; + query_global_state_options(options: any): queryGlobalStateOptions; /** - * Parses state root hash options from a JsValue. + * Retrieves global state information using the provided options. * * # Arguments * - * * `options` - A JsValue containing state root hash options to be parsed. + * * `options` - An optional `QueryGlobalStateOptions` struct containing retrieval options. * * # Returns * - * Parsed state root hash options as a `GetStateRootHashOptions` struct. - * @param {any} options - * @returns {getStateRootHashOptions} + * A `Result` containing either a `QueryGlobalStateResult` or a `JsError` in case of an error. + * + * # Errors + * + * Returns a `JsError` if there is an error during the retrieval process. + * @param {queryGlobalStateOptions | undefined} [options] + * @returns {Promise} */ - get_state_root_hash_options(options: any): getStateRootHashOptions; + query_global_state(options?: queryGlobalStateOptions): Promise; /** - * Retrieves state root hash information using the provided options. + * Installs a smart contract with the specified parameters and returns the result. * * # Arguments - * - * * `options` - An optional `GetStateRootHashOptions` struct containing retrieval options. + *. + * * `transaction_params` - Transaction parameters. + * * `transaction_bytes` - Transaction Bytes to install + * * `rpc_address` - An optional rpc address to send the request to. * * # Returns * - * A `Result` containing either a `GetStateRootHashResult` or a `JsError` in case of an error. + * A `Result` containing either a `PutTransactionResult` or a `JsError` in case of an error. * * # Errors * - * Returns a `JsError` if there is an error during the retrieval process. - * @param {getStateRootHashOptions | undefined} [options] - * @returns {Promise} + * Returns a `JsError` if there is an error during the installation. + * @param {TransactionStrParams} transaction_params + * @param {Bytes} transaction_bytes + * @param {string | undefined} [rpc_address] + * @returns {Promise} */ - get_state_root_hash(options?: getStateRootHashOptions): Promise; + install(transaction_params: TransactionStrParams, transaction_bytes: Bytes, rpc_address?: string): Promise; /** - * Retrieves state root hash information using the provided options (alias for `get_state_root_hash`). + * Installs a smart contract with the specified parameters and returns the result. * * # Arguments * - * * `options` - An optional `GetStateRootHashOptions` struct containing retrieval options. + * * `deploy_params` - The deploy parameters. + * * `session_params` - The session parameters. + * * `payment_amount` - The payment amount as a string. + * * `rpc_address` - An optional rpc address to send the request to. * * # Returns * - * A `Result` containing either a `GetStateRootHashResult` or a `JsError` in case of an error. + * A `Result` containing either a `PutDeployResult` or a `JsError` in case of an error. * * # Errors * - * Returns a `JsError` if there is an error during the retrieval process. - * @param {getStateRootHashOptions | undefined} [options] - * @returns {Promise} + * Returns a `JsError` if there is an error during the installation. + * @param {DeployStrParams} deploy_params + * @param {SessionStrParams} session_params + * @param {string} payment_amount + * @param {string | undefined} [rpc_address] + * @returns {Promise} */ - chain_get_state_root_hash(options?: getStateRootHashOptions): Promise; + install_deploy(deploy_params: DeployStrParams, session_params: SessionStrParams, payment_amount: string, rpc_address?: string): Promise; /** - * Creates a new Watcher instance to watch deploys (JavaScript-friendly). - * Legacy alias + * This function allows executing a deploy speculatively. * * # Arguments * - * * `events_url` - The URL to monitor for transaction events. - * * `timeout_duration` - An optional timeout duration in seconds. + * * `deploy_params` - Deployment parameters for the deploy. + * * `session_params` - Session parameters for the deploy. + * * `payment_params` - Payment parameters for the deploy. + * * `verbosity` - Optional verbosity level. + * * `rpc_address` - Optional rpc address. * * # Returns * - * A `Watcher` instance. - * @param {string} events_url - * @param {number | undefined} [timeout_duration] - * @returns {Watcher} + * A `Result` containing either a `SpeculativeExecResult` or a `JsError` in case of an error. + * @param {DeployStrParams} deploy_params + * @param {SessionStrParams} session_params + * @param {PaymentStrParams} payment_params + * @param {Verbosity | undefined} [verbosity] + * @param {string | undefined} [rpc_address] + * @returns {Promise} */ - watchDeploy(events_url: string, timeout_duration?: number): Watcher; + speculative_deploy(deploy_params: DeployStrParams, session_params: SessionStrParams, payment_params: PaymentStrParams, verbosity?: Verbosity, rpc_address?: string): Promise; /** - * Creates a new Watcher instance to watch deploys (JavaScript-friendly). + * Parses block transfers options from a JsValue. * * # Arguments * - * * `events_url` - The URL to monitor for transaction events. - * * `timeout_duration` - An optional timeout duration in seconds. + * * `options` - A JsValue containing block transfers options to be parsed. * * # Returns * - * A `Watcher` instance. - * @param {string} events_url - * @param {number | undefined} [timeout_duration] - * @returns {Watcher} + * Parsed block transfers options as a `GetBlockTransfersOptions` struct. + * @param {any} options + * @returns {getBlockTransfersOptions} */ - watchTransaction(events_url: string, timeout_duration?: number): Watcher; + get_block_transfers_options(options: any): getBlockTransfersOptions; /** - * Waits for a deploy event to be processed asynchronously (JavaScript-friendly). - * Legacy alias + * Retrieves block transfers information using the provided options. * * # Arguments * - * * `events_url` - The URL to monitor for transaction events. - * * `deploy_hash` - The deploy hash to wait for. - * * `timeout_duration` - An optional timeout duration in seconds. + * * `options` - An optional `GetBlockTransfersOptions` struct containing retrieval options. * * # Returns * - * A JavaScript `Promise` resolving to either the processed `EventParseResult` or an error message. - * @param {string} events_url - * @param {string} deploy_hash - * @param {number | undefined} [timeout_duration] - * @returns {Promise>} + * A `Result` containing either a `GetBlockTransfersResult` or a `JsError` in case of an error. + * + * # Errors + * + * Returns a `JsError` if there is an error during the retrieval process. + * @param {getBlockTransfersOptions | undefined} [options] + * @returns {Promise} */ - waitDeploy(events_url: string, deploy_hash: string, timeout_duration?: number): Promise>; + get_block_transfers(options?: getBlockTransfersOptions): Promise; /** - * Waits for a deploy event to be processed asynchronously (JavaScript-friendly). + * @param {getBlockTransfersOptions | undefined} [options] + * @returns {Promise} + */ + chain_get_block_transfers(options?: getBlockTransfersOptions): Promise; + /** + * Parses query balance options from a JsValue. * * # Arguments * - * * `events_url` - The URL to monitor for transaction events. - * * `target_hash` - The transaction hash to wait for. - * * `timeout_duration` - An optional timeout duration in seconds. + * * `options` - A JsValue containing query balance options to be parsed. * * # Returns * - * A JavaScript `Promise` resolving to either the processed `EventParseResult` or an error message. - * @param {string} events_url - * @param {string} target_hash - * @param {number | undefined} [timeout_duration] - * @returns {Promise>} + * Parsed query balance options as a `QueryBalanceOptions` struct. + * @param {any} options + * @returns {queryBalanceOptions} */ - waitTransaction(events_url: string, target_hash: string, timeout_duration?: number): Promise>; + query_balance_options(options: any): queryBalanceOptions; /** - * JavaScript function for deploying with deserialized parameters. + * Retrieves balance information using the provided options. * * # Arguments * - * * `deploy_params` - Deploy parameters. - * * `session_params` - Session parameters. - * * `payment_params` - Payment parameters. - * * `verbosity` - An optional verbosity level. - * * `rpc_address` - An optional rpc address. + * * `options` - An optional `QueryBalanceOptions` struct containing retrieval options. * * # Returns * - * A result containing PutDeployResult or a JsError. - * @param {DeployStrParams} deploy_params - * @param {SessionStrParams} session_params - * @param {PaymentStrParams} payment_params - * @param {Verbosity | undefined} [verbosity] - * @param {string | undefined} [rpc_address] - * @returns {Promise} + * A `Result` containing either a `QueryBalanceResult` or a `JsError` in case of an error. + * + * # Errors + * + * Returns a `JsError` if there is an error during the retrieval process. + * @param {queryBalanceOptions | undefined} [options] + * @returns {Promise} */ - deploy(deploy_params: DeployStrParams, session_params: SessionStrParams, payment_params: PaymentStrParams, verbosity?: Verbosity, rpc_address?: string): Promise; + query_balance(options?: queryBalanceOptions): Promise; /** - * JS function for speculative transfer. + * Get options for speculative execution from a JavaScript value. + * @param {any} options + * @returns {getSpeculativeExecDeployOptions} + */ + get_speculative_exec_deploy_options(options: any): getSpeculativeExecDeployOptions; + /** + * JS function for speculative execution. * * # Arguments * - * * `amount` - The amount to transfer. - * * `target_account` - The target account. - * * `transfer_id` - An optional transfer ID (defaults to a random number). - * * `deploy_params` - The deployment parameters. - * * `payment_params` - The payment parameters. - * * `verbosity` - The verbosity level for logging (optional). - * * `rpc_address` - The address of the node to connect to (optional). + * * `options` - The options for speculative execution. * * # Returns * - * A `Result` containing the result of the speculative transfer or a `JsError` in case of an error. - * @param {string} amount - * @param {string} target_account - * @param {string | undefined} transfer_id - * @param {DeployStrParams} deploy_params - * @param {PaymentStrParams} payment_params - * @param {Verbosity | undefined} [verbosity] - * @param {string | undefined} [rpc_address] + * A `Result` containing the result of the speculative execution or a `JsError` in case of an error. + * @param {getSpeculativeExecDeployOptions | undefined} [options] * @returns {Promise} */ - speculative_transfer(amount: string, target_account: string, transfer_id: string | undefined, deploy_params: DeployStrParams, payment_params: PaymentStrParams, verbosity?: Verbosity, rpc_address?: string): Promise; + speculative_exec_deploy(options?: getSpeculativeExecDeployOptions): Promise; /** - * Parses deploy options from a JsValue. + * Calls a smart contract entry point with the specified parameters and returns the result. * * # Arguments * - * * `options` - A JsValue containing deploy options to be parsed. + * * `transaction_params` - Transaction parameters. + * * `builder_params` - Transaction Builder parameters. + * * `rpc_address` - An optional rpc address to send the request to. * * # Returns * - * Parsed deploy options as a `GetDeployOptions` struct. - * @param {any} options - * @returns {getDeployOptions} - */ - get_deploy_options(options: any): getDeployOptions; - /** - * Retrieves deploy information using the provided options. - * - * # Arguments - * - * * `options` - An optional `GetDeployOptions` struct containing retrieval options. + * A `Result` containing either a `PutTransactionResult` or a `JsError` in case of an error. * - * # Returns + * # Errors * - * A `Result` containing either a `GetDeployResult` or an error. - * @param {getDeployOptions | undefined} [options] - * @returns {Promise} + * Returns a `JsError` if there is an error during the call. + * @param {TransactionBuilderParams} builder_params + * @param {TransactionStrParams} transaction_params + * @param {string | undefined} [rpc_address] + * @returns {Promise} */ - get_deploy(options?: getDeployOptions): Promise; + call_entrypoint(builder_params: TransactionBuilderParams, transaction_params: TransactionStrParams, rpc_address?: string): Promise; /** - * Retrieves deploy information using the provided options, alias for `get_deploy`. - * @param {getDeployOptions | undefined} [options] - * @returns {Promise} + * @param {string | undefined} [rpc_address] + * @param {string | undefined} [node_address] + * @param {Verbosity | undefined} [verbosity] */ - info_get_deploy(options?: getDeployOptions): Promise; + constructor(rpc_address?: string, node_address?: string, verbosity?: Verbosity); /** - * Parses transaction options from a JsValue. - * - * # Arguments - * - * * `options` - A JsValue containing transaction options to be parsed. - * - * # Returns - * - * Parsed transaction options as a `GetTransactionOptions` struct. - * @param {any} options - * @returns {getTransactionOptions} + * @param {string | undefined} [rpc_address] + * @returns {string} */ - get_transaction_options(options: any): getTransactionOptions; + getRPCAddress(rpc_address?: string): string; /** - * Retrieves transaction information using the provided options. - * - * # Arguments - * - * * `options` - An optional `GetTransactionOptions` struct containing retrieval options. - * - * # Returns - * - * A `Result` containing either a `GetTransactionResult` or an error. - * @param {getTransactionOptions | undefined} [options] - * @returns {Promise} + * @param {string | undefined} [rpc_address] */ - get_transaction(options?: getTransactionOptions): Promise; + setRPCAddress(rpc_address?: string): void; /** - * Retrieves transaction information using the provided options, alias for `get_transaction`. - * @param {getTransactionOptions | undefined} [options] - * @returns {Promise} + * @param {string | undefined} [node_address] + * @returns {string} */ - info_get_transaction(options?: getTransactionOptions): Promise; + getNodeAddress(node_address?: string): string; /** - * Get options for speculative execution from a JavaScript value. - * @param {any} options - * @returns {getSpeculativeExecTxnOptions} + * @param {string | undefined} [node_address] */ - get_speculative_exec_options(options: any): getSpeculativeExecTxnOptions; + setNodeAddress(node_address?: string): void; /** - * JS function for speculative execution. - * - * # Arguments - * - * * `options` - The options for speculative execution. - * - * # Returns - * - * A `Result` containing the result of the speculative execution or a `JsError` in case of an error. - * @param {getSpeculativeExecTxnOptions | undefined} [options] - * @returns {Promise} + * @param {Verbosity | undefined} [verbosity] + * @returns {Verbosity} */ - speculative_exec(options?: getSpeculativeExecTxnOptions): Promise; + getVerbosity(verbosity?: Verbosity): Verbosity; /** - * JS function for `make_transfer`. + * @param {Verbosity | undefined} [verbosity] + */ + setVerbosity(verbosity?: Verbosity): void; + /** + * JS function for speculative transfer. * * # Arguments * - * * `amount` - The transfer amount. + * * `amount` - The amount to transfer. * * `target_account` - The target account. - * * `transfer_id` - Optional transfer identifier. - * * `deploy_params` - The deploy parameters. + * * `transfer_id` - An optional transfer ID (defaults to a random number). + * * `deploy_params` - The deployment parameters. * * `payment_params` - The payment parameters. + * * `verbosity` - The verbosity level for logging (optional). + * * `rpc_address` - The address of the node to connect to (optional). * * # Returns * - * A `Result` containing the created `Deploy` or a `JsError` in case of an error. + * A `Result` containing the result of the speculative transfer or a `JsError` in case of an error. * @param {string} amount * @param {string} target_account * @param {string | undefined} transfer_id * @param {DeployStrParams} deploy_params * @param {PaymentStrParams} payment_params - * @returns {Deploy} + * @param {Verbosity | undefined} [verbosity] + * @param {string | undefined} [rpc_address] + * @returns {Promise} */ - make_transfer(amount: string, target_account: string, transfer_id: string | undefined, deploy_params: DeployStrParams, payment_params: PaymentStrParams): Deploy; + speculative_transfer(amount: string, target_account: string, transfer_id: string | undefined, deploy_params: DeployStrParams, payment_params: PaymentStrParams, verbosity?: Verbosity, rpc_address?: string): Promise; /** - * JS function for `make_transfer_transaction`. + * Parses state root hash options from a JsValue. * * # Arguments * - * * `maybe_source` - Optional transfer source uref. - * * `amount` - The transfer amount. - * * `target` - The target account. - * * `transaction_params` - The transaction parameters. - * * `maybe_id` - Optional transfer identifier. + * * `options` - A JsValue containing state root hash options to be parsed. * * # Returns * - * A `Result` containing the created `Transaction` or a `JsError` in case of an error. - * @param {URef | undefined} maybe_source - * @param {string} target - * @param {string} amount - * @param {TransactionStrParams} transaction_params - * @param {string | undefined} [maybe_id] - * @returns {Transaction} + * Parsed state root hash options as a `GetStateRootHashOptions` struct. + * @param {any} options + * @returns {getStateRootHashOptions} */ - make_transfer_transaction(maybe_source: URef | undefined, target: string, amount: string, transaction_params: TransactionStrParams, maybe_id?: string): Transaction; + get_state_root_hash_options(options: any): getStateRootHashOptions; /** - * Calls a smart contract entry point with the specified parameters and returns the result. + * Retrieves state root hash information using the provided options. * * # Arguments * - * * `deploy_params` - The deploy parameters. - * * `session_params` - The session parameters. - * * `payment_amount` - The payment amount as a string. - * * `rpc_address` - An optional rpc address to send the request to. + * * `options` - An optional `GetStateRootHashOptions` struct containing retrieval options. * * # Returns * - * A `Result` containing either a `PutDeployResult` or a `JsError` in case of an error. + * A `Result` containing either a `GetStateRootHashResult` or a `JsError` in case of an error. * * # Errors * - * Returns a `JsError` if there is an error during the call. - * @param {DeployStrParams} deploy_params - * @param {SessionStrParams} session_params - * @param {string} payment_amount - * @param {string | undefined} [rpc_address] - * @returns {Promise} + * Returns a `JsError` if there is an error during the retrieval process. + * @param {getStateRootHashOptions | undefined} [options] + * @returns {Promise} */ - call_entrypoint_deploy(deploy_params: DeployStrParams, session_params: SessionStrParams, payment_amount: string, rpc_address?: string): Promise; + get_state_root_hash(options?: getStateRootHashOptions): Promise; /** - * Installs a smart contract with the specified parameters and returns the result. + * Retrieves state root hash information using the provided options (alias for `get_state_root_hash`). * * # Arguments - *. - * * `transaction_params` - Transaction parameters. - * * `transaction_bytes` - Transaction Bytes to install - * * `rpc_address` - An optional rpc address to send the request to. + * + * * `options` - An optional `GetStateRootHashOptions` struct containing retrieval options. * * # Returns * - * A `Result` containing either a `PutTransactionResult` or a `JsError` in case of an error. + * A `Result` containing either a `GetStateRootHashResult` or a `JsError` in case of an error. * * # Errors * - * Returns a `JsError` if there is an error during the installation. - * @param {TransactionStrParams} transaction_params - * @param {Bytes} transaction_bytes - * @param {string | undefined} [rpc_address] - * @returns {Promise} - */ - install(transaction_params: TransactionStrParams, transaction_bytes: Bytes, rpc_address?: string): Promise; - /** - * @param {any} options - * @returns {getAccountOptions} + * Returns a `JsError` if there is an error during the retrieval process. + * @param {getStateRootHashOptions | undefined} [options] + * @returns {Promise} */ - get_account_options(options: any): getAccountOptions; + chain_get_state_root_hash(options?: getStateRootHashOptions): Promise; /** - * Retrieves account information using the provided options. - * - * This function is an asynchronous JavaScript binding for the Rust `get_account` method. + * Puts a deploy using the provided options. * * # Arguments * - * * `options` - An optional `GetAccountOptions` struct containing retrieval options, such as: - * - `account_identifier`: Identifier for the account. - * - `account_identifier_as_string`: String representation of the account identifier. - * - `maybe_block_id_as_string`: Optional string representation of the block ID. - * - `maybe_block_identifier`: Optional `BlockIdentifierInput` for specifying the block. - * - `verbosity`: Verbosity level for the output. - * - `rpc_address`: Address of the node to query. + * * `deploy` - The `Deploy` object to be sent. + * * `verbosity` - An optional `Verbosity` level for controlling the output verbosity. + * * `rpc_address` - An optional string specifying the rpc address to use for the request. * * # Returns * - * A `Result` containing either a `GetAccountResult` on success or a `JsError` on failure. + * A `Result` containing either a `PutDeployResult` or a `JsError` in case of an error. * * # Errors * - * Returns a `JsError` if there is an error during the retrieval process, such as issues with the provided options or network errors. - * ``` - * @param {getAccountOptions | undefined} [options] - * @returns {Promise} + * Returns a `JsError` if there is an error during the deploy process. + * @param {Deploy} deploy + * @param {Verbosity | undefined} [verbosity] + * @param {string | undefined} [rpc_address] + * @returns {Promise} */ - get_account(options?: getAccountOptions): Promise; + put_deploy(deploy: Deploy, verbosity?: Verbosity, rpc_address?: string): Promise; /** - * @param {getAccountOptions | undefined} [options] - * @returns {Promise} + * JavaScript Alias for `put_deploy`. + * @param {Deploy} deploy + * @param {Verbosity | undefined} [verbosity] + * @param {string | undefined} [rpc_address] + * @returns {Promise} */ - state_get_account_info(options?: getAccountOptions): Promise; + account_put_deploy(deploy: Deploy, verbosity?: Verbosity, rpc_address?: string): Promise; /** - * Parses era summary options from a JsValue. + * This function allows executing a transaction speculatively. * * # Arguments * - * * `options` - A JsValue containing era summary options to be parsed. + * * `builder_params` - Transaction Builder parameters. + * * `transaction_params` - Transactionment parameters for the transaction. + * * `verbosity` - Optional verbosity level. + * * `rpc_address` - Optional rpc address. * * # Returns * - * Parsed era summary options as a `GetEraSummaryOptions` struct. - * @param {any} options - * @returns {getEraSummaryOptions} + * A `Result` containing either a `SpeculativeExecTxnResult` or a `JsError` in case of an error. + * @param {TransactionBuilderParams} builder_params + * @param {TransactionStrParams} transaction_params + * @param {Verbosity | undefined} [verbosity] + * @param {string | undefined} [rpc_address] + * @returns {Promise} */ - get_era_summary_options(options: any): getEraSummaryOptions; + speculative_transaction(builder_params: TransactionBuilderParams, transaction_params: TransactionStrParams, verbosity?: Verbosity, rpc_address?: string): Promise; /** - * Retrieves era summary information using the provided options. - * + * Creates a new Watcher instance to watch deploys (JavaScript-friendly). + * Legacy alias + * * # Arguments * - * * `options` - An optional `GetEraSummaryOptions` struct containing retrieval options. + * * `events_url` - The URL to monitor for transaction events. + * * `timeout_duration` - An optional timeout duration in seconds. * * # Returns * - * A `Result` containing either a `GetEraSummaryResult` or a `JsError` in case of an error. - * - * # Errors - * - * Returns a `JsError` if there is an error during the retrieval process. - * @param {getEraSummaryOptions | undefined} [options] - * @returns {Promise} - */ - get_era_summary(options?: getEraSummaryOptions): Promise; - /** - * @param {getEraSummaryOptions | undefined} [options] - * @returns {Promise} + * A `Watcher` instance. + * @param {string} events_url + * @param {number | undefined} [timeout_duration] + * @returns {Watcher} */ - chain_get_era_summary(options?: getEraSummaryOptions): Promise; + watchDeploy(events_url: string, timeout_duration?: number): Watcher; /** - * Puts a deploy using the provided options. + * Creates a new Watcher instance to watch deploys (JavaScript-friendly). * * # Arguments * - * * `deploy` - The `Deploy` object to be sent. - * * `verbosity` - An optional `Verbosity` level for controlling the output verbosity. - * * `rpc_address` - An optional string specifying the rpc address to use for the request. + * * `events_url` - The URL to monitor for transaction events. + * * `timeout_duration` - An optional timeout duration in seconds. * * # Returns * - * A `Result` containing either a `PutDeployResult` or a `JsError` in case of an error. - * - * # Errors - * - * Returns a `JsError` if there is an error during the deploy process. - * @param {Deploy} deploy - * @param {Verbosity | undefined} [verbosity] - * @param {string | undefined} [rpc_address] - * @returns {Promise} - */ - put_deploy(deploy: Deploy, verbosity?: Verbosity, rpc_address?: string): Promise; - /** - * JavaScript Alias for `put_deploy`. - * @param {Deploy} deploy - * @param {Verbosity | undefined} [verbosity] - * @param {string | undefined} [rpc_address] - * @returns {Promise} + * A `Watcher` instance. + * @param {string} events_url + * @param {number | undefined} [timeout_duration] + * @returns {Watcher} */ - account_put_deploy(deploy: Deploy, verbosity?: Verbosity, rpc_address?: string): Promise; + watchTransaction(events_url: string, timeout_duration?: number): Watcher; /** - * Installs a smart contract with the specified parameters and returns the result. + * Waits for a deploy event to be processed asynchronously (JavaScript-friendly). + * Legacy alias * * # Arguments * - * * `deploy_params` - The deploy parameters. - * * `session_params` - The session parameters. - * * `payment_amount` - The payment amount as a string. - * * `rpc_address` - An optional rpc address to send the request to. + * * `events_url` - The URL to monitor for transaction events. + * * `deploy_hash` - The deploy hash to wait for. + * * `timeout_duration` - An optional timeout duration in seconds. * * # Returns * - * A `Result` containing either a `PutDeployResult` or a `JsError` in case of an error. - * - * # Errors - * - * Returns a `JsError` if there is an error during the installation. - * @param {DeployStrParams} deploy_params - * @param {SessionStrParams} session_params - * @param {string} payment_amount - * @param {string | undefined} [rpc_address] - * @returns {Promise} + * A JavaScript `Promise` resolving to either the processed `EventParseResult` or an error message. + * @param {string} events_url + * @param {string} deploy_hash + * @param {number | undefined} [timeout_duration] + * @returns {Promise>} */ - install_deploy(deploy_params: DeployStrParams, session_params: SessionStrParams, payment_amount: string, rpc_address?: string): Promise; + waitDeploy(events_url: string, deploy_hash: string, timeout_duration?: number): Promise>; /** - * Parses block transfers options from a JsValue. + * Waits for a deploy event to be processed asynchronously (JavaScript-friendly). * * # Arguments * - * * `options` - A JsValue containing block transfers options to be parsed. + * * `events_url` - The URL to monitor for transaction events. + * * `target_hash` - The transaction hash to wait for. + * * `timeout_duration` - An optional timeout duration in seconds. * * # Returns * - * Parsed block transfers options as a `GetBlockTransfersOptions` struct. - * @param {any} options - * @returns {getBlockTransfersOptions} + * A JavaScript `Promise` resolving to either the processed `EventParseResult` or an error message. + * @param {string} events_url + * @param {string} target_hash + * @param {number | undefined} [timeout_duration] + * @returns {Promise>} */ - get_block_transfers_options(options: any): getBlockTransfersOptions; + waitTransaction(events_url: string, target_hash: string, timeout_duration?: number): Promise>; /** - * Retrieves block transfers information using the provided options. - * - * # Arguments - * - * * `options` - An optional `GetBlockTransfersOptions` struct containing retrieval options. - * - * # Returns - * - * A `Result` containing either a `GetBlockTransfersResult` or a `JsError` in case of an error. - * - * # Errors - * - * Returns a `JsError` if there is an error during the retrieval process. - * @param {getBlockTransfersOptions | undefined} [options] - * @returns {Promise} + * @param {string | undefined} [node_address] + * @returns {Promise} */ - get_block_transfers(options?: getBlockTransfersOptions): Promise; + get_binary_latest_switch_block_header(node_address?: string): Promise; /** - * @param {getBlockTransfersOptions | undefined} [options] - * @returns {Promise} + * @param {string | undefined} [node_address] + * @returns {Promise} */ - chain_get_block_transfers(options?: getBlockTransfersOptions): Promise; + get_binary_latest_block_header(node_address?: string): Promise; /** - * Parses query balance options from a JsValue. - * - * # Arguments - * - * * `options` - A JsValue containing query balance options to be parsed. - * - * # Returns - * - * Parsed query balance options as a `QueryBalanceOptions` struct. - * @param {any} options - * @returns {queryBalanceOptions} + * @param {string | undefined} node_address + * @param {bigint} height + * @returns {Promise} */ - query_balance_options(options: any): queryBalanceOptions; + get_binary_block_header_by_height(node_address: string | undefined, height: bigint): Promise; /** - * Retrieves balance information using the provided options. - * - * # Arguments - * - * * `options` - An optional `QueryBalanceOptions` struct containing retrieval options. - * - * # Returns - * - * A `Result` containing either a `QueryBalanceResult` or a `JsError` in case of an error. - * - * # Errors - * - * Returns a `JsError` if there is an error during the retrieval process. - * @param {queryBalanceOptions | undefined} [options] - * @returns {Promise} + * @param {string | undefined} node_address + * @param {BlockHash} block_hash + * @returns {Promise} */ - query_balance(options?: queryBalanceOptions): Promise; + get_binary_block_header_by_hash(node_address: string | undefined, block_hash: BlockHash): Promise; /** - * Get options for speculative execution from a JavaScript value. - * @param {any} options - * @returns {getSpeculativeExecDeployOptions} + * @param {string | undefined} [node_address] + * @returns {Promise} */ - get_speculative_exec_deploy_options(options: any): getSpeculativeExecDeployOptions; + get_binary_latest_signed_block(node_address?: string): Promise; /** - * JS function for speculative execution. - * - * # Arguments - * - * * `options` - The options for speculative execution. - * - * # Returns - * - * A `Result` containing the result of the speculative execution or a `JsError` in case of an error. - * @param {getSpeculativeExecDeployOptions | undefined} [options] - * @returns {Promise} + * @param {string | undefined} node_address + * @param {bigint} height + * @returns {Promise} */ - speculative_exec_deploy(options?: getSpeculativeExecDeployOptions): Promise; + get_binary_signed_block_by_height(node_address: string | undefined, height: bigint): Promise; /** - * JS function for transaction transferring funds. - * - * # Arguments - * - * * `maybe_source` - Optional transfer source uref. - * * `target_account` - The target account. - * * `amount` - The amount to transfer. - * * `transaction_params` - The transaction parameters. - * * `maybe_id` - An optional transfer ID (defaults to a random number). - * * `verbosity` - The verbosity level for logging (optional). - * * `rpc_address` - The address of the node to connect to (optional). - * - * # Returns - * - * A `Result` containing the result of the transfer or a `JsError` in case of an error. - * @param {URef | undefined} maybe_source - * @param {string} target_account - * @param {string} amount - * @param {TransactionStrParams} transaction_params - * @param {string | undefined} [maybe_id] - * @param {Verbosity | undefined} [verbosity] - * @param {string | undefined} [rpc_address] - * @returns {Promise} + * @param {string | undefined} node_address + * @param {BlockHash} block_hash + * @returns {Promise} */ - transfer_transaction(maybe_source: URef | undefined, target_account: string, amount: string, transaction_params: TransactionStrParams, maybe_id?: string, verbosity?: Verbosity, rpc_address?: string): Promise; + get_binary_signed_block_by_hash(node_address: string | undefined, block_hash: BlockHash): Promise; + /** + * @param {string | undefined} node_address + * @param {TransactionHash} hash + * @param {boolean} with_finalized_approvals + * @returns {Promise} + */ + get_binary_transaction_by_hash(node_address: string | undefined, hash: TransactionHash, with_finalized_approvals: boolean): Promise; /** - * @param {string | undefined} [rpc_address] * @param {string | undefined} [node_address] - * @param {Verbosity | undefined} [verbosity] + * @returns {Promise} */ - constructor(rpc_address?: string, node_address?: string, verbosity?: Verbosity); + get_binary_peers(node_address?: string): Promise; /** - * @param {string | undefined} [rpc_address] - * @returns {string} + * @param {string | undefined} [node_address] + * @returns {Promise} */ - getRPCAddress(rpc_address?: string): string; + get_binary_uptime(node_address?: string): Promise; /** - * @param {string | undefined} [rpc_address] + * @param {string | undefined} [node_address] + * @returns {Promise} */ - setRPCAddress(rpc_address?: string): void; + get_binary_last_progress(node_address?: string): Promise; /** * @param {string | undefined} [node_address] - * @returns {string} + * @returns {Promise} */ - getNodeAddress(node_address?: string): string; + get_binary_reactor_state(node_address?: string): Promise; /** * @param {string | undefined} [node_address] + * @returns {Promise} */ - setNodeAddress(node_address?: string): void; + get_binary_network_name(node_address?: string): Promise; /** - * @param {Verbosity | undefined} [verbosity] - * @returns {Verbosity} + * @param {string | undefined} [node_address] + * @returns {Promise} */ - getVerbosity(verbosity?: Verbosity): Verbosity; + get_binary_consensus_validator_changes(node_address?: string): Promise; /** - * @param {Verbosity | undefined} [verbosity] + * @param {string | undefined} [node_address] + * @returns {Promise} */ - setVerbosity(verbosity?: Verbosity): void; + get_binary_block_synchronizer_status(node_address?: string): Promise; /** - * JS function for transferring funds. - * - * # Arguments - * - * * `amount` - The amount to transfer. - * * `target_account` - The target account. - * * `transfer_id` - An optional transfer ID (defaults to a random number). - * * `deploy_params` - The deployment parameters. - * * `payment_params` - The payment parameters. - * * `verbosity` - The verbosity level for logging (optional). - * * `rpc_address` - The address of the node to connect to (optional). - * - * # Returns - * - * A `Result` containing the result of the transfer or a `JsError` in case of an error. - * @param {string} amount - * @param {string} target_account - * @param {string | undefined} transfer_id - * @param {DeployStrParams} deploy_params - * @param {PaymentStrParams} payment_params - * @param {Verbosity | undefined} [verbosity] - * @param {string | undefined} [rpc_address] - * @returns {Promise} + * @param {string | undefined} [node_address] + * @returns {Promise} */ - transfer(amount: string, target_account: string, transfer_id: string | undefined, deploy_params: DeployStrParams, payment_params: PaymentStrParams, verbosity?: Verbosity, rpc_address?: string): Promise; + get_binary_available_block_range(node_address?: string): Promise; /** - * @param {any} options - * @returns {getEntityOptions} + * @param {string | undefined} [node_address] + * @returns {Promise} */ - get_entity_options(options: any): getEntityOptions; + get_binary_next_upgrade(node_address?: string): Promise; /** - * Retrieves entity information using the provided options. - * - * This function is an asynchronous JavaScript binding for the Rust `get_entity` method. - * - * # Arguments - * - * * `options` - An optional `GetEntityOptions` struct containing retrieval options, such as: - * - `entity_identifier`: Identifier for the entity. - * - `entity_identifier_as_string`: String representation of the entity identifier. - * - `maybe_block_id_as_string`: Optional string representation of the block ID. - * - `maybe_block_identifier`: Optional `BlockIdentifierInput` for specifying the block. - * - `verbosity`: Verbosity level for the output. - * - `rpc_address`: Address of the node to query. - * - * # Returns - * - * A `Result` containing either a `GetAddressableEntityResult` on success or a `JsError` on failure. - * - * # Errors - * - * Returns a `JsError` if there is an error during the retrieval process, such as issues with the provided options or network errors. - * ``` - * @param {getEntityOptions | undefined} [options] - * @returns {Promise} + * @param {string | undefined} [node_address] + * @returns {Promise} */ - get_entity(options?: getEntityOptions): Promise; + get_binary_consensus_status(node_address?: string): Promise; /** - * @param {getEntityOptions | undefined} [options] - * @returns {Promise} + * @param {string | undefined} [node_address] + * @returns {Promise} */ - state_get_entity(options?: getEntityOptions): Promise; + get_binary_chainspec_raw_bytes(node_address?: string): Promise; /** - * Puts a transaction using the provided options. - * - * # Arguments - * - * * `transaction` - The `Transaction` object to be sent. - * * `verbosity` - An optional `Verbosity` level for controlling the output verbosity. - * * `rpc_address` - An optional string specifying the rpc address to use for the request. - * - * # Returns - * - * A `Result` containing either a `PutTransactionResult` or a `JsError` in case of an error. - * - * # Errors - * - * Returns a `JsError` if there is an error during the transaction process. + * @param {string | undefined} [node_address] + * @returns {Promise} + */ + get_binary_node_status(node_address?: string): Promise; + /** + * @param {string | undefined} node_address + * @param {PublicKey} validator_key + * @param {EraId} era + * @returns {Promise} + */ + get_binary_get_validator_reward_by_era(node_address: string | undefined, validator_key: PublicKey, era: EraId): Promise; + /** + * @param {string | undefined} node_address + * @param {PublicKey} validator_key + * @param {bigint} block_height + * @returns {Promise} + */ + get_binary_get_validator_reward_by_block_height(node_address: string | undefined, validator_key: PublicKey, block_height: bigint): Promise; + /** + * @param {string | undefined} node_address + * @param {PublicKey} validator_key + * @param {BlockHash} block_hash + * @returns {Promise} + */ + get_binary_get_validator_reward_by_block_hash(node_address: string | undefined, validator_key: PublicKey, block_hash: BlockHash): Promise; + /** + * @param {string | undefined} node_address + * @param {PublicKey} validator_key + * @param {PublicKey} delegator_key + * @param {EraId} era + * @returns {Promise} + */ + get_binary_get_delegator_reward_by_era(node_address: string | undefined, validator_key: PublicKey, delegator_key: PublicKey, era: EraId): Promise; + /** + * @param {string | undefined} node_address + * @param {PublicKey} validator_key + * @param {PublicKey} delegator_key + * @param {bigint} block_height + * @returns {Promise} + */ + get_binary_get_delegator_reward_by_block_height(node_address: string | undefined, validator_key: PublicKey, delegator_key: PublicKey, block_height: bigint): Promise; + /** + * @param {string | undefined} node_address + * @param {PublicKey} validator_key + * @param {PublicKey} delegator_key + * @param {BlockHash} block_hash + * @returns {Promise} + */ + get_binary_get_delegator_reward_by_block_hash(node_address: string | undefined, validator_key: PublicKey, delegator_key: PublicKey, block_hash: BlockHash): Promise; + /** + * @param {string | undefined} node_address + * @param {RecordId} record_id + * @param {Uint8Array} key + * @returns {Promise} + */ + get_binary_read_record(node_address: string | undefined, record_id: RecordId, key: Uint8Array): Promise; + /** + * @param {string | undefined} node_address + * @param {Key} key + * @param {(string)[]} path + * @returns {Promise} + */ + get_binary_global_state_item(node_address: string | undefined, key: Key, path: (string)[]): Promise; + /** + * @param {string | undefined} node_address + * @param {Digest} state_root_hash + * @param {Key} key + * @param {(string)[]} path + * @returns {Promise} + */ + get_binary_global_state_item_by_state_root_hash(node_address: string | undefined, state_root_hash: Digest, key: Key, path: (string)[]): Promise; + /** + * @param {string | undefined} node_address + * @param {BlockHash} block_hash + * @param {Key} key + * @param {(string)[]} path + * @returns {Promise} + */ + get_binary_global_state_item_by_block_hash(node_address: string | undefined, block_hash: BlockHash, key: Key, path: (string)[]): Promise; + /** + * @param {string | undefined} node_address + * @param {bigint} block_height + * @param {Key} key + * @param {(string)[]} path + * @returns {Promise} + */ + get_binary_global_state_item_by_block_height(node_address: string | undefined, block_height: bigint, key: Key, path: (string)[]): Promise; + /** + * @param {string | undefined} node_address * @param {Transaction} transaction - * @param {Verbosity | undefined} [verbosity] - * @param {string | undefined} [rpc_address] - * @returns {Promise} + * @returns {Promise} */ - put_transaction(transaction: Transaction, verbosity?: Verbosity, rpc_address?: string): Promise; + get_binary_try_accept_transaction(node_address: string | undefined, transaction: Transaction): Promise; /** - * JavaScript Alias for `put_transaction`. + * @param {string | undefined} node_address * @param {Transaction} transaction - * @param {Verbosity | undefined} [verbosity] - * @param {string | undefined} [rpc_address] - * @returns {Promise} + * @returns {Promise} */ - account_put_transaction(transaction: Transaction, verbosity?: Verbosity, rpc_address?: string): Promise; + get_binary_try_speculative_execution(node_address: string | undefined, transaction: Transaction): Promise; /** - * Parses query balance options from a JsValue. + * @param {string | undefined} [node_address] + * @returns {Promise} + */ + get_binary_get_protocol_version(node_address?: string): Promise; + /** + * Parses auction info options from a JsValue. * * # Arguments * - * * `options` - A JsValue containing query balance options to be parsed. + * * `options` - A JsValue containing auction info options to be parsed. * * # Returns * - * Parsed query balance options as a `QueryBalanceDetailsOptions` struct. + * Result containing parsed auction info options as a `GetAuctionInfoOptions` struct, + * or a `JsError` if deserialization fails. * @param {any} options - * @returns {queryBalanceDetailsOptions} + * @returns {getAuctionInfoOptions} */ - query_balance_details_options(options: any): queryBalanceDetailsOptions; + get_auction_info_options(options: any): getAuctionInfoOptions; /** - * Retrieves balance information using the provided options. + * Retrieves auction information using the provided options. * * # Arguments * - * * `options` - An optional `QueryBalanceDetailsOptions` struct containing retrieval options. + * * `options` - An optional `GetAuctionInfoOptions` struct containing retrieval options. * * # Returns * - * A `Result` containing either a `QueryBalanceDetailsResult` or a `JsError` in case of an error. + * A `Result` containing either a `GetAuctionInfoResult` or a `JsError` in case of an error. * * # Errors * * Returns a `JsError` if there is an error during the retrieval process. - * @param {queryBalanceDetailsOptions | undefined} [options] - * @returns {Promise} + * @param {getAuctionInfoOptions | undefined} [options] + * @returns {Promise} */ - query_balance_details(options?: queryBalanceDetailsOptions): Promise; + get_auction_info(options?: getAuctionInfoOptions): Promise; /** - * Parses query global state options from a JsValue. + * @param {getAuctionInfoOptions | undefined} [options] + * @returns {Promise} + */ + state_get_auction_info_js_alias(options?: getAuctionInfoOptions): Promise; + /** + * Parses block options from a JsValue. * * # Arguments * - * * `options` - A JsValue containing query global state options to be parsed. + * * `options` - A JsValue containing block options to be parsed. * * # Returns * - * Parsed query global state options as a `QueryGlobalStateOptions` struct. + * Parsed block options as a `GetBlockOptions` struct. * @param {any} options - * @returns {queryGlobalStateOptions} + * @returns {getBlockOptions} */ - query_global_state_options(options: any): queryGlobalStateOptions; + get_block_options(options: any): getBlockOptions; /** - * Retrieves global state information using the provided options. + * Retrieves block information using the provided options. * * # Arguments * - * * `options` - An optional `QueryGlobalStateOptions` struct containing retrieval options. + * * `options` - An optional `GetBlockOptions` struct containing retrieval options. * * # Returns * - * A `Result` containing either a `QueryGlobalStateResult` or a `JsError` in case of an error. + * A `Result` containing either a `GetBlockResult` or a `JsError` in case of an error. * * # Errors * * Returns a `JsError` if there is an error during the retrieval process. - * @param {queryGlobalStateOptions | undefined} [options] - * @returns {Promise} + * @param {getBlockOptions | undefined} [options] + * @returns {Promise} */ - query_global_state(options?: queryGlobalStateOptions): Promise; + get_block(options?: getBlockOptions): Promise; /** - * This function allows executing a transaction speculatively. + * JavaScript Alias for the `get_block`. * * # Arguments * - * * `builder_params` - Transaction Builder parameters. - * * `transaction_params` - Transactionment parameters for the transaction. - * * `verbosity` - Optional verbosity level. - * * `rpc_address` - Optional rpc address. + * * `options` - An optional `GetBlockOptions` struct containing retrieval options. * * # Returns * - * A `Result` containing either a `SpeculativeExecTxnResult` or a `JsError` in case of an error. - * @param {TransactionBuilderParams} builder_params - * @param {TransactionStrParams} transaction_params - * @param {Verbosity | undefined} [verbosity] - * @param {string | undefined} [rpc_address] - * @returns {Promise} - */ - speculative_transaction(builder_params: TransactionBuilderParams, transaction_params: TransactionStrParams, verbosity?: Verbosity, rpc_address?: string): Promise; - /** - * JS function for speculative transfer transaction. + * A `Result` containing either a `GetBlockResult` or a `JsError` in case of an error. * - * # Arguments + * # Errors * - * * `maybe_source` - Optional transfer source uref. - * * `target_account` - The target account. + * Returns a `JsError` if there is an error during the retrieval process. + * @param {getBlockOptions | undefined} [options] + * @returns {Promise} + */ + chain_get_block(options?: getBlockOptions): Promise; + /** + * Asynchronously retrieves the chainspec. + * + * # Arguments + * + * * `verbosity` - An optional `Verbosity` parameter. + * * `rpc_address` - An optional rpc address as a string. + * + * # Returns + * + * A `Result` containing either a `GetChainspecResult` or a `JsError` in case of an error. + * @param {Verbosity | undefined} [verbosity] + * @param {string | undefined} [rpc_address] + * @returns {Promise} + */ + get_chainspec(verbosity?: Verbosity, rpc_address?: string): Promise; + /** + * @param {Verbosity | undefined} [verbosity] + * @param {string | undefined} [rpc_address] + * @returns {Promise} + */ + info_get_chainspec(verbosity?: Verbosity, rpc_address?: string): Promise; + /** + * Retrieves node status information using the provided options. + * + * # Arguments + * + * * `verbosity` - An optional `Verbosity` level for controlling the output verbosity. + * * `rpc_address` - An optional string specifying the rpc address to use for the request. + * + * # Returns + * + * A `Result` containing either a `GetNodeStatusResult` or a `JsError` in case of an error. + * + * # Errors + * + * Returns a `JsError` if there is an error during the retrieval process. + * @param {Verbosity | undefined} [verbosity] + * @param {string | undefined} [rpc_address] + * @returns {Promise} + */ + get_node_status(verbosity?: Verbosity, rpc_address?: string): Promise; + /** + * @param {Verbosity | undefined} [verbosity] + * @param {string | undefined} [rpc_address] + * @returns {Promise} + */ + info_get_status(verbosity?: Verbosity, rpc_address?: string): Promise; + /** + * Retrieves peers asynchronously. + * + * # Arguments + * + * * `verbosity` - Optional verbosity level. + * * `rpc_address` - Optional rpc address. + * + * # Returns + * + * A `Result` containing `GetPeersResult` or a `JsError` if an error occurs. + * @param {Verbosity | undefined} [verbosity] + * @param {string | undefined} [rpc_address] + * @returns {Promise} + */ + get_peers(verbosity?: Verbosity, rpc_address?: string): Promise; + /** + * @param {Verbosity | undefined} [verbosity] + * @param {string | undefined} [rpc_address] + * @returns {Promise} + */ + info_get_peers(verbosity?: Verbosity, rpc_address?: string): Promise; + /** + * Retrieves validator changes using the provided options. + * + * # Arguments + * + * * `verbosity` - An optional `Verbosity` level for controlling the output verbosity. + * * `rpc_address` - An optional string specifying the rpc address to use for the request. + * + * # Returns + * + * A `Result` containing either a `GetValidatorChangesResult` or a `JsError` in case of an error. + * + * # Errors + * + * Returns a `JsError` if there is an error during the retrieval process. + * @param {Verbosity | undefined} [verbosity] + * @param {string | undefined} [rpc_address] + * @returns {Promise} + */ + get_validator_changes(verbosity?: Verbosity, rpc_address?: string): Promise; + /** + * @param {Verbosity | undefined} [verbosity] + * @param {string | undefined} [rpc_address] + * @returns {Promise} + */ + info_get_validator_change(verbosity?: Verbosity, rpc_address?: string): Promise; + /** + * Lists available RPCs using the provided options. + * + * # Arguments + * + * * `verbosity` - An optional `Verbosity` level for controlling the output verbosity. + * * `rpc_address` - An optional string specifying the rpc address to use for the request. + * + * # Returns + * + * A `Result` containing either a `ListRpcsResult` or a `JsError` in case of an error. + * + * # Errors + * + * Returns a `JsError` if there is an error during the listing process. + * @param {Verbosity | undefined} [verbosity] + * @param {string | undefined} [rpc_address] + * @returns {Promise} + */ + list_rpcs(verbosity?: Verbosity, rpc_address?: string): Promise; + /** + * JS function for speculative transfer transaction. + * + * # Arguments + * + * * `maybe_source` - Optional transfer source uref. + * * `target_account` - The target account. * * `amount` - The amount to transfer. * * `maybe_id` - An optional transfer ID (defaults to a random number). * * `transaction_params` - The transactionment parameters. @@ -3072,255 +3120,207 @@ export class SDK { */ speculative_transfer_transaction(maybe_source: URef | undefined, target_account: string, amount: string, transaction_params: TransactionStrParams, maybe_id?: string, verbosity?: Verbosity, rpc_address?: string): Promise; /** - * @param {string | undefined} [node_address] - * @returns {Promise} - */ - get_binary_latest_switch_block_header(node_address?: string): Promise; - /** - * @param {string | undefined} [node_address] - * @returns {Promise} + * JS function for `make_deploy`. + * + * # Arguments + * + * * `deploy_params` - The deploy parameters. + * * `session_params` - The session parameters. + * * `payment_params` - The payment parameters. + * + * # Returns + * + * A `Result` containing the created `Deploy` or a `JsError` in case of an error. + * @param {DeployStrParams} deploy_params + * @param {SessionStrParams} session_params + * @param {PaymentStrParams} payment_params + * @returns {Deploy} */ - get_binary_latest_block_header(node_address?: string): Promise; + make_deploy(deploy_params: DeployStrParams, session_params: SessionStrParams, payment_params: PaymentStrParams): Deploy; /** - * @param {string | undefined} node_address - * @param {bigint} height - * @returns {Promise} + * JS function for `sign_deploy`. + * + * # Arguments + * + * * `deploy` - The deploy to sign. + * * `secret_key` - The secret key for signing. + * + * # Returns + * + * The signed `Deploy`. + * @param {Deploy} deploy + * @param {string} secret_key + * @returns {Deploy} */ - get_binary_block_header_by_height(node_address: string | undefined, height: bigint): Promise; + sign_deploy(deploy: Deploy, secret_key: string): Deploy; /** - * @param {string | undefined} node_address - * @param {BlockHash} block_hash - * @returns {Promise} + * JS function for `make_transaction`. + * + * # Arguments + * + * * `builder_params` - Transaction Builder parameters. + * * `transaction_params` - The transaction parameters. + * + * # Returns + * + * A `Result` containing the created `Transaction` or a `JsError` in case of an error. + * @param {TransactionBuilderParams} builder_params + * @param {TransactionStrParams} transaction_params + * @returns {Transaction} */ - get_binary_block_header_by_hash(node_address: string | undefined, block_hash: BlockHash): Promise; + make_transaction(builder_params: TransactionBuilderParams, transaction_params: TransactionStrParams): Transaction; /** - * @param {string | undefined} [node_address] - * @returns {Promise} + * JS function for `sign_transaction`. + * + * # Arguments + * + * * `transaction` - The transaction to sign. + * * `secret_key` - The secret key for signing. + * + * # Returns + * + * The signed `Transaction`. + * @param {Transaction} transaction + * @param {string} secret_key + * @returns {Transaction} */ - get_binary_latest_signed_block(node_address?: string): Promise; + sign_transaction(transaction: Transaction, secret_key: string): Transaction; /** - * @param {string | undefined} node_address - * @param {bigint} height - * @returns {Promise} + * Calls a smart contract entry point with the specified parameters and returns the result. + * + * # Arguments + * + * * `deploy_params` - The deploy parameters. + * * `session_params` - The session parameters. + * * `payment_amount` - The payment amount as a string. + * * `rpc_address` - An optional rpc address to send the request to. + * + * # Returns + * + * A `Result` containing either a `PutDeployResult` or a `JsError` in case of an error. + * + * # Errors + * + * Returns a `JsError` if there is an error during the call. + * @param {DeployStrParams} deploy_params + * @param {SessionStrParams} session_params + * @param {string} payment_amount + * @param {string | undefined} [rpc_address] + * @returns {Promise} */ - get_binary_signed_block_by_height(node_address: string | undefined, height: bigint): Promise; + call_entrypoint_deploy(deploy_params: DeployStrParams, session_params: SessionStrParams, payment_amount: string, rpc_address?: string): Promise; /** - * @param {string | undefined} node_address - * @param {BlockHash} block_hash - * @returns {Promise} + * Deserialize query_contract_key_options from a JavaScript object. + * @param {any} options + * @returns {queryContractKeyOptions} */ - get_binary_signed_block_by_hash(node_address: string | undefined, block_hash: BlockHash): Promise; + query_contract_key_options(options: any): queryContractKeyOptions; /** - * @param {string | undefined} node_address - * @param {TransactionHash} hash - * @param {boolean} with_finalized_approvals - * @returns {Promise} + * JavaScript function for query_contract_key with deserialized options. + * @param {queryContractKeyOptions | undefined} [options] + * @returns {Promise} */ - get_binary_transaction_by_hash(node_address: string | undefined, hash: TransactionHash, with_finalized_approvals: boolean): Promise; + query_contract_key(options?: queryContractKeyOptions): Promise; /** - * @param {string | undefined} [node_address] - * @returns {Promise} + * @param {any} options + * @returns {getAccountOptions} */ - get_binary_peers(node_address?: string): Promise; + get_account_options(options: any): getAccountOptions; /** - * @param {string | undefined} [node_address] - * @returns {Promise} - */ - get_binary_uptime(node_address?: string): Promise; - /** - * @param {string | undefined} [node_address] - * @returns {Promise} - */ - get_binary_last_progress(node_address?: string): Promise; - /** - * @param {string | undefined} [node_address] - * @returns {Promise} - */ - get_binary_reactor_state(node_address?: string): Promise; - /** - * @param {string | undefined} [node_address] - * @returns {Promise} - */ - get_binary_network_name(node_address?: string): Promise; - /** - * @param {string | undefined} [node_address] - * @returns {Promise} - */ - get_binary_consensus_validator_changes(node_address?: string): Promise; - /** - * @param {string | undefined} [node_address] - * @returns {Promise} - */ - get_binary_block_synchronizer_status(node_address?: string): Promise; - /** - * @param {string | undefined} [node_address] - * @returns {Promise} - */ - get_binary_available_block_range(node_address?: string): Promise; - /** - * @param {string | undefined} [node_address] - * @returns {Promise} - */ - get_binary_next_upgrade(node_address?: string): Promise; - /** - * @param {string | undefined} [node_address] - * @returns {Promise} - */ - get_binary_consensus_status(node_address?: string): Promise; - /** - * @param {string | undefined} [node_address] - * @returns {Promise} - */ - get_binary_chainspec_raw_bytes(node_address?: string): Promise; - /** - * @param {string | undefined} [node_address] - * @returns {Promise} - */ - get_binary_node_status(node_address?: string): Promise; - /** - * @param {string | undefined} node_address - * @param {PublicKey} validator_key - * @param {EraId} era - * @returns {Promise} - */ - get_binary_get_validator_reward_by_era(node_address: string | undefined, validator_key: PublicKey, era: EraId): Promise; - /** - * @param {string | undefined} node_address - * @param {PublicKey} validator_key - * @param {bigint} block_height - * @returns {Promise} - */ - get_binary_get_validator_reward_by_block_height(node_address: string | undefined, validator_key: PublicKey, block_height: bigint): Promise; - /** - * @param {string | undefined} node_address - * @param {PublicKey} validator_key - * @param {BlockHash} block_hash - * @returns {Promise} - */ - get_binary_get_validator_reward_by_block_hash(node_address: string | undefined, validator_key: PublicKey, block_hash: BlockHash): Promise; - /** - * @param {string | undefined} node_address - * @param {PublicKey} validator_key - * @param {PublicKey} delegator_key - * @param {EraId} era - * @returns {Promise} - */ - get_binary_get_delegator_reward_by_era(node_address: string | undefined, validator_key: PublicKey, delegator_key: PublicKey, era: EraId): Promise; - /** - * @param {string | undefined} node_address - * @param {PublicKey} validator_key - * @param {PublicKey} delegator_key - * @param {bigint} block_height - * @returns {Promise} - */ - get_binary_get_delegator_reward_by_block_height(node_address: string | undefined, validator_key: PublicKey, delegator_key: PublicKey, block_height: bigint): Promise; - /** - * @param {string | undefined} node_address - * @param {PublicKey} validator_key - * @param {PublicKey} delegator_key - * @param {BlockHash} block_hash - * @returns {Promise} - */ - get_binary_get_delegator_reward_by_block_hash(node_address: string | undefined, validator_key: PublicKey, delegator_key: PublicKey, block_hash: BlockHash): Promise; - /** - * @param {string | undefined} node_address - * @param {RecordId} record_id - * @param {Uint8Array} key - * @returns {Promise} - */ - get_binary_read_record(node_address: string | undefined, record_id: RecordId, key: Uint8Array): Promise; - /** - * @param {string | undefined} node_address - * @param {Key} key - * @param {(string)[]} path - * @returns {Promise} - */ - get_binary_global_state_item(node_address: string | undefined, key: Key, path: (string)[]): Promise; - /** - * @param {string | undefined} node_address - * @param {Digest} state_root_hash - * @param {Key} key - * @param {(string)[]} path - * @returns {Promise} - */ - get_binary_global_state_item_by_state_root_hash(node_address: string | undefined, state_root_hash: Digest, key: Key, path: (string)[]): Promise; - /** - * @param {string | undefined} node_address - * @param {BlockHash} block_hash - * @param {Key} key - * @param {(string)[]} path - * @returns {Promise} - */ - get_binary_global_state_item_by_block_hash(node_address: string | undefined, block_hash: BlockHash, key: Key, path: (string)[]): Promise; - /** - * @param {string | undefined} node_address - * @param {bigint} block_height - * @param {Key} key - * @param {(string)[]} path - * @returns {Promise} - */ - get_binary_global_state_item_by_block_height(node_address: string | undefined, block_height: bigint, key: Key, path: (string)[]): Promise; - /** - * @param {string | undefined} node_address - * @param {Transaction} transaction - * @returns {Promise} - */ - get_binary_try_accept_transaction(node_address: string | undefined, transaction: Transaction): Promise; - /** - * @param {string | undefined} node_address - * @param {Transaction} transaction - * @returns {Promise} + * Retrieves account information using the provided options. + * + * This function is an asynchronous JavaScript binding for the Rust `get_account` method. + * + * # Arguments + * + * * `options` - An optional `GetAccountOptions` struct containing retrieval options, such as: + * - `account_identifier`: Identifier for the account. + * - `account_identifier_as_string`: String representation of the account identifier. + * - `maybe_block_id_as_string`: Optional string representation of the block ID. + * - `maybe_block_identifier`: Optional `BlockIdentifierInput` for specifying the block. + * - `verbosity`: Verbosity level for the output. + * - `rpc_address`: Address of the node to query. + * + * # Returns + * + * A `Result` containing either a `GetAccountResult` on success or a `JsError` on failure. + * + * # Errors + * + * Returns a `JsError` if there is an error during the retrieval process, such as issues with the provided options or network errors. + * ``` + * @param {getAccountOptions | undefined} [options] + * @returns {Promise} */ - get_binary_try_speculative_execution(node_address: string | undefined, transaction: Transaction): Promise; + get_account(options?: getAccountOptions): Promise; /** - * @param {string | undefined} [node_address] - * @returns {Promise} + * @param {getAccountOptions | undefined} [options] + * @returns {Promise} */ - get_binary_get_protocol_version(node_address?: string): Promise; + state_get_account_info(options?: getAccountOptions): Promise; /** - * This function allows executing a deploy speculatively. + * Parses era summary options from a JsValue. * * # Arguments * - * * `deploy_params` - Deployment parameters for the deploy. - * * `session_params` - Session parameters for the deploy. - * * `payment_params` - Payment parameters for the deploy. - * * `verbosity` - Optional verbosity level. - * * `rpc_address` - Optional rpc address. + * * `options` - A JsValue containing era summary options to be parsed. * * # Returns * - * A `Result` containing either a `SpeculativeExecResult` or a `JsError` in case of an error. - * @param {DeployStrParams} deploy_params - * @param {SessionStrParams} session_params - * @param {PaymentStrParams} payment_params - * @param {Verbosity | undefined} [verbosity] - * @param {string | undefined} [rpc_address] - * @returns {Promise} + * Parsed era summary options as a `GetEraSummaryOptions` struct. + * @param {any} options + * @returns {getEraSummaryOptions} */ - speculative_deploy(deploy_params: DeployStrParams, session_params: SessionStrParams, payment_params: PaymentStrParams, verbosity?: Verbosity, rpc_address?: string): Promise; + get_era_summary_options(options: any): getEraSummaryOptions; /** - * Calls a smart contract entry point with the specified parameters and returns the result. + * Retrieves era summary information using the provided options. * * # Arguments * - * * `transaction_params` - Transaction parameters. - * * `builder_params` - Transaction Builder parameters. - * * `rpc_address` - An optional rpc address to send the request to. + * * `options` - An optional `GetEraSummaryOptions` struct containing retrieval options. * * # Returns * - * A `Result` containing either a `PutTransactionResult` or a `JsError` in case of an error. + * A `Result` containing either a `GetEraSummaryResult` or a `JsError` in case of an error. * * # Errors * - * Returns a `JsError` if there is an error during the call. - * @param {TransactionBuilderParams} builder_params + * Returns a `JsError` if there is an error during the retrieval process. + * @param {getEraSummaryOptions | undefined} [options] + * @returns {Promise} + */ + get_era_summary(options?: getEraSummaryOptions): Promise; + /** + * @param {getEraSummaryOptions | undefined} [options] + * @returns {Promise} + */ + chain_get_era_summary(options?: getEraSummaryOptions): Promise; + /** + * JS function for transaction transferring funds. + * + * # Arguments + * + * * `maybe_source` - Optional transfer source uref. + * * `target_account` - The target account. + * * `amount` - The amount to transfer. + * * `transaction_params` - The transaction parameters. + * * `maybe_id` - An optional transfer ID (defaults to a random number). + * * `verbosity` - The verbosity level for logging (optional). + * * `rpc_address` - The address of the node to connect to (optional). + * + * # Returns + * + * A `Result` containing the result of the transfer or a `JsError` in case of an error. + * @param {URef | undefined} maybe_source + * @param {string} target_account + * @param {string} amount * @param {TransactionStrParams} transaction_params + * @param {string | undefined} [maybe_id] + * @param {Verbosity | undefined} [verbosity] * @param {string | undefined} [rpc_address] * @returns {Promise} */ - call_entrypoint(builder_params: TransactionBuilderParams, transaction_params: TransactionStrParams, rpc_address?: string): Promise; + transfer_transaction(maybe_source: URef | undefined, target_account: string, amount: string, transaction_params: TransactionStrParams, maybe_id?: string, verbosity?: Verbosity, rpc_address?: string): Promise; } export class SessionStrParams { free(): void; @@ -4046,442 +4046,136 @@ export class getTransactionOptions { } /** * Options for the `query_balance` method. - */ -export class queryBalanceDetailsOptions { - free(): void; - global_state_identifier?: GlobalStateIdentifier; - maybe_block_id_as_string?: string; - purse_identifier?: PurseIdentifier; - purse_identifier_as_string?: string; - rpc_address?: string; - state_root_hash?: Digest; - state_root_hash_as_string?: string; - verbosity?: Verbosity; -} -/** - * Options for the `query_balance` method. - */ -export class queryBalanceOptions { - free(): void; - global_state_identifier?: GlobalStateIdentifier; - maybe_block_id_as_string?: string; - purse_identifier?: PurseIdentifier; - purse_identifier_as_string?: string; - rpc_address?: string; - state_root_hash?: Digest; - state_root_hash_as_string?: string; - verbosity?: Verbosity; -} -export class queryContractDictOptions { - free(): void; - dictionary_item_identifier?: DictionaryItemIdentifier; - dictionary_item_params?: DictionaryItemStrParams; - rpc_address?: string; - state_root_hash?: Digest; - state_root_hash_as_string?: string; - verbosity?: Verbosity; -} -export class queryContractKeyOptions { - free(): void; - entity_identifier?: EntityIdentifier; - entity_identifier_as_string?: string; - maybe_block_id_as_string?: string; - maybe_block_identifier?: BlockIdentifier; - path?: Path; - path_as_string?: string; - rpc_address?: string; - verbosity?: Verbosity; -} -/** - * Options for the `query_global_state` method. - */ -export class queryGlobalStateOptions { - free(): void; - global_state_identifier?: GlobalStateIdentifier; - key?: Key; - key_as_string?: string; - maybe_block_id_as_string?: string; - path?: Path; - path_as_string?: string; - rpc_address?: string; - state_root_hash?: Digest; - state_root_hash_as_string?: string; - verbosity?: Verbosity; -} - -export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module; - -export interface InitOutput { - readonly memory: WebAssembly.Memory; - readonly __wbg_peerentry_free: (a: number, b: number) => void; - readonly peerentry_node_id: (a: number) => Array; - readonly peerentry_address: (a: number) => Array; - readonly __wbg_getbalanceresult_free: (a: number, b: number) => void; - readonly getbalanceresult_api_version: (a: number) => number; - readonly getbalanceresult_balance_value: (a: number) => number; - readonly getbalanceresult_merkle_proof: (a: number) => Array; - readonly getbalanceresult_toJson: (a: number) => number; - readonly __wbg_getbalanceoptions_free: (a: number, b: number) => void; - readonly __wbg_get_getbalanceoptions_state_root_hash_as_string: (a: number) => Array; - readonly __wbg_set_getbalanceoptions_state_root_hash_as_string: (a: number, b: number, c: number) => void; - readonly __wbg_get_getbalanceoptions_state_root_hash: (a: number) => number; - readonly __wbg_set_getbalanceoptions_state_root_hash: (a: number, b: number) => void; - readonly __wbg_get_getbalanceoptions_purse_uref_as_string: (a: number) => Array; - readonly __wbg_set_getbalanceoptions_purse_uref_as_string: (a: number, b: number, c: number) => void; - readonly __wbg_get_getbalanceoptions_purse_uref: (a: number) => number; - readonly __wbg_set_getbalanceoptions_purse_uref: (a: number, b: number) => void; - readonly __wbg_get_getbalanceoptions_rpc_address: (a: number) => Array; - readonly __wbg_set_getbalanceoptions_rpc_address: (a: number, b: number, c: number) => void; - readonly __wbg_get_getbalanceoptions_verbosity: (a: number) => number; - readonly __wbg_set_getbalanceoptions_verbosity: (a: number, b: number) => void; - readonly sdk_get_balance_options: (a: number, b: number) => Array; - readonly sdk_get_balance: (a: number, b: number) => number; - readonly sdk_state_get_balance: (a: number, b: number) => number; - readonly __wbg_getdictionaryitemresult_free: (a: number, b: number) => void; - readonly getdictionaryitemresult_api_version: (a: number) => number; - readonly getdictionaryitemresult_dictionary_key: (a: number) => Array; - readonly getdictionaryitemresult_stored_value: (a: number) => number; - readonly getdictionaryitemresult_merkle_proof: (a: number) => Array; - readonly getdictionaryitemresult_toJson: (a: number) => number; - readonly __wbg_getdictionaryitemoptions_free: (a: number, b: number) => void; - readonly __wbg_get_getdictionaryitemoptions_state_root_hash_as_string: (a: number) => Array; - readonly __wbg_set_getdictionaryitemoptions_state_root_hash_as_string: (a: number, b: number, c: number) => void; - readonly __wbg_get_getdictionaryitemoptions_state_root_hash: (a: number) => number; - readonly __wbg_set_getdictionaryitemoptions_state_root_hash: (a: number, b: number) => void; - readonly __wbg_get_getdictionaryitemoptions_dictionary_item_params: (a: number) => number; - readonly __wbg_set_getdictionaryitemoptions_dictionary_item_params: (a: number, b: number) => void; - readonly __wbg_get_getdictionaryitemoptions_dictionary_item_identifier: (a: number) => number; - readonly __wbg_set_getdictionaryitemoptions_dictionary_item_identifier: (a: number, b: number) => void; - readonly __wbg_get_getdictionaryitemoptions_rpc_address: (a: number) => Array; - readonly __wbg_set_getdictionaryitemoptions_rpc_address: (a: number, b: number, c: number) => void; - readonly __wbg_get_getdictionaryitemoptions_verbosity: (a: number) => number; - readonly __wbg_set_getdictionaryitemoptions_verbosity: (a: number, b: number) => void; - readonly sdk_get_dictionary_item_options: (a: number, b: number) => Array; - readonly sdk_get_dictionary_item: (a: number, b: number) => number; - readonly sdk_state_get_dictionary_item: (a: number, b: number) => number; - readonly __wbg_puttransactionresult_free: (a: number, b: number) => void; - readonly puttransactionresult_api_version: (a: number) => number; - readonly puttransactionresult_transaction_hash: (a: number) => number; - readonly puttransactionresult_toJson: (a: number) => number; - readonly sdk_transaction: (a: number, b: number, c: number, d: number, e: number, f: number) => number; - readonly __wbg_querycontractdictoptions_free: (a: number, b: number) => void; - readonly sdk_query_contract_dict_options: (a: number, b: number) => Array; - readonly sdk_query_contract_dict: (a: number, b: number) => number; - readonly __wbg_get_querycontractdictoptions_dictionary_item_params: (a: number) => number; - readonly __wbg_get_querycontractdictoptions_dictionary_item_identifier: (a: number) => number; - readonly __wbg_set_querycontractdictoptions_verbosity: (a: number, b: number) => void; - readonly __wbg_set_querycontractdictoptions_state_root_hash: (a: number, b: number) => void; - readonly __wbg_set_querycontractdictoptions_state_root_hash_as_string: (a: number, b: number, c: number) => void; - readonly __wbg_set_querycontractdictoptions_rpc_address: (a: number, b: number, c: number) => void; - readonly __wbg_get_querycontractdictoptions_state_root_hash: (a: number) => number; - readonly __wbg_get_querycontractdictoptions_state_root_hash_as_string: (a: number) => Array; - readonly __wbg_get_querycontractdictoptions_rpc_address: (a: number) => Array; - readonly __wbg_get_querycontractdictoptions_verbosity: (a: number) => number; - readonly __wbg_set_querycontractdictoptions_dictionary_item_params: (a: number, b: number) => void; - readonly __wbg_set_querycontractdictoptions_dictionary_item_identifier: (a: number, b: number) => void; - readonly __wbg_geterainforesult_free: (a: number, b: number) => void; - readonly geterainforesult_api_version: (a: number) => number; - readonly geterainforesult_era_summary: (a: number) => number; - readonly geterainforesult_toJson: (a: number) => number; - readonly __wbg_geterainfooptions_free: (a: number, b: number) => void; - readonly __wbg_get_geterainfooptions_maybe_block_id_as_string: (a: number) => Array; - readonly __wbg_set_geterainfooptions_maybe_block_id_as_string: (a: number, b: number, c: number) => void; - readonly __wbg_get_geterainfooptions_maybe_block_identifier: (a: number) => number; - readonly __wbg_set_geterainfooptions_maybe_block_identifier: (a: number, b: number) => void; - readonly __wbg_get_geterainfooptions_rpc_address: (a: number) => Array; - readonly __wbg_set_geterainfooptions_rpc_address: (a: number, b: number, c: number) => void; - readonly __wbg_get_geterainfooptions_verbosity: (a: number) => number; - readonly __wbg_set_geterainfooptions_verbosity: (a: number, b: number) => void; - readonly sdk_get_era_info_options: (a: number, b: number) => Array; - readonly sdk_get_era_info: (a: number, b: number) => number; - readonly sdk_chain_get_era_info_by_switch_block: (a: number, b: number) => number; - readonly __wbg_accessrights_free: (a: number, b: number) => void; - readonly accessrights_NONE: () => number; - readonly accessrights_READ: () => number; - readonly accessrights_WRITE: () => number; - readonly accessrights_ADD: () => number; - readonly accessrights_READ_ADD: () => number; - readonly accessrights_READ_WRITE: () => number; - readonly accessrights_ADD_WRITE: () => number; - readonly accessrights_READ_ADD_WRITE: () => number; - readonly accessrights_new: (a: number) => Array; - readonly accessrights_from_bits: (a: number, b: number, c: number) => number; - readonly accessrights_is_readable: (a: number) => number; - readonly accessrights_is_writeable: (a: number) => number; - readonly accessrights_is_addable: (a: number) => number; - readonly accessrights_is_none: (a: number) => number; - readonly __wbg_dictionaryaddr_free: (a: number, b: number) => void; - readonly dictionaryaddr_new: (a: number, b: number) => Array; - readonly transferaddr_new: (a: number, b: number) => Array; - readonly urefaddr_new: (a: number, b: number) => Array; - readonly __wbg_blockidentifier_free: (a: number, b: number) => void; - readonly blockidentifier_new: (a: number) => number; - readonly blockidentifier_from_hash: (a: number) => number; - readonly blockidentifier_fromHeight: (a: number) => number; - readonly blockidentifier_toJson: (a: number) => number; - readonly __wbg_eraid_free: (a: number, b: number) => void; - readonly eraid_new: (a: number) => number; - readonly eraid_value: (a: number) => number; - readonly __wbg_getauctioninforesult_free: (a: number, b: number) => void; - readonly getauctioninforesult_api_version: (a: number) => number; - readonly getauctioninforesult_auction_state: (a: number) => number; - readonly getauctioninforesult_toJson: (a: number) => number; - readonly __wbg_getauctioninfooptions_free: (a: number, b: number) => void; - readonly __wbg_get_getauctioninfooptions_maybe_block_id_as_string: (a: number) => Array; - readonly __wbg_set_getauctioninfooptions_maybe_block_id_as_string: (a: number, b: number, c: number) => void; - readonly __wbg_get_getauctioninfooptions_maybe_block_identifier: (a: number) => number; - readonly __wbg_set_getauctioninfooptions_maybe_block_identifier: (a: number, b: number) => void; - readonly __wbg_get_getauctioninfooptions_rpc_address: (a: number) => Array; - readonly __wbg_set_getauctioninfooptions_rpc_address: (a: number, b: number, c: number) => void; - readonly __wbg_get_getauctioninfooptions_verbosity: (a: number) => number; - readonly __wbg_set_getauctioninfooptions_verbosity: (a: number, b: number) => void; - readonly sdk_get_auction_info_options: (a: number, b: number) => Array; - readonly sdk_get_auction_info: (a: number, b: number) => number; - readonly sdk_state_get_auction_info_js_alias: (a: number, b: number) => number; - readonly __wbg_getblockresult_free: (a: number, b: number) => void; - readonly getblockresult_api_version: (a: number) => number; - readonly getblockresult_block: (a: number) => number; - readonly getblockresult_toJson: (a: number) => number; - readonly sdk_get_block_options: (a: number, b: number) => Array; - readonly sdk_get_block: (a: number, b: number) => number; - readonly sdk_chain_get_block: (a: number, b: number) => number; - readonly __wbg_getchainspecresult_free: (a: number, b: number) => void; - readonly getchainspecresult_api_version: (a: number) => number; - readonly getchainspecresult_chainspec_bytes: (a: number) => number; - readonly getchainspecresult_toJson: (a: number) => number; - readonly sdk_get_chainspec: (a: number, b: number, c: number, d: number) => number; - readonly sdk_info_get_chainspec: (a: number, b: number, c: number, d: number) => number; - readonly __wbg_getnodestatusresult_free: (a: number, b: number) => void; - readonly getnodestatusresult_api_version: (a: number) => number; - readonly getnodestatusresult_chainspec_name: (a: number) => Array; - readonly getnodestatusresult_starting_state_root_hash: (a: number) => number; - readonly getnodestatusresult_peers: (a: number) => number; - readonly getnodestatusresult_last_added_block_info: (a: number) => number; - readonly getnodestatusresult_our_public_signing_key: (a: number) => number; - readonly getnodestatusresult_round_length: (a: number) => number; - readonly getnodestatusresult_next_upgrade: (a: number) => number; - readonly getnodestatusresult_build_version: (a: number) => Array; - readonly getnodestatusresult_uptime: (a: number) => number; - readonly getnodestatusresult_reactor_state: (a: number) => number; - readonly getnodestatusresult_last_progress: (a: number) => number; - readonly getnodestatusresult_available_block_range: (a: number) => number; - readonly getnodestatusresult_block_sync: (a: number) => number; - readonly getnodestatusresult_toJson: (a: number) => number; - readonly sdk_get_node_status: (a: number, b: number, c: number, d: number) => number; - readonly sdk_info_get_status: (a: number, b: number, c: number, d: number) => number; - readonly __wbg_getpeersresult_free: (a: number, b: number) => void; - readonly getpeersresult_api_version: (a: number) => number; - readonly getpeersresult_peers: (a: number) => number; - readonly getpeersresult_toJson: (a: number) => number; - readonly sdk_get_peers: (a: number, b: number, c: number, d: number) => number; - readonly sdk_info_get_peers: (a: number, b: number, c: number, d: number) => number; - readonly __wbg_getvalidatorchangesresult_free: (a: number, b: number) => void; - readonly getvalidatorchangesresult_api_version: (a: number) => number; - readonly getvalidatorchangesresult_changes: (a: number) => number; - readonly getvalidatorchangesresult_toJson: (a: number) => number; - readonly sdk_get_validator_changes: (a: number, b: number, c: number, d: number) => number; - readonly sdk_info_get_validator_change: (a: number, b: number, c: number, d: number) => number; - readonly __wbg_listrpcsresult_free: (a: number, b: number) => void; - readonly listrpcsresult_api_version: (a: number) => number; - readonly listrpcsresult_name: (a: number) => Array; - readonly listrpcsresult_schema: (a: number) => number; - readonly listrpcsresult_toJson: (a: number) => number; - readonly sdk_list_rpcs: (a: number, b: number, c: number, d: number) => number; - readonly sdk_make_deploy: (a: number, b: number, c: number, d: number) => Array; - readonly sdk_sign_deploy: (a: number, b: number, c: number, d: number) => number; - readonly sdk_make_transaction: (a: number, b: number, c: number) => Array; - readonly sdk_sign_transaction: (a: number, b: number, c: number, d: number) => number; - readonly __wbg_querycontractkeyoptions_free: (a: number, b: number) => void; - readonly __wbg_get_querycontractkeyoptions_entity_identifier: (a: number) => number; - readonly __wbg_set_querycontractkeyoptions_entity_identifier: (a: number, b: number) => void; - readonly __wbg_get_querycontractkeyoptions_entity_identifier_as_string: (a: number) => Array; - readonly __wbg_set_querycontractkeyoptions_entity_identifier_as_string: (a: number, b: number, c: number) => void; - readonly __wbg_get_querycontractkeyoptions_maybe_block_id_as_string: (a: number) => Array; - readonly __wbg_set_querycontractkeyoptions_maybe_block_id_as_string: (a: number, b: number, c: number) => void; - readonly __wbg_get_querycontractkeyoptions_path_as_string: (a: number) => Array; - readonly __wbg_set_querycontractkeyoptions_path_as_string: (a: number, b: number, c: number) => void; - readonly __wbg_get_querycontractkeyoptions_path: (a: number) => number; - readonly __wbg_set_querycontractkeyoptions_path: (a: number, b: number) => void; - readonly __wbg_get_querycontractkeyoptions_rpc_address: (a: number) => Array; - readonly __wbg_set_querycontractkeyoptions_rpc_address: (a: number, b: number, c: number) => void; - readonly __wbg_get_querycontractkeyoptions_verbosity: (a: number) => number; - readonly __wbg_set_querycontractkeyoptions_verbosity: (a: number, b: number) => void; - readonly sdk_query_contract_key_options: (a: number, b: number) => Array; - readonly sdk_query_contract_key: (a: number, b: number) => number; - readonly __wbg_getblockoptions_free: (a: number, b: number) => void; - readonly __wbg_set_getblockoptions_verbosity: (a: number, b: number) => void; - readonly __wbg_get_getblockoptions_maybe_block_identifier: (a: number) => number; - readonly __wbg_get_querycontractkeyoptions_maybe_block_identifier: (a: number) => number; - readonly __wbg_set_getblockoptions_maybe_block_id_as_string: (a: number, b: number, c: number) => void; - readonly __wbg_set_getblockoptions_rpc_address: (a: number, b: number, c: number) => void; - readonly __wbg_get_getblockoptions_maybe_block_id_as_string: (a: number) => Array; - readonly __wbg_get_getblockoptions_rpc_address: (a: number) => Array; - readonly __wbg_get_getblockoptions_verbosity: (a: number) => number; - readonly __wbg_set_getblockoptions_maybe_block_identifier: (a: number, b: number) => void; - readonly __wbg_set_querycontractkeyoptions_maybe_block_identifier: (a: number, b: number) => void; - readonly __wbg_transferaddr_free: (a: number, b: number) => void; - readonly __wbg_urefaddr_free: (a: number, b: number) => void; - readonly __wbg_accounthash_free: (a: number, b: number) => void; - readonly accounthash_new_js_alias: (a: number, b: number) => Array; - readonly accounthash_fromFormattedStr: (a: number, b: number) => Array; - readonly accounthash_fromPublicKey: (a: number) => number; - readonly accounthash_toFormattedString: (a: number) => Array; - readonly accounthash_toHexString: (a: number) => Array; - readonly accounthash_fromUint8Array: (a: number, b: number) => number; - readonly accounthash_toJson: (a: number) => number; - readonly __wbg_accountidentifier_free: (a: number, b: number) => void; - readonly accountidentifier_fromFormattedStr: (a: number, b: number) => Array; - readonly accountidentifier_fromPublicKey: (a: number) => number; - readonly accountidentifier_fromAccountHash: (a: number) => number; - readonly accountidentifier_toJson: (a: number) => number; - readonly hashaddr_new: (a: number, b: number) => Array; - readonly hashaddr_toBytes: (a: number) => Array; - readonly hashaddr_toHexString: (a: number) => Array; - readonly __wbg_dictionaryitemstrparams_free: (a: number, b: number) => void; - readonly dictionaryitemstrparams_new: () => number; - readonly dictionaryitemstrparams_setAccountNamedKey: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void; - readonly dictionaryitemstrparams_setContractNamedKey: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void; - readonly dictionaryitemstrparams_setEntityNamedKey: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void; - readonly dictionaryitemstrparams_setUref: (a: number, b: number, c: number, d: number, e: number) => void; - readonly dictionaryitemstrparams_setDictionary: (a: number, b: number, c: number) => void; - readonly dictionaryitemstrparams_toJson: (a: number) => number; - readonly packagehash_new_js_alias: (a: number, b: number) => Array; - readonly packagehash_fromFormattedStr: (a: number, b: number) => Array; - readonly packagehash_toFormattedString: (a: number) => Array; - readonly packagehash_fromUint8Array: (a: number, b: number) => number; - readonly __wbg_transactionhash_free: (a: number, b: number) => void; - readonly transactionhash_new_js_alias: (a: number, b: number) => Array; - readonly transactionhash_fromRaw: (a: number, b: number) => Array; - readonly transactionhash_digest: (a: number) => Array; - readonly transactionhash_toJson: (a: number) => number; - readonly transactionhash_toString: (a: number) => Array; - readonly __wbg_getstateroothashresult_free: (a: number, b: number) => void; - readonly getstateroothashresult_api_version: (a: number) => number; - readonly getstateroothashresult_state_root_hash: (a: number) => number; - readonly getstateroothashresult_state_root_hash_as_string: (a: number) => Array; - readonly getstateroothashresult_toString: (a: number) => Array; - readonly getstateroothashresult_toJson: (a: number) => number; - readonly __wbg_getstateroothashoptions_free: (a: number, b: number) => void; - readonly __wbg_get_getstateroothashoptions_maybe_block_id_as_string: (a: number) => Array; - readonly __wbg_set_getstateroothashoptions_maybe_block_id_as_string: (a: number, b: number, c: number) => void; - readonly __wbg_get_getstateroothashoptions_maybe_block_identifier: (a: number) => number; - readonly __wbg_set_getstateroothashoptions_maybe_block_identifier: (a: number, b: number) => void; - readonly __wbg_get_getstateroothashoptions_rpc_address: (a: number) => Array; - readonly __wbg_set_getstateroothashoptions_rpc_address: (a: number, b: number, c: number) => void; - readonly __wbg_get_getstateroothashoptions_verbosity: (a: number) => number; - readonly __wbg_set_getstateroothashoptions_verbosity: (a: number, b: number) => void; - readonly sdk_get_state_root_hash_options: (a: number, b: number) => Array; - readonly sdk_get_state_root_hash: (a: number, b: number) => number; - readonly sdk_chain_get_state_root_hash: (a: number, b: number) => number; - readonly sdk_watchDeploy: (a: number, b: number, c: number, d: number, e: number) => number; - readonly sdk_watchTransaction: (a: number, b: number, c: number, d: number, e: number) => number; - readonly sdk_waitDeploy: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => number; - readonly sdk_waitTransaction: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => number; - readonly __wbg_watcher_free: (a: number, b: number) => void; - readonly watcher_new: (a: number, b: number, c: number, d: number) => number; - readonly watcher_subscribe: (a: number, b: number, c: number) => Array; - readonly watcher_unsubscribe: (a: number, b: number, c: number) => void; - readonly watcher_start: (a: number) => number; - readonly watcher_stop: (a: number) => void; - readonly __wbg_subscription_free: (a: number, b: number) => void; - readonly __wbg_get_subscription_eventHandlerFn: (a: number) => number; - readonly __wbg_set_subscription_eventHandlerFn: (a: number, b: number) => void; - readonly subscription_new: (a: number, b: number, c: number) => number; - readonly __wbg_failure_free: (a: number, b: number) => void; - readonly __wbg_get_failure_cost: (a: number) => Array; - readonly __wbg_set_failure_cost: (a: number, b: number, c: number) => void; - readonly __wbg_get_failure_error_message: (a: number) => Array; - readonly __wbg_set_failure_error_message: (a: number, b: number, c: number) => void; - readonly __wbg_version2_free: (a: number, b: number) => void; - readonly __wbg_get_version2_error_message: (a: number) => Array; - readonly __wbg_set_version2_error_message: (a: number, b: number, c: number) => void; - readonly __wbg_executionresult_free: (a: number, b: number) => void; - readonly __wbg_get_executionresult_Success: (a: number) => number; - readonly __wbg_set_executionresult_Success: (a: number, b: number) => void; - readonly __wbg_get_executionresult_Failure: (a: number) => number; - readonly __wbg_set_executionresult_Failure: (a: number, b: number) => void; - readonly __wbg_hashstring_free: (a: number, b: number) => void; - readonly hashstring_Deploy: (a: number) => Array; - readonly hashstring_toString: (a: number) => Array; - readonly __wbg_messages_free: (a: number, b: number) => void; - readonly __wbg_set_messages_entity_hash: (a: number, b: number, c: number) => void; - readonly __wbg_get_messages_message: (a: number) => number; - readonly __wbg_set_messages_message: (a: number, b: number) => void; - readonly __wbg_get_messages_topic_name: (a: number) => Array; - readonly __wbg_set_messages_topic_name: (a: number, b: number, c: number) => void; - readonly __wbg_get_messages_topic_name_hash: (a: number) => Array; - readonly __wbg_set_messages_topic_name_hash: (a: number, b: number, c: number) => void; - readonly __wbg_get_messages_topic_index: (a: number) => number; - readonly __wbg_set_messages_topic_index: (a: number, b: number) => void; - readonly __wbg_get_messages_block_index: (a: number) => number; - readonly __wbg_set_messages_block_index: (a: number, b: number) => void; - readonly __wbg_transactionprocessed_free: (a: number, b: number) => void; - readonly __wbg_get_transactionprocessed_hash: (a: number) => number; - readonly __wbg_set_transactionprocessed_hash: (a: number, b: number) => void; - readonly __wbg_get_transactionprocessed_initiator_addr: (a: number) => number; - readonly __wbg_set_transactionprocessed_initiator_addr: (a: number, b: number) => void; - readonly __wbg_get_transactionprocessed_timestamp: (a: number) => Array; - readonly __wbg_set_transactionprocessed_timestamp: (a: number, b: number, c: number) => void; - readonly __wbg_set_transactionprocessed_ttl: (a: number, b: number, c: number) => void; - readonly __wbg_get_transactionprocessed_execution_result: (a: number) => number; - readonly __wbg_set_transactionprocessed_execution_result: (a: number, b: number) => void; - readonly __wbg_get_transactionprocessed_messages: (a: number) => Array; - readonly __wbg_set_transactionprocessed_messages: (a: number, b: number, c: number) => void; - readonly __wbg_body_free: (a: number, b: number) => void; - readonly __wbg_get_body_transaction_processed: (a: number) => number; - readonly __wbg_set_body_transaction_processed: (a: number, b: number) => void; - readonly body_get_deploy_processed: (a: number) => number; - readonly __wbg_eventparseresult_free: (a: number, b: number) => void; - readonly __wbg_get_eventparseresult_err: (a: number) => Array; - readonly __wbg_set_eventparseresult_err: (a: number, b: number, c: number) => void; - readonly __wbg_get_eventparseresult_body: (a: number) => number; - readonly __wbg_set_eventparseresult_body: (a: number, b: number) => void; - readonly __wbg_payment_free: (a: number, b: number) => void; - readonly __wbg_publickeystring_free: (a: number, b: number) => void; - readonly __wbg_message_free: (a: number, b: number) => void; - readonly __wbg_get_version2_initiator: (a: number) => number; - readonly accountidentifier_new: (a: number, b: number) => Array; - readonly __wbg_set_subscription_targetHash: (a: number, b: number, c: number) => void; - readonly __wbg_set_version2_limit: (a: number, b: number, c: number) => void; - readonly __wbg_set_payment_source: (a: number, b: number, c: number) => void; - readonly __wbg_set_hashstring_hash: (a: number, b: number, c: number) => void; - readonly __wbg_set_publickeystring_PublicKey: (a: number, b: number, c: number) => void; - readonly __wbg_set_message_String: (a: number, b: number, c: number) => void; - readonly __wbg_set_version2_consumed: (a: number, b: number, c: number) => void; - readonly __wbg_set_version2_cost: (a: number, b: number, c: number) => void; - readonly __wbg_set_transactionprocessed_block_hash: (a: number, b: number, c: number) => void; - readonly body_get_transaction_processed: (a: number) => number; - readonly hashstring_Version1: (a: number) => Array; - readonly __wbg_set_version2_initiator: (a: number, b: number) => void; - readonly __wbg_hashaddr_free: (a: number, b: number) => void; - readonly __wbg_packagehash_free: (a: number, b: number) => void; - readonly __wbg_get_subscription_targetHash: (a: number) => Array; - readonly __wbg_get_version2_limit: (a: number) => Array; - readonly __wbg_get_payment_source: (a: number) => Array; - readonly __wbg_get_hashstring_hash: (a: number) => Array; - readonly __wbg_get_publickeystring_PublicKey: (a: number) => Array; - readonly __wbg_get_message_String: (a: number) => Array; - readonly __wbg_get_messages_entity_hash: (a: number) => Array; - readonly __wbg_get_version2_cost: (a: number) => Array; - readonly __wbg_get_version2_consumed: (a: number) => Array; - readonly __wbg_get_transactionprocessed_ttl: (a: number) => Array; - readonly __wbg_get_transactionprocessed_block_hash: (a: number) => Array; - readonly __wbg_addressableentityhash_free: (a: number, b: number) => void; - readonly addressableentityhash_new_js_alias: (a: number, b: number) => Array; - readonly addressableentityhash_fromFormattedStr: (a: number, b: number) => Array; - readonly addressableentityhash_toFormattedString: (a: number) => Array; - readonly addressableentityhash_fromUint8Array: (a: number, b: number) => number; - readonly blockhash_new_js_alias: (a: number, b: number) => Array; - readonly blockhash_fromDigest: (a: number) => Array; - readonly blockhash_toJson: (a: number) => number; - readonly blockhash_toString: (a: number) => Array; - readonly contractpackagehash_new_js_alias: (a: number, b: number) => Array; - readonly contractpackagehash_fromFormattedStr: (a: number, b: number) => Array; - readonly contractpackagehash_toFormattedString: (a: number) => Array; - readonly contractpackagehash_fromUint8Array: (a: number, b: number) => number; - readonly deployhash_new_js_alias: (a: number, b: number) => Array; - readonly deployhash_toJson: (a: number) => number; - readonly deployhash_toString: (a: number) => Array; + */ +export class queryBalanceDetailsOptions { + free(): void; + global_state_identifier?: GlobalStateIdentifier; + maybe_block_id_as_string?: string; + purse_identifier?: PurseIdentifier; + purse_identifier_as_string?: string; + rpc_address?: string; + state_root_hash?: Digest; + state_root_hash_as_string?: string; + verbosity?: Verbosity; +} +/** + * Options for the `query_balance` method. + */ +export class queryBalanceOptions { + free(): void; + global_state_identifier?: GlobalStateIdentifier; + maybe_block_id_as_string?: string; + purse_identifier?: PurseIdentifier; + purse_identifier_as_string?: string; + rpc_address?: string; + state_root_hash?: Digest; + state_root_hash_as_string?: string; + verbosity?: Verbosity; +} +export class queryContractDictOptions { + free(): void; + dictionary_item_identifier?: DictionaryItemIdentifier; + dictionary_item_params?: DictionaryItemStrParams; + rpc_address?: string; + state_root_hash?: Digest; + state_root_hash_as_string?: string; + verbosity?: Verbosity; +} +export class queryContractKeyOptions { + free(): void; + entity_identifier?: EntityIdentifier; + entity_identifier_as_string?: string; + maybe_block_id_as_string?: string; + maybe_block_identifier?: BlockIdentifier; + path?: Path; + path_as_string?: string; + rpc_address?: string; + verbosity?: Verbosity; +} +/** + * Options for the `query_global_state` method. + */ +export class queryGlobalStateOptions { + free(): void; + global_state_identifier?: GlobalStateIdentifier; + key?: Key; + key_as_string?: string; + maybe_block_id_as_string?: string; + path?: Path; + path_as_string?: string; + rpc_address?: string; + state_root_hash?: Digest; + state_root_hash_as_string?: string; + verbosity?: Verbosity; +} + +export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module; + +export interface InitOutput { + readonly memory: WebAssembly.Memory; + readonly __wbg_getbalanceresult_free: (a: number, b: number) => void; + readonly getbalanceresult_api_version: (a: number) => number; + readonly getbalanceresult_balance_value: (a: number) => number; + readonly getbalanceresult_merkle_proof: (a: number) => Array; + readonly getbalanceresult_toJson: (a: number) => number; + readonly __wbg_getbalanceoptions_free: (a: number, b: number) => void; + readonly __wbg_get_getbalanceoptions_state_root_hash_as_string: (a: number) => Array; + readonly __wbg_set_getbalanceoptions_state_root_hash_as_string: (a: number, b: number, c: number) => void; + readonly __wbg_get_getbalanceoptions_state_root_hash: (a: number) => number; + readonly __wbg_set_getbalanceoptions_state_root_hash: (a: number, b: number) => void; + readonly __wbg_get_getbalanceoptions_purse_uref_as_string: (a: number) => Array; + readonly __wbg_set_getbalanceoptions_purse_uref_as_string: (a: number, b: number, c: number) => void; + readonly __wbg_get_getbalanceoptions_purse_uref: (a: number) => number; + readonly __wbg_set_getbalanceoptions_purse_uref: (a: number, b: number) => void; + readonly __wbg_get_getbalanceoptions_rpc_address: (a: number) => Array; + readonly __wbg_set_getbalanceoptions_rpc_address: (a: number, b: number, c: number) => void; + readonly __wbg_get_getbalanceoptions_verbosity: (a: number) => number; + readonly __wbg_set_getbalanceoptions_verbosity: (a: number, b: number) => void; + readonly sdk_get_balance_options: (a: number, b: number) => Array; + readonly sdk_get_balance: (a: number, b: number) => number; + readonly sdk_state_get_balance: (a: number, b: number) => number; + readonly __wbg_getdictionaryitemresult_free: (a: number, b: number) => void; + readonly getdictionaryitemresult_api_version: (a: number) => number; + readonly getdictionaryitemresult_dictionary_key: (a: number) => Array; + readonly getdictionaryitemresult_stored_value: (a: number) => number; + readonly getdictionaryitemresult_merkle_proof: (a: number) => Array; + readonly getdictionaryitemresult_toJson: (a: number) => number; + readonly __wbg_getdictionaryitemoptions_free: (a: number, b: number) => void; + readonly __wbg_get_getdictionaryitemoptions_state_root_hash_as_string: (a: number) => Array; + readonly __wbg_set_getdictionaryitemoptions_state_root_hash_as_string: (a: number, b: number, c: number) => void; + readonly __wbg_get_getdictionaryitemoptions_state_root_hash: (a: number) => number; + readonly __wbg_set_getdictionaryitemoptions_state_root_hash: (a: number, b: number) => void; + readonly __wbg_get_getdictionaryitemoptions_dictionary_item_params: (a: number) => number; + readonly __wbg_set_getdictionaryitemoptions_dictionary_item_params: (a: number, b: number) => void; + readonly __wbg_get_getdictionaryitemoptions_dictionary_item_identifier: (a: number) => number; + readonly __wbg_set_getdictionaryitemoptions_dictionary_item_identifier: (a: number, b: number) => void; + readonly __wbg_get_getdictionaryitemoptions_rpc_address: (a: number) => Array; + readonly __wbg_set_getdictionaryitemoptions_rpc_address: (a: number, b: number, c: number) => void; + readonly __wbg_get_getdictionaryitemoptions_verbosity: (a: number) => number; + readonly __wbg_set_getdictionaryitemoptions_verbosity: (a: number, b: number) => void; + readonly sdk_get_dictionary_item_options: (a: number, b: number) => Array; + readonly sdk_get_dictionary_item: (a: number, b: number) => number; + readonly sdk_state_get_dictionary_item: (a: number, b: number) => number; + readonly __wbg_puttransactionresult_free: (a: number, b: number) => void; + readonly puttransactionresult_api_version: (a: number) => number; + readonly puttransactionresult_transaction_hash: (a: number) => number; + readonly puttransactionresult_toJson: (a: number) => number; + readonly sdk_transaction: (a: number, b: number, c: number, d: number, e: number, f: number) => number; + readonly __wbg_querycontractdictoptions_free: (a: number, b: number) => void; + readonly sdk_query_contract_dict_options: (a: number, b: number) => Array; + readonly sdk_query_contract_dict: (a: number, b: number) => number; + readonly __wbg_get_querycontractdictoptions_dictionary_item_params: (a: number) => number; + readonly __wbg_get_querycontractdictoptions_dictionary_item_identifier: (a: number) => number; + readonly __wbg_set_querycontractdictoptions_verbosity: (a: number, b: number) => void; + readonly __wbg_set_querycontractdictoptions_state_root_hash: (a: number, b: number) => void; + readonly __wbg_set_querycontractdictoptions_state_root_hash_as_string: (a: number, b: number, c: number) => void; + readonly __wbg_set_querycontractdictoptions_rpc_address: (a: number, b: number, c: number) => void; + readonly __wbg_get_querycontractdictoptions_state_root_hash: (a: number) => number; + readonly __wbg_get_querycontractdictoptions_state_root_hash_as_string: (a: number) => Array; + readonly __wbg_get_querycontractdictoptions_rpc_address: (a: number) => Array; + readonly __wbg_get_querycontractdictoptions_verbosity: (a: number) => number; + readonly __wbg_set_querycontractdictoptions_dictionary_item_params: (a: number, b: number) => void; + readonly __wbg_set_querycontractdictoptions_dictionary_item_identifier: (a: number, b: number) => void; readonly __wbg_paymentstrparams_free: (a: number, b: number) => void; readonly paymentstrparams_new: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number, n: number, o: number, p: number, q: number, r: number, s: number) => number; readonly paymentstrparams_payment_amount: (a: number) => Array; @@ -4528,6 +4222,27 @@ export interface InitOutput { readonly sessionstrparams_set_session_entry_point: (a: number, b: number, c: number) => void; readonly sessionstrparams_is_session_transfer: (a: number) => number; readonly sessionstrparams_set_is_session_transfer: (a: number, b: number) => void; + readonly digest_new_js_alias: (a: number, b: number) => Array; + readonly digest_fromString: (a: number, b: number) => Array; + readonly digest_fromRaw: (a: number, b: number) => Array; + readonly digest_toJson: (a: number) => number; + readonly digest_toString: (a: number) => Array; + readonly __wbg_addressableentityhash_free: (a: number, b: number) => void; + readonly addressableentityhash_new_js_alias: (a: number, b: number) => Array; + readonly addressableentityhash_fromFormattedStr: (a: number, b: number) => Array; + readonly addressableentityhash_toFormattedString: (a: number) => Array; + readonly addressableentityhash_fromUint8Array: (a: number, b: number) => number; + readonly blockhash_new_js_alias: (a: number, b: number) => Array; + readonly blockhash_fromDigest: (a: number) => Array; + readonly blockhash_toJson: (a: number) => number; + readonly blockhash_toString: (a: number) => Array; + readonly contractpackagehash_new_js_alias: (a: number, b: number) => Array; + readonly contractpackagehash_fromFormattedStr: (a: number, b: number) => Array; + readonly contractpackagehash_toFormattedString: (a: number) => Array; + readonly contractpackagehash_fromUint8Array: (a: number, b: number) => number; + readonly deployhash_new_js_alias: (a: number, b: number) => Array; + readonly deployhash_toJson: (a: number) => number; + readonly deployhash_toString: (a: number) => Array; readonly __wbg_dictionaryitemidentifier_free: (a: number, b: number) => void; readonly dictionaryitemidentifier_newFromAccountInfo: (a: number, b: number, c: number, d: number, e: number, f: number) => Array; readonly dictionaryitemidentifier_newFromContractInfo: (a: number, b: number, c: number, d: number, e: number, f: number) => Array; @@ -4535,11 +4250,6 @@ export interface InitOutput { readonly dictionaryitemidentifier_newFromSeedUref: (a: number, b: number, c: number, d: number) => Array; readonly dictionaryitemidentifier_newFromDictionaryKey: (a: number, b: number) => Array; readonly dictionaryitemidentifier_toJson: (a: number) => number; - readonly digest_new_js_alias: (a: number, b: number) => Array; - readonly digest_fromString: (a: number, b: number) => Array; - readonly digest_fromRaw: (a: number, b: number) => Array; - readonly digest_toJson: (a: number) => number; - readonly digest_toString: (a: number) => Array; readonly __wbg_publickey_free: (a: number, b: number) => void; readonly publickey_new_js_alias: (a: number, b: number) => Array; readonly publickey_fromUint8Array: (a: number, b: number) => Array; @@ -4629,7 +4339,6 @@ export interface InitOutput { readonly putdeployresult_deploy_hash: (a: number) => number; readonly putdeployresult_toJson: (a: number) => number; readonly sdk_deploy: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => number; - readonly sdk_speculative_transfer: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number) => number; readonly __wbg_getdeployresult_free: (a: number, b: number) => void; readonly getdeployresult_api_version: (a: number) => number; readonly getdeployresult_deploy: (a: number) => number; @@ -4677,8 +4386,6 @@ export interface InitOutput { readonly sdk_speculative_exec: (a: number, b: number) => number; readonly sdk_make_transfer: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number) => Array; readonly sdk_make_transfer_transaction: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number) => Array; - readonly sdk_call_entrypoint_deploy: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => number; - readonly sdk_install: (a: number, b: number, c: number, d: number, e: number) => number; readonly __wbg_gettransactionoptions_free: (a: number, b: number) => void; readonly __wbg_set_gettransactionoptions_verbosity: (a: number, b: number) => void; readonly __wbg_set_gettransactionoptions_transaction_hash_as_string: (a: number, b: number, c: number) => void; @@ -4689,64 +4396,135 @@ export interface InitOutput { readonly __wbg_get_gettransactionoptions_transaction_hash_as_string: (a: number) => Array; readonly __wbg_get_gettransactionoptions_rpc_address: (a: number) => Array; readonly __wbg_get_gettransactionoptions_verbosity: (a: number) => number; + readonly __wbg_digest_free: (a: number, b: number) => void; readonly __wbg_blockhash_free: (a: number, b: number) => void; readonly __wbg_contractpackagehash_free: (a: number, b: number) => void; readonly __wbg_deployhash_free: (a: number, b: number) => void; - readonly __wbg_digest_free: (a: number, b: number) => void; - readonly __wbg_bytes_free: (a: number, b: number) => void; - readonly bytes_new: () => number; - readonly bytes_fromUint8Array: (a: number) => number; - readonly __wbg_argssimple_free: (a: number, b: number) => void; - readonly __wbg_getaccountresult_free: (a: number, b: number) => void; - readonly getaccountresult_api_version: (a: number) => number; - readonly getaccountresult_account: (a: number) => number; - readonly getaccountresult_merkle_proof: (a: number) => Array; - readonly getaccountresult_toJson: (a: number) => number; - readonly __wbg_getaccountoptions_free: (a: number, b: number) => void; - readonly __wbg_get_getaccountoptions_account_identifier: (a: number) => number; - readonly __wbg_set_getaccountoptions_account_identifier: (a: number, b: number) => void; - readonly __wbg_get_getaccountoptions_account_identifier_as_string: (a: number) => Array; - readonly __wbg_set_getaccountoptions_account_identifier_as_string: (a: number, b: number, c: number) => void; - readonly __wbg_get_getaccountoptions_maybe_block_id_as_string: (a: number) => Array; - readonly __wbg_set_getaccountoptions_maybe_block_id_as_string: (a: number, b: number, c: number) => void; - readonly __wbg_get_getaccountoptions_maybe_block_identifier: (a: number) => number; - readonly __wbg_set_getaccountoptions_maybe_block_identifier: (a: number, b: number) => void; - readonly __wbg_get_getaccountoptions_rpc_address: (a: number) => Array; - readonly __wbg_set_getaccountoptions_rpc_address: (a: number, b: number, c: number) => void; - readonly __wbg_get_getaccountoptions_verbosity: (a: number) => number; - readonly __wbg_set_getaccountoptions_verbosity: (a: number, b: number) => void; - readonly sdk_get_account_options: (a: number, b: number) => Array; - readonly sdk_get_account: (a: number, b: number) => number; - readonly sdk_state_get_account_info: (a: number, b: number) => number; - readonly __wbg_geterasummaryresult_free: (a: number, b: number) => void; - readonly geterasummaryresult_api_version: (a: number) => number; - readonly geterasummaryresult_era_summary: (a: number) => number; - readonly geterasummaryresult_toJson: (a: number) => number; - readonly __wbg_geterasummaryoptions_free: (a: number, b: number) => void; - readonly __wbg_get_geterasummaryoptions_maybe_block_id_as_string: (a: number) => Array; - readonly __wbg_set_geterasummaryoptions_maybe_block_id_as_string: (a: number, b: number, c: number) => void; - readonly __wbg_get_geterasummaryoptions_rpc_address: (a: number) => Array; - readonly __wbg_set_geterasummaryoptions_rpc_address: (a: number, b: number, c: number) => void; - readonly __wbg_get_geterasummaryoptions_verbosity: (a: number) => number; - readonly __wbg_set_geterasummaryoptions_verbosity: (a: number, b: number) => void; - readonly sdk_get_era_summary_options: (a: number, b: number) => Array; - readonly sdk_get_era_summary: (a: number, b: number) => number; - readonly sdk_chain_get_era_summary: (a: number, b: number) => number; - readonly sdk_put_deploy: (a: number, b: number, c: number, d: number, e: number) => number; - readonly sdk_account_put_deploy: (a: number, b: number, c: number, d: number, e: number) => number; + readonly __wbg_geterainforesult_free: (a: number, b: number) => void; + readonly geterainforesult_api_version: (a: number) => number; + readonly geterainforesult_era_summary: (a: number) => number; + readonly geterainforesult_toJson: (a: number) => number; + readonly __wbg_geterainfooptions_free: (a: number, b: number) => void; + readonly __wbg_get_geterainfooptions_maybe_block_id_as_string: (a: number) => Array; + readonly __wbg_set_geterainfooptions_maybe_block_id_as_string: (a: number, b: number, c: number) => void; + readonly __wbg_get_geterainfooptions_maybe_block_identifier: (a: number) => number; + readonly __wbg_set_geterainfooptions_maybe_block_identifier: (a: number, b: number) => void; + readonly __wbg_get_geterainfooptions_rpc_address: (a: number) => Array; + readonly __wbg_set_geterainfooptions_rpc_address: (a: number, b: number, c: number) => void; + readonly __wbg_get_geterainfooptions_verbosity: (a: number) => number; + readonly __wbg_set_geterainfooptions_verbosity: (a: number, b: number) => void; + readonly sdk_get_era_info_options: (a: number, b: number) => Array; + readonly sdk_get_era_info: (a: number, b: number) => number; + readonly sdk_chain_get_era_info_by_switch_block: (a: number, b: number) => number; + readonly __wbg_globalstateidentifier_free: (a: number, b: number) => void; + readonly globalstateidentifier_new: (a: number) => number; + readonly globalstateidentifier_fromBlockHash: (a: number) => number; + readonly globalstateidentifier_fromBlockHeight: (a: number) => number; + readonly globalstateidentifier_fromStateRootHash: (a: number) => number; + readonly globalstateidentifier_toJson: (a: number) => number; + readonly __wbg_signatureresponse_free: (a: number, b: number) => void; + readonly signatureresponse_is_cancelled: (a: number) => number; + readonly signatureresponse_get_signature_hex: (a: number) => Array; + readonly signatureresponse_get_signature: (a: number) => Array; + readonly sdk_transfer: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number) => number; + readonly __wbg_getaddressableentityresult_free: (a: number, b: number) => void; + readonly getaddressableentityresult_api_version: (a: number) => number; + readonly getaddressableentityresult_entity_result: (a: number) => number; + readonly getaddressableentityresult_merkle_proof: (a: number) => Array; + readonly getaddressableentityresult_toJson: (a: number) => number; + readonly __wbg_getentityoptions_free: (a: number, b: number) => void; + readonly __wbg_get_getentityoptions_entity_identifier: (a: number) => number; + readonly __wbg_set_getentityoptions_entity_identifier: (a: number, b: number) => void; + readonly __wbg_get_getentityoptions_entity_identifier_as_string: (a: number) => Array; + readonly __wbg_set_getentityoptions_entity_identifier_as_string: (a: number, b: number, c: number) => void; + readonly __wbg_get_getentityoptions_maybe_block_id_as_string: (a: number) => Array; + readonly __wbg_set_getentityoptions_maybe_block_id_as_string: (a: number, b: number, c: number) => void; + readonly __wbg_get_getentityoptions_maybe_block_identifier: (a: number) => number; + readonly __wbg_set_getentityoptions_maybe_block_identifier: (a: number, b: number) => void; + readonly __wbg_get_getentityoptions_rpc_address: (a: number) => Array; + readonly __wbg_set_getentityoptions_rpc_address: (a: number, b: number, c: number) => void; + readonly __wbg_get_getentityoptions_verbosity: (a: number) => number; + readonly __wbg_set_getentityoptions_verbosity: (a: number, b: number) => void; + readonly sdk_get_entity_options: (a: number, b: number) => Array; + readonly sdk_get_entity: (a: number, b: number) => number; + readonly sdk_state_get_entity: (a: number, b: number) => number; + readonly sdk_put_transaction: (a: number, b: number, c: number, d: number, e: number) => number; + readonly sdk_account_put_transaction: (a: number, b: number, c: number, d: number, e: number) => number; + readonly __wbg_querybalancedetailsresult_free: (a: number, b: number) => void; + readonly querybalancedetailsresult_api_version: (a: number) => number; + readonly querybalancedetailsresult_total_balance: (a: number) => number; + readonly querybalancedetailsresult_available_balance: (a: number) => number; + readonly querybalancedetailsresult_total_balance_proof: (a: number) => number; + readonly querybalancedetailsresult_holds: (a: number) => number; + readonly querybalancedetailsresult_toJson: (a: number) => number; + readonly __wbg_querybalancedetailsoptions_free: (a: number, b: number) => void; + readonly __wbg_get_querybalancedetailsoptions_purse_identifier: (a: number) => number; + readonly __wbg_set_querybalancedetailsoptions_purse_identifier: (a: number, b: number) => void; + readonly __wbg_get_querybalancedetailsoptions_global_state_identifier: (a: number) => number; + readonly __wbg_set_querybalancedetailsoptions_global_state_identifier: (a: number, b: number) => void; + readonly __wbg_get_querybalancedetailsoptions_state_root_hash: (a: number) => number; + readonly __wbg_set_querybalancedetailsoptions_state_root_hash: (a: number, b: number) => void; + readonly __wbg_get_querybalancedetailsoptions_rpc_address: (a: number) => Array; + readonly __wbg_set_querybalancedetailsoptions_rpc_address: (a: number, b: number, c: number) => void; + readonly __wbg_get_querybalancedetailsoptions_verbosity: (a: number) => number; + readonly __wbg_set_querybalancedetailsoptions_verbosity: (a: number, b: number) => void; + readonly sdk_query_balance_details_options: (a: number, b: number) => Array; + readonly sdk_query_balance_details: (a: number, b: number) => number; + readonly __wbg_queryglobalstateresult_free: (a: number, b: number) => void; + readonly queryglobalstateresult_api_version: (a: number) => number; + readonly queryglobalstateresult_block_header: (a: number) => number; + readonly queryglobalstateresult_stored_value: (a: number) => number; + readonly queryglobalstateresult_merkle_proof: (a: number) => Array; + readonly queryglobalstateresult_toJson: (a: number) => number; + readonly __wbg_queryglobalstateoptions_free: (a: number, b: number) => void; + readonly __wbg_get_queryglobalstateoptions_global_state_identifier: (a: number) => number; + readonly __wbg_set_queryglobalstateoptions_global_state_identifier: (a: number, b: number) => void; + readonly __wbg_get_queryglobalstateoptions_state_root_hash_as_string: (a: number) => Array; + readonly __wbg_set_queryglobalstateoptions_state_root_hash_as_string: (a: number, b: number, c: number) => void; + readonly __wbg_get_queryglobalstateoptions_state_root_hash: (a: number) => number; + readonly __wbg_set_queryglobalstateoptions_state_root_hash: (a: number, b: number) => void; + readonly __wbg_get_queryglobalstateoptions_maybe_block_id_as_string: (a: number) => Array; + readonly __wbg_set_queryglobalstateoptions_maybe_block_id_as_string: (a: number, b: number, c: number) => void; + readonly __wbg_get_queryglobalstateoptions_key_as_string: (a: number) => Array; + readonly __wbg_set_queryglobalstateoptions_key_as_string: (a: number, b: number, c: number) => void; + readonly __wbg_get_queryglobalstateoptions_key: (a: number) => number; + readonly __wbg_set_queryglobalstateoptions_key: (a: number, b: number) => void; + readonly __wbg_get_queryglobalstateoptions_path_as_string: (a: number) => Array; + readonly __wbg_set_queryglobalstateoptions_path_as_string: (a: number, b: number, c: number) => void; + readonly __wbg_get_queryglobalstateoptions_path: (a: number) => number; + readonly __wbg_set_queryglobalstateoptions_path: (a: number, b: number) => void; + readonly __wbg_get_queryglobalstateoptions_rpc_address: (a: number) => Array; + readonly __wbg_set_queryglobalstateoptions_rpc_address: (a: number, b: number, c: number) => void; + readonly __wbg_get_queryglobalstateoptions_verbosity: (a: number) => number; + readonly __wbg_set_queryglobalstateoptions_verbosity: (a: number, b: number) => void; + readonly sdk_query_global_state_options: (a: number, b: number) => Array; + readonly sdk_query_global_state: (a: number, b: number) => number; + readonly sdk_install: (a: number, b: number, c: number, d: number, e: number) => number; readonly sdk_install_deploy: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => number; - readonly __wbg_get_geterasummaryoptions_maybe_block_identifier: (a: number) => number; - readonly __wbg_set_geterasummaryoptions_maybe_block_identifier: (a: number, b: number) => void; + readonly __wbg_casperwallet_free: (a: number, b: number) => void; + readonly casperwallet_new: () => number; + readonly casperwallet_signDeploy: (a: number, b: number, c: number, d: number) => number; + readonly casperwallet_signTransaction: (a: number, b: number, c: number, d: number) => number; + readonly casperwallet_signDeployHash: (a: number, b: number, c: number, d: number, e: number) => number; + readonly casperwallet_signTransactionHash: (a: number, b: number, c: number, d: number, e: number) => number; + readonly casperwallet_signMessage: (a: number, b: number, c: number, d: number, e: number) => number; + readonly casperwallet_connect: (a: number) => number; + readonly casperwallet_disconnect: (a: number) => number; + readonly casperwallet_isConnected: (a: number) => number; + readonly casperwallet_getVersion: (a: number) => number; + readonly casperwallet_getActivePublicKey: (a: number) => number; + readonly casperwallet_switchAccount: (a: number) => number; + readonly __wbg_set_querybalancedetailsoptions_purse_identifier_as_string: (a: number, b: number, c: number) => void; + readonly __wbg_set_querybalancedetailsoptions_state_root_hash_as_string: (a: number, b: number, c: number) => void; + readonly __wbg_set_querybalancedetailsoptions_maybe_block_id_as_string: (a: number, b: number, c: number) => void; + readonly __wbg_get_querybalancedetailsoptions_purse_identifier_as_string: (a: number) => Array; + readonly __wbg_get_querybalancedetailsoptions_state_root_hash_as_string: (a: number) => Array; + readonly __wbg_get_querybalancedetailsoptions_maybe_block_id_as_string: (a: number) => Array; readonly __wbg_entityaddr_free: (a: number, b: number) => void; readonly entityaddr_fromFormattedStr: (a: number, b: number) => Array; readonly entityaddr_toFormattedString: (a: number) => Array; readonly entityaddr_toHexString: (a: number) => Array; readonly entityaddr_toJson: (a: number) => number; - readonly __wbg_contracthash_free: (a: number, b: number) => void; - readonly contracthash_new_js_alias: (a: number, b: number) => Array; - readonly contracthash_fromFormattedStr: (a: number, b: number) => Array; - readonly contracthash_toFormattedString: (a: number) => Array; - readonly contracthash_fromUint8Array: (a: number, b: number) => number; readonly __wbg_deploy_free: (a: number, b: number) => void; readonly deploy_new: (a: number) => number; readonly deploy_toJson: (a: number) => number; @@ -4804,12 +4582,19 @@ export interface InitOutput { readonly deploystrparams_set_session_account: (a: number, b: number, c: number) => void; readonly deploystrparams_gas_price_tolerance: (a: number) => Array; readonly deploystrparams_set_gas_price_tolerance: (a: number, b: number, c: number) => void; + readonly __wbg_contracthash_free: (a: number, b: number) => void; + readonly contracthash_new_js_alias: (a: number, b: number) => Array; + readonly contracthash_fromFormattedStr: (a: number, b: number) => Array; + readonly contracthash_toFormattedString: (a: number) => Array; + readonly contracthash_fromUint8Array: (a: number, b: number) => number; readonly __wbg_entityidentifier_free: (a: number, b: number) => void; readonly entityidentifier_fromFormattedStr: (a: number, b: number) => Array; readonly entityidentifier_fromPublicKey: (a: number) => number; readonly entityidentifier_fromAccountHash: (a: number) => number; readonly entityidentifier_fromEntityAddr: (a: number) => number; readonly entityidentifier_toJson: (a: number) => number; + readonly purseidentifier_fromURef: (a: number) => number; + readonly purseidentifier_toJson: (a: number) => number; readonly __wbg_key_free: (a: number, b: number) => void; readonly key_new: (a: number) => Array; readonly key_toJson: (a: number) => number; @@ -4845,8 +4630,9 @@ export interface InitOutput { readonly path_toJson: (a: number) => number; readonly path_toString: (a: number) => Array; readonly path_is_empty: (a: number) => number; - readonly purseidentifier_fromURef: (a: number) => number; - readonly purseidentifier_toJson: (a: number) => number; + readonly __wbg_peerentry_free: (a: number, b: number) => void; + readonly peerentry_node_id: (a: number) => Array; + readonly peerentry_address: (a: number) => Array; readonly __wbg_recordid_free: (a: number, b: number) => void; readonly recordid_new_js_alias: (a: number) => Array; readonly __wbg_transfertarget_free: (a: number, b: number) => void; @@ -4901,6 +4687,7 @@ export interface InitOutput { readonly transactionbuilderparams_set_maximum_delegation_amount: (a: number, b: number) => void; readonly transactionbuilderparams_is_install_upgrade: (a: number) => number; readonly transactionbuilderparams_set_is_install_upgrade: (a: number, b: number) => void; + readonly sdk_speculative_deploy: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => number; readonly __wbg_getblocktransfersresult_free: (a: number, b: number) => void; readonly getblocktransfersresult_api_version: (a: number) => number; readonly getblocktransfersresult_block_hash: (a: number) => number; @@ -4956,7 +4743,7 @@ export interface InitOutput { readonly __wbg_set_getspeculativeexecdeployoptions_verbosity: (a: number, b: number) => void; readonly sdk_get_speculative_exec_deploy_options: (a: number, b: number) => Array; readonly sdk_speculative_exec_deploy: (a: number, b: number) => number; - readonly sdk_transfer_transaction: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number) => number; + readonly sdk_call_entrypoint: (a: number, b: number, c: number, d: number, e: number) => number; readonly __wbg_sdk_free: (a: number, b: number) => void; readonly sdk_new: (a: number, b: number, c: number, d: number, e: number) => number; readonly sdk_getRPCAddress: (a: number, b: number, c: number) => Array; @@ -4977,115 +4764,187 @@ export interface InitOutput { readonly getTimestamp: () => number; readonly encodeLowerBlake2b: (a: number, b: number) => number; readonly makeDictionaryItemKey: (a: number, b: number, c: number) => Array; - readonly __wbg_casperwallet_free: (a: number, b: number) => void; - readonly casperwallet_new: () => number; - readonly casperwallet_signDeploy: (a: number, b: number, c: number, d: number) => number; - readonly casperwallet_signTransaction: (a: number, b: number, c: number, d: number) => number; - readonly casperwallet_signDeployHash: (a: number, b: number, c: number, d: number, e: number) => number; - readonly casperwallet_signTransactionHash: (a: number, b: number, c: number, d: number, e: number) => number; - readonly casperwallet_signMessage: (a: number, b: number, c: number, d: number, e: number) => number; - readonly casperwallet_connect: (a: number) => number; - readonly casperwallet_disconnect: (a: number) => number; - readonly casperwallet_isConnected: (a: number) => number; - readonly casperwallet_getVersion: (a: number) => number; - readonly casperwallet_getActivePublicKey: (a: number) => number; - readonly casperwallet_switchAccount: (a: number) => number; readonly purseidentifier_fromPublicKey: (a: number) => number; readonly purseidentifier_fromAccountHash: (a: number) => number; readonly __wbg_purseidentifier_free: (a: number, b: number) => void; readonly __wbg_querybalanceresult_free: (a: number, b: number) => void; readonly entityidentifier_new_js_alias: (a: number, b: number) => Array; - readonly __wbg_globalstateidentifier_free: (a: number, b: number) => void; - readonly globalstateidentifier_new: (a: number) => number; - readonly globalstateidentifier_fromBlockHash: (a: number) => number; - readonly globalstateidentifier_fromBlockHeight: (a: number) => number; - readonly globalstateidentifier_fromStateRootHash: (a: number) => number; - readonly globalstateidentifier_toJson: (a: number) => number; - readonly __wbg_signatureresponse_free: (a: number, b: number) => void; - readonly signatureresponse_is_cancelled: (a: number) => number; - readonly signatureresponse_get_signature_hex: (a: number) => Array; - readonly signatureresponse_get_signature: (a: number) => Array; - readonly sdk_transfer: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number) => number; - readonly __wbg_getaddressableentityresult_free: (a: number, b: number) => void; - readonly getaddressableentityresult_api_version: (a: number) => number; - readonly getaddressableentityresult_entity_result: (a: number) => number; - readonly getaddressableentityresult_merkle_proof: (a: number) => Array; - readonly getaddressableentityresult_toJson: (a: number) => number; - readonly __wbg_getentityoptions_free: (a: number, b: number) => void; - readonly __wbg_get_getentityoptions_entity_identifier: (a: number) => number; - readonly __wbg_set_getentityoptions_entity_identifier: (a: number, b: number) => void; - readonly __wbg_get_getentityoptions_entity_identifier_as_string: (a: number) => Array; - readonly __wbg_set_getentityoptions_entity_identifier_as_string: (a: number, b: number, c: number) => void; - readonly __wbg_get_getentityoptions_maybe_block_id_as_string: (a: number) => Array; - readonly __wbg_set_getentityoptions_maybe_block_id_as_string: (a: number, b: number, c: number) => void; - readonly __wbg_get_getentityoptions_maybe_block_identifier: (a: number) => number; - readonly __wbg_set_getentityoptions_maybe_block_identifier: (a: number, b: number) => void; - readonly __wbg_get_getentityoptions_rpc_address: (a: number) => Array; - readonly __wbg_set_getentityoptions_rpc_address: (a: number, b: number, c: number) => void; - readonly __wbg_get_getentityoptions_verbosity: (a: number) => number; - readonly __wbg_set_getentityoptions_verbosity: (a: number, b: number) => void; - readonly sdk_get_entity_options: (a: number, b: number) => Array; - readonly sdk_get_entity: (a: number, b: number) => number; - readonly sdk_state_get_entity: (a: number, b: number) => number; - readonly sdk_put_transaction: (a: number, b: number, c: number, d: number, e: number) => number; - readonly sdk_account_put_transaction: (a: number, b: number, c: number, d: number, e: number) => number; - readonly __wbg_querybalancedetailsresult_free: (a: number, b: number) => void; - readonly querybalancedetailsresult_api_version: (a: number) => number; - readonly querybalancedetailsresult_total_balance: (a: number) => number; - readonly querybalancedetailsresult_available_balance: (a: number) => number; - readonly querybalancedetailsresult_total_balance_proof: (a: number) => number; - readonly querybalancedetailsresult_holds: (a: number) => number; - readonly querybalancedetailsresult_toJson: (a: number) => number; - readonly __wbg_querybalancedetailsoptions_free: (a: number, b: number) => void; - readonly __wbg_get_querybalancedetailsoptions_purse_identifier: (a: number) => number; - readonly __wbg_set_querybalancedetailsoptions_purse_identifier: (a: number, b: number) => void; - readonly __wbg_get_querybalancedetailsoptions_global_state_identifier: (a: number) => number; - readonly __wbg_set_querybalancedetailsoptions_global_state_identifier: (a: number, b: number) => void; - readonly __wbg_get_querybalancedetailsoptions_state_root_hash: (a: number) => number; - readonly __wbg_set_querybalancedetailsoptions_state_root_hash: (a: number, b: number) => void; - readonly __wbg_get_querybalancedetailsoptions_rpc_address: (a: number) => Array; - readonly __wbg_set_querybalancedetailsoptions_rpc_address: (a: number, b: number, c: number) => void; - readonly __wbg_get_querybalancedetailsoptions_verbosity: (a: number) => number; - readonly __wbg_set_querybalancedetailsoptions_verbosity: (a: number, b: number) => void; - readonly sdk_query_balance_details_options: (a: number, b: number) => Array; - readonly sdk_query_balance_details: (a: number, b: number) => number; - readonly __wbg_queryglobalstateresult_free: (a: number, b: number) => void; - readonly queryglobalstateresult_api_version: (a: number) => number; - readonly queryglobalstateresult_block_header: (a: number) => number; - readonly queryglobalstateresult_stored_value: (a: number) => number; - readonly queryglobalstateresult_merkle_proof: (a: number) => Array; - readonly queryglobalstateresult_toJson: (a: number) => number; - readonly __wbg_queryglobalstateoptions_free: (a: number, b: number) => void; - readonly __wbg_get_queryglobalstateoptions_global_state_identifier: (a: number) => number; - readonly __wbg_set_queryglobalstateoptions_global_state_identifier: (a: number, b: number) => void; - readonly __wbg_get_queryglobalstateoptions_state_root_hash_as_string: (a: number) => Array; - readonly __wbg_set_queryglobalstateoptions_state_root_hash_as_string: (a: number, b: number, c: number) => void; - readonly __wbg_get_queryglobalstateoptions_state_root_hash: (a: number) => number; - readonly __wbg_set_queryglobalstateoptions_state_root_hash: (a: number, b: number) => void; - readonly __wbg_get_queryglobalstateoptions_maybe_block_id_as_string: (a: number) => Array; - readonly __wbg_set_queryglobalstateoptions_maybe_block_id_as_string: (a: number, b: number, c: number) => void; - readonly __wbg_get_queryglobalstateoptions_key_as_string: (a: number) => Array; - readonly __wbg_set_queryglobalstateoptions_key_as_string: (a: number, b: number, c: number) => void; - readonly __wbg_get_queryglobalstateoptions_key: (a: number) => number; - readonly __wbg_set_queryglobalstateoptions_key: (a: number, b: number) => void; - readonly __wbg_get_queryglobalstateoptions_path_as_string: (a: number) => Array; - readonly __wbg_set_queryglobalstateoptions_path_as_string: (a: number, b: number, c: number) => void; - readonly __wbg_get_queryglobalstateoptions_path: (a: number) => number; - readonly __wbg_set_queryglobalstateoptions_path: (a: number, b: number) => void; - readonly __wbg_get_queryglobalstateoptions_rpc_address: (a: number) => Array; - readonly __wbg_set_queryglobalstateoptions_rpc_address: (a: number, b: number, c: number) => void; - readonly __wbg_get_queryglobalstateoptions_verbosity: (a: number) => number; - readonly __wbg_set_queryglobalstateoptions_verbosity: (a: number, b: number) => void; - readonly sdk_query_global_state_options: (a: number, b: number) => Array; - readonly sdk_query_global_state: (a: number, b: number) => number; + readonly hashaddr_new: (a: number, b: number) => Array; + readonly hashaddr_toBytes: (a: number) => Array; + readonly hashaddr_toHexString: (a: number) => Array; + readonly __wbg_dictionaryitemstrparams_free: (a: number, b: number) => void; + readonly dictionaryitemstrparams_new: () => number; + readonly dictionaryitemstrparams_setAccountNamedKey: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void; + readonly dictionaryitemstrparams_setContractNamedKey: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void; + readonly dictionaryitemstrparams_setEntityNamedKey: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void; + readonly dictionaryitemstrparams_setUref: (a: number, b: number, c: number, d: number, e: number) => void; + readonly dictionaryitemstrparams_setDictionary: (a: number, b: number, c: number) => void; + readonly dictionaryitemstrparams_toJson: (a: number) => number; + readonly __wbg_accounthash_free: (a: number, b: number) => void; + readonly accounthash_new_js_alias: (a: number, b: number) => Array; + readonly accounthash_fromFormattedStr: (a: number, b: number) => Array; + readonly accounthash_fromPublicKey: (a: number) => number; + readonly accounthash_toFormattedString: (a: number) => Array; + readonly accounthash_toHexString: (a: number) => Array; + readonly accounthash_fromUint8Array: (a: number, b: number) => number; + readonly accounthash_toJson: (a: number) => number; + readonly packagehash_new_js_alias: (a: number, b: number) => Array; + readonly packagehash_fromFormattedStr: (a: number, b: number) => Array; + readonly packagehash_toFormattedString: (a: number) => Array; + readonly packagehash_fromUint8Array: (a: number, b: number) => number; + readonly __wbg_transactionhash_free: (a: number, b: number) => void; + readonly transactionhash_new_js_alias: (a: number, b: number) => Array; + readonly transactionhash_fromRaw: (a: number, b: number) => Array; + readonly transactionhash_digest: (a: number) => Array; + readonly transactionhash_toJson: (a: number) => number; + readonly transactionhash_toString: (a: number) => Array; + readonly __wbg_accountidentifier_free: (a: number, b: number) => void; + readonly accountidentifier_fromFormattedStr: (a: number, b: number) => Array; + readonly accountidentifier_fromPublicKey: (a: number) => number; + readonly accountidentifier_fromAccountHash: (a: number) => number; + readonly accountidentifier_toJson: (a: number) => number; + readonly sdk_speculative_transfer: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number) => number; + readonly __wbg_getstateroothashresult_free: (a: number, b: number) => void; + readonly getstateroothashresult_api_version: (a: number) => number; + readonly getstateroothashresult_state_root_hash: (a: number) => number; + readonly getstateroothashresult_state_root_hash_as_string: (a: number) => Array; + readonly getstateroothashresult_toString: (a: number) => Array; + readonly getstateroothashresult_toJson: (a: number) => number; + readonly __wbg_getstateroothashoptions_free: (a: number, b: number) => void; + readonly __wbg_get_getstateroothashoptions_maybe_block_id_as_string: (a: number) => Array; + readonly __wbg_set_getstateroothashoptions_maybe_block_id_as_string: (a: number, b: number, c: number) => void; + readonly __wbg_get_getstateroothashoptions_maybe_block_identifier: (a: number) => number; + readonly __wbg_set_getstateroothashoptions_maybe_block_identifier: (a: number, b: number) => void; + readonly __wbg_get_getstateroothashoptions_rpc_address: (a: number) => Array; + readonly __wbg_set_getstateroothashoptions_rpc_address: (a: number, b: number, c: number) => void; + readonly __wbg_get_getstateroothashoptions_verbosity: (a: number) => number; + readonly __wbg_set_getstateroothashoptions_verbosity: (a: number, b: number) => void; + readonly sdk_get_state_root_hash_options: (a: number, b: number) => Array; + readonly sdk_get_state_root_hash: (a: number, b: number) => number; + readonly sdk_chain_get_state_root_hash: (a: number, b: number) => number; + readonly sdk_put_deploy: (a: number, b: number, c: number, d: number, e: number) => number; + readonly sdk_account_put_deploy: (a: number, b: number, c: number, d: number, e: number) => number; readonly sdk_speculative_transaction: (a: number, b: number, c: number, d: number, e: number, f: number) => number; - readonly sdk_speculative_transfer_transaction: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number) => number; - readonly __wbg_set_querybalancedetailsoptions_purse_identifier_as_string: (a: number, b: number, c: number) => void; - readonly __wbg_set_querybalancedetailsoptions_state_root_hash_as_string: (a: number, b: number, c: number) => void; - readonly __wbg_set_querybalancedetailsoptions_maybe_block_id_as_string: (a: number, b: number, c: number) => void; - readonly __wbg_get_querybalancedetailsoptions_purse_identifier_as_string: (a: number) => Array; - readonly __wbg_get_querybalancedetailsoptions_state_root_hash_as_string: (a: number) => Array; - readonly __wbg_get_querybalancedetailsoptions_maybe_block_id_as_string: (a: number) => Array; + readonly sdk_watchDeploy: (a: number, b: number, c: number, d: number, e: number) => number; + readonly sdk_watchTransaction: (a: number, b: number, c: number, d: number, e: number) => number; + readonly sdk_waitDeploy: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => number; + readonly sdk_waitTransaction: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => number; + readonly __wbg_watcher_free: (a: number, b: number) => void; + readonly watcher_new: (a: number, b: number, c: number, d: number) => number; + readonly watcher_subscribe: (a: number, b: number, c: number) => Array; + readonly watcher_unsubscribe: (a: number, b: number, c: number) => void; + readonly watcher_start: (a: number) => number; + readonly watcher_stop: (a: number) => void; + readonly __wbg_subscription_free: (a: number, b: number) => void; + readonly __wbg_get_subscription_eventHandlerFn: (a: number) => number; + readonly __wbg_set_subscription_eventHandlerFn: (a: number, b: number) => void; + readonly subscription_new: (a: number, b: number, c: number) => number; + readonly __wbg_failure_free: (a: number, b: number) => void; + readonly __wbg_get_failure_cost: (a: number) => Array; + readonly __wbg_set_failure_cost: (a: number, b: number, c: number) => void; + readonly __wbg_get_failure_error_message: (a: number) => Array; + readonly __wbg_set_failure_error_message: (a: number, b: number, c: number) => void; + readonly __wbg_version2_free: (a: number, b: number) => void; + readonly __wbg_get_version2_error_message: (a: number) => Array; + readonly __wbg_set_version2_error_message: (a: number, b: number, c: number) => void; + readonly __wbg_executionresult_free: (a: number, b: number) => void; + readonly __wbg_get_executionresult_Success: (a: number) => number; + readonly __wbg_set_executionresult_Success: (a: number, b: number) => void; + readonly __wbg_get_executionresult_Failure: (a: number) => number; + readonly __wbg_set_executionresult_Failure: (a: number, b: number) => void; + readonly __wbg_hashstring_free: (a: number, b: number) => void; + readonly hashstring_Deploy: (a: number) => Array; + readonly hashstring_toString: (a: number) => Array; + readonly __wbg_messages_free: (a: number, b: number) => void; + readonly __wbg_set_messages_entity_hash: (a: number, b: number, c: number) => void; + readonly __wbg_get_messages_message: (a: number) => number; + readonly __wbg_set_messages_message: (a: number, b: number) => void; + readonly __wbg_get_messages_topic_name: (a: number) => Array; + readonly __wbg_set_messages_topic_name: (a: number, b: number, c: number) => void; + readonly __wbg_get_messages_topic_name_hash: (a: number) => Array; + readonly __wbg_set_messages_topic_name_hash: (a: number, b: number, c: number) => void; + readonly __wbg_get_messages_topic_index: (a: number) => number; + readonly __wbg_set_messages_topic_index: (a: number, b: number) => void; + readonly __wbg_get_messages_block_index: (a: number) => number; + readonly __wbg_set_messages_block_index: (a: number, b: number) => void; + readonly __wbg_transactionprocessed_free: (a: number, b: number) => void; + readonly __wbg_get_transactionprocessed_hash: (a: number) => number; + readonly __wbg_set_transactionprocessed_hash: (a: number, b: number) => void; + readonly __wbg_get_transactionprocessed_initiator_addr: (a: number) => number; + readonly __wbg_set_transactionprocessed_initiator_addr: (a: number, b: number) => void; + readonly __wbg_get_transactionprocessed_timestamp: (a: number) => Array; + readonly __wbg_set_transactionprocessed_timestamp: (a: number, b: number, c: number) => void; + readonly __wbg_set_transactionprocessed_ttl: (a: number, b: number, c: number) => void; + readonly __wbg_get_transactionprocessed_execution_result: (a: number) => number; + readonly __wbg_set_transactionprocessed_execution_result: (a: number, b: number) => void; + readonly __wbg_get_transactionprocessed_messages: (a: number) => Array; + readonly __wbg_set_transactionprocessed_messages: (a: number, b: number, c: number) => void; + readonly __wbg_body_free: (a: number, b: number) => void; + readonly __wbg_get_body_transaction_processed: (a: number) => number; + readonly __wbg_set_body_transaction_processed: (a: number, b: number) => void; + readonly body_get_deploy_processed: (a: number) => number; + readonly __wbg_eventparseresult_free: (a: number, b: number) => void; + readonly __wbg_get_eventparseresult_err: (a: number) => Array; + readonly __wbg_set_eventparseresult_err: (a: number, b: number, c: number) => void; + readonly __wbg_get_eventparseresult_body: (a: number) => number; + readonly __wbg_set_eventparseresult_body: (a: number, b: number) => void; + readonly __wbg_payment_free: (a: number, b: number) => void; + readonly __wbg_publickeystring_free: (a: number, b: number) => void; + readonly __wbg_message_free: (a: number, b: number) => void; + readonly __wbg_get_version2_initiator: (a: number) => number; + readonly accountidentifier_new: (a: number, b: number) => Array; + readonly __wbg_set_subscription_targetHash: (a: number, b: number, c: number) => void; + readonly __wbg_set_version2_limit: (a: number, b: number, c: number) => void; + readonly __wbg_set_payment_source: (a: number, b: number, c: number) => void; + readonly __wbg_set_hashstring_hash: (a: number, b: number, c: number) => void; + readonly __wbg_set_publickeystring_PublicKey: (a: number, b: number, c: number) => void; + readonly __wbg_set_message_String: (a: number, b: number, c: number) => void; + readonly __wbg_set_version2_consumed: (a: number, b: number, c: number) => void; + readonly __wbg_set_version2_cost: (a: number, b: number, c: number) => void; + readonly __wbg_set_transactionprocessed_block_hash: (a: number, b: number, c: number) => void; + readonly body_get_transaction_processed: (a: number) => number; + readonly hashstring_Version1: (a: number) => Array; + readonly __wbg_set_version2_initiator: (a: number, b: number) => void; + readonly __wbg_hashaddr_free: (a: number, b: number) => void; + readonly __wbg_packagehash_free: (a: number, b: number) => void; + readonly __wbg_get_subscription_targetHash: (a: number) => Array; + readonly __wbg_get_version2_limit: (a: number) => Array; + readonly __wbg_get_payment_source: (a: number) => Array; + readonly __wbg_get_hashstring_hash: (a: number) => Array; + readonly __wbg_get_publickeystring_PublicKey: (a: number) => Array; + readonly __wbg_get_message_String: (a: number) => Array; + readonly __wbg_get_messages_entity_hash: (a: number) => Array; + readonly __wbg_get_version2_cost: (a: number) => Array; + readonly __wbg_get_version2_consumed: (a: number) => Array; + readonly __wbg_get_transactionprocessed_ttl: (a: number) => Array; + readonly __wbg_get_transactionprocessed_block_hash: (a: number) => Array; + readonly __wbg_accessrights_free: (a: number, b: number) => void; + readonly accessrights_NONE: () => number; + readonly accessrights_READ: () => number; + readonly accessrights_WRITE: () => number; + readonly accessrights_ADD: () => number; + readonly accessrights_READ_ADD: () => number; + readonly accessrights_READ_WRITE: () => number; + readonly accessrights_ADD_WRITE: () => number; + readonly accessrights_READ_ADD_WRITE: () => number; + readonly accessrights_new: (a: number) => Array; + readonly accessrights_from_bits: (a: number, b: number, c: number) => number; + readonly accessrights_is_readable: (a: number) => number; + readonly accessrights_is_writeable: (a: number) => number; + readonly accessrights_is_addable: (a: number) => number; + readonly accessrights_is_none: (a: number) => number; + readonly __wbg_dictionaryaddr_free: (a: number, b: number) => void; + readonly dictionaryaddr_new: (a: number, b: number) => Array; + readonly transferaddr_new: (a: number, b: number) => Array; + readonly urefaddr_new: (a: number, b: number) => Array; + readonly __wbg_eraid_free: (a: number, b: number) => void; + readonly eraid_new: (a: number) => number; + readonly eraid_value: (a: number) => number; + readonly __wbg_blockidentifier_free: (a: number, b: number) => void; + readonly blockidentifier_new: (a: number) => number; + readonly blockidentifier_from_hash: (a: number) => number; + readonly blockidentifier_fromHeight: (a: number) => number; + readonly blockidentifier_toJson: (a: number) => number; readonly sdk_get_binary_latest_switch_block_header: (a: number, b: number, c: number) => number; readonly sdk_get_binary_latest_block_header: (a: number, b: number, c: number) => number; readonly sdk_get_binary_block_header_by_height: (a: number, b: number, c: number, d: number) => number; @@ -5120,8 +4979,149 @@ export interface InitOutput { readonly sdk_get_binary_try_accept_transaction: (a: number, b: number, c: number, d: number) => number; readonly sdk_get_binary_try_speculative_execution: (a: number, b: number, c: number, d: number) => number; readonly sdk_get_binary_get_protocol_version: (a: number, b: number, c: number) => number; - readonly sdk_speculative_deploy: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => number; - readonly sdk_call_entrypoint: (a: number, b: number, c: number, d: number, e: number) => number; + readonly __wbg_getauctioninforesult_free: (a: number, b: number) => void; + readonly getauctioninforesult_api_version: (a: number) => number; + readonly getauctioninforesult_auction_state: (a: number) => number; + readonly getauctioninforesult_toJson: (a: number) => number; + readonly __wbg_getauctioninfooptions_free: (a: number, b: number) => void; + readonly __wbg_get_getauctioninfooptions_maybe_block_id_as_string: (a: number) => Array; + readonly __wbg_set_getauctioninfooptions_maybe_block_id_as_string: (a: number, b: number, c: number) => void; + readonly __wbg_get_getauctioninfooptions_maybe_block_identifier: (a: number) => number; + readonly __wbg_set_getauctioninfooptions_maybe_block_identifier: (a: number, b: number) => void; + readonly __wbg_get_getauctioninfooptions_rpc_address: (a: number) => Array; + readonly __wbg_set_getauctioninfooptions_rpc_address: (a: number, b: number, c: number) => void; + readonly __wbg_get_getauctioninfooptions_verbosity: (a: number) => number; + readonly __wbg_set_getauctioninfooptions_verbosity: (a: number, b: number) => void; + readonly sdk_get_auction_info_options: (a: number, b: number) => Array; + readonly sdk_get_auction_info: (a: number, b: number) => number; + readonly sdk_state_get_auction_info_js_alias: (a: number, b: number) => number; + readonly __wbg_getblockresult_free: (a: number, b: number) => void; + readonly getblockresult_api_version: (a: number) => number; + readonly getblockresult_block: (a: number) => number; + readonly getblockresult_toJson: (a: number) => number; + readonly sdk_get_block_options: (a: number, b: number) => Array; + readonly sdk_get_block: (a: number, b: number) => number; + readonly sdk_chain_get_block: (a: number, b: number) => number; + readonly __wbg_getchainspecresult_free: (a: number, b: number) => void; + readonly getchainspecresult_api_version: (a: number) => number; + readonly getchainspecresult_chainspec_bytes: (a: number) => number; + readonly getchainspecresult_toJson: (a: number) => number; + readonly sdk_get_chainspec: (a: number, b: number, c: number, d: number) => number; + readonly sdk_info_get_chainspec: (a: number, b: number, c: number, d: number) => number; + readonly __wbg_getnodestatusresult_free: (a: number, b: number) => void; + readonly getnodestatusresult_api_version: (a: number) => number; + readonly getnodestatusresult_chainspec_name: (a: number) => Array; + readonly getnodestatusresult_starting_state_root_hash: (a: number) => number; + readonly getnodestatusresult_peers: (a: number) => number; + readonly getnodestatusresult_last_added_block_info: (a: number) => number; + readonly getnodestatusresult_our_public_signing_key: (a: number) => number; + readonly getnodestatusresult_round_length: (a: number) => number; + readonly getnodestatusresult_next_upgrade: (a: number) => number; + readonly getnodestatusresult_build_version: (a: number) => Array; + readonly getnodestatusresult_uptime: (a: number) => number; + readonly getnodestatusresult_reactor_state: (a: number) => number; + readonly getnodestatusresult_last_progress: (a: number) => number; + readonly getnodestatusresult_available_block_range: (a: number) => number; + readonly getnodestatusresult_block_sync: (a: number) => number; + readonly getnodestatusresult_toJson: (a: number) => number; + readonly sdk_get_node_status: (a: number, b: number, c: number, d: number) => number; + readonly sdk_info_get_status: (a: number, b: number, c: number, d: number) => number; + readonly __wbg_getpeersresult_free: (a: number, b: number) => void; + readonly getpeersresult_api_version: (a: number) => number; + readonly getpeersresult_peers: (a: number) => number; + readonly getpeersresult_toJson: (a: number) => number; + readonly sdk_get_peers: (a: number, b: number, c: number, d: number) => number; + readonly sdk_info_get_peers: (a: number, b: number, c: number, d: number) => number; + readonly __wbg_getvalidatorchangesresult_free: (a: number, b: number) => void; + readonly getvalidatorchangesresult_api_version: (a: number) => number; + readonly getvalidatorchangesresult_changes: (a: number) => number; + readonly getvalidatorchangesresult_toJson: (a: number) => number; + readonly sdk_get_validator_changes: (a: number, b: number, c: number, d: number) => number; + readonly sdk_info_get_validator_change: (a: number, b: number, c: number, d: number) => number; + readonly __wbg_listrpcsresult_free: (a: number, b: number) => void; + readonly listrpcsresult_api_version: (a: number) => number; + readonly listrpcsresult_name: (a: number) => Array; + readonly listrpcsresult_schema: (a: number) => number; + readonly listrpcsresult_toJson: (a: number) => number; + readonly sdk_list_rpcs: (a: number, b: number, c: number, d: number) => number; + readonly sdk_speculative_transfer_transaction: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number) => number; + readonly sdk_make_deploy: (a: number, b: number, c: number, d: number) => Array; + readonly sdk_sign_deploy: (a: number, b: number, c: number, d: number) => number; + readonly sdk_make_transaction: (a: number, b: number, c: number) => Array; + readonly sdk_sign_transaction: (a: number, b: number, c: number, d: number) => number; + readonly sdk_call_entrypoint_deploy: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => number; + readonly __wbg_querycontractkeyoptions_free: (a: number, b: number) => void; + readonly __wbg_get_querycontractkeyoptions_entity_identifier: (a: number) => number; + readonly __wbg_set_querycontractkeyoptions_entity_identifier: (a: number, b: number) => void; + readonly __wbg_get_querycontractkeyoptions_entity_identifier_as_string: (a: number) => Array; + readonly __wbg_set_querycontractkeyoptions_entity_identifier_as_string: (a: number, b: number, c: number) => void; + readonly __wbg_get_querycontractkeyoptions_maybe_block_id_as_string: (a: number) => Array; + readonly __wbg_set_querycontractkeyoptions_maybe_block_id_as_string: (a: number, b: number, c: number) => void; + readonly __wbg_get_querycontractkeyoptions_path_as_string: (a: number) => Array; + readonly __wbg_set_querycontractkeyoptions_path_as_string: (a: number, b: number, c: number) => void; + readonly __wbg_get_querycontractkeyoptions_path: (a: number) => number; + readonly __wbg_set_querycontractkeyoptions_path: (a: number, b: number) => void; + readonly __wbg_get_querycontractkeyoptions_rpc_address: (a: number) => Array; + readonly __wbg_set_querycontractkeyoptions_rpc_address: (a: number, b: number, c: number) => void; + readonly __wbg_get_querycontractkeyoptions_verbosity: (a: number) => number; + readonly __wbg_set_querycontractkeyoptions_verbosity: (a: number, b: number) => void; + readonly sdk_query_contract_key_options: (a: number, b: number) => Array; + readonly sdk_query_contract_key: (a: number, b: number) => number; + readonly __wbg_getblockoptions_free: (a: number, b: number) => void; + readonly __wbg_set_getblockoptions_verbosity: (a: number, b: number) => void; + readonly __wbg_get_getblockoptions_maybe_block_identifier: (a: number) => number; + readonly __wbg_get_querycontractkeyoptions_maybe_block_identifier: (a: number) => number; + readonly __wbg_set_getblockoptions_maybe_block_id_as_string: (a: number, b: number, c: number) => void; + readonly __wbg_set_getblockoptions_rpc_address: (a: number, b: number, c: number) => void; + readonly __wbg_get_getblockoptions_maybe_block_id_as_string: (a: number) => Array; + readonly __wbg_get_getblockoptions_rpc_address: (a: number) => Array; + readonly __wbg_get_getblockoptions_verbosity: (a: number) => number; + readonly __wbg_set_getblockoptions_maybe_block_identifier: (a: number, b: number) => void; + readonly __wbg_set_querycontractkeyoptions_maybe_block_identifier: (a: number, b: number) => void; + readonly __wbg_transferaddr_free: (a: number, b: number) => void; + readonly __wbg_urefaddr_free: (a: number, b: number) => void; + readonly __wbg_bytes_free: (a: number, b: number) => void; + readonly bytes_new: () => number; + readonly bytes_fromUint8Array: (a: number) => number; + readonly __wbg_argssimple_free: (a: number, b: number) => void; + readonly __wbg_getaccountresult_free: (a: number, b: number) => void; + readonly getaccountresult_api_version: (a: number) => number; + readonly getaccountresult_account: (a: number) => number; + readonly getaccountresult_merkle_proof: (a: number) => Array; + readonly getaccountresult_toJson: (a: number) => number; + readonly __wbg_getaccountoptions_free: (a: number, b: number) => void; + readonly __wbg_get_getaccountoptions_account_identifier: (a: number) => number; + readonly __wbg_set_getaccountoptions_account_identifier: (a: number, b: number) => void; + readonly __wbg_get_getaccountoptions_account_identifier_as_string: (a: number) => Array; + readonly __wbg_set_getaccountoptions_account_identifier_as_string: (a: number, b: number, c: number) => void; + readonly __wbg_get_getaccountoptions_maybe_block_id_as_string: (a: number) => Array; + readonly __wbg_set_getaccountoptions_maybe_block_id_as_string: (a: number, b: number, c: number) => void; + readonly __wbg_get_getaccountoptions_maybe_block_identifier: (a: number) => number; + readonly __wbg_set_getaccountoptions_maybe_block_identifier: (a: number, b: number) => void; + readonly __wbg_get_getaccountoptions_rpc_address: (a: number) => Array; + readonly __wbg_set_getaccountoptions_rpc_address: (a: number, b: number, c: number) => void; + readonly __wbg_get_getaccountoptions_verbosity: (a: number) => number; + readonly __wbg_set_getaccountoptions_verbosity: (a: number, b: number) => void; + readonly sdk_get_account_options: (a: number, b: number) => Array; + readonly sdk_get_account: (a: number, b: number) => number; + readonly sdk_state_get_account_info: (a: number, b: number) => number; + readonly __wbg_geterasummaryresult_free: (a: number, b: number) => void; + readonly geterasummaryresult_api_version: (a: number) => number; + readonly geterasummaryresult_era_summary: (a: number) => number; + readonly geterasummaryresult_toJson: (a: number) => number; + readonly __wbg_geterasummaryoptions_free: (a: number, b: number) => void; + readonly __wbg_get_geterasummaryoptions_maybe_block_id_as_string: (a: number) => Array; + readonly __wbg_set_geterasummaryoptions_maybe_block_id_as_string: (a: number, b: number, c: number) => void; + readonly __wbg_get_geterasummaryoptions_rpc_address: (a: number) => Array; + readonly __wbg_set_geterasummaryoptions_rpc_address: (a: number, b: number, c: number) => void; + readonly __wbg_get_geterasummaryoptions_verbosity: (a: number) => number; + readonly __wbg_set_geterasummaryoptions_verbosity: (a: number, b: number) => void; + readonly sdk_get_era_summary_options: (a: number, b: number) => Array; + readonly sdk_get_era_summary: (a: number, b: number) => number; + readonly sdk_chain_get_era_summary: (a: number, b: number) => number; + readonly sdk_transfer_transaction: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number) => number; + readonly __wbg_get_geterasummaryoptions_maybe_block_identifier: (a: number) => number; + readonly __wbg_set_geterasummaryoptions_maybe_block_identifier: (a: number, b: number) => void; readonly __wbg_intounderlyingbytesource_free: (a: number, b: number) => void; readonly intounderlyingbytesource_type: (a: number) => number; readonly intounderlyingbytesource_autoAllocateChunkSize: (a: number) => number; @@ -5139,16 +5139,16 @@ export interface InitOutput { readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number; readonly __wbindgen_export_2: WebAssembly.Table; readonly __wbindgen_export_3: WebAssembly.Table; - readonly closure820_externref_shim: (a: number, b: number, c: number) => void; - readonly _dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hbccf68cb4005f2b4: (a: number, b: number) => void; - readonly closure1141_externref_shim: (a: number, b: number, c: number) => void; - readonly closure1155_externref_shim: (a: number, b: number, c: number) => void; + readonly closure937_externref_shim: (a: number, b: number, c: number) => void; + readonly _dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h6b87dddcaa71d61d: (a: number, b: number) => void; + readonly closure1139_externref_shim: (a: number, b: number, c: number) => void; + readonly closure1153_externref_shim: (a: number, b: number, c: number) => void; readonly __wbindgen_free: (a: number, b: number, c: number) => void; readonly __externref_table_dealloc: (a: number) => void; readonly __externref_table_alloc: () => number; - readonly __externref_drop_slice: (a: number, b: number) => void; readonly __wbindgen_exn_store: (a: number) => void; - readonly closure1703_externref_shim: (a: number, b: number, c: number, d: number) => void; + readonly __externref_drop_slice: (a: number, b: number) => void; + readonly closure1701_externref_shim: (a: number, b: number, c: number, d: number) => void; readonly __wbindgen_start: () => void; } diff --git a/pkg/casper_rust_wasm_sdk.js b/pkg/casper_rust_wasm_sdk.js index 4e2175ddf..1888d2f1a 100644 --- a/pkg/casper_rust_wasm_sdk.js +++ b/pkg/casper_rust_wasm_sdk.js @@ -183,19 +183,19 @@ function makeMutClosure(arg0, arg1, dtor, f) { return real; } function __wbg_adapter_38(arg0, arg1, arg2) { - wasm.closure820_externref_shim(arg0, arg1, arg2); + wasm.closure937_externref_shim(arg0, arg1, arg2); } -function __wbg_adapter_45(arg0, arg1) { - wasm._dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hbccf68cb4005f2b4(arg0, arg1); +function __wbg_adapter_43(arg0, arg1) { + wasm._dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h6b87dddcaa71d61d(arg0, arg1); } function __wbg_adapter_48(arg0, arg1, arg2) { - wasm.closure1141_externref_shim(arg0, arg1, arg2); + wasm.closure1139_externref_shim(arg0, arg1, arg2); } function __wbg_adapter_51(arg0, arg1, arg2) { - wasm.closure1155_externref_shim(arg0, arg1, arg2); + wasm.closure1153_externref_shim(arg0, arg1, arg2); } function _assertClass(instance, klass) { @@ -211,6 +211,12 @@ function takeFromExternrefTable0(idx) { return value; } +function addToExternrefTable0(obj) { + const idx = wasm.__externref_table_alloc(); + wasm.__wbindgen_export_2.set(idx, obj); + return idx; +} + function passArray8ToWasm0(arg, malloc) { const ptr = malloc(arg.length * 1, 1) >>> 0; getUint8ArrayMemory0().set(arg, ptr / 1); @@ -218,17 +224,6 @@ function passArray8ToWasm0(arg, malloc) { return ptr; } -function getArrayU8FromWasm0(ptr, len) { - ptr = ptr >>> 0; - return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len); -} - -function addToExternrefTable0(obj) { - const idx = wasm.__externref_table_alloc(); - wasm.__wbindgen_export_2.set(idx, obj); - return idx; -} - function passArrayJsValueToWasm0(array, malloc) { const ptr = malloc(array.length * 4, 4) >>> 0; const mem = getDataViewMemory0(); @@ -239,17 +234,6 @@ function passArrayJsValueToWasm0(array, malloc) { return ptr; } -function getArrayJsValueFromWasm0(ptr, len) { - ptr = ptr >>> 0; - const mem = getDataViewMemory0(); - const result = []; - for (let i = ptr; i < ptr + 4 * len; i += 4) { - result.push(wasm.__wbindgen_export_2.get(mem.getUint32(i, true))); - } - wasm.__externref_drop_slice(ptr, len); - return result; -} - function notDefined(what) { return () => { throw new Error(`${what} is not defined`); }; } function handleError(f, args) { @@ -260,6 +244,11 @@ function handleError(f, args) { wasm.__wbindgen_exn_store(idx); } } + +function getArrayU8FromWasm0(ptr, len) { + ptr = ptr >>> 0; + return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len); +} /** * Converts a hexadecimal string to a regular string. * @@ -557,8 +546,18 @@ export function makeDictionaryItemKey(key, value) { } } +function getArrayJsValueFromWasm0(ptr, len) { + ptr = ptr >>> 0; + const mem = getDataViewMemory0(); + const result = []; + for (let i = ptr; i < ptr + 4 * len; i += 4) { + result.push(wasm.__wbindgen_export_2.get(mem.getUint32(i, true))); + } + wasm.__externref_drop_slice(ptr, len); + return result; +} function __wbg_adapter_1203(arg0, arg1, arg2, arg3) { - wasm.closure1703_externref_shim(arg0, arg1, arg2, arg3); + wasm.closure1701_externref_shim(arg0, arg1, arg2, arg3); } export const PricingMode = Object.freeze({ Fixed:0,"0":"Fixed",Classic:1,"1":"Classic",Reserved:2,"2":"Reserved", }); @@ -6279,826 +6278,751 @@ export class SDK { return ret; } /** + * JavaScript function for deploying with deserialized parameters. + * + * # Arguments + * + * * `deploy_params` - Deploy parameters. + * * `session_params` - Session parameters. + * * `payment_params` - Payment parameters. + * * `verbosity` - An optional verbosity level. + * * `rpc_address` - An optional rpc address. + * + * # Returns + * + * A result containing PutDeployResult or a JsError. + * @param {DeployStrParams} deploy_params + * @param {SessionStrParams} session_params + * @param {PaymentStrParams} payment_params + * @param {Verbosity | undefined} [verbosity] + * @param {string | undefined} [rpc_address] + * @returns {Promise} + */ + deploy(deploy_params, session_params, payment_params, verbosity, rpc_address) { + _assertClass(deploy_params, DeployStrParams); + var ptr0 = deploy_params.__destroy_into_raw(); + _assertClass(session_params, SessionStrParams); + var ptr1 = session_params.__destroy_into_raw(); + _assertClass(payment_params, PaymentStrParams); + var ptr2 = payment_params.__destroy_into_raw(); + var ptr3 = isLikeNone(rpc_address) ? 0 : passStringToWasm0(rpc_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + var len3 = WASM_VECTOR_LEN; + const ret = wasm.sdk_deploy(this.__wbg_ptr, ptr0, ptr1, ptr2, isLikeNone(verbosity) ? 3 : verbosity, ptr3, len3); + return ret; + } + /** + * Parses deploy options from a JsValue. + * + * # Arguments + * + * * `options` - A JsValue containing deploy options to be parsed. + * + * # Returns + * + * Parsed deploy options as a `GetDeployOptions` struct. * @param {any} options - * @returns {getEraInfoOptions} + * @returns {getDeployOptions} */ - get_era_info_options(options) { - const ret = wasm.sdk_get_era_info_options(this.__wbg_ptr, options); + get_deploy_options(options) { + const ret = wasm.sdk_get_deploy_options(this.__wbg_ptr, options); if (ret[2]) { throw takeFromExternrefTable0(ret[1]); } - return getEraInfoOptions.__wrap(ret[0]); + return getDeployOptions.__wrap(ret[0]); } /** - * @param {getEraInfoOptions | undefined} [options] - * @returns {Promise} + * Retrieves deploy information using the provided options. + * + * # Arguments + * + * * `options` - An optional `GetDeployOptions` struct containing retrieval options. + * + * # Returns + * + * A `Result` containing either a `GetDeployResult` or an error. + * @param {getDeployOptions | undefined} [options] + * @returns {Promise} */ - get_era_info(options) { + get_deploy(options) { let ptr0 = 0; if (!isLikeNone(options)) { - _assertClass(options, getEraInfoOptions); + _assertClass(options, getDeployOptions); ptr0 = options.__destroy_into_raw(); } - const ret = wasm.sdk_get_era_info(this.__wbg_ptr, ptr0); + const ret = wasm.sdk_get_deploy(this.__wbg_ptr, ptr0); return ret; } /** - * @param {getEraInfoOptions | undefined} [options] - * @returns {Promise} + * Retrieves deploy information using the provided options, alias for `get_deploy`. + * @param {getDeployOptions | undefined} [options] + * @returns {Promise} */ - chain_get_era_info_by_switch_block(options) { + info_get_deploy(options) { let ptr0 = 0; if (!isLikeNone(options)) { - _assertClass(options, getEraInfoOptions); + _assertClass(options, getDeployOptions); ptr0 = options.__destroy_into_raw(); } - const ret = wasm.sdk_chain_get_era_info_by_switch_block(this.__wbg_ptr, ptr0); + const ret = wasm.sdk_info_get_deploy(this.__wbg_ptr, ptr0); return ret; } /** - * Parses auction info options from a JsValue. + * Parses transaction options from a JsValue. * * # Arguments * - * * `options` - A JsValue containing auction info options to be parsed. + * * `options` - A JsValue containing transaction options to be parsed. * * # Returns * - * Result containing parsed auction info options as a `GetAuctionInfoOptions` struct, - * or a `JsError` if deserialization fails. + * Parsed transaction options as a `GetTransactionOptions` struct. * @param {any} options - * @returns {getAuctionInfoOptions} + * @returns {getTransactionOptions} */ - get_auction_info_options(options) { - const ret = wasm.sdk_get_auction_info_options(this.__wbg_ptr, options); + get_transaction_options(options) { + const ret = wasm.sdk_get_transaction_options(this.__wbg_ptr, options); if (ret[2]) { throw takeFromExternrefTable0(ret[1]); } - return getAuctionInfoOptions.__wrap(ret[0]); + return getTransactionOptions.__wrap(ret[0]); } /** - * Retrieves auction information using the provided options. + * Retrieves transaction information using the provided options. * * # Arguments * - * * `options` - An optional `GetAuctionInfoOptions` struct containing retrieval options. + * * `options` - An optional `GetTransactionOptions` struct containing retrieval options. * * # Returns * - * A `Result` containing either a `GetAuctionInfoResult` or a `JsError` in case of an error. - * - * # Errors - * - * Returns a `JsError` if there is an error during the retrieval process. - * @param {getAuctionInfoOptions | undefined} [options] - * @returns {Promise} + * A `Result` containing either a `GetTransactionResult` or an error. + * @param {getTransactionOptions | undefined} [options] + * @returns {Promise} */ - get_auction_info(options) { + get_transaction(options) { let ptr0 = 0; if (!isLikeNone(options)) { - _assertClass(options, getAuctionInfoOptions); + _assertClass(options, getTransactionOptions); ptr0 = options.__destroy_into_raw(); } - const ret = wasm.sdk_get_auction_info(this.__wbg_ptr, ptr0); + const ret = wasm.sdk_get_transaction(this.__wbg_ptr, ptr0); return ret; } /** - * @param {getAuctionInfoOptions | undefined} [options] - * @returns {Promise} + * Retrieves transaction information using the provided options, alias for `get_transaction`. + * @param {getTransactionOptions | undefined} [options] + * @returns {Promise} */ - state_get_auction_info_js_alias(options) { + info_get_transaction(options) { let ptr0 = 0; if (!isLikeNone(options)) { - _assertClass(options, getAuctionInfoOptions); + _assertClass(options, getTransactionOptions); ptr0 = options.__destroy_into_raw(); } - const ret = wasm.sdk_state_get_auction_info_js_alias(this.__wbg_ptr, ptr0); + const ret = wasm.sdk_info_get_transaction(this.__wbg_ptr, ptr0); return ret; } /** - * Parses block options from a JsValue. - * - * # Arguments - * - * * `options` - A JsValue containing block options to be parsed. - * - * # Returns - * - * Parsed block options as a `GetBlockOptions` struct. + * Get options for speculative execution from a JavaScript value. * @param {any} options - * @returns {getBlockOptions} + * @returns {getSpeculativeExecTxnOptions} */ - get_block_options(options) { - const ret = wasm.sdk_get_block_options(this.__wbg_ptr, options); + get_speculative_exec_options(options) { + const ret = wasm.sdk_get_speculative_exec_options(this.__wbg_ptr, options); if (ret[2]) { throw takeFromExternrefTable0(ret[1]); } - return getBlockOptions.__wrap(ret[0]); + return getSpeculativeExecTxnOptions.__wrap(ret[0]); } /** - * Retrieves block information using the provided options. + * JS function for speculative execution. * * # Arguments * - * * `options` - An optional `GetBlockOptions` struct containing retrieval options. + * * `options` - The options for speculative execution. * * # Returns * - * A `Result` containing either a `GetBlockResult` or a `JsError` in case of an error. - * - * # Errors - * - * Returns a `JsError` if there is an error during the retrieval process. - * @param {getBlockOptions | undefined} [options] - * @returns {Promise} + * A `Result` containing the result of the speculative execution or a `JsError` in case of an error. + * @param {getSpeculativeExecTxnOptions | undefined} [options] + * @returns {Promise} */ - get_block(options) { + speculative_exec(options) { let ptr0 = 0; if (!isLikeNone(options)) { - _assertClass(options, getBlockOptions); + _assertClass(options, getSpeculativeExecTxnOptions); ptr0 = options.__destroy_into_raw(); } - const ret = wasm.sdk_get_block(this.__wbg_ptr, ptr0); + const ret = wasm.sdk_speculative_exec(this.__wbg_ptr, ptr0); return ret; } /** - * JavaScript Alias for the `get_block`. + * JS function for `make_transfer`. * * # Arguments * - * * `options` - An optional `GetBlockOptions` struct containing retrieval options. + * * `amount` - The transfer amount. + * * `target_account` - The target account. + * * `transfer_id` - Optional transfer identifier. + * * `deploy_params` - The deploy parameters. + * * `payment_params` - The payment parameters. * * # Returns * - * A `Result` containing either a `GetBlockResult` or a `JsError` in case of an error. - * - * # Errors - * - * Returns a `JsError` if there is an error during the retrieval process. - * @param {getBlockOptions | undefined} [options] - * @returns {Promise} + * A `Result` containing the created `Deploy` or a `JsError` in case of an error. + * @param {string} amount + * @param {string} target_account + * @param {string | undefined} transfer_id + * @param {DeployStrParams} deploy_params + * @param {PaymentStrParams} payment_params + * @returns {Deploy} */ - chain_get_block(options) { - let ptr0 = 0; - if (!isLikeNone(options)) { - _assertClass(options, getBlockOptions); - ptr0 = options.__destroy_into_raw(); + make_transfer(amount, target_account, transfer_id, deploy_params, payment_params) { + const ptr0 = passStringToWasm0(amount, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + const len0 = WASM_VECTOR_LEN; + const ptr1 = passStringToWasm0(target_account, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + const len1 = WASM_VECTOR_LEN; + var ptr2 = isLikeNone(transfer_id) ? 0 : passStringToWasm0(transfer_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + var len2 = WASM_VECTOR_LEN; + _assertClass(deploy_params, DeployStrParams); + var ptr3 = deploy_params.__destroy_into_raw(); + _assertClass(payment_params, PaymentStrParams); + var ptr4 = payment_params.__destroy_into_raw(); + const ret = wasm.sdk_make_transfer(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, ptr4); + if (ret[2]) { + throw takeFromExternrefTable0(ret[1]); } - const ret = wasm.sdk_chain_get_block(this.__wbg_ptr, ptr0); - return ret; + return Deploy.__wrap(ret[0]); } /** - * Asynchronously retrieves the chainspec. + * JS function for `make_transfer_transaction`. * * # Arguments * - * * `verbosity` - An optional `Verbosity` parameter. - * * `rpc_address` - An optional rpc address as a string. - * + * * `maybe_source` - Optional transfer source uref. + * * `amount` - The transfer amount. + * * `target` - The target account. + * * `transaction_params` - The transaction parameters. + * * `maybe_id` - Optional transfer identifier. + * * # Returns * - * A `Result` containing either a `GetChainspecResult` or a `JsError` in case of an error. - * @param {Verbosity | undefined} [verbosity] - * @param {string | undefined} [rpc_address] - * @returns {Promise} + * A `Result` containing the created `Transaction` or a `JsError` in case of an error. + * @param {URef | undefined} maybe_source + * @param {string} target + * @param {string} amount + * @param {TransactionStrParams} transaction_params + * @param {string | undefined} [maybe_id] + * @returns {Transaction} */ - get_chainspec(verbosity, rpc_address) { - var ptr0 = isLikeNone(rpc_address) ? 0 : passStringToWasm0(rpc_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - var len0 = WASM_VECTOR_LEN; - const ret = wasm.sdk_get_chainspec(this.__wbg_ptr, isLikeNone(verbosity) ? 3 : verbosity, ptr0, len0); + make_transfer_transaction(maybe_source, target, amount, transaction_params, maybe_id) { + let ptr0 = 0; + if (!isLikeNone(maybe_source)) { + _assertClass(maybe_source, URef); + ptr0 = maybe_source.__destroy_into_raw(); + } + const ptr1 = passStringToWasm0(target, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + const len1 = WASM_VECTOR_LEN; + const ptr2 = passStringToWasm0(amount, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + const len2 = WASM_VECTOR_LEN; + _assertClass(transaction_params, TransactionStrParams); + var ptr3 = transaction_params.__destroy_into_raw(); + var ptr4 = isLikeNone(maybe_id) ? 0 : passStringToWasm0(maybe_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + var len4 = WASM_VECTOR_LEN; + const ret = wasm.sdk_make_transfer_transaction(this.__wbg_ptr, ptr0, ptr1, len1, ptr2, len2, ptr3, ptr4, len4); + if (ret[2]) { + throw takeFromExternrefTable0(ret[1]); + } + return Transaction.__wrap(ret[0]); + } + /** + * @param {any} options + * @returns {getEraInfoOptions} + */ + get_era_info_options(options) { + const ret = wasm.sdk_get_era_info_options(this.__wbg_ptr, options); + if (ret[2]) { + throw takeFromExternrefTable0(ret[1]); + } + return getEraInfoOptions.__wrap(ret[0]); + } + /** + * @param {getEraInfoOptions | undefined} [options] + * @returns {Promise} + */ + get_era_info(options) { + let ptr0 = 0; + if (!isLikeNone(options)) { + _assertClass(options, getEraInfoOptions); + ptr0 = options.__destroy_into_raw(); + } + const ret = wasm.sdk_get_era_info(this.__wbg_ptr, ptr0); return ret; } /** - * @param {Verbosity | undefined} [verbosity] - * @param {string | undefined} [rpc_address] - * @returns {Promise} + * @param {getEraInfoOptions | undefined} [options] + * @returns {Promise} */ - info_get_chainspec(verbosity, rpc_address) { - var ptr0 = isLikeNone(rpc_address) ? 0 : passStringToWasm0(rpc_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - var len0 = WASM_VECTOR_LEN; - const ret = wasm.sdk_info_get_chainspec(this.__wbg_ptr, isLikeNone(verbosity) ? 3 : verbosity, ptr0, len0); + chain_get_era_info_by_switch_block(options) { + let ptr0 = 0; + if (!isLikeNone(options)) { + _assertClass(options, getEraInfoOptions); + ptr0 = options.__destroy_into_raw(); + } + const ret = wasm.sdk_chain_get_era_info_by_switch_block(this.__wbg_ptr, ptr0); return ret; } /** - * Retrieves node status information using the provided options. + * JS function for transferring funds. * * # Arguments * - * * `verbosity` - An optional `Verbosity` level for controlling the output verbosity. - * * `rpc_address` - An optional string specifying the rpc address to use for the request. + * * `amount` - The amount to transfer. + * * `target_account` - The target account. + * * `transfer_id` - An optional transfer ID (defaults to a random number). + * * `deploy_params` - The deployment parameters. + * * `payment_params` - The payment parameters. + * * `verbosity` - The verbosity level for logging (optional). + * * `rpc_address` - The address of the node to connect to (optional). * * # Returns * - * A `Result` containing either a `GetNodeStatusResult` or a `JsError` in case of an error. - * - * # Errors - * - * Returns a `JsError` if there is an error during the retrieval process. + * A `Result` containing the result of the transfer or a `JsError` in case of an error. + * @param {string} amount + * @param {string} target_account + * @param {string | undefined} transfer_id + * @param {DeployStrParams} deploy_params + * @param {PaymentStrParams} payment_params * @param {Verbosity | undefined} [verbosity] * @param {string | undefined} [rpc_address] - * @returns {Promise} + * @returns {Promise} */ - get_node_status(verbosity, rpc_address) { - var ptr0 = isLikeNone(rpc_address) ? 0 : passStringToWasm0(rpc_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - var len0 = WASM_VECTOR_LEN; - const ret = wasm.sdk_get_node_status(this.__wbg_ptr, isLikeNone(verbosity) ? 3 : verbosity, ptr0, len0); + transfer(amount, target_account, transfer_id, deploy_params, payment_params, verbosity, rpc_address) { + const ptr0 = passStringToWasm0(amount, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + const len0 = WASM_VECTOR_LEN; + const ptr1 = passStringToWasm0(target_account, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + const len1 = WASM_VECTOR_LEN; + var ptr2 = isLikeNone(transfer_id) ? 0 : passStringToWasm0(transfer_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + var len2 = WASM_VECTOR_LEN; + _assertClass(deploy_params, DeployStrParams); + var ptr3 = deploy_params.__destroy_into_raw(); + _assertClass(payment_params, PaymentStrParams); + var ptr4 = payment_params.__destroy_into_raw(); + var ptr5 = isLikeNone(rpc_address) ? 0 : passStringToWasm0(rpc_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + var len5 = WASM_VECTOR_LEN; + const ret = wasm.sdk_transfer(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, ptr4, isLikeNone(verbosity) ? 3 : verbosity, ptr5, len5); return ret; } /** - * @param {Verbosity | undefined} [verbosity] - * @param {string | undefined} [rpc_address] - * @returns {Promise} + * @param {any} options + * @returns {getEntityOptions} */ - info_get_status(verbosity, rpc_address) { - var ptr0 = isLikeNone(rpc_address) ? 0 : passStringToWasm0(rpc_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - var len0 = WASM_VECTOR_LEN; - const ret = wasm.sdk_info_get_status(this.__wbg_ptr, isLikeNone(verbosity) ? 3 : verbosity, ptr0, len0); - return ret; + get_entity_options(options) { + const ret = wasm.sdk_get_entity_options(this.__wbg_ptr, options); + if (ret[2]) { + throw takeFromExternrefTable0(ret[1]); + } + return getEntityOptions.__wrap(ret[0]); } /** - * Retrieves peers asynchronously. + * Retrieves entity information using the provided options. + * + * This function is an asynchronous JavaScript binding for the Rust `get_entity` method. * * # Arguments * - * * `verbosity` - Optional verbosity level. - * * `rpc_address` - Optional rpc address. + * * `options` - An optional `GetEntityOptions` struct containing retrieval options, such as: + * - `entity_identifier`: Identifier for the entity. + * - `entity_identifier_as_string`: String representation of the entity identifier. + * - `maybe_block_id_as_string`: Optional string representation of the block ID. + * - `maybe_block_identifier`: Optional `BlockIdentifierInput` for specifying the block. + * - `verbosity`: Verbosity level for the output. + * - `rpc_address`: Address of the node to query. * * # Returns * - * A `Result` containing `GetPeersResult` or a `JsError` if an error occurs. - * @param {Verbosity | undefined} [verbosity] - * @param {string | undefined} [rpc_address] - * @returns {Promise} + * A `Result` containing either a `GetAddressableEntityResult` on success or a `JsError` on failure. + * + * # Errors + * + * Returns a `JsError` if there is an error during the retrieval process, such as issues with the provided options or network errors. + * ``` + * @param {getEntityOptions | undefined} [options] + * @returns {Promise} */ - get_peers(verbosity, rpc_address) { - var ptr0 = isLikeNone(rpc_address) ? 0 : passStringToWasm0(rpc_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - var len0 = WASM_VECTOR_LEN; - const ret = wasm.sdk_get_peers(this.__wbg_ptr, isLikeNone(verbosity) ? 3 : verbosity, ptr0, len0); + get_entity(options) { + let ptr0 = 0; + if (!isLikeNone(options)) { + _assertClass(options, getEntityOptions); + ptr0 = options.__destroy_into_raw(); + } + const ret = wasm.sdk_get_entity(this.__wbg_ptr, ptr0); return ret; } /** - * @param {Verbosity | undefined} [verbosity] - * @param {string | undefined} [rpc_address] - * @returns {Promise} + * @param {getEntityOptions | undefined} [options] + * @returns {Promise} */ - info_get_peers(verbosity, rpc_address) { - var ptr0 = isLikeNone(rpc_address) ? 0 : passStringToWasm0(rpc_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - var len0 = WASM_VECTOR_LEN; - const ret = wasm.sdk_info_get_peers(this.__wbg_ptr, isLikeNone(verbosity) ? 3 : verbosity, ptr0, len0); + state_get_entity(options) { + let ptr0 = 0; + if (!isLikeNone(options)) { + _assertClass(options, getEntityOptions); + ptr0 = options.__destroy_into_raw(); + } + const ret = wasm.sdk_state_get_entity(this.__wbg_ptr, ptr0); return ret; } /** - * Retrieves validator changes using the provided options. + * Puts a transaction using the provided options. * * # Arguments * + * * `transaction` - The `Transaction` object to be sent. * * `verbosity` - An optional `Verbosity` level for controlling the output verbosity. * * `rpc_address` - An optional string specifying the rpc address to use for the request. * * # Returns * - * A `Result` containing either a `GetValidatorChangesResult` or a `JsError` in case of an error. + * A `Result` containing either a `PutTransactionResult` or a `JsError` in case of an error. * * # Errors * - * Returns a `JsError` if there is an error during the retrieval process. + * Returns a `JsError` if there is an error during the transaction process. + * @param {Transaction} transaction * @param {Verbosity | undefined} [verbosity] * @param {string | undefined} [rpc_address] - * @returns {Promise} + * @returns {Promise} */ - get_validator_changes(verbosity, rpc_address) { - var ptr0 = isLikeNone(rpc_address) ? 0 : passStringToWasm0(rpc_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - var len0 = WASM_VECTOR_LEN; - const ret = wasm.sdk_get_validator_changes(this.__wbg_ptr, isLikeNone(verbosity) ? 3 : verbosity, ptr0, len0); + put_transaction(transaction, verbosity, rpc_address) { + _assertClass(transaction, Transaction); + var ptr0 = transaction.__destroy_into_raw(); + var ptr1 = isLikeNone(rpc_address) ? 0 : passStringToWasm0(rpc_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + var len1 = WASM_VECTOR_LEN; + const ret = wasm.sdk_put_transaction(this.__wbg_ptr, ptr0, isLikeNone(verbosity) ? 3 : verbosity, ptr1, len1); return ret; } /** + * JavaScript Alias for `put_transaction`. + * @param {Transaction} transaction * @param {Verbosity | undefined} [verbosity] * @param {string | undefined} [rpc_address] - * @returns {Promise} + * @returns {Promise} */ - info_get_validator_change(verbosity, rpc_address) { - var ptr0 = isLikeNone(rpc_address) ? 0 : passStringToWasm0(rpc_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - var len0 = WASM_VECTOR_LEN; - const ret = wasm.sdk_info_get_validator_change(this.__wbg_ptr, isLikeNone(verbosity) ? 3 : verbosity, ptr0, len0); + account_put_transaction(transaction, verbosity, rpc_address) { + _assertClass(transaction, Transaction); + var ptr0 = transaction.__destroy_into_raw(); + var ptr1 = isLikeNone(rpc_address) ? 0 : passStringToWasm0(rpc_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + var len1 = WASM_VECTOR_LEN; + const ret = wasm.sdk_account_put_transaction(this.__wbg_ptr, ptr0, isLikeNone(verbosity) ? 3 : verbosity, ptr1, len1); return ret; } /** - * Lists available RPCs using the provided options. + * Parses query balance options from a JsValue. * * # Arguments * - * * `verbosity` - An optional `Verbosity` level for controlling the output verbosity. - * * `rpc_address` - An optional string specifying the rpc address to use for the request. + * * `options` - A JsValue containing query balance options to be parsed. * * # Returns * - * A `Result` containing either a `ListRpcsResult` or a `JsError` in case of an error. - * - * # Errors - * - * Returns a `JsError` if there is an error during the listing process. - * @param {Verbosity | undefined} [verbosity] - * @param {string | undefined} [rpc_address] - * @returns {Promise} + * Parsed query balance options as a `QueryBalanceDetailsOptions` struct. + * @param {any} options + * @returns {queryBalanceDetailsOptions} */ - list_rpcs(verbosity, rpc_address) { - var ptr0 = isLikeNone(rpc_address) ? 0 : passStringToWasm0(rpc_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - var len0 = WASM_VECTOR_LEN; - const ret = wasm.sdk_list_rpcs(this.__wbg_ptr, isLikeNone(verbosity) ? 3 : verbosity, ptr0, len0); - return ret; + query_balance_details_options(options) { + const ret = wasm.sdk_query_balance_details_options(this.__wbg_ptr, options); + if (ret[2]) { + throw takeFromExternrefTable0(ret[1]); + } + return queryBalanceDetailsOptions.__wrap(ret[0]); } /** - * JS function for `make_deploy`. + * Retrieves balance information using the provided options. * * # Arguments * - * * `deploy_params` - The deploy parameters. - * * `session_params` - The session parameters. - * * `payment_params` - The payment parameters. + * * `options` - An optional `QueryBalanceDetailsOptions` struct containing retrieval options. * * # Returns * - * A `Result` containing the created `Deploy` or a `JsError` in case of an error. - * @param {DeployStrParams} deploy_params - * @param {SessionStrParams} session_params - * @param {PaymentStrParams} payment_params - * @returns {Deploy} - */ - make_deploy(deploy_params, session_params, payment_params) { - _assertClass(deploy_params, DeployStrParams); - var ptr0 = deploy_params.__destroy_into_raw(); - _assertClass(session_params, SessionStrParams); - var ptr1 = session_params.__destroy_into_raw(); - _assertClass(payment_params, PaymentStrParams); - var ptr2 = payment_params.__destroy_into_raw(); - const ret = wasm.sdk_make_deploy(this.__wbg_ptr, ptr0, ptr1, ptr2); - if (ret[2]) { - throw takeFromExternrefTable0(ret[1]); - } - return Deploy.__wrap(ret[0]); - } - /** - * JS function for `sign_deploy`. - * - * # Arguments - * - * * `deploy` - The deploy to sign. - * * `secret_key` - The secret key for signing. + * A `Result` containing either a `QueryBalanceDetailsResult` or a `JsError` in case of an error. * - * # Returns + * # Errors * - * The signed `Deploy`. - * @param {Deploy} deploy - * @param {string} secret_key - * @returns {Deploy} + * Returns a `JsError` if there is an error during the retrieval process. + * @param {queryBalanceDetailsOptions | undefined} [options] + * @returns {Promise} */ - sign_deploy(deploy, secret_key) { - _assertClass(deploy, Deploy); - var ptr0 = deploy.__destroy_into_raw(); - const ptr1 = passStringToWasm0(secret_key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - const len1 = WASM_VECTOR_LEN; - const ret = wasm.sdk_sign_deploy(this.__wbg_ptr, ptr0, ptr1, len1); - return Deploy.__wrap(ret); + query_balance_details(options) { + let ptr0 = 0; + if (!isLikeNone(options)) { + _assertClass(options, queryBalanceDetailsOptions); + ptr0 = options.__destroy_into_raw(); + } + const ret = wasm.sdk_query_balance_details(this.__wbg_ptr, ptr0); + return ret; } /** - * JS function for `make_transaction`. + * Parses query global state options from a JsValue. * * # Arguments * - * * `builder_params` - Transaction Builder parameters. - * * `transaction_params` - The transaction parameters. + * * `options` - A JsValue containing query global state options to be parsed. * * # Returns * - * A `Result` containing the created `Transaction` or a `JsError` in case of an error. - * @param {TransactionBuilderParams} builder_params - * @param {TransactionStrParams} transaction_params - * @returns {Transaction} + * Parsed query global state options as a `QueryGlobalStateOptions` struct. + * @param {any} options + * @returns {queryGlobalStateOptions} */ - make_transaction(builder_params, transaction_params) { - _assertClass(builder_params, TransactionBuilderParams); - var ptr0 = builder_params.__destroy_into_raw(); - _assertClass(transaction_params, TransactionStrParams); - var ptr1 = transaction_params.__destroy_into_raw(); - const ret = wasm.sdk_make_transaction(this.__wbg_ptr, ptr0, ptr1); + query_global_state_options(options) { + const ret = wasm.sdk_query_global_state_options(this.__wbg_ptr, options); if (ret[2]) { throw takeFromExternrefTable0(ret[1]); } - return Transaction.__wrap(ret[0]); + return queryGlobalStateOptions.__wrap(ret[0]); } /** - * JS function for `sign_transaction`. + * Retrieves global state information using the provided options. * * # Arguments * - * * `transaction` - The transaction to sign. - * * `secret_key` - The secret key for signing. + * * `options` - An optional `QueryGlobalStateOptions` struct containing retrieval options. * * # Returns * - * The signed `Transaction`. - * @param {Transaction} transaction - * @param {string} secret_key - * @returns {Transaction} - */ - sign_transaction(transaction, secret_key) { - _assertClass(transaction, Transaction); - var ptr0 = transaction.__destroy_into_raw(); - const ptr1 = passStringToWasm0(secret_key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - const len1 = WASM_VECTOR_LEN; - const ret = wasm.sdk_sign_transaction(this.__wbg_ptr, ptr0, ptr1, len1); - return Transaction.__wrap(ret); - } - /** - * Deserialize query_contract_key_options from a JavaScript object. - * @param {any} options - * @returns {queryContractKeyOptions} - */ - query_contract_key_options(options) { - const ret = wasm.sdk_query_contract_key_options(this.__wbg_ptr, options); - if (ret[2]) { - throw takeFromExternrefTable0(ret[1]); - } - return queryContractKeyOptions.__wrap(ret[0]); - } - /** - * JavaScript function for query_contract_key with deserialized options. - * @param {queryContractKeyOptions | undefined} [options] + * A `Result` containing either a `QueryGlobalStateResult` or a `JsError` in case of an error. + * + * # Errors + * + * Returns a `JsError` if there is an error during the retrieval process. + * @param {queryGlobalStateOptions | undefined} [options] * @returns {Promise} */ - query_contract_key(options) { + query_global_state(options) { let ptr0 = 0; if (!isLikeNone(options)) { - _assertClass(options, queryContractKeyOptions); + _assertClass(options, queryGlobalStateOptions); ptr0 = options.__destroy_into_raw(); } - const ret = wasm.sdk_query_contract_key(this.__wbg_ptr, ptr0); + const ret = wasm.sdk_query_global_state(this.__wbg_ptr, ptr0); return ret; } /** - * Parses state root hash options from a JsValue. + * Installs a smart contract with the specified parameters and returns the result. * * # Arguments - * - * * `options` - A JsValue containing state root hash options to be parsed. + *. + * * `transaction_params` - Transaction parameters. + * * `transaction_bytes` - Transaction Bytes to install + * * `rpc_address` - An optional rpc address to send the request to. * * # Returns * - * Parsed state root hash options as a `GetStateRootHashOptions` struct. - * @param {any} options - * @returns {getStateRootHashOptions} + * A `Result` containing either a `PutTransactionResult` or a `JsError` in case of an error. + * + * # Errors + * + * Returns a `JsError` if there is an error during the installation. + * @param {TransactionStrParams} transaction_params + * @param {Bytes} transaction_bytes + * @param {string | undefined} [rpc_address] + * @returns {Promise} */ - get_state_root_hash_options(options) { - const ret = wasm.sdk_get_state_root_hash_options(this.__wbg_ptr, options); - if (ret[2]) { - throw takeFromExternrefTable0(ret[1]); - } - return getStateRootHashOptions.__wrap(ret[0]); + install(transaction_params, transaction_bytes, rpc_address) { + _assertClass(transaction_params, TransactionStrParams); + var ptr0 = transaction_params.__destroy_into_raw(); + _assertClass(transaction_bytes, Bytes); + var ptr1 = transaction_bytes.__destroy_into_raw(); + var ptr2 = isLikeNone(rpc_address) ? 0 : passStringToWasm0(rpc_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + var len2 = WASM_VECTOR_LEN; + const ret = wasm.sdk_install(this.__wbg_ptr, ptr0, ptr1, ptr2, len2); + return ret; } /** - * Retrieves state root hash information using the provided options. + * Installs a smart contract with the specified parameters and returns the result. * * # Arguments * - * * `options` - An optional `GetStateRootHashOptions` struct containing retrieval options. + * * `deploy_params` - The deploy parameters. + * * `session_params` - The session parameters. + * * `payment_amount` - The payment amount as a string. + * * `rpc_address` - An optional rpc address to send the request to. * * # Returns * - * A `Result` containing either a `GetStateRootHashResult` or a `JsError` in case of an error. + * A `Result` containing either a `PutDeployResult` or a `JsError` in case of an error. * * # Errors * - * Returns a `JsError` if there is an error during the retrieval process. - * @param {getStateRootHashOptions | undefined} [options] - * @returns {Promise} + * Returns a `JsError` if there is an error during the installation. + * @param {DeployStrParams} deploy_params + * @param {SessionStrParams} session_params + * @param {string} payment_amount + * @param {string | undefined} [rpc_address] + * @returns {Promise} */ - get_state_root_hash(options) { - let ptr0 = 0; - if (!isLikeNone(options)) { - _assertClass(options, getStateRootHashOptions); - ptr0 = options.__destroy_into_raw(); - } - const ret = wasm.sdk_get_state_root_hash(this.__wbg_ptr, ptr0); + install_deploy(deploy_params, session_params, payment_amount, rpc_address) { + _assertClass(deploy_params, DeployStrParams); + var ptr0 = deploy_params.__destroy_into_raw(); + _assertClass(session_params, SessionStrParams); + var ptr1 = session_params.__destroy_into_raw(); + const ptr2 = passStringToWasm0(payment_amount, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + const len2 = WASM_VECTOR_LEN; + var ptr3 = isLikeNone(rpc_address) ? 0 : passStringToWasm0(rpc_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + var len3 = WASM_VECTOR_LEN; + const ret = wasm.sdk_install_deploy(this.__wbg_ptr, ptr0, ptr1, ptr2, len2, ptr3, len3); return ret; } /** - * Retrieves state root hash information using the provided options (alias for `get_state_root_hash`). + * This function allows executing a deploy speculatively. * * # Arguments * - * * `options` - An optional `GetStateRootHashOptions` struct containing retrieval options. + * * `deploy_params` - Deployment parameters for the deploy. + * * `session_params` - Session parameters for the deploy. + * * `payment_params` - Payment parameters for the deploy. + * * `verbosity` - Optional verbosity level. + * * `rpc_address` - Optional rpc address. * * # Returns * - * A `Result` containing either a `GetStateRootHashResult` or a `JsError` in case of an error. - * - * # Errors - * - * Returns a `JsError` if there is an error during the retrieval process. - * @param {getStateRootHashOptions | undefined} [options] - * @returns {Promise} + * A `Result` containing either a `SpeculativeExecResult` or a `JsError` in case of an error. + * @param {DeployStrParams} deploy_params + * @param {SessionStrParams} session_params + * @param {PaymentStrParams} payment_params + * @param {Verbosity | undefined} [verbosity] + * @param {string | undefined} [rpc_address] + * @returns {Promise} */ - chain_get_state_root_hash(options) { - let ptr0 = 0; - if (!isLikeNone(options)) { - _assertClass(options, getStateRootHashOptions); - ptr0 = options.__destroy_into_raw(); - } - const ret = wasm.sdk_chain_get_state_root_hash(this.__wbg_ptr, ptr0); + speculative_deploy(deploy_params, session_params, payment_params, verbosity, rpc_address) { + _assertClass(deploy_params, DeployStrParams); + var ptr0 = deploy_params.__destroy_into_raw(); + _assertClass(session_params, SessionStrParams); + var ptr1 = session_params.__destroy_into_raw(); + _assertClass(payment_params, PaymentStrParams); + var ptr2 = payment_params.__destroy_into_raw(); + var ptr3 = isLikeNone(rpc_address) ? 0 : passStringToWasm0(rpc_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + var len3 = WASM_VECTOR_LEN; + const ret = wasm.sdk_speculative_deploy(this.__wbg_ptr, ptr0, ptr1, ptr2, isLikeNone(verbosity) ? 3 : verbosity, ptr3, len3); return ret; } /** - * Creates a new Watcher instance to watch deploys (JavaScript-friendly). - * Legacy alias + * Parses block transfers options from a JsValue. * * # Arguments * - * * `events_url` - The URL to monitor for transaction events. - * * `timeout_duration` - An optional timeout duration in seconds. + * * `options` - A JsValue containing block transfers options to be parsed. * * # Returns * - * A `Watcher` instance. - * @param {string} events_url - * @param {number | undefined} [timeout_duration] - * @returns {Watcher} + * Parsed block transfers options as a `GetBlockTransfersOptions` struct. + * @param {any} options + * @returns {getBlockTransfersOptions} */ - watchDeploy(events_url, timeout_duration) { - const ptr0 = passStringToWasm0(events_url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - const len0 = WASM_VECTOR_LEN; - const ret = wasm.sdk_watchDeploy(this.__wbg_ptr, ptr0, len0, !isLikeNone(timeout_duration), isLikeNone(timeout_duration) ? 0 : timeout_duration); - return Watcher.__wrap(ret); + get_block_transfers_options(options) { + const ret = wasm.sdk_get_block_transfers_options(this.__wbg_ptr, options); + if (ret[2]) { + throw takeFromExternrefTable0(ret[1]); + } + return getBlockTransfersOptions.__wrap(ret[0]); } /** - * Creates a new Watcher instance to watch deploys (JavaScript-friendly). + * Retrieves block transfers information using the provided options. * * # Arguments * - * * `events_url` - The URL to monitor for transaction events. - * * `timeout_duration` - An optional timeout duration in seconds. + * * `options` - An optional `GetBlockTransfersOptions` struct containing retrieval options. * * # Returns * - * A `Watcher` instance. - * @param {string} events_url - * @param {number | undefined} [timeout_duration] - * @returns {Watcher} - */ - watchTransaction(events_url, timeout_duration) { - const ptr0 = passStringToWasm0(events_url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - const len0 = WASM_VECTOR_LEN; - const ret = wasm.sdk_watchTransaction(this.__wbg_ptr, ptr0, len0, !isLikeNone(timeout_duration), isLikeNone(timeout_duration) ? 0 : timeout_duration); - return Watcher.__wrap(ret); - } - /** - * Waits for a deploy event to be processed asynchronously (JavaScript-friendly). - * Legacy alias - * - * # Arguments - * - * * `events_url` - The URL to monitor for transaction events. - * * `deploy_hash` - The deploy hash to wait for. - * * `timeout_duration` - An optional timeout duration in seconds. - * - * # Returns - * - * A JavaScript `Promise` resolving to either the processed `EventParseResult` or an error message. - * @param {string} events_url - * @param {string} deploy_hash - * @param {number | undefined} [timeout_duration] - * @returns {Promise>} - */ - waitDeploy(events_url, deploy_hash, timeout_duration) { - const ptr0 = passStringToWasm0(events_url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - const len0 = WASM_VECTOR_LEN; - const ptr1 = passStringToWasm0(deploy_hash, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - const len1 = WASM_VECTOR_LEN; - const ret = wasm.sdk_waitDeploy(this.__wbg_ptr, ptr0, len0, ptr1, len1, !isLikeNone(timeout_duration), isLikeNone(timeout_duration) ? 0 : timeout_duration); - return ret; - } - /** - * Waits for a deploy event to be processed asynchronously (JavaScript-friendly). - * - * # Arguments - * - * * `events_url` - The URL to monitor for transaction events. - * * `target_hash` - The transaction hash to wait for. - * * `timeout_duration` - An optional timeout duration in seconds. - * - * # Returns - * - * A JavaScript `Promise` resolving to either the processed `EventParseResult` or an error message. - * @param {string} events_url - * @param {string} target_hash - * @param {number | undefined} [timeout_duration] - * @returns {Promise>} - */ - waitTransaction(events_url, target_hash, timeout_duration) { - const ptr0 = passStringToWasm0(events_url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - const len0 = WASM_VECTOR_LEN; - const ptr1 = passStringToWasm0(target_hash, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - const len1 = WASM_VECTOR_LEN; - const ret = wasm.sdk_waitTransaction(this.__wbg_ptr, ptr0, len0, ptr1, len1, !isLikeNone(timeout_duration), isLikeNone(timeout_duration) ? 0 : timeout_duration); - return ret; - } - /** - * JavaScript function for deploying with deserialized parameters. - * - * # Arguments - * - * * `deploy_params` - Deploy parameters. - * * `session_params` - Session parameters. - * * `payment_params` - Payment parameters. - * * `verbosity` - An optional verbosity level. - * * `rpc_address` - An optional rpc address. - * - * # Returns - * - * A result containing PutDeployResult or a JsError. - * @param {DeployStrParams} deploy_params - * @param {SessionStrParams} session_params - * @param {PaymentStrParams} payment_params - * @param {Verbosity | undefined} [verbosity] - * @param {string | undefined} [rpc_address] - * @returns {Promise} - */ - deploy(deploy_params, session_params, payment_params, verbosity, rpc_address) { - _assertClass(deploy_params, DeployStrParams); - var ptr0 = deploy_params.__destroy_into_raw(); - _assertClass(session_params, SessionStrParams); - var ptr1 = session_params.__destroy_into_raw(); - _assertClass(payment_params, PaymentStrParams); - var ptr2 = payment_params.__destroy_into_raw(); - var ptr3 = isLikeNone(rpc_address) ? 0 : passStringToWasm0(rpc_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - var len3 = WASM_VECTOR_LEN; - const ret = wasm.sdk_deploy(this.__wbg_ptr, ptr0, ptr1, ptr2, isLikeNone(verbosity) ? 3 : verbosity, ptr3, len3); - return ret; - } - /** - * JS function for speculative transfer. - * - * # Arguments - * - * * `amount` - The amount to transfer. - * * `target_account` - The target account. - * * `transfer_id` - An optional transfer ID (defaults to a random number). - * * `deploy_params` - The deployment parameters. - * * `payment_params` - The payment parameters. - * * `verbosity` - The verbosity level for logging (optional). - * * `rpc_address` - The address of the node to connect to (optional). - * - * # Returns - * - * A `Result` containing the result of the speculative transfer or a `JsError` in case of an error. - * @param {string} amount - * @param {string} target_account - * @param {string | undefined} transfer_id - * @param {DeployStrParams} deploy_params - * @param {PaymentStrParams} payment_params - * @param {Verbosity | undefined} [verbosity] - * @param {string | undefined} [rpc_address] - * @returns {Promise} - */ - speculative_transfer(amount, target_account, transfer_id, deploy_params, payment_params, verbosity, rpc_address) { - const ptr0 = passStringToWasm0(amount, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - const len0 = WASM_VECTOR_LEN; - const ptr1 = passStringToWasm0(target_account, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - const len1 = WASM_VECTOR_LEN; - var ptr2 = isLikeNone(transfer_id) ? 0 : passStringToWasm0(transfer_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - var len2 = WASM_VECTOR_LEN; - _assertClass(deploy_params, DeployStrParams); - var ptr3 = deploy_params.__destroy_into_raw(); - _assertClass(payment_params, PaymentStrParams); - var ptr4 = payment_params.__destroy_into_raw(); - var ptr5 = isLikeNone(rpc_address) ? 0 : passStringToWasm0(rpc_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - var len5 = WASM_VECTOR_LEN; - const ret = wasm.sdk_speculative_transfer(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, ptr4, isLikeNone(verbosity) ? 3 : verbosity, ptr5, len5); - return ret; - } - /** - * Parses deploy options from a JsValue. - * - * # Arguments - * - * * `options` - A JsValue containing deploy options to be parsed. - * - * # Returns - * - * Parsed deploy options as a `GetDeployOptions` struct. - * @param {any} options - * @returns {getDeployOptions} - */ - get_deploy_options(options) { - const ret = wasm.sdk_get_deploy_options(this.__wbg_ptr, options); - if (ret[2]) { - throw takeFromExternrefTable0(ret[1]); - } - return getDeployOptions.__wrap(ret[0]); - } - /** - * Retrieves deploy information using the provided options. - * - * # Arguments - * - * * `options` - An optional `GetDeployOptions` struct containing retrieval options. + * A `Result` containing either a `GetBlockTransfersResult` or a `JsError` in case of an error. * - * # Returns + * # Errors * - * A `Result` containing either a `GetDeployResult` or an error. - * @param {getDeployOptions | undefined} [options] - * @returns {Promise} + * Returns a `JsError` if there is an error during the retrieval process. + * @param {getBlockTransfersOptions | undefined} [options] + * @returns {Promise} */ - get_deploy(options) { + get_block_transfers(options) { let ptr0 = 0; if (!isLikeNone(options)) { - _assertClass(options, getDeployOptions); + _assertClass(options, getBlockTransfersOptions); ptr0 = options.__destroy_into_raw(); } - const ret = wasm.sdk_get_deploy(this.__wbg_ptr, ptr0); + const ret = wasm.sdk_get_block_transfers(this.__wbg_ptr, ptr0); return ret; } /** - * Retrieves deploy information using the provided options, alias for `get_deploy`. - * @param {getDeployOptions | undefined} [options] - * @returns {Promise} + * @param {getBlockTransfersOptions | undefined} [options] + * @returns {Promise} */ - info_get_deploy(options) { + chain_get_block_transfers(options) { let ptr0 = 0; if (!isLikeNone(options)) { - _assertClass(options, getDeployOptions); + _assertClass(options, getBlockTransfersOptions); ptr0 = options.__destroy_into_raw(); } - const ret = wasm.sdk_info_get_deploy(this.__wbg_ptr, ptr0); + const ret = wasm.sdk_chain_get_block_transfers(this.__wbg_ptr, ptr0); return ret; } /** - * Parses transaction options from a JsValue. + * Parses query balance options from a JsValue. * * # Arguments * - * * `options` - A JsValue containing transaction options to be parsed. + * * `options` - A JsValue containing query balance options to be parsed. * * # Returns * - * Parsed transaction options as a `GetTransactionOptions` struct. + * Parsed query balance options as a `QueryBalanceOptions` struct. * @param {any} options - * @returns {getTransactionOptions} + * @returns {queryBalanceOptions} */ - get_transaction_options(options) { - const ret = wasm.sdk_get_transaction_options(this.__wbg_ptr, options); + query_balance_options(options) { + const ret = wasm.sdk_query_balance_options(this.__wbg_ptr, options); if (ret[2]) { throw takeFromExternrefTable0(ret[1]); } - return getTransactionOptions.__wrap(ret[0]); + return queryBalanceOptions.__wrap(ret[0]); } /** - * Retrieves transaction information using the provided options. + * Retrieves balance information using the provided options. * * # Arguments * - * * `options` - An optional `GetTransactionOptions` struct containing retrieval options. + * * `options` - An optional `QueryBalanceOptions` struct containing retrieval options. * * # Returns * - * A `Result` containing either a `GetTransactionResult` or an error. - * @param {getTransactionOptions | undefined} [options] - * @returns {Promise} - */ - get_transaction(options) { - let ptr0 = 0; - if (!isLikeNone(options)) { - _assertClass(options, getTransactionOptions); - ptr0 = options.__destroy_into_raw(); - } - const ret = wasm.sdk_get_transaction(this.__wbg_ptr, ptr0); - return ret; - } - /** - * Retrieves transaction information using the provided options, alias for `get_transaction`. - * @param {getTransactionOptions | undefined} [options] - * @returns {Promise} + * A `Result` containing either a `QueryBalanceResult` or a `JsError` in case of an error. + * + * # Errors + * + * Returns a `JsError` if there is an error during the retrieval process. + * @param {queryBalanceOptions | undefined} [options] + * @returns {Promise} */ - info_get_transaction(options) { + query_balance(options) { let ptr0 = 0; if (!isLikeNone(options)) { - _assertClass(options, getTransactionOptions); + _assertClass(options, queryBalanceOptions); ptr0 = options.__destroy_into_raw(); } - const ret = wasm.sdk_info_get_transaction(this.__wbg_ptr, ptr0); + const ret = wasm.sdk_query_balance(this.__wbg_ptr, ptr0); return ret; } /** * Get options for speculative execution from a JavaScript value. * @param {any} options - * @returns {getSpeculativeExecTxnOptions} + * @returns {getSpeculativeExecDeployOptions} */ - get_speculative_exec_options(options) { - const ret = wasm.sdk_get_speculative_exec_options(this.__wbg_ptr, options); + get_speculative_exec_deploy_options(options) { + const ret = wasm.sdk_get_speculative_exec_deploy_options(this.__wbg_ptr, options); if (ret[2]) { throw takeFromExternrefTable0(ret[1]); } - return getSpeculativeExecTxnOptions.__wrap(ret[0]); + return getSpeculativeExecDeployOptions.__wrap(ret[0]); } /** * JS function for speculative execution. @@ -7110,40 +7034,165 @@ export class SDK { * # Returns * * A `Result` containing the result of the speculative execution or a `JsError` in case of an error. - * @param {getSpeculativeExecTxnOptions | undefined} [options] - * @returns {Promise} + * @param {getSpeculativeExecDeployOptions | undefined} [options] + * @returns {Promise} */ - speculative_exec(options) { + speculative_exec_deploy(options) { let ptr0 = 0; if (!isLikeNone(options)) { - _assertClass(options, getSpeculativeExecTxnOptions); + _assertClass(options, getSpeculativeExecDeployOptions); ptr0 = options.__destroy_into_raw(); } - const ret = wasm.sdk_speculative_exec(this.__wbg_ptr, ptr0); + const ret = wasm.sdk_speculative_exec_deploy(this.__wbg_ptr, ptr0); return ret; } /** - * JS function for `make_transfer`. + * Calls a smart contract entry point with the specified parameters and returns the result. * * # Arguments * - * * `amount` - The transfer amount. + * * `transaction_params` - Transaction parameters. + * * `builder_params` - Transaction Builder parameters. + * * `rpc_address` - An optional rpc address to send the request to. + * + * # Returns + * + * A `Result` containing either a `PutTransactionResult` or a `JsError` in case of an error. + * + * # Errors + * + * Returns a `JsError` if there is an error during the call. + * @param {TransactionBuilderParams} builder_params + * @param {TransactionStrParams} transaction_params + * @param {string | undefined} [rpc_address] + * @returns {Promise} + */ + call_entrypoint(builder_params, transaction_params, rpc_address) { + _assertClass(builder_params, TransactionBuilderParams); + var ptr0 = builder_params.__destroy_into_raw(); + _assertClass(transaction_params, TransactionStrParams); + var ptr1 = transaction_params.__destroy_into_raw(); + var ptr2 = isLikeNone(rpc_address) ? 0 : passStringToWasm0(rpc_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + var len2 = WASM_VECTOR_LEN; + const ret = wasm.sdk_call_entrypoint(this.__wbg_ptr, ptr0, ptr1, ptr2, len2); + return ret; + } + /** + * @param {string | undefined} [rpc_address] + * @param {string | undefined} [node_address] + * @param {Verbosity | undefined} [verbosity] + */ + constructor(rpc_address, node_address, verbosity) { + var ptr0 = isLikeNone(rpc_address) ? 0 : passStringToWasm0(rpc_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + var len0 = WASM_VECTOR_LEN; + var ptr1 = isLikeNone(node_address) ? 0 : passStringToWasm0(node_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + var len1 = WASM_VECTOR_LEN; + const ret = wasm.sdk_new(ptr0, len0, ptr1, len1, isLikeNone(verbosity) ? 3 : verbosity); + this.__wbg_ptr = ret >>> 0; + SDKFinalization.register(this, this.__wbg_ptr, this); + return this; + } + /** + * @param {string | undefined} [rpc_address] + * @returns {string} + */ + getRPCAddress(rpc_address) { + let deferred2_0; + let deferred2_1; + try { + var ptr0 = isLikeNone(rpc_address) ? 0 : passStringToWasm0(rpc_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + var len0 = WASM_VECTOR_LEN; + const ret = wasm.sdk_getRPCAddress(this.__wbg_ptr, ptr0, len0); + deferred2_0 = ret[0]; + deferred2_1 = ret[1]; + return getStringFromWasm0(ret[0], ret[1]); + } finally { + wasm.__wbindgen_free(deferred2_0, deferred2_1, 1); + } + } + /** + * @param {string | undefined} [rpc_address] + */ + setRPCAddress(rpc_address) { + var ptr0 = isLikeNone(rpc_address) ? 0 : passStringToWasm0(rpc_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + var len0 = WASM_VECTOR_LEN; + const ret = wasm.sdk_setRPCAddress(this.__wbg_ptr, ptr0, len0); + if (ret[1]) { + throw takeFromExternrefTable0(ret[0]); + } + } + /** + * @param {string | undefined} [node_address] + * @returns {string} + */ + getNodeAddress(node_address) { + let deferred2_0; + let deferred2_1; + try { + var ptr0 = isLikeNone(node_address) ? 0 : passStringToWasm0(node_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + var len0 = WASM_VECTOR_LEN; + const ret = wasm.sdk_getNodeAddress(this.__wbg_ptr, ptr0, len0); + deferred2_0 = ret[0]; + deferred2_1 = ret[1]; + return getStringFromWasm0(ret[0], ret[1]); + } finally { + wasm.__wbindgen_free(deferred2_0, deferred2_1, 1); + } + } + /** + * @param {string | undefined} [node_address] + */ + setNodeAddress(node_address) { + var ptr0 = isLikeNone(node_address) ? 0 : passStringToWasm0(node_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + var len0 = WASM_VECTOR_LEN; + const ret = wasm.sdk_setNodeAddress(this.__wbg_ptr, ptr0, len0); + if (ret[1]) { + throw takeFromExternrefTable0(ret[0]); + } + } + /** + * @param {Verbosity | undefined} [verbosity] + * @returns {Verbosity} + */ + getVerbosity(verbosity) { + const ret = wasm.sdk_getVerbosity(this.__wbg_ptr, isLikeNone(verbosity) ? 3 : verbosity); + return ret; + } + /** + * @param {Verbosity | undefined} [verbosity] + */ + setVerbosity(verbosity) { + const ret = wasm.sdk_setVerbosity(this.__wbg_ptr, isLikeNone(verbosity) ? 3 : verbosity); + if (ret[1]) { + throw takeFromExternrefTable0(ret[0]); + } + } + /** + * JS function for speculative transfer. + * + * # Arguments + * + * * `amount` - The amount to transfer. * * `target_account` - The target account. - * * `transfer_id` - Optional transfer identifier. - * * `deploy_params` - The deploy parameters. + * * `transfer_id` - An optional transfer ID (defaults to a random number). + * * `deploy_params` - The deployment parameters. * * `payment_params` - The payment parameters. + * * `verbosity` - The verbosity level for logging (optional). + * * `rpc_address` - The address of the node to connect to (optional). * * # Returns * - * A `Result` containing the created `Deploy` or a `JsError` in case of an error. + * A `Result` containing the result of the speculative transfer or a `JsError` in case of an error. * @param {string} amount * @param {string} target_account * @param {string | undefined} transfer_id * @param {DeployStrParams} deploy_params * @param {PaymentStrParams} payment_params - * @returns {Deploy} + * @param {Verbosity | undefined} [verbosity] + * @param {string | undefined} [rpc_address] + * @returns {Promise} */ - make_transfer(amount, target_account, transfer_id, deploy_params, payment_params) { + speculative_transfer(amount, target_account, transfer_id, deploy_params, payment_params, verbosity, rpc_address) { const ptr0 = passStringToWasm0(amount, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); const len0 = WASM_VECTOR_LEN; const ptr1 = passStringToWasm0(target_account, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); @@ -7154,235 +7203,81 @@ export class SDK { var ptr3 = deploy_params.__destroy_into_raw(); _assertClass(payment_params, PaymentStrParams); var ptr4 = payment_params.__destroy_into_raw(); - const ret = wasm.sdk_make_transfer(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, ptr4); - if (ret[2]) { - throw takeFromExternrefTable0(ret[1]); - } - return Deploy.__wrap(ret[0]); + var ptr5 = isLikeNone(rpc_address) ? 0 : passStringToWasm0(rpc_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + var len5 = WASM_VECTOR_LEN; + const ret = wasm.sdk_speculative_transfer(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, ptr4, isLikeNone(verbosity) ? 3 : verbosity, ptr5, len5); + return ret; } /** - * JS function for `make_transfer_transaction`. + * Parses state root hash options from a JsValue. * * # Arguments * - * * `maybe_source` - Optional transfer source uref. - * * `amount` - The transfer amount. - * * `target` - The target account. - * * `transaction_params` - The transaction parameters. - * * `maybe_id` - Optional transfer identifier. + * * `options` - A JsValue containing state root hash options to be parsed. * * # Returns * - * A `Result` containing the created `Transaction` or a `JsError` in case of an error. - * @param {URef | undefined} maybe_source - * @param {string} target - * @param {string} amount - * @param {TransactionStrParams} transaction_params - * @param {string | undefined} [maybe_id] - * @returns {Transaction} + * Parsed state root hash options as a `GetStateRootHashOptions` struct. + * @param {any} options + * @returns {getStateRootHashOptions} */ - make_transfer_transaction(maybe_source, target, amount, transaction_params, maybe_id) { - let ptr0 = 0; - if (!isLikeNone(maybe_source)) { - _assertClass(maybe_source, URef); - ptr0 = maybe_source.__destroy_into_raw(); - } - const ptr1 = passStringToWasm0(target, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - const len1 = WASM_VECTOR_LEN; - const ptr2 = passStringToWasm0(amount, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - const len2 = WASM_VECTOR_LEN; - _assertClass(transaction_params, TransactionStrParams); - var ptr3 = transaction_params.__destroy_into_raw(); - var ptr4 = isLikeNone(maybe_id) ? 0 : passStringToWasm0(maybe_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - var len4 = WASM_VECTOR_LEN; - const ret = wasm.sdk_make_transfer_transaction(this.__wbg_ptr, ptr0, ptr1, len1, ptr2, len2, ptr3, ptr4, len4); + get_state_root_hash_options(options) { + const ret = wasm.sdk_get_state_root_hash_options(this.__wbg_ptr, options); if (ret[2]) { throw takeFromExternrefTable0(ret[1]); } - return Transaction.__wrap(ret[0]); + return getStateRootHashOptions.__wrap(ret[0]); } /** - * Calls a smart contract entry point with the specified parameters and returns the result. + * Retrieves state root hash information using the provided options. * * # Arguments * - * * `deploy_params` - The deploy parameters. - * * `session_params` - The session parameters. - * * `payment_amount` - The payment amount as a string. - * * `rpc_address` - An optional rpc address to send the request to. + * * `options` - An optional `GetStateRootHashOptions` struct containing retrieval options. * * # Returns * - * A `Result` containing either a `PutDeployResult` or a `JsError` in case of an error. + * A `Result` containing either a `GetStateRootHashResult` or a `JsError` in case of an error. * * # Errors * - * Returns a `JsError` if there is an error during the call. - * @param {DeployStrParams} deploy_params - * @param {SessionStrParams} session_params - * @param {string} payment_amount - * @param {string | undefined} [rpc_address] - * @returns {Promise} + * Returns a `JsError` if there is an error during the retrieval process. + * @param {getStateRootHashOptions | undefined} [options] + * @returns {Promise} */ - call_entrypoint_deploy(deploy_params, session_params, payment_amount, rpc_address) { - _assertClass(deploy_params, DeployStrParams); - var ptr0 = deploy_params.__destroy_into_raw(); - _assertClass(session_params, SessionStrParams); - var ptr1 = session_params.__destroy_into_raw(); - const ptr2 = passStringToWasm0(payment_amount, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - const len2 = WASM_VECTOR_LEN; - var ptr3 = isLikeNone(rpc_address) ? 0 : passStringToWasm0(rpc_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - var len3 = WASM_VECTOR_LEN; - const ret = wasm.sdk_call_entrypoint_deploy(this.__wbg_ptr, ptr0, ptr1, ptr2, len2, ptr3, len3); + get_state_root_hash(options) { + let ptr0 = 0; + if (!isLikeNone(options)) { + _assertClass(options, getStateRootHashOptions); + ptr0 = options.__destroy_into_raw(); + } + const ret = wasm.sdk_get_state_root_hash(this.__wbg_ptr, ptr0); return ret; } /** - * Installs a smart contract with the specified parameters and returns the result. + * Retrieves state root hash information using the provided options (alias for `get_state_root_hash`). * * # Arguments - *. - * * `transaction_params` - Transaction parameters. - * * `transaction_bytes` - Transaction Bytes to install - * * `rpc_address` - An optional rpc address to send the request to. + * + * * `options` - An optional `GetStateRootHashOptions` struct containing retrieval options. * * # Returns * - * A `Result` containing either a `PutTransactionResult` or a `JsError` in case of an error. + * A `Result` containing either a `GetStateRootHashResult` or a `JsError` in case of an error. * * # Errors * - * Returns a `JsError` if there is an error during the installation. - * @param {TransactionStrParams} transaction_params - * @param {Bytes} transaction_bytes - * @param {string | undefined} [rpc_address] - * @returns {Promise} + * Returns a `JsError` if there is an error during the retrieval process. + * @param {getStateRootHashOptions | undefined} [options] + * @returns {Promise} */ - install(transaction_params, transaction_bytes, rpc_address) { - _assertClass(transaction_params, TransactionStrParams); - var ptr0 = transaction_params.__destroy_into_raw(); - _assertClass(transaction_bytes, Bytes); - var ptr1 = transaction_bytes.__destroy_into_raw(); - var ptr2 = isLikeNone(rpc_address) ? 0 : passStringToWasm0(rpc_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - var len2 = WASM_VECTOR_LEN; - const ret = wasm.sdk_install(this.__wbg_ptr, ptr0, ptr1, ptr2, len2); - return ret; - } - /** - * @param {any} options - * @returns {getAccountOptions} - */ - get_account_options(options) { - const ret = wasm.sdk_get_account_options(this.__wbg_ptr, options); - if (ret[2]) { - throw takeFromExternrefTable0(ret[1]); - } - return getAccountOptions.__wrap(ret[0]); - } - /** - * Retrieves account information using the provided options. - * - * This function is an asynchronous JavaScript binding for the Rust `get_account` method. - * - * # Arguments - * - * * `options` - An optional `GetAccountOptions` struct containing retrieval options, such as: - * - `account_identifier`: Identifier for the account. - * - `account_identifier_as_string`: String representation of the account identifier. - * - `maybe_block_id_as_string`: Optional string representation of the block ID. - * - `maybe_block_identifier`: Optional `BlockIdentifierInput` for specifying the block. - * - `verbosity`: Verbosity level for the output. - * - `rpc_address`: Address of the node to query. - * - * # Returns - * - * A `Result` containing either a `GetAccountResult` on success or a `JsError` on failure. - * - * # Errors - * - * Returns a `JsError` if there is an error during the retrieval process, such as issues with the provided options or network errors. - * ``` - * @param {getAccountOptions | undefined} [options] - * @returns {Promise} - */ - get_account(options) { - let ptr0 = 0; - if (!isLikeNone(options)) { - _assertClass(options, getAccountOptions); - ptr0 = options.__destroy_into_raw(); - } - const ret = wasm.sdk_get_account(this.__wbg_ptr, ptr0); - return ret; - } - /** - * @param {getAccountOptions | undefined} [options] - * @returns {Promise} - */ - state_get_account_info(options) { - let ptr0 = 0; - if (!isLikeNone(options)) { - _assertClass(options, getAccountOptions); - ptr0 = options.__destroy_into_raw(); - } - const ret = wasm.sdk_state_get_account_info(this.__wbg_ptr, ptr0); - return ret; - } - /** - * Parses era summary options from a JsValue. - * - * # Arguments - * - * * `options` - A JsValue containing era summary options to be parsed. - * - * # Returns - * - * Parsed era summary options as a `GetEraSummaryOptions` struct. - * @param {any} options - * @returns {getEraSummaryOptions} - */ - get_era_summary_options(options) { - const ret = wasm.sdk_get_era_summary_options(this.__wbg_ptr, options); - if (ret[2]) { - throw takeFromExternrefTable0(ret[1]); - } - return getEraSummaryOptions.__wrap(ret[0]); - } - /** - * Retrieves era summary information using the provided options. - * - * # Arguments - * - * * `options` - An optional `GetEraSummaryOptions` struct containing retrieval options. - * - * # Returns - * - * A `Result` containing either a `GetEraSummaryResult` or a `JsError` in case of an error. - * - * # Errors - * - * Returns a `JsError` if there is an error during the retrieval process. - * @param {getEraSummaryOptions | undefined} [options] - * @returns {Promise} - */ - get_era_summary(options) { - let ptr0 = 0; - if (!isLikeNone(options)) { - _assertClass(options, getEraSummaryOptions); - ptr0 = options.__destroy_into_raw(); - } - const ret = wasm.sdk_get_era_summary(this.__wbg_ptr, ptr0); - return ret; - } - /** - * @param {getEraSummaryOptions | undefined} [options] - * @returns {Promise} - */ - chain_get_era_summary(options) { - let ptr0 = 0; - if (!isLikeNone(options)) { - _assertClass(options, getEraSummaryOptions); - ptr0 = options.__destroy_into_raw(); - } - const ret = wasm.sdk_chain_get_era_summary(this.__wbg_ptr, ptr0); + chain_get_state_root_hash(options) { + let ptr0 = 0; + if (!isLikeNone(options)) { + _assertClass(options, getStateRootHashOptions); + ptr0 = options.__destroy_into_raw(); + } + const ret = wasm.sdk_chain_get_state_root_hash(this.__wbg_ptr, ptr0); return ret; } /** @@ -7430,1120 +7325,1224 @@ export class SDK { return ret; } /** - * Installs a smart contract with the specified parameters and returns the result. + * This function allows executing a transaction speculatively. * * # Arguments * - * * `deploy_params` - The deploy parameters. - * * `session_params` - The session parameters. - * * `payment_amount` - The payment amount as a string. - * * `rpc_address` - An optional rpc address to send the request to. + * * `builder_params` - Transaction Builder parameters. + * * `transaction_params` - Transactionment parameters for the transaction. + * * `verbosity` - Optional verbosity level. + * * `rpc_address` - Optional rpc address. * * # Returns * - * A `Result` containing either a `PutDeployResult` or a `JsError` in case of an error. - * - * # Errors - * - * Returns a `JsError` if there is an error during the installation. - * @param {DeployStrParams} deploy_params - * @param {SessionStrParams} session_params - * @param {string} payment_amount + * A `Result` containing either a `SpeculativeExecTxnResult` or a `JsError` in case of an error. + * @param {TransactionBuilderParams} builder_params + * @param {TransactionStrParams} transaction_params + * @param {Verbosity | undefined} [verbosity] * @param {string | undefined} [rpc_address] - * @returns {Promise} + * @returns {Promise} */ - install_deploy(deploy_params, session_params, payment_amount, rpc_address) { - _assertClass(deploy_params, DeployStrParams); - var ptr0 = deploy_params.__destroy_into_raw(); - _assertClass(session_params, SessionStrParams); - var ptr1 = session_params.__destroy_into_raw(); - const ptr2 = passStringToWasm0(payment_amount, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - const len2 = WASM_VECTOR_LEN; - var ptr3 = isLikeNone(rpc_address) ? 0 : passStringToWasm0(rpc_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - var len3 = WASM_VECTOR_LEN; - const ret = wasm.sdk_install_deploy(this.__wbg_ptr, ptr0, ptr1, ptr2, len2, ptr3, len3); + speculative_transaction(builder_params, transaction_params, verbosity, rpc_address) { + _assertClass(builder_params, TransactionBuilderParams); + var ptr0 = builder_params.__destroy_into_raw(); + _assertClass(transaction_params, TransactionStrParams); + var ptr1 = transaction_params.__destroy_into_raw(); + var ptr2 = isLikeNone(rpc_address) ? 0 : passStringToWasm0(rpc_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + var len2 = WASM_VECTOR_LEN; + const ret = wasm.sdk_speculative_transaction(this.__wbg_ptr, ptr0, ptr1, isLikeNone(verbosity) ? 3 : verbosity, ptr2, len2); return ret; } /** - * Parses block transfers options from a JsValue. + * Creates a new Watcher instance to watch deploys (JavaScript-friendly). + * Legacy alias * * # Arguments * - * * `options` - A JsValue containing block transfers options to be parsed. + * * `events_url` - The URL to monitor for transaction events. + * * `timeout_duration` - An optional timeout duration in seconds. * * # Returns * - * Parsed block transfers options as a `GetBlockTransfersOptions` struct. - * @param {any} options - * @returns {getBlockTransfersOptions} + * A `Watcher` instance. + * @param {string} events_url + * @param {number | undefined} [timeout_duration] + * @returns {Watcher} */ - get_block_transfers_options(options) { - const ret = wasm.sdk_get_block_transfers_options(this.__wbg_ptr, options); - if (ret[2]) { - throw takeFromExternrefTable0(ret[1]); - } - return getBlockTransfersOptions.__wrap(ret[0]); + watchDeploy(events_url, timeout_duration) { + const ptr0 = passStringToWasm0(events_url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + const len0 = WASM_VECTOR_LEN; + const ret = wasm.sdk_watchDeploy(this.__wbg_ptr, ptr0, len0, !isLikeNone(timeout_duration), isLikeNone(timeout_duration) ? 0 : timeout_duration); + return Watcher.__wrap(ret); } /** - * Retrieves block transfers information using the provided options. + * Creates a new Watcher instance to watch deploys (JavaScript-friendly). * * # Arguments * - * * `options` - An optional `GetBlockTransfersOptions` struct containing retrieval options. + * * `events_url` - The URL to monitor for transaction events. + * * `timeout_duration` - An optional timeout duration in seconds. * * # Returns * - * A `Result` containing either a `GetBlockTransfersResult` or a `JsError` in case of an error. - * - * # Errors - * - * Returns a `JsError` if there is an error during the retrieval process. - * @param {getBlockTransfersOptions | undefined} [options] - * @returns {Promise} - */ - get_block_transfers(options) { - let ptr0 = 0; - if (!isLikeNone(options)) { - _assertClass(options, getBlockTransfersOptions); - ptr0 = options.__destroy_into_raw(); - } - const ret = wasm.sdk_get_block_transfers(this.__wbg_ptr, ptr0); - return ret; - } - /** - * @param {getBlockTransfersOptions | undefined} [options] - * @returns {Promise} + * A `Watcher` instance. + * @param {string} events_url + * @param {number | undefined} [timeout_duration] + * @returns {Watcher} */ - chain_get_block_transfers(options) { - let ptr0 = 0; - if (!isLikeNone(options)) { - _assertClass(options, getBlockTransfersOptions); - ptr0 = options.__destroy_into_raw(); - } - const ret = wasm.sdk_chain_get_block_transfers(this.__wbg_ptr, ptr0); - return ret; + watchTransaction(events_url, timeout_duration) { + const ptr0 = passStringToWasm0(events_url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + const len0 = WASM_VECTOR_LEN; + const ret = wasm.sdk_watchTransaction(this.__wbg_ptr, ptr0, len0, !isLikeNone(timeout_duration), isLikeNone(timeout_duration) ? 0 : timeout_duration); + return Watcher.__wrap(ret); } /** - * Parses query balance options from a JsValue. + * Waits for a deploy event to be processed asynchronously (JavaScript-friendly). + * Legacy alias * * # Arguments * - * * `options` - A JsValue containing query balance options to be parsed. + * * `events_url` - The URL to monitor for transaction events. + * * `deploy_hash` - The deploy hash to wait for. + * * `timeout_duration` - An optional timeout duration in seconds. * * # Returns * - * Parsed query balance options as a `QueryBalanceOptions` struct. - * @param {any} options - * @returns {queryBalanceOptions} + * A JavaScript `Promise` resolving to either the processed `EventParseResult` or an error message. + * @param {string} events_url + * @param {string} deploy_hash + * @param {number | undefined} [timeout_duration] + * @returns {Promise>} */ - query_balance_options(options) { - const ret = wasm.sdk_query_balance_options(this.__wbg_ptr, options); - if (ret[2]) { - throw takeFromExternrefTable0(ret[1]); - } - return queryBalanceOptions.__wrap(ret[0]); + waitDeploy(events_url, deploy_hash, timeout_duration) { + const ptr0 = passStringToWasm0(events_url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + const len0 = WASM_VECTOR_LEN; + const ptr1 = passStringToWasm0(deploy_hash, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + const len1 = WASM_VECTOR_LEN; + const ret = wasm.sdk_waitDeploy(this.__wbg_ptr, ptr0, len0, ptr1, len1, !isLikeNone(timeout_duration), isLikeNone(timeout_duration) ? 0 : timeout_duration); + return ret; } /** - * Retrieves balance information using the provided options. + * Waits for a deploy event to be processed asynchronously (JavaScript-friendly). * * # Arguments * - * * `options` - An optional `QueryBalanceOptions` struct containing retrieval options. + * * `events_url` - The URL to monitor for transaction events. + * * `target_hash` - The transaction hash to wait for. + * * `timeout_duration` - An optional timeout duration in seconds. * * # Returns * - * A `Result` containing either a `QueryBalanceResult` or a `JsError` in case of an error. - * - * # Errors - * - * Returns a `JsError` if there is an error during the retrieval process. - * @param {queryBalanceOptions | undefined} [options] - * @returns {Promise} + * A JavaScript `Promise` resolving to either the processed `EventParseResult` or an error message. + * @param {string} events_url + * @param {string} target_hash + * @param {number | undefined} [timeout_duration] + * @returns {Promise>} */ - query_balance(options) { - let ptr0 = 0; - if (!isLikeNone(options)) { - _assertClass(options, queryBalanceOptions); - ptr0 = options.__destroy_into_raw(); - } - const ret = wasm.sdk_query_balance(this.__wbg_ptr, ptr0); + waitTransaction(events_url, target_hash, timeout_duration) { + const ptr0 = passStringToWasm0(events_url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + const len0 = WASM_VECTOR_LEN; + const ptr1 = passStringToWasm0(target_hash, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + const len1 = WASM_VECTOR_LEN; + const ret = wasm.sdk_waitTransaction(this.__wbg_ptr, ptr0, len0, ptr1, len1, !isLikeNone(timeout_duration), isLikeNone(timeout_duration) ? 0 : timeout_duration); return ret; } /** - * Get options for speculative execution from a JavaScript value. - * @param {any} options - * @returns {getSpeculativeExecDeployOptions} + * @param {string | undefined} [node_address] + * @returns {Promise} */ - get_speculative_exec_deploy_options(options) { - const ret = wasm.sdk_get_speculative_exec_deploy_options(this.__wbg_ptr, options); - if (ret[2]) { - throw takeFromExternrefTable0(ret[1]); - } - return getSpeculativeExecDeployOptions.__wrap(ret[0]); + get_binary_latest_switch_block_header(node_address) { + var ptr0 = isLikeNone(node_address) ? 0 : passStringToWasm0(node_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + var len0 = WASM_VECTOR_LEN; + const ret = wasm.sdk_get_binary_latest_switch_block_header(this.__wbg_ptr, ptr0, len0); + return ret; } /** - * JS function for speculative execution. - * - * # Arguments - * - * * `options` - The options for speculative execution. - * - * # Returns - * - * A `Result` containing the result of the speculative execution or a `JsError` in case of an error. - * @param {getSpeculativeExecDeployOptions | undefined} [options] - * @returns {Promise} + * @param {string | undefined} [node_address] + * @returns {Promise} */ - speculative_exec_deploy(options) { - let ptr0 = 0; - if (!isLikeNone(options)) { - _assertClass(options, getSpeculativeExecDeployOptions); - ptr0 = options.__destroy_into_raw(); - } - const ret = wasm.sdk_speculative_exec_deploy(this.__wbg_ptr, ptr0); + get_binary_latest_block_header(node_address) { + var ptr0 = isLikeNone(node_address) ? 0 : passStringToWasm0(node_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + var len0 = WASM_VECTOR_LEN; + const ret = wasm.sdk_get_binary_latest_block_header(this.__wbg_ptr, ptr0, len0); return ret; } /** - * JS function for transaction transferring funds. - * - * # Arguments - * - * * `maybe_source` - Optional transfer source uref. - * * `target_account` - The target account. - * * `amount` - The amount to transfer. - * * `transaction_params` - The transaction parameters. - * * `maybe_id` - An optional transfer ID (defaults to a random number). - * * `verbosity` - The verbosity level for logging (optional). - * * `rpc_address` - The address of the node to connect to (optional). - * - * # Returns - * - * A `Result` containing the result of the transfer or a `JsError` in case of an error. - * @param {URef | undefined} maybe_source - * @param {string} target_account - * @param {string} amount - * @param {TransactionStrParams} transaction_params - * @param {string | undefined} [maybe_id] - * @param {Verbosity | undefined} [verbosity] - * @param {string | undefined} [rpc_address] - * @returns {Promise} + * @param {string | undefined} node_address + * @param {bigint} height + * @returns {Promise} */ - transfer_transaction(maybe_source, target_account, amount, transaction_params, maybe_id, verbosity, rpc_address) { - let ptr0 = 0; - if (!isLikeNone(maybe_source)) { - _assertClass(maybe_source, URef); - ptr0 = maybe_source.__destroy_into_raw(); - } - const ptr1 = passStringToWasm0(target_account, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - const len1 = WASM_VECTOR_LEN; - const ptr2 = passStringToWasm0(amount, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - const len2 = WASM_VECTOR_LEN; - _assertClass(transaction_params, TransactionStrParams); - var ptr3 = transaction_params.__destroy_into_raw(); - var ptr4 = isLikeNone(maybe_id) ? 0 : passStringToWasm0(maybe_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - var len4 = WASM_VECTOR_LEN; - var ptr5 = isLikeNone(rpc_address) ? 0 : passStringToWasm0(rpc_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - var len5 = WASM_VECTOR_LEN; - const ret = wasm.sdk_transfer_transaction(this.__wbg_ptr, ptr0, ptr1, len1, ptr2, len2, ptr3, ptr4, len4, isLikeNone(verbosity) ? 3 : verbosity, ptr5, len5); + get_binary_block_header_by_height(node_address, height) { + var ptr0 = isLikeNone(node_address) ? 0 : passStringToWasm0(node_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + var len0 = WASM_VECTOR_LEN; + const ret = wasm.sdk_get_binary_block_header_by_height(this.__wbg_ptr, ptr0, len0, height); + return ret; + } + /** + * @param {string | undefined} node_address + * @param {BlockHash} block_hash + * @returns {Promise} + */ + get_binary_block_header_by_hash(node_address, block_hash) { + var ptr0 = isLikeNone(node_address) ? 0 : passStringToWasm0(node_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + var len0 = WASM_VECTOR_LEN; + _assertClass(block_hash, BlockHash); + var ptr1 = block_hash.__destroy_into_raw(); + const ret = wasm.sdk_get_binary_block_header_by_hash(this.__wbg_ptr, ptr0, len0, ptr1); return ret; } /** - * @param {string | undefined} [rpc_address] * @param {string | undefined} [node_address] - * @param {Verbosity | undefined} [verbosity] + * @returns {Promise} */ - constructor(rpc_address, node_address, verbosity) { - var ptr0 = isLikeNone(rpc_address) ? 0 : passStringToWasm0(rpc_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + get_binary_latest_signed_block(node_address) { + var ptr0 = isLikeNone(node_address) ? 0 : passStringToWasm0(node_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); var len0 = WASM_VECTOR_LEN; - var ptr1 = isLikeNone(node_address) ? 0 : passStringToWasm0(node_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - var len1 = WASM_VECTOR_LEN; - const ret = wasm.sdk_new(ptr0, len0, ptr1, len1, isLikeNone(verbosity) ? 3 : verbosity); - this.__wbg_ptr = ret >>> 0; - SDKFinalization.register(this, this.__wbg_ptr, this); - return this; + const ret = wasm.sdk_get_binary_latest_signed_block(this.__wbg_ptr, ptr0, len0); + return ret; } /** - * @param {string | undefined} [rpc_address] - * @returns {string} + * @param {string | undefined} node_address + * @param {bigint} height + * @returns {Promise} */ - getRPCAddress(rpc_address) { - let deferred2_0; - let deferred2_1; - try { - var ptr0 = isLikeNone(rpc_address) ? 0 : passStringToWasm0(rpc_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - var len0 = WASM_VECTOR_LEN; - const ret = wasm.sdk_getRPCAddress(this.__wbg_ptr, ptr0, len0); - deferred2_0 = ret[0]; - deferred2_1 = ret[1]; - return getStringFromWasm0(ret[0], ret[1]); - } finally { - wasm.__wbindgen_free(deferred2_0, deferred2_1, 1); - } + get_binary_signed_block_by_height(node_address, height) { + var ptr0 = isLikeNone(node_address) ? 0 : passStringToWasm0(node_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + var len0 = WASM_VECTOR_LEN; + const ret = wasm.sdk_get_binary_signed_block_by_height(this.__wbg_ptr, ptr0, len0, height); + return ret; } /** - * @param {string | undefined} [rpc_address] + * @param {string | undefined} node_address + * @param {BlockHash} block_hash + * @returns {Promise} */ - setRPCAddress(rpc_address) { - var ptr0 = isLikeNone(rpc_address) ? 0 : passStringToWasm0(rpc_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + get_binary_signed_block_by_hash(node_address, block_hash) { + var ptr0 = isLikeNone(node_address) ? 0 : passStringToWasm0(node_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); var len0 = WASM_VECTOR_LEN; - const ret = wasm.sdk_setRPCAddress(this.__wbg_ptr, ptr0, len0); - if (ret[1]) { - throw takeFromExternrefTable0(ret[0]); - } + _assertClass(block_hash, BlockHash); + var ptr1 = block_hash.__destroy_into_raw(); + const ret = wasm.sdk_get_binary_signed_block_by_hash(this.__wbg_ptr, ptr0, len0, ptr1); + return ret; + } + /** + * @param {string | undefined} node_address + * @param {TransactionHash} hash + * @param {boolean} with_finalized_approvals + * @returns {Promise} + */ + get_binary_transaction_by_hash(node_address, hash, with_finalized_approvals) { + var ptr0 = isLikeNone(node_address) ? 0 : passStringToWasm0(node_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + var len0 = WASM_VECTOR_LEN; + _assertClass(hash, TransactionHash); + var ptr1 = hash.__destroy_into_raw(); + const ret = wasm.sdk_get_binary_transaction_by_hash(this.__wbg_ptr, ptr0, len0, ptr1, with_finalized_approvals); + return ret; } /** * @param {string | undefined} [node_address] - * @returns {string} + * @returns {Promise} */ - getNodeAddress(node_address) { - let deferred2_0; - let deferred2_1; - try { - var ptr0 = isLikeNone(node_address) ? 0 : passStringToWasm0(node_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - var len0 = WASM_VECTOR_LEN; - const ret = wasm.sdk_getNodeAddress(this.__wbg_ptr, ptr0, len0); - deferred2_0 = ret[0]; - deferred2_1 = ret[1]; - return getStringFromWasm0(ret[0], ret[1]); - } finally { - wasm.__wbindgen_free(deferred2_0, deferred2_1, 1); - } + get_binary_peers(node_address) { + var ptr0 = isLikeNone(node_address) ? 0 : passStringToWasm0(node_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + var len0 = WASM_VECTOR_LEN; + const ret = wasm.sdk_get_binary_peers(this.__wbg_ptr, ptr0, len0); + return ret; } /** * @param {string | undefined} [node_address] + * @returns {Promise} */ - setNodeAddress(node_address) { + get_binary_uptime(node_address) { var ptr0 = isLikeNone(node_address) ? 0 : passStringToWasm0(node_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); var len0 = WASM_VECTOR_LEN; - const ret = wasm.sdk_setNodeAddress(this.__wbg_ptr, ptr0, len0); - if (ret[1]) { - throw takeFromExternrefTable0(ret[0]); - } + const ret = wasm.sdk_get_binary_uptime(this.__wbg_ptr, ptr0, len0); + return ret; } /** - * @param {Verbosity | undefined} [verbosity] - * @returns {Verbosity} + * @param {string | undefined} [node_address] + * @returns {Promise} */ - getVerbosity(verbosity) { - const ret = wasm.sdk_getVerbosity(this.__wbg_ptr, isLikeNone(verbosity) ? 3 : verbosity); + get_binary_last_progress(node_address) { + var ptr0 = isLikeNone(node_address) ? 0 : passStringToWasm0(node_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + var len0 = WASM_VECTOR_LEN; + const ret = wasm.sdk_get_binary_last_progress(this.__wbg_ptr, ptr0, len0); return ret; } /** - * @param {Verbosity | undefined} [verbosity] + * @param {string | undefined} [node_address] + * @returns {Promise} */ - setVerbosity(verbosity) { - const ret = wasm.sdk_setVerbosity(this.__wbg_ptr, isLikeNone(verbosity) ? 3 : verbosity); - if (ret[1]) { - throw takeFromExternrefTable0(ret[0]); - } + get_binary_reactor_state(node_address) { + var ptr0 = isLikeNone(node_address) ? 0 : passStringToWasm0(node_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + var len0 = WASM_VECTOR_LEN; + const ret = wasm.sdk_get_binary_reactor_state(this.__wbg_ptr, ptr0, len0); + return ret; } /** - * JS function for transferring funds. - * - * # Arguments - * - * * `amount` - The amount to transfer. - * * `target_account` - The target account. - * * `transfer_id` - An optional transfer ID (defaults to a random number). - * * `deploy_params` - The deployment parameters. - * * `payment_params` - The payment parameters. - * * `verbosity` - The verbosity level for logging (optional). - * * `rpc_address` - The address of the node to connect to (optional). - * - * # Returns - * - * A `Result` containing the result of the transfer or a `JsError` in case of an error. - * @param {string} amount - * @param {string} target_account - * @param {string | undefined} transfer_id - * @param {DeployStrParams} deploy_params - * @param {PaymentStrParams} payment_params - * @param {Verbosity | undefined} [verbosity] - * @param {string | undefined} [rpc_address] - * @returns {Promise} + * @param {string | undefined} [node_address] + * @returns {Promise} */ - transfer(amount, target_account, transfer_id, deploy_params, payment_params, verbosity, rpc_address) { - const ptr0 = passStringToWasm0(amount, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - const len0 = WASM_VECTOR_LEN; - const ptr1 = passStringToWasm0(target_account, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - const len1 = WASM_VECTOR_LEN; - var ptr2 = isLikeNone(transfer_id) ? 0 : passStringToWasm0(transfer_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - var len2 = WASM_VECTOR_LEN; - _assertClass(deploy_params, DeployStrParams); - var ptr3 = deploy_params.__destroy_into_raw(); - _assertClass(payment_params, PaymentStrParams); - var ptr4 = payment_params.__destroy_into_raw(); - var ptr5 = isLikeNone(rpc_address) ? 0 : passStringToWasm0(rpc_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - var len5 = WASM_VECTOR_LEN; - const ret = wasm.sdk_transfer(this.__wbg_ptr, ptr0, len0, ptr1, len1, ptr2, len2, ptr3, ptr4, isLikeNone(verbosity) ? 3 : verbosity, ptr5, len5); + get_binary_network_name(node_address) { + var ptr0 = isLikeNone(node_address) ? 0 : passStringToWasm0(node_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + var len0 = WASM_VECTOR_LEN; + const ret = wasm.sdk_get_binary_network_name(this.__wbg_ptr, ptr0, len0); return ret; } /** - * @param {any} options - * @returns {getEntityOptions} - */ - get_entity_options(options) { - const ret = wasm.sdk_get_entity_options(this.__wbg_ptr, options); - if (ret[2]) { - throw takeFromExternrefTable0(ret[1]); - } - return getEntityOptions.__wrap(ret[0]); - } - /** - * Retrieves entity information using the provided options. - * - * This function is an asynchronous JavaScript binding for the Rust `get_entity` method. - * - * # Arguments - * - * * `options` - An optional `GetEntityOptions` struct containing retrieval options, such as: - * - `entity_identifier`: Identifier for the entity. - * - `entity_identifier_as_string`: String representation of the entity identifier. - * - `maybe_block_id_as_string`: Optional string representation of the block ID. - * - `maybe_block_identifier`: Optional `BlockIdentifierInput` for specifying the block. - * - `verbosity`: Verbosity level for the output. - * - `rpc_address`: Address of the node to query. - * - * # Returns - * - * A `Result` containing either a `GetAddressableEntityResult` on success or a `JsError` on failure. - * - * # Errors - * - * Returns a `JsError` if there is an error during the retrieval process, such as issues with the provided options or network errors. - * ``` - * @param {getEntityOptions | undefined} [options] - * @returns {Promise} + * @param {string | undefined} [node_address] + * @returns {Promise} */ - get_entity(options) { - let ptr0 = 0; - if (!isLikeNone(options)) { - _assertClass(options, getEntityOptions); - ptr0 = options.__destroy_into_raw(); - } - const ret = wasm.sdk_get_entity(this.__wbg_ptr, ptr0); + get_binary_consensus_validator_changes(node_address) { + var ptr0 = isLikeNone(node_address) ? 0 : passStringToWasm0(node_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + var len0 = WASM_VECTOR_LEN; + const ret = wasm.sdk_get_binary_consensus_validator_changes(this.__wbg_ptr, ptr0, len0); return ret; } /** - * @param {getEntityOptions | undefined} [options] - * @returns {Promise} + * @param {string | undefined} [node_address] + * @returns {Promise} */ - state_get_entity(options) { - let ptr0 = 0; - if (!isLikeNone(options)) { - _assertClass(options, getEntityOptions); - ptr0 = options.__destroy_into_raw(); - } - const ret = wasm.sdk_state_get_entity(this.__wbg_ptr, ptr0); + get_binary_block_synchronizer_status(node_address) { + var ptr0 = isLikeNone(node_address) ? 0 : passStringToWasm0(node_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + var len0 = WASM_VECTOR_LEN; + const ret = wasm.sdk_get_binary_block_synchronizer_status(this.__wbg_ptr, ptr0, len0); return ret; } /** - * Puts a transaction using the provided options. - * - * # Arguments - * - * * `transaction` - The `Transaction` object to be sent. - * * `verbosity` - An optional `Verbosity` level for controlling the output verbosity. - * * `rpc_address` - An optional string specifying the rpc address to use for the request. - * - * # Returns - * - * A `Result` containing either a `PutTransactionResult` or a `JsError` in case of an error. - * - * # Errors - * - * Returns a `JsError` if there is an error during the transaction process. - * @param {Transaction} transaction - * @param {Verbosity | undefined} [verbosity] - * @param {string | undefined} [rpc_address] - * @returns {Promise} + * @param {string | undefined} [node_address] + * @returns {Promise} */ - put_transaction(transaction, verbosity, rpc_address) { - _assertClass(transaction, Transaction); - var ptr0 = transaction.__destroy_into_raw(); - var ptr1 = isLikeNone(rpc_address) ? 0 : passStringToWasm0(rpc_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - var len1 = WASM_VECTOR_LEN; - const ret = wasm.sdk_put_transaction(this.__wbg_ptr, ptr0, isLikeNone(verbosity) ? 3 : verbosity, ptr1, len1); + get_binary_available_block_range(node_address) { + var ptr0 = isLikeNone(node_address) ? 0 : passStringToWasm0(node_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + var len0 = WASM_VECTOR_LEN; + const ret = wasm.sdk_get_binary_available_block_range(this.__wbg_ptr, ptr0, len0); return ret; } /** - * JavaScript Alias for `put_transaction`. - * @param {Transaction} transaction - * @param {Verbosity | undefined} [verbosity] - * @param {string | undefined} [rpc_address] - * @returns {Promise} + * @param {string | undefined} [node_address] + * @returns {Promise} */ - account_put_transaction(transaction, verbosity, rpc_address) { - _assertClass(transaction, Transaction); - var ptr0 = transaction.__destroy_into_raw(); - var ptr1 = isLikeNone(rpc_address) ? 0 : passStringToWasm0(rpc_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - var len1 = WASM_VECTOR_LEN; - const ret = wasm.sdk_account_put_transaction(this.__wbg_ptr, ptr0, isLikeNone(verbosity) ? 3 : verbosity, ptr1, len1); + get_binary_next_upgrade(node_address) { + var ptr0 = isLikeNone(node_address) ? 0 : passStringToWasm0(node_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + var len0 = WASM_VECTOR_LEN; + const ret = wasm.sdk_get_binary_next_upgrade(this.__wbg_ptr, ptr0, len0); return ret; } /** - * Parses query balance options from a JsValue. - * - * # Arguments - * - * * `options` - A JsValue containing query balance options to be parsed. - * - * # Returns - * - * Parsed query balance options as a `QueryBalanceDetailsOptions` struct. - * @param {any} options - * @returns {queryBalanceDetailsOptions} + * @param {string | undefined} [node_address] + * @returns {Promise} */ - query_balance_details_options(options) { - const ret = wasm.sdk_query_balance_details_options(this.__wbg_ptr, options); - if (ret[2]) { - throw takeFromExternrefTable0(ret[1]); - } - return queryBalanceDetailsOptions.__wrap(ret[0]); + get_binary_consensus_status(node_address) { + var ptr0 = isLikeNone(node_address) ? 0 : passStringToWasm0(node_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + var len0 = WASM_VECTOR_LEN; + const ret = wasm.sdk_get_binary_consensus_status(this.__wbg_ptr, ptr0, len0); + return ret; } /** - * Retrieves balance information using the provided options. - * - * # Arguments - * - * * `options` - An optional `QueryBalanceDetailsOptions` struct containing retrieval options. - * - * # Returns - * - * A `Result` containing either a `QueryBalanceDetailsResult` or a `JsError` in case of an error. - * - * # Errors - * - * Returns a `JsError` if there is an error during the retrieval process. - * @param {queryBalanceDetailsOptions | undefined} [options] - * @returns {Promise} + * @param {string | undefined} [node_address] + * @returns {Promise} */ - query_balance_details(options) { - let ptr0 = 0; - if (!isLikeNone(options)) { - _assertClass(options, queryBalanceDetailsOptions); - ptr0 = options.__destroy_into_raw(); - } - const ret = wasm.sdk_query_balance_details(this.__wbg_ptr, ptr0); + get_binary_chainspec_raw_bytes(node_address) { + var ptr0 = isLikeNone(node_address) ? 0 : passStringToWasm0(node_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + var len0 = WASM_VECTOR_LEN; + const ret = wasm.sdk_get_binary_chainspec_raw_bytes(this.__wbg_ptr, ptr0, len0); return ret; } /** - * Parses query global state options from a JsValue. - * - * # Arguments - * - * * `options` - A JsValue containing query global state options to be parsed. - * - * # Returns - * - * Parsed query global state options as a `QueryGlobalStateOptions` struct. - * @param {any} options - * @returns {queryGlobalStateOptions} + * @param {string | undefined} [node_address] + * @returns {Promise} */ - query_global_state_options(options) { - const ret = wasm.sdk_query_global_state_options(this.__wbg_ptr, options); - if (ret[2]) { - throw takeFromExternrefTable0(ret[1]); - } - return queryGlobalStateOptions.__wrap(ret[0]); + get_binary_node_status(node_address) { + var ptr0 = isLikeNone(node_address) ? 0 : passStringToWasm0(node_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + var len0 = WASM_VECTOR_LEN; + const ret = wasm.sdk_get_binary_node_status(this.__wbg_ptr, ptr0, len0); + return ret; } /** - * Retrieves global state information using the provided options. - * - * # Arguments - * - * * `options` - An optional `QueryGlobalStateOptions` struct containing retrieval options. - * - * # Returns - * - * A `Result` containing either a `QueryGlobalStateResult` or a `JsError` in case of an error. - * - * # Errors - * - * Returns a `JsError` if there is an error during the retrieval process. - * @param {queryGlobalStateOptions | undefined} [options] - * @returns {Promise} + * @param {string | undefined} node_address + * @param {PublicKey} validator_key + * @param {EraId} era + * @returns {Promise} */ - query_global_state(options) { - let ptr0 = 0; - if (!isLikeNone(options)) { - _assertClass(options, queryGlobalStateOptions); - ptr0 = options.__destroy_into_raw(); - } - const ret = wasm.sdk_query_global_state(this.__wbg_ptr, ptr0); - return ret; - } - /** - * This function allows executing a transaction speculatively. - * - * # Arguments - * - * * `builder_params` - Transaction Builder parameters. - * * `transaction_params` - Transactionment parameters for the transaction. - * * `verbosity` - Optional verbosity level. - * * `rpc_address` - Optional rpc address. - * - * # Returns - * - * A `Result` containing either a `SpeculativeExecTxnResult` or a `JsError` in case of an error. - * @param {TransactionBuilderParams} builder_params - * @param {TransactionStrParams} transaction_params - * @param {Verbosity | undefined} [verbosity] - * @param {string | undefined} [rpc_address] - * @returns {Promise} - */ - speculative_transaction(builder_params, transaction_params, verbosity, rpc_address) { - _assertClass(builder_params, TransactionBuilderParams); - var ptr0 = builder_params.__destroy_into_raw(); - _assertClass(transaction_params, TransactionStrParams); - var ptr1 = transaction_params.__destroy_into_raw(); - var ptr2 = isLikeNone(rpc_address) ? 0 : passStringToWasm0(rpc_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - var len2 = WASM_VECTOR_LEN; - const ret = wasm.sdk_speculative_transaction(this.__wbg_ptr, ptr0, ptr1, isLikeNone(verbosity) ? 3 : verbosity, ptr2, len2); - return ret; - } - /** - * JS function for speculative transfer transaction. - * - * # Arguments - * - * * `maybe_source` - Optional transfer source uref. - * * `target_account` - The target account. - * * `amount` - The amount to transfer. - * * `maybe_id` - An optional transfer ID (defaults to a random number). - * * `transaction_params` - The transactionment parameters. - * * `verbosity` - The verbosity level for logging (optional). - * * `rpc_address` - The address of the node to connect to (optional). - * - * # Returns - * - * A `Result` containing the result of the speculative transfer or a `JsError` in case of an error. - * @param {URef | undefined} maybe_source - * @param {string} target_account - * @param {string} amount - * @param {TransactionStrParams} transaction_params - * @param {string | undefined} [maybe_id] - * @param {Verbosity | undefined} [verbosity] - * @param {string | undefined} [rpc_address] - * @returns {Promise} - */ - speculative_transfer_transaction(maybe_source, target_account, amount, transaction_params, maybe_id, verbosity, rpc_address) { - let ptr0 = 0; - if (!isLikeNone(maybe_source)) { - _assertClass(maybe_source, URef); - ptr0 = maybe_source.__destroy_into_raw(); - } - const ptr1 = passStringToWasm0(target_account, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - const len1 = WASM_VECTOR_LEN; - const ptr2 = passStringToWasm0(amount, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - const len2 = WASM_VECTOR_LEN; - _assertClass(transaction_params, TransactionStrParams); - var ptr3 = transaction_params.__destroy_into_raw(); - var ptr4 = isLikeNone(maybe_id) ? 0 : passStringToWasm0(maybe_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - var len4 = WASM_VECTOR_LEN; - var ptr5 = isLikeNone(rpc_address) ? 0 : passStringToWasm0(rpc_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - var len5 = WASM_VECTOR_LEN; - const ret = wasm.sdk_speculative_transfer_transaction(this.__wbg_ptr, ptr0, ptr1, len1, ptr2, len2, ptr3, ptr4, len4, isLikeNone(verbosity) ? 3 : verbosity, ptr5, len5); - return ret; - } - /** - * @param {string | undefined} [node_address] - * @returns {Promise} - */ - get_binary_latest_switch_block_header(node_address) { - var ptr0 = isLikeNone(node_address) ? 0 : passStringToWasm0(node_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - var len0 = WASM_VECTOR_LEN; - const ret = wasm.sdk_get_binary_latest_switch_block_header(this.__wbg_ptr, ptr0, len0); - return ret; - } - /** - * @param {string | undefined} [node_address] - * @returns {Promise} - */ - get_binary_latest_block_header(node_address) { - var ptr0 = isLikeNone(node_address) ? 0 : passStringToWasm0(node_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - var len0 = WASM_VECTOR_LEN; - const ret = wasm.sdk_get_binary_latest_block_header(this.__wbg_ptr, ptr0, len0); + get_binary_get_validator_reward_by_era(node_address, validator_key, era) { + var ptr0 = isLikeNone(node_address) ? 0 : passStringToWasm0(node_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + var len0 = WASM_VECTOR_LEN; + _assertClass(validator_key, PublicKey); + var ptr1 = validator_key.__destroy_into_raw(); + _assertClass(era, EraId); + var ptr2 = era.__destroy_into_raw(); + const ret = wasm.sdk_get_binary_get_validator_reward_by_era(this.__wbg_ptr, ptr0, len0, ptr1, ptr2); return ret; } /** * @param {string | undefined} node_address - * @param {bigint} height + * @param {PublicKey} validator_key + * @param {bigint} block_height * @returns {Promise} */ - get_binary_block_header_by_height(node_address, height) { + get_binary_get_validator_reward_by_block_height(node_address, validator_key, block_height) { var ptr0 = isLikeNone(node_address) ? 0 : passStringToWasm0(node_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); var len0 = WASM_VECTOR_LEN; - const ret = wasm.sdk_get_binary_block_header_by_height(this.__wbg_ptr, ptr0, len0, height); + _assertClass(validator_key, PublicKey); + var ptr1 = validator_key.__destroy_into_raw(); + const ret = wasm.sdk_get_binary_get_validator_reward_by_block_height(this.__wbg_ptr, ptr0, len0, ptr1, block_height); return ret; } /** * @param {string | undefined} node_address + * @param {PublicKey} validator_key * @param {BlockHash} block_hash * @returns {Promise} */ - get_binary_block_header_by_hash(node_address, block_hash) { + get_binary_get_validator_reward_by_block_hash(node_address, validator_key, block_hash) { var ptr0 = isLikeNone(node_address) ? 0 : passStringToWasm0(node_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); var len0 = WASM_VECTOR_LEN; + _assertClass(validator_key, PublicKey); + var ptr1 = validator_key.__destroy_into_raw(); _assertClass(block_hash, BlockHash); - var ptr1 = block_hash.__destroy_into_raw(); - const ret = wasm.sdk_get_binary_block_header_by_hash(this.__wbg_ptr, ptr0, len0, ptr1); + var ptr2 = block_hash.__destroy_into_raw(); + const ret = wasm.sdk_get_binary_get_validator_reward_by_block_hash(this.__wbg_ptr, ptr0, len0, ptr1, ptr2); return ret; } /** - * @param {string | undefined} [node_address] + * @param {string | undefined} node_address + * @param {PublicKey} validator_key + * @param {PublicKey} delegator_key + * @param {EraId} era * @returns {Promise} */ - get_binary_latest_signed_block(node_address) { + get_binary_get_delegator_reward_by_era(node_address, validator_key, delegator_key, era) { var ptr0 = isLikeNone(node_address) ? 0 : passStringToWasm0(node_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); var len0 = WASM_VECTOR_LEN; - const ret = wasm.sdk_get_binary_latest_signed_block(this.__wbg_ptr, ptr0, len0); + _assertClass(validator_key, PublicKey); + var ptr1 = validator_key.__destroy_into_raw(); + _assertClass(delegator_key, PublicKey); + var ptr2 = delegator_key.__destroy_into_raw(); + _assertClass(era, EraId); + var ptr3 = era.__destroy_into_raw(); + const ret = wasm.sdk_get_binary_get_delegator_reward_by_era(this.__wbg_ptr, ptr0, len0, ptr1, ptr2, ptr3); return ret; } /** * @param {string | undefined} node_address - * @param {bigint} height + * @param {PublicKey} validator_key + * @param {PublicKey} delegator_key + * @param {bigint} block_height * @returns {Promise} */ - get_binary_signed_block_by_height(node_address, height) { + get_binary_get_delegator_reward_by_block_height(node_address, validator_key, delegator_key, block_height) { var ptr0 = isLikeNone(node_address) ? 0 : passStringToWasm0(node_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); var len0 = WASM_VECTOR_LEN; - const ret = wasm.sdk_get_binary_signed_block_by_height(this.__wbg_ptr, ptr0, len0, height); + _assertClass(validator_key, PublicKey); + var ptr1 = validator_key.__destroy_into_raw(); + _assertClass(delegator_key, PublicKey); + var ptr2 = delegator_key.__destroy_into_raw(); + const ret = wasm.sdk_get_binary_get_delegator_reward_by_block_height(this.__wbg_ptr, ptr0, len0, ptr1, ptr2, block_height); return ret; } /** * @param {string | undefined} node_address + * @param {PublicKey} validator_key + * @param {PublicKey} delegator_key * @param {BlockHash} block_hash * @returns {Promise} */ - get_binary_signed_block_by_hash(node_address, block_hash) { + get_binary_get_delegator_reward_by_block_hash(node_address, validator_key, delegator_key, block_hash) { var ptr0 = isLikeNone(node_address) ? 0 : passStringToWasm0(node_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); var len0 = WASM_VECTOR_LEN; + _assertClass(validator_key, PublicKey); + var ptr1 = validator_key.__destroy_into_raw(); + _assertClass(delegator_key, PublicKey); + var ptr2 = delegator_key.__destroy_into_raw(); _assertClass(block_hash, BlockHash); - var ptr1 = block_hash.__destroy_into_raw(); - const ret = wasm.sdk_get_binary_signed_block_by_hash(this.__wbg_ptr, ptr0, len0, ptr1); + var ptr3 = block_hash.__destroy_into_raw(); + const ret = wasm.sdk_get_binary_get_delegator_reward_by_block_hash(this.__wbg_ptr, ptr0, len0, ptr1, ptr2, ptr3); return ret; } /** * @param {string | undefined} node_address - * @param {TransactionHash} hash - * @param {boolean} with_finalized_approvals + * @param {RecordId} record_id + * @param {Uint8Array} key * @returns {Promise} */ - get_binary_transaction_by_hash(node_address, hash, with_finalized_approvals) { + get_binary_read_record(node_address, record_id, key) { var ptr0 = isLikeNone(node_address) ? 0 : passStringToWasm0(node_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); var len0 = WASM_VECTOR_LEN; - _assertClass(hash, TransactionHash); - var ptr1 = hash.__destroy_into_raw(); - const ret = wasm.sdk_get_binary_transaction_by_hash(this.__wbg_ptr, ptr0, len0, ptr1, with_finalized_approvals); + _assertClass(record_id, RecordId); + var ptr1 = record_id.__destroy_into_raw(); + const ptr2 = passArray8ToWasm0(key, wasm.__wbindgen_malloc); + const len2 = WASM_VECTOR_LEN; + const ret = wasm.sdk_get_binary_read_record(this.__wbg_ptr, ptr0, len0, ptr1, ptr2, len2); return ret; } /** - * @param {string | undefined} [node_address] + * @param {string | undefined} node_address + * @param {Key} key + * @param {(string)[]} path * @returns {Promise} */ - get_binary_peers(node_address) { + get_binary_global_state_item(node_address, key, path) { var ptr0 = isLikeNone(node_address) ? 0 : passStringToWasm0(node_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); var len0 = WASM_VECTOR_LEN; - const ret = wasm.sdk_get_binary_peers(this.__wbg_ptr, ptr0, len0); + _assertClass(key, Key); + var ptr1 = key.__destroy_into_raw(); + const ptr2 = passArrayJsValueToWasm0(path, wasm.__wbindgen_malloc); + const len2 = WASM_VECTOR_LEN; + const ret = wasm.sdk_get_binary_global_state_item(this.__wbg_ptr, ptr0, len0, ptr1, ptr2, len2); return ret; } /** - * @param {string | undefined} [node_address] + * @param {string | undefined} node_address + * @param {Digest} state_root_hash + * @param {Key} key + * @param {(string)[]} path * @returns {Promise} */ - get_binary_uptime(node_address) { + get_binary_global_state_item_by_state_root_hash(node_address, state_root_hash, key, path) { var ptr0 = isLikeNone(node_address) ? 0 : passStringToWasm0(node_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); var len0 = WASM_VECTOR_LEN; - const ret = wasm.sdk_get_binary_uptime(this.__wbg_ptr, ptr0, len0); + _assertClass(state_root_hash, Digest); + var ptr1 = state_root_hash.__destroy_into_raw(); + _assertClass(key, Key); + var ptr2 = key.__destroy_into_raw(); + const ptr3 = passArrayJsValueToWasm0(path, wasm.__wbindgen_malloc); + const len3 = WASM_VECTOR_LEN; + const ret = wasm.sdk_get_binary_global_state_item_by_state_root_hash(this.__wbg_ptr, ptr0, len0, ptr1, ptr2, ptr3, len3); return ret; } /** - * @param {string | undefined} [node_address] + * @param {string | undefined} node_address + * @param {BlockHash} block_hash + * @param {Key} key + * @param {(string)[]} path * @returns {Promise} */ - get_binary_last_progress(node_address) { + get_binary_global_state_item_by_block_hash(node_address, block_hash, key, path) { var ptr0 = isLikeNone(node_address) ? 0 : passStringToWasm0(node_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); var len0 = WASM_VECTOR_LEN; - const ret = wasm.sdk_get_binary_last_progress(this.__wbg_ptr, ptr0, len0); + _assertClass(block_hash, BlockHash); + var ptr1 = block_hash.__destroy_into_raw(); + _assertClass(key, Key); + var ptr2 = key.__destroy_into_raw(); + const ptr3 = passArrayJsValueToWasm0(path, wasm.__wbindgen_malloc); + const len3 = WASM_VECTOR_LEN; + const ret = wasm.sdk_get_binary_global_state_item_by_block_hash(this.__wbg_ptr, ptr0, len0, ptr1, ptr2, ptr3, len3); return ret; } /** - * @param {string | undefined} [node_address] + * @param {string | undefined} node_address + * @param {bigint} block_height + * @param {Key} key + * @param {(string)[]} path * @returns {Promise} */ - get_binary_reactor_state(node_address) { + get_binary_global_state_item_by_block_height(node_address, block_height, key, path) { var ptr0 = isLikeNone(node_address) ? 0 : passStringToWasm0(node_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); var len0 = WASM_VECTOR_LEN; - const ret = wasm.sdk_get_binary_reactor_state(this.__wbg_ptr, ptr0, len0); + _assertClass(key, Key); + var ptr1 = key.__destroy_into_raw(); + const ptr2 = passArrayJsValueToWasm0(path, wasm.__wbindgen_malloc); + const len2 = WASM_VECTOR_LEN; + const ret = wasm.sdk_get_binary_global_state_item_by_block_height(this.__wbg_ptr, ptr0, len0, block_height, ptr1, ptr2, len2); return ret; } /** - * @param {string | undefined} [node_address] + * @param {string | undefined} node_address + * @param {Transaction} transaction * @returns {Promise} */ - get_binary_network_name(node_address) { + get_binary_try_accept_transaction(node_address, transaction) { var ptr0 = isLikeNone(node_address) ? 0 : passStringToWasm0(node_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); var len0 = WASM_VECTOR_LEN; - const ret = wasm.sdk_get_binary_network_name(this.__wbg_ptr, ptr0, len0); + _assertClass(transaction, Transaction); + var ptr1 = transaction.__destroy_into_raw(); + const ret = wasm.sdk_get_binary_try_accept_transaction(this.__wbg_ptr, ptr0, len0, ptr1); return ret; } /** - * @param {string | undefined} [node_address] + * @param {string | undefined} node_address + * @param {Transaction} transaction * @returns {Promise} */ - get_binary_consensus_validator_changes(node_address) { + get_binary_try_speculative_execution(node_address, transaction) { var ptr0 = isLikeNone(node_address) ? 0 : passStringToWasm0(node_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); var len0 = WASM_VECTOR_LEN; - const ret = wasm.sdk_get_binary_consensus_validator_changes(this.__wbg_ptr, ptr0, len0); + _assertClass(transaction, Transaction); + var ptr1 = transaction.__destroy_into_raw(); + const ret = wasm.sdk_get_binary_try_speculative_execution(this.__wbg_ptr, ptr0, len0, ptr1); return ret; } /** * @param {string | undefined} [node_address] * @returns {Promise} */ - get_binary_block_synchronizer_status(node_address) { + get_binary_get_protocol_version(node_address) { var ptr0 = isLikeNone(node_address) ? 0 : passStringToWasm0(node_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); var len0 = WASM_VECTOR_LEN; - const ret = wasm.sdk_get_binary_block_synchronizer_status(this.__wbg_ptr, ptr0, len0); + const ret = wasm.sdk_get_binary_get_protocol_version(this.__wbg_ptr, ptr0, len0); return ret; } /** - * @param {string | undefined} [node_address] - * @returns {Promise} + * Parses auction info options from a JsValue. + * + * # Arguments + * + * * `options` - A JsValue containing auction info options to be parsed. + * + * # Returns + * + * Result containing parsed auction info options as a `GetAuctionInfoOptions` struct, + * or a `JsError` if deserialization fails. + * @param {any} options + * @returns {getAuctionInfoOptions} */ - get_binary_available_block_range(node_address) { - var ptr0 = isLikeNone(node_address) ? 0 : passStringToWasm0(node_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - var len0 = WASM_VECTOR_LEN; - const ret = wasm.sdk_get_binary_available_block_range(this.__wbg_ptr, ptr0, len0); - return ret; + get_auction_info_options(options) { + const ret = wasm.sdk_get_auction_info_options(this.__wbg_ptr, options); + if (ret[2]) { + throw takeFromExternrefTable0(ret[1]); + } + return getAuctionInfoOptions.__wrap(ret[0]); } /** - * @param {string | undefined} [node_address] - * @returns {Promise} + * Retrieves auction information using the provided options. + * + * # Arguments + * + * * `options` - An optional `GetAuctionInfoOptions` struct containing retrieval options. + * + * # Returns + * + * A `Result` containing either a `GetAuctionInfoResult` or a `JsError` in case of an error. + * + * # Errors + * + * Returns a `JsError` if there is an error during the retrieval process. + * @param {getAuctionInfoOptions | undefined} [options] + * @returns {Promise} */ - get_binary_next_upgrade(node_address) { - var ptr0 = isLikeNone(node_address) ? 0 : passStringToWasm0(node_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - var len0 = WASM_VECTOR_LEN; - const ret = wasm.sdk_get_binary_next_upgrade(this.__wbg_ptr, ptr0, len0); + get_auction_info(options) { + let ptr0 = 0; + if (!isLikeNone(options)) { + _assertClass(options, getAuctionInfoOptions); + ptr0 = options.__destroy_into_raw(); + } + const ret = wasm.sdk_get_auction_info(this.__wbg_ptr, ptr0); return ret; } /** - * @param {string | undefined} [node_address] - * @returns {Promise} + * @param {getAuctionInfoOptions | undefined} [options] + * @returns {Promise} */ - get_binary_consensus_status(node_address) { - var ptr0 = isLikeNone(node_address) ? 0 : passStringToWasm0(node_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - var len0 = WASM_VECTOR_LEN; - const ret = wasm.sdk_get_binary_consensus_status(this.__wbg_ptr, ptr0, len0); + state_get_auction_info_js_alias(options) { + let ptr0 = 0; + if (!isLikeNone(options)) { + _assertClass(options, getAuctionInfoOptions); + ptr0 = options.__destroy_into_raw(); + } + const ret = wasm.sdk_state_get_auction_info_js_alias(this.__wbg_ptr, ptr0); return ret; } /** - * @param {string | undefined} [node_address] - * @returns {Promise} + * Parses block options from a JsValue. + * + * # Arguments + * + * * `options` - A JsValue containing block options to be parsed. + * + * # Returns + * + * Parsed block options as a `GetBlockOptions` struct. + * @param {any} options + * @returns {getBlockOptions} */ - get_binary_chainspec_raw_bytes(node_address) { - var ptr0 = isLikeNone(node_address) ? 0 : passStringToWasm0(node_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - var len0 = WASM_VECTOR_LEN; - const ret = wasm.sdk_get_binary_chainspec_raw_bytes(this.__wbg_ptr, ptr0, len0); + get_block_options(options) { + const ret = wasm.sdk_get_block_options(this.__wbg_ptr, options); + if (ret[2]) { + throw takeFromExternrefTable0(ret[1]); + } + return getBlockOptions.__wrap(ret[0]); + } + /** + * Retrieves block information using the provided options. + * + * # Arguments + * + * * `options` - An optional `GetBlockOptions` struct containing retrieval options. + * + * # Returns + * + * A `Result` containing either a `GetBlockResult` or a `JsError` in case of an error. + * + * # Errors + * + * Returns a `JsError` if there is an error during the retrieval process. + * @param {getBlockOptions | undefined} [options] + * @returns {Promise} + */ + get_block(options) { + let ptr0 = 0; + if (!isLikeNone(options)) { + _assertClass(options, getBlockOptions); + ptr0 = options.__destroy_into_raw(); + } + const ret = wasm.sdk_get_block(this.__wbg_ptr, ptr0); return ret; } /** - * @param {string | undefined} [node_address] - * @returns {Promise} + * JavaScript Alias for the `get_block`. + * + * # Arguments + * + * * `options` - An optional `GetBlockOptions` struct containing retrieval options. + * + * # Returns + * + * A `Result` containing either a `GetBlockResult` or a `JsError` in case of an error. + * + * # Errors + * + * Returns a `JsError` if there is an error during the retrieval process. + * @param {getBlockOptions | undefined} [options] + * @returns {Promise} */ - get_binary_node_status(node_address) { - var ptr0 = isLikeNone(node_address) ? 0 : passStringToWasm0(node_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - var len0 = WASM_VECTOR_LEN; - const ret = wasm.sdk_get_binary_node_status(this.__wbg_ptr, ptr0, len0); + chain_get_block(options) { + let ptr0 = 0; + if (!isLikeNone(options)) { + _assertClass(options, getBlockOptions); + ptr0 = options.__destroy_into_raw(); + } + const ret = wasm.sdk_chain_get_block(this.__wbg_ptr, ptr0); return ret; } /** - * @param {string | undefined} node_address - * @param {PublicKey} validator_key - * @param {EraId} era - * @returns {Promise} + * Asynchronously retrieves the chainspec. + * + * # Arguments + * + * * `verbosity` - An optional `Verbosity` parameter. + * * `rpc_address` - An optional rpc address as a string. + * + * # Returns + * + * A `Result` containing either a `GetChainspecResult` or a `JsError` in case of an error. + * @param {Verbosity | undefined} [verbosity] + * @param {string | undefined} [rpc_address] + * @returns {Promise} */ - get_binary_get_validator_reward_by_era(node_address, validator_key, era) { - var ptr0 = isLikeNone(node_address) ? 0 : passStringToWasm0(node_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + get_chainspec(verbosity, rpc_address) { + var ptr0 = isLikeNone(rpc_address) ? 0 : passStringToWasm0(rpc_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); var len0 = WASM_VECTOR_LEN; - _assertClass(validator_key, PublicKey); - var ptr1 = validator_key.__destroy_into_raw(); - _assertClass(era, EraId); - var ptr2 = era.__destroy_into_raw(); - const ret = wasm.sdk_get_binary_get_validator_reward_by_era(this.__wbg_ptr, ptr0, len0, ptr1, ptr2); + const ret = wasm.sdk_get_chainspec(this.__wbg_ptr, isLikeNone(verbosity) ? 3 : verbosity, ptr0, len0); return ret; } /** - * @param {string | undefined} node_address - * @param {PublicKey} validator_key - * @param {bigint} block_height - * @returns {Promise} + * @param {Verbosity | undefined} [verbosity] + * @param {string | undefined} [rpc_address] + * @returns {Promise} */ - get_binary_get_validator_reward_by_block_height(node_address, validator_key, block_height) { - var ptr0 = isLikeNone(node_address) ? 0 : passStringToWasm0(node_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + info_get_chainspec(verbosity, rpc_address) { + var ptr0 = isLikeNone(rpc_address) ? 0 : passStringToWasm0(rpc_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); var len0 = WASM_VECTOR_LEN; - _assertClass(validator_key, PublicKey); - var ptr1 = validator_key.__destroy_into_raw(); - const ret = wasm.sdk_get_binary_get_validator_reward_by_block_height(this.__wbg_ptr, ptr0, len0, ptr1, block_height); + const ret = wasm.sdk_info_get_chainspec(this.__wbg_ptr, isLikeNone(verbosity) ? 3 : verbosity, ptr0, len0); return ret; } /** - * @param {string | undefined} node_address - * @param {PublicKey} validator_key - * @param {BlockHash} block_hash - * @returns {Promise} + * Retrieves node status information using the provided options. + * + * # Arguments + * + * * `verbosity` - An optional `Verbosity` level for controlling the output verbosity. + * * `rpc_address` - An optional string specifying the rpc address to use for the request. + * + * # Returns + * + * A `Result` containing either a `GetNodeStatusResult` or a `JsError` in case of an error. + * + * # Errors + * + * Returns a `JsError` if there is an error during the retrieval process. + * @param {Verbosity | undefined} [verbosity] + * @param {string | undefined} [rpc_address] + * @returns {Promise} */ - get_binary_get_validator_reward_by_block_hash(node_address, validator_key, block_hash) { - var ptr0 = isLikeNone(node_address) ? 0 : passStringToWasm0(node_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + get_node_status(verbosity, rpc_address) { + var ptr0 = isLikeNone(rpc_address) ? 0 : passStringToWasm0(rpc_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); var len0 = WASM_VECTOR_LEN; - _assertClass(validator_key, PublicKey); - var ptr1 = validator_key.__destroy_into_raw(); - _assertClass(block_hash, BlockHash); - var ptr2 = block_hash.__destroy_into_raw(); - const ret = wasm.sdk_get_binary_get_validator_reward_by_block_hash(this.__wbg_ptr, ptr0, len0, ptr1, ptr2); + const ret = wasm.sdk_get_node_status(this.__wbg_ptr, isLikeNone(verbosity) ? 3 : verbosity, ptr0, len0); return ret; } /** - * @param {string | undefined} node_address - * @param {PublicKey} validator_key - * @param {PublicKey} delegator_key - * @param {EraId} era - * @returns {Promise} + * @param {Verbosity | undefined} [verbosity] + * @param {string | undefined} [rpc_address] + * @returns {Promise} */ - get_binary_get_delegator_reward_by_era(node_address, validator_key, delegator_key, era) { - var ptr0 = isLikeNone(node_address) ? 0 : passStringToWasm0(node_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + info_get_status(verbosity, rpc_address) { + var ptr0 = isLikeNone(rpc_address) ? 0 : passStringToWasm0(rpc_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); var len0 = WASM_VECTOR_LEN; - _assertClass(validator_key, PublicKey); - var ptr1 = validator_key.__destroy_into_raw(); - _assertClass(delegator_key, PublicKey); - var ptr2 = delegator_key.__destroy_into_raw(); - _assertClass(era, EraId); - var ptr3 = era.__destroy_into_raw(); - const ret = wasm.sdk_get_binary_get_delegator_reward_by_era(this.__wbg_ptr, ptr0, len0, ptr1, ptr2, ptr3); + const ret = wasm.sdk_info_get_status(this.__wbg_ptr, isLikeNone(verbosity) ? 3 : verbosity, ptr0, len0); return ret; } /** - * @param {string | undefined} node_address - * @param {PublicKey} validator_key - * @param {PublicKey} delegator_key - * @param {bigint} block_height - * @returns {Promise} + * Retrieves peers asynchronously. + * + * # Arguments + * + * * `verbosity` - Optional verbosity level. + * * `rpc_address` - Optional rpc address. + * + * # Returns + * + * A `Result` containing `GetPeersResult` or a `JsError` if an error occurs. + * @param {Verbosity | undefined} [verbosity] + * @param {string | undefined} [rpc_address] + * @returns {Promise} */ - get_binary_get_delegator_reward_by_block_height(node_address, validator_key, delegator_key, block_height) { - var ptr0 = isLikeNone(node_address) ? 0 : passStringToWasm0(node_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + get_peers(verbosity, rpc_address) { + var ptr0 = isLikeNone(rpc_address) ? 0 : passStringToWasm0(rpc_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); var len0 = WASM_VECTOR_LEN; - _assertClass(validator_key, PublicKey); - var ptr1 = validator_key.__destroy_into_raw(); - _assertClass(delegator_key, PublicKey); - var ptr2 = delegator_key.__destroy_into_raw(); - const ret = wasm.sdk_get_binary_get_delegator_reward_by_block_height(this.__wbg_ptr, ptr0, len0, ptr1, ptr2, block_height); + const ret = wasm.sdk_get_peers(this.__wbg_ptr, isLikeNone(verbosity) ? 3 : verbosity, ptr0, len0); return ret; } /** - * @param {string | undefined} node_address - * @param {PublicKey} validator_key - * @param {PublicKey} delegator_key - * @param {BlockHash} block_hash - * @returns {Promise} + * @param {Verbosity | undefined} [verbosity] + * @param {string | undefined} [rpc_address] + * @returns {Promise} */ - get_binary_get_delegator_reward_by_block_hash(node_address, validator_key, delegator_key, block_hash) { - var ptr0 = isLikeNone(node_address) ? 0 : passStringToWasm0(node_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + info_get_peers(verbosity, rpc_address) { + var ptr0 = isLikeNone(rpc_address) ? 0 : passStringToWasm0(rpc_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); var len0 = WASM_VECTOR_LEN; - _assertClass(validator_key, PublicKey); - var ptr1 = validator_key.__destroy_into_raw(); - _assertClass(delegator_key, PublicKey); - var ptr2 = delegator_key.__destroy_into_raw(); - _assertClass(block_hash, BlockHash); - var ptr3 = block_hash.__destroy_into_raw(); - const ret = wasm.sdk_get_binary_get_delegator_reward_by_block_hash(this.__wbg_ptr, ptr0, len0, ptr1, ptr2, ptr3); + const ret = wasm.sdk_info_get_peers(this.__wbg_ptr, isLikeNone(verbosity) ? 3 : verbosity, ptr0, len0); return ret; } /** - * @param {string | undefined} node_address - * @param {RecordId} record_id - * @param {Uint8Array} key - * @returns {Promise} + * Retrieves validator changes using the provided options. + * + * # Arguments + * + * * `verbosity` - An optional `Verbosity` level for controlling the output verbosity. + * * `rpc_address` - An optional string specifying the rpc address to use for the request. + * + * # Returns + * + * A `Result` containing either a `GetValidatorChangesResult` or a `JsError` in case of an error. + * + * # Errors + * + * Returns a `JsError` if there is an error during the retrieval process. + * @param {Verbosity | undefined} [verbosity] + * @param {string | undefined} [rpc_address] + * @returns {Promise} */ - get_binary_read_record(node_address, record_id, key) { - var ptr0 = isLikeNone(node_address) ? 0 : passStringToWasm0(node_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + get_validator_changes(verbosity, rpc_address) { + var ptr0 = isLikeNone(rpc_address) ? 0 : passStringToWasm0(rpc_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); var len0 = WASM_VECTOR_LEN; - _assertClass(record_id, RecordId); - var ptr1 = record_id.__destroy_into_raw(); - const ptr2 = passArray8ToWasm0(key, wasm.__wbindgen_malloc); - const len2 = WASM_VECTOR_LEN; - const ret = wasm.sdk_get_binary_read_record(this.__wbg_ptr, ptr0, len0, ptr1, ptr2, len2); + const ret = wasm.sdk_get_validator_changes(this.__wbg_ptr, isLikeNone(verbosity) ? 3 : verbosity, ptr0, len0); return ret; } /** - * @param {string | undefined} node_address - * @param {Key} key - * @param {(string)[]} path - * @returns {Promise} + * @param {Verbosity | undefined} [verbosity] + * @param {string | undefined} [rpc_address] + * @returns {Promise} */ - get_binary_global_state_item(node_address, key, path) { - var ptr0 = isLikeNone(node_address) ? 0 : passStringToWasm0(node_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + info_get_validator_change(verbosity, rpc_address) { + var ptr0 = isLikeNone(rpc_address) ? 0 : passStringToWasm0(rpc_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); var len0 = WASM_VECTOR_LEN; - _assertClass(key, Key); - var ptr1 = key.__destroy_into_raw(); - const ptr2 = passArrayJsValueToWasm0(path, wasm.__wbindgen_malloc); - const len2 = WASM_VECTOR_LEN; - const ret = wasm.sdk_get_binary_global_state_item(this.__wbg_ptr, ptr0, len0, ptr1, ptr2, len2); + const ret = wasm.sdk_info_get_validator_change(this.__wbg_ptr, isLikeNone(verbosity) ? 3 : verbosity, ptr0, len0); return ret; } /** - * @param {string | undefined} node_address - * @param {Digest} state_root_hash - * @param {Key} key - * @param {(string)[]} path - * @returns {Promise} + * Lists available RPCs using the provided options. + * + * # Arguments + * + * * `verbosity` - An optional `Verbosity` level for controlling the output verbosity. + * * `rpc_address` - An optional string specifying the rpc address to use for the request. + * + * # Returns + * + * A `Result` containing either a `ListRpcsResult` or a `JsError` in case of an error. + * + * # Errors + * + * Returns a `JsError` if there is an error during the listing process. + * @param {Verbosity | undefined} [verbosity] + * @param {string | undefined} [rpc_address] + * @returns {Promise} */ - get_binary_global_state_item_by_state_root_hash(node_address, state_root_hash, key, path) { - var ptr0 = isLikeNone(node_address) ? 0 : passStringToWasm0(node_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + list_rpcs(verbosity, rpc_address) { + var ptr0 = isLikeNone(rpc_address) ? 0 : passStringToWasm0(rpc_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); var len0 = WASM_VECTOR_LEN; - _assertClass(state_root_hash, Digest); - var ptr1 = state_root_hash.__destroy_into_raw(); - _assertClass(key, Key); - var ptr2 = key.__destroy_into_raw(); - const ptr3 = passArrayJsValueToWasm0(path, wasm.__wbindgen_malloc); - const len3 = WASM_VECTOR_LEN; - const ret = wasm.sdk_get_binary_global_state_item_by_state_root_hash(this.__wbg_ptr, ptr0, len0, ptr1, ptr2, ptr3, len3); + const ret = wasm.sdk_list_rpcs(this.__wbg_ptr, isLikeNone(verbosity) ? 3 : verbosity, ptr0, len0); return ret; } /** - * @param {string | undefined} node_address - * @param {BlockHash} block_hash - * @param {Key} key - * @param {(string)[]} path - * @returns {Promise} + * JS function for speculative transfer transaction. + * + * # Arguments + * + * * `maybe_source` - Optional transfer source uref. + * * `target_account` - The target account. + * * `amount` - The amount to transfer. + * * `maybe_id` - An optional transfer ID (defaults to a random number). + * * `transaction_params` - The transactionment parameters. + * * `verbosity` - The verbosity level for logging (optional). + * * `rpc_address` - The address of the node to connect to (optional). + * + * # Returns + * + * A `Result` containing the result of the speculative transfer or a `JsError` in case of an error. + * @param {URef | undefined} maybe_source + * @param {string} target_account + * @param {string} amount + * @param {TransactionStrParams} transaction_params + * @param {string | undefined} [maybe_id] + * @param {Verbosity | undefined} [verbosity] + * @param {string | undefined} [rpc_address] + * @returns {Promise} */ - get_binary_global_state_item_by_block_hash(node_address, block_hash, key, path) { - var ptr0 = isLikeNone(node_address) ? 0 : passStringToWasm0(node_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - var len0 = WASM_VECTOR_LEN; - _assertClass(block_hash, BlockHash); - var ptr1 = block_hash.__destroy_into_raw(); - _assertClass(key, Key); - var ptr2 = key.__destroy_into_raw(); - const ptr3 = passArrayJsValueToWasm0(path, wasm.__wbindgen_malloc); - const len3 = WASM_VECTOR_LEN; - const ret = wasm.sdk_get_binary_global_state_item_by_block_hash(this.__wbg_ptr, ptr0, len0, ptr1, ptr2, ptr3, len3); + speculative_transfer_transaction(maybe_source, target_account, amount, transaction_params, maybe_id, verbosity, rpc_address) { + let ptr0 = 0; + if (!isLikeNone(maybe_source)) { + _assertClass(maybe_source, URef); + ptr0 = maybe_source.__destroy_into_raw(); + } + const ptr1 = passStringToWasm0(target_account, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + const len1 = WASM_VECTOR_LEN; + const ptr2 = passStringToWasm0(amount, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + const len2 = WASM_VECTOR_LEN; + _assertClass(transaction_params, TransactionStrParams); + var ptr3 = transaction_params.__destroy_into_raw(); + var ptr4 = isLikeNone(maybe_id) ? 0 : passStringToWasm0(maybe_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + var len4 = WASM_VECTOR_LEN; + var ptr5 = isLikeNone(rpc_address) ? 0 : passStringToWasm0(rpc_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + var len5 = WASM_VECTOR_LEN; + const ret = wasm.sdk_speculative_transfer_transaction(this.__wbg_ptr, ptr0, ptr1, len1, ptr2, len2, ptr3, ptr4, len4, isLikeNone(verbosity) ? 3 : verbosity, ptr5, len5); return ret; } /** - * @param {string | undefined} node_address - * @param {bigint} block_height - * @param {Key} key - * @param {(string)[]} path - * @returns {Promise} + * JS function for `make_deploy`. + * + * # Arguments + * + * * `deploy_params` - The deploy parameters. + * * `session_params` - The session parameters. + * * `payment_params` - The payment parameters. + * + * # Returns + * + * A `Result` containing the created `Deploy` or a `JsError` in case of an error. + * @param {DeployStrParams} deploy_params + * @param {SessionStrParams} session_params + * @param {PaymentStrParams} payment_params + * @returns {Deploy} */ - get_binary_global_state_item_by_block_height(node_address, block_height, key, path) { - var ptr0 = isLikeNone(node_address) ? 0 : passStringToWasm0(node_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - var len0 = WASM_VECTOR_LEN; - _assertClass(key, Key); - var ptr1 = key.__destroy_into_raw(); - const ptr2 = passArrayJsValueToWasm0(path, wasm.__wbindgen_malloc); - const len2 = WASM_VECTOR_LEN; - const ret = wasm.sdk_get_binary_global_state_item_by_block_height(this.__wbg_ptr, ptr0, len0, block_height, ptr1, ptr2, len2); - return ret; + make_deploy(deploy_params, session_params, payment_params) { + _assertClass(deploy_params, DeployStrParams); + var ptr0 = deploy_params.__destroy_into_raw(); + _assertClass(session_params, SessionStrParams); + var ptr1 = session_params.__destroy_into_raw(); + _assertClass(payment_params, PaymentStrParams); + var ptr2 = payment_params.__destroy_into_raw(); + const ret = wasm.sdk_make_deploy(this.__wbg_ptr, ptr0, ptr1, ptr2); + if (ret[2]) { + throw takeFromExternrefTable0(ret[1]); + } + return Deploy.__wrap(ret[0]); } /** - * @param {string | undefined} node_address + * JS function for `sign_deploy`. + * + * # Arguments + * + * * `deploy` - The deploy to sign. + * * `secret_key` - The secret key for signing. + * + * # Returns + * + * The signed `Deploy`. + * @param {Deploy} deploy + * @param {string} secret_key + * @returns {Deploy} + */ + sign_deploy(deploy, secret_key) { + _assertClass(deploy, Deploy); + var ptr0 = deploy.__destroy_into_raw(); + const ptr1 = passStringToWasm0(secret_key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + const len1 = WASM_VECTOR_LEN; + const ret = wasm.sdk_sign_deploy(this.__wbg_ptr, ptr0, ptr1, len1); + return Deploy.__wrap(ret); + } + /** + * JS function for `make_transaction`. + * + * # Arguments + * + * * `builder_params` - Transaction Builder parameters. + * * `transaction_params` - The transaction parameters. + * + * # Returns + * + * A `Result` containing the created `Transaction` or a `JsError` in case of an error. + * @param {TransactionBuilderParams} builder_params + * @param {TransactionStrParams} transaction_params + * @returns {Transaction} + */ + make_transaction(builder_params, transaction_params) { + _assertClass(builder_params, TransactionBuilderParams); + var ptr0 = builder_params.__destroy_into_raw(); + _assertClass(transaction_params, TransactionStrParams); + var ptr1 = transaction_params.__destroy_into_raw(); + const ret = wasm.sdk_make_transaction(this.__wbg_ptr, ptr0, ptr1); + if (ret[2]) { + throw takeFromExternrefTable0(ret[1]); + } + return Transaction.__wrap(ret[0]); + } + /** + * JS function for `sign_transaction`. + * + * # Arguments + * + * * `transaction` - The transaction to sign. + * * `secret_key` - The secret key for signing. + * + * # Returns + * + * The signed `Transaction`. * @param {Transaction} transaction - * @returns {Promise} + * @param {string} secret_key + * @returns {Transaction} */ - get_binary_try_accept_transaction(node_address, transaction) { - var ptr0 = isLikeNone(node_address) ? 0 : passStringToWasm0(node_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - var len0 = WASM_VECTOR_LEN; + sign_transaction(transaction, secret_key) { _assertClass(transaction, Transaction); - var ptr1 = transaction.__destroy_into_raw(); - const ret = wasm.sdk_get_binary_try_accept_transaction(this.__wbg_ptr, ptr0, len0, ptr1); + var ptr0 = transaction.__destroy_into_raw(); + const ptr1 = passStringToWasm0(secret_key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + const len1 = WASM_VECTOR_LEN; + const ret = wasm.sdk_sign_transaction(this.__wbg_ptr, ptr0, ptr1, len1); + return Transaction.__wrap(ret); + } + /** + * Calls a smart contract entry point with the specified parameters and returns the result. + * + * # Arguments + * + * * `deploy_params` - The deploy parameters. + * * `session_params` - The session parameters. + * * `payment_amount` - The payment amount as a string. + * * `rpc_address` - An optional rpc address to send the request to. + * + * # Returns + * + * A `Result` containing either a `PutDeployResult` or a `JsError` in case of an error. + * + * # Errors + * + * Returns a `JsError` if there is an error during the call. + * @param {DeployStrParams} deploy_params + * @param {SessionStrParams} session_params + * @param {string} payment_amount + * @param {string | undefined} [rpc_address] + * @returns {Promise} + */ + call_entrypoint_deploy(deploy_params, session_params, payment_amount, rpc_address) { + _assertClass(deploy_params, DeployStrParams); + var ptr0 = deploy_params.__destroy_into_raw(); + _assertClass(session_params, SessionStrParams); + var ptr1 = session_params.__destroy_into_raw(); + const ptr2 = passStringToWasm0(payment_amount, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + const len2 = WASM_VECTOR_LEN; + var ptr3 = isLikeNone(rpc_address) ? 0 : passStringToWasm0(rpc_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + var len3 = WASM_VECTOR_LEN; + const ret = wasm.sdk_call_entrypoint_deploy(this.__wbg_ptr, ptr0, ptr1, ptr2, len2, ptr3, len3); return ret; } /** - * @param {string | undefined} node_address - * @param {Transaction} transaction - * @returns {Promise} + * Deserialize query_contract_key_options from a JavaScript object. + * @param {any} options + * @returns {queryContractKeyOptions} */ - get_binary_try_speculative_execution(node_address, transaction) { - var ptr0 = isLikeNone(node_address) ? 0 : passStringToWasm0(node_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - var len0 = WASM_VECTOR_LEN; - _assertClass(transaction, Transaction); - var ptr1 = transaction.__destroy_into_raw(); - const ret = wasm.sdk_get_binary_try_speculative_execution(this.__wbg_ptr, ptr0, len0, ptr1); + query_contract_key_options(options) { + const ret = wasm.sdk_query_contract_key_options(this.__wbg_ptr, options); + if (ret[2]) { + throw takeFromExternrefTable0(ret[1]); + } + return queryContractKeyOptions.__wrap(ret[0]); + } + /** + * JavaScript function for query_contract_key with deserialized options. + * @param {queryContractKeyOptions | undefined} [options] + * @returns {Promise} + */ + query_contract_key(options) { + let ptr0 = 0; + if (!isLikeNone(options)) { + _assertClass(options, queryContractKeyOptions); + ptr0 = options.__destroy_into_raw(); + } + const ret = wasm.sdk_query_contract_key(this.__wbg_ptr, ptr0); return ret; } /** - * @param {string | undefined} [node_address] - * @returns {Promise} + * @param {any} options + * @returns {getAccountOptions} */ - get_binary_get_protocol_version(node_address) { - var ptr0 = isLikeNone(node_address) ? 0 : passStringToWasm0(node_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - var len0 = WASM_VECTOR_LEN; - const ret = wasm.sdk_get_binary_get_protocol_version(this.__wbg_ptr, ptr0, len0); + get_account_options(options) { + const ret = wasm.sdk_get_account_options(this.__wbg_ptr, options); + if (ret[2]) { + throw takeFromExternrefTable0(ret[1]); + } + return getAccountOptions.__wrap(ret[0]); + } + /** + * Retrieves account information using the provided options. + * + * This function is an asynchronous JavaScript binding for the Rust `get_account` method. + * + * # Arguments + * + * * `options` - An optional `GetAccountOptions` struct containing retrieval options, such as: + * - `account_identifier`: Identifier for the account. + * - `account_identifier_as_string`: String representation of the account identifier. + * - `maybe_block_id_as_string`: Optional string representation of the block ID. + * - `maybe_block_identifier`: Optional `BlockIdentifierInput` for specifying the block. + * - `verbosity`: Verbosity level for the output. + * - `rpc_address`: Address of the node to query. + * + * # Returns + * + * A `Result` containing either a `GetAccountResult` on success or a `JsError` on failure. + * + * # Errors + * + * Returns a `JsError` if there is an error during the retrieval process, such as issues with the provided options or network errors. + * ``` + * @param {getAccountOptions | undefined} [options] + * @returns {Promise} + */ + get_account(options) { + let ptr0 = 0; + if (!isLikeNone(options)) { + _assertClass(options, getAccountOptions); + ptr0 = options.__destroy_into_raw(); + } + const ret = wasm.sdk_get_account(this.__wbg_ptr, ptr0); + return ret; + } + /** + * @param {getAccountOptions | undefined} [options] + * @returns {Promise} + */ + state_get_account_info(options) { + let ptr0 = 0; + if (!isLikeNone(options)) { + _assertClass(options, getAccountOptions); + ptr0 = options.__destroy_into_raw(); + } + const ret = wasm.sdk_state_get_account_info(this.__wbg_ptr, ptr0); return ret; } /** - * This function allows executing a deploy speculatively. + * Parses era summary options from a JsValue. + * + * # Arguments + * + * * `options` - A JsValue containing era summary options to be parsed. + * + * # Returns + * + * Parsed era summary options as a `GetEraSummaryOptions` struct. + * @param {any} options + * @returns {getEraSummaryOptions} + */ + get_era_summary_options(options) { + const ret = wasm.sdk_get_era_summary_options(this.__wbg_ptr, options); + if (ret[2]) { + throw takeFromExternrefTable0(ret[1]); + } + return getEraSummaryOptions.__wrap(ret[0]); + } + /** + * Retrieves era summary information using the provided options. * * # Arguments * - * * `deploy_params` - Deployment parameters for the deploy. - * * `session_params` - Session parameters for the deploy. - * * `payment_params` - Payment parameters for the deploy. - * * `verbosity` - Optional verbosity level. - * * `rpc_address` - Optional rpc address. + * * `options` - An optional `GetEraSummaryOptions` struct containing retrieval options. * * # Returns * - * A `Result` containing either a `SpeculativeExecResult` or a `JsError` in case of an error. - * @param {DeployStrParams} deploy_params - * @param {SessionStrParams} session_params - * @param {PaymentStrParams} payment_params - * @param {Verbosity | undefined} [verbosity] - * @param {string | undefined} [rpc_address] - * @returns {Promise} + * A `Result` containing either a `GetEraSummaryResult` or a `JsError` in case of an error. + * + * # Errors + * + * Returns a `JsError` if there is an error during the retrieval process. + * @param {getEraSummaryOptions | undefined} [options] + * @returns {Promise} */ - speculative_deploy(deploy_params, session_params, payment_params, verbosity, rpc_address) { - _assertClass(deploy_params, DeployStrParams); - var ptr0 = deploy_params.__destroy_into_raw(); - _assertClass(session_params, SessionStrParams); - var ptr1 = session_params.__destroy_into_raw(); - _assertClass(payment_params, PaymentStrParams); - var ptr2 = payment_params.__destroy_into_raw(); - var ptr3 = isLikeNone(rpc_address) ? 0 : passStringToWasm0(rpc_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - var len3 = WASM_VECTOR_LEN; - const ret = wasm.sdk_speculative_deploy(this.__wbg_ptr, ptr0, ptr1, ptr2, isLikeNone(verbosity) ? 3 : verbosity, ptr3, len3); + get_era_summary(options) { + let ptr0 = 0; + if (!isLikeNone(options)) { + _assertClass(options, getEraSummaryOptions); + ptr0 = options.__destroy_into_raw(); + } + const ret = wasm.sdk_get_era_summary(this.__wbg_ptr, ptr0); return ret; } /** - * Calls a smart contract entry point with the specified parameters and returns the result. + * @param {getEraSummaryOptions | undefined} [options] + * @returns {Promise} + */ + chain_get_era_summary(options) { + let ptr0 = 0; + if (!isLikeNone(options)) { + _assertClass(options, getEraSummaryOptions); + ptr0 = options.__destroy_into_raw(); + } + const ret = wasm.sdk_chain_get_era_summary(this.__wbg_ptr, ptr0); + return ret; + } + /** + * JS function for transaction transferring funds. * * # Arguments * - * * `transaction_params` - Transaction parameters. - * * `builder_params` - Transaction Builder parameters. - * * `rpc_address` - An optional rpc address to send the request to. + * * `maybe_source` - Optional transfer source uref. + * * `target_account` - The target account. + * * `amount` - The amount to transfer. + * * `transaction_params` - The transaction parameters. + * * `maybe_id` - An optional transfer ID (defaults to a random number). + * * `verbosity` - The verbosity level for logging (optional). + * * `rpc_address` - The address of the node to connect to (optional). * * # Returns * - * A `Result` containing either a `PutTransactionResult` or a `JsError` in case of an error. - * - * # Errors - * - * Returns a `JsError` if there is an error during the call. - * @param {TransactionBuilderParams} builder_params + * A `Result` containing the result of the transfer or a `JsError` in case of an error. + * @param {URef | undefined} maybe_source + * @param {string} target_account + * @param {string} amount * @param {TransactionStrParams} transaction_params + * @param {string | undefined} [maybe_id] + * @param {Verbosity | undefined} [verbosity] * @param {string | undefined} [rpc_address] * @returns {Promise} */ - call_entrypoint(builder_params, transaction_params, rpc_address) { - _assertClass(builder_params, TransactionBuilderParams); - var ptr0 = builder_params.__destroy_into_raw(); + transfer_transaction(maybe_source, target_account, amount, transaction_params, maybe_id, verbosity, rpc_address) { + let ptr0 = 0; + if (!isLikeNone(maybe_source)) { + _assertClass(maybe_source, URef); + ptr0 = maybe_source.__destroy_into_raw(); + } + const ptr1 = passStringToWasm0(target_account, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + const len1 = WASM_VECTOR_LEN; + const ptr2 = passStringToWasm0(amount, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + const len2 = WASM_VECTOR_LEN; _assertClass(transaction_params, TransactionStrParams); - var ptr1 = transaction_params.__destroy_into_raw(); - var ptr2 = isLikeNone(rpc_address) ? 0 : passStringToWasm0(rpc_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); - var len2 = WASM_VECTOR_LEN; - const ret = wasm.sdk_call_entrypoint(this.__wbg_ptr, ptr0, ptr1, ptr2, len2); + var ptr3 = transaction_params.__destroy_into_raw(); + var ptr4 = isLikeNone(maybe_id) ? 0 : passStringToWasm0(maybe_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + var len4 = WASM_VECTOR_LEN; + var ptr5 = isLikeNone(rpc_address) ? 0 : passStringToWasm0(rpc_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); + var len5 = WASM_VECTOR_LEN; + const ret = wasm.sdk_transfer_transaction(this.__wbg_ptr, ptr0, ptr1, len1, ptr2, len2, ptr3, ptr4, len4, isLikeNone(verbosity) ? 3 : verbosity, ptr5, len5); return ret; } } @@ -13559,10 +13558,6 @@ async function __wbg_load(module, imports) { function __wbg_get_imports() { const imports = {}; imports.wbg = {}; - imports.wbg.__wbindgen_string_new = function(arg0, arg1) { - const ret = getStringFromWasm0(arg0, arg1); - return ret; - }; imports.wbg.__wbindgen_error_new = function(arg0, arg1) { const ret = new Error(getStringFromWasm0(arg0, arg1)); return ret; @@ -13575,76 +13570,56 @@ function __wbg_get_imports() { const ret = PutTransactionResult.__wrap(arg0); return ret; }; - imports.wbg.__wbg_getbalanceresult_new = function(arg0) { - const ret = GetBalanceResult.__wrap(arg0); - return ret; - }; - imports.wbg.__wbg_listrpcsresult_new = function(arg0) { - const ret = ListRpcsResult.__wrap(arg0); - return ret; - }; - imports.wbg.__wbg_getstateroothashresult_new = function(arg0) { - const ret = GetStateRootHashResult.__wrap(arg0); - return ret; - }; - imports.wbg.__wbg_speculativeexectxnresult_new = function(arg0) { - const ret = SpeculativeExecTxnResult.__wrap(arg0); + imports.wbg.__wbg_queryglobalstateresult_new = function(arg0) { + const ret = QueryGlobalStateResult.__wrap(arg0); return ret; }; - imports.wbg.__wbg_putdeployresult_new = function(arg0) { - const ret = PutDeployResult.__wrap(arg0); + imports.wbg.__wbindgen_string_new = function(arg0, arg1) { + const ret = getStringFromWasm0(arg0, arg1); return ret; }; - imports.wbg.__wbg_speculativeexecresult_new = function(arg0) { - const ret = SpeculativeExecResult.__wrap(arg0); + imports.wbg.__wbg_getnodestatusresult_new = function(arg0) { + const ret = GetNodeStatusResult.__wrap(arg0); return ret; }; - imports.wbg.__wbg_geterasummaryresult_new = function(arg0) { - const ret = GetEraSummaryResult.__wrap(arg0); + imports.wbg.__wbg_deploy_new = function(arg0) { + const ret = Deploy.__wrap(arg0); return ret; }; - imports.wbg.__wbg_getblockresult_new = function(arg0) { - const ret = GetBlockResult.__wrap(arg0); + imports.wbg.__wbg_speculativeexectxnresult_new = function(arg0) { + const ret = SpeculativeExecTxnResult.__wrap(arg0); return ret; }; imports.wbg.__wbg_getvalidatorchangesresult_new = function(arg0) { const ret = GetValidatorChangesResult.__wrap(arg0); return ret; }; - imports.wbg.__wbg_deploy_new = function(arg0) { - const ret = Deploy.__wrap(arg0); - return ret; - }; - imports.wbg.__wbg_querybalancedetailsresult_new = function(arg0) { - const ret = QueryBalanceDetailsResult.__wrap(arg0); + imports.wbg.__wbg_putdeployresult_new = function(arg0) { + const ret = PutDeployResult.__wrap(arg0); return ret; }; - imports.wbg.__wbg_gettransactionresult_new = function(arg0) { - const ret = GetTransactionResult.__wrap(arg0); + imports.wbg.__wbg_getblocktransfersresult_new = function(arg0) { + const ret = GetBlockTransfersResult.__wrap(arg0); return ret; }; - imports.wbg.__wbg_queryglobalstateresult_new = function(arg0) { - const ret = QueryGlobalStateResult.__wrap(arg0); + imports.wbg.__wbg_getchainspecresult_new = function(arg0) { + const ret = GetChainspecResult.__wrap(arg0); return ret; }; imports.wbg.__wbg_geterainforesult_new = function(arg0) { const ret = GetEraInfoResult.__wrap(arg0); return ret; }; - imports.wbg.__wbg_getchainspecresult_new = function(arg0) { - const ret = GetChainspecResult.__wrap(arg0); - return ret; - }; imports.wbg.__wbg_getdeployresult_new = function(arg0) { const ret = GetDeployResult.__wrap(arg0); return ret; }; - imports.wbg.__wbg_getaccountresult_new = function(arg0) { - const ret = GetAccountResult.__wrap(arg0); + imports.wbg.__wbg_listrpcsresult_new = function(arg0) { + const ret = ListRpcsResult.__wrap(arg0); return ret; }; - imports.wbg.__wbg_getaddressableentityresult_new = function(arg0) { - const ret = GetAddressableEntityResult.__wrap(arg0); + imports.wbg.__wbg_querybalanceresult_new = function(arg0) { + const ret = QueryBalanceResult.__wrap(arg0); return ret; }; imports.wbg.__wbg_requestSwitchAccount_0e44115ee2041c5e = function() { return handleError(function (arg0) { @@ -13656,18 +13631,30 @@ function __wbg_get_imports() { const ret = typeof(v) === 'boolean' ? (v ? 1 : 0) : 2; return ret; }; - imports.wbg.__wbg_transaction_new = function(arg0) { - const ret = Transaction.__wrap(arg0); + imports.wbg.__wbg_getaddressableentityresult_new = function(arg0) { + const ret = GetAddressableEntityResult.__wrap(arg0); return ret; }; - imports.wbg.__wbg_querybalanceresult_new = function(arg0) { - const ret = QueryBalanceResult.__wrap(arg0); + imports.wbg.__wbg_gettransactionresult_new = function(arg0) { + const ret = GetTransactionResult.__wrap(arg0); return ret; }; - imports.wbg.__wbg_disconnectFromSite_2d2501f4e00e57c8 = function() { return handleError(function (arg0) { - const ret = arg0.disconnectFromSite(); + imports.wbg.__wbg_getbalanceresult_new = function(arg0) { + const ret = GetBalanceResult.__wrap(arg0); return ret; - }, arguments) }; + }; + imports.wbg.__wbg_getauctioninforesult_new = function(arg0) { + const ret = GetAuctionInfoResult.__wrap(arg0); + return ret; + }; + imports.wbg.__wbg_speculativeexecresult_new = function(arg0) { + const ret = SpeculativeExecResult.__wrap(arg0); + return ret; + }; + imports.wbg.__wbg_getstateroothashresult_new = function(arg0) { + const ret = GetStateRootHashResult.__wrap(arg0); + return ret; + }; imports.wbg.__wbg_getVersion_821280958b37ff1f = function() { return handleError(function (arg0) { const ret = arg0.getVersion(); return ret; @@ -13680,26 +13667,38 @@ function __wbg_get_imports() { getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true); getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true); }; - imports.wbg.__wbg_getauctioninforesult_new = function(arg0) { - const ret = GetAuctionInfoResult.__wrap(arg0); + imports.wbg.__wbg_getaccountresult_new = function(arg0) { + const ret = GetAccountResult.__wrap(arg0); return ret; }; - imports.wbg.__wbg_getblocktransfersresult_new = function(arg0) { - const ret = GetBlockTransfersResult.__wrap(arg0); + imports.wbg.__wbg_geterasummaryresult_new = function(arg0) { + const ret = GetEraSummaryResult.__wrap(arg0); return ret; }; - imports.wbg.__wbg_getnodestatusresult_new = function(arg0) { - const ret = GetNodeStatusResult.__wrap(arg0); + imports.wbg.__wbg_querybalancedetailsresult_new = function(arg0) { + const ret = QueryBalanceDetailsResult.__wrap(arg0); return ret; }; - imports.wbg.__wbg_getpeersresult_new = function(arg0) { - const ret = GetPeersResult.__wrap(arg0); + imports.wbg.__wbg_transaction_new = function(arg0) { + const ret = Transaction.__wrap(arg0); return ret; }; imports.wbg.__wbg_isConnected_f84ffbccb9898623 = function() { return handleError(function (arg0) { const ret = arg0.isConnected(); return ret; }, arguments) }; + imports.wbg.__wbg_getblockresult_new = function(arg0) { + const ret = GetBlockResult.__wrap(arg0); + return ret; + }; + imports.wbg.__wbg_getpeersresult_new = function(arg0) { + const ret = GetPeersResult.__wrap(arg0); + return ret; + }; + imports.wbg.__wbg_disconnectFromSite_2d2501f4e00e57c8 = function() { return handleError(function (arg0) { + const ret = arg0.disconnectFromSite(); + return ret; + }, arguments) }; imports.wbg.__wbindgen_is_function = function(arg0) { const ret = typeof(arg0) === 'function'; return ret; @@ -13716,31 +13715,14 @@ function __wbg_get_imports() { const ret = arg0.getActivePublicKey(); return ret; }, arguments) }; - imports.wbg.__wbg_messages_new = function(arg0) { - const ret = Messages.__wrap(arg0); - return ret; - }; imports.wbg.__wbindgen_number_get = function(arg0, arg1) { const obj = arg1; const ret = typeof(obj) === 'number' ? obj : undefined; getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true); getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true); }; - imports.wbg.__wbg_messages_unwrap = function(arg0) { - const ret = Messages.__unwrap(arg0); - return ret; - }; - imports.wbg.__wbg_subscription_unwrap = function(arg0) { - const ret = Subscription.__unwrap(arg0); - return ret; - }; - imports.wbg.__wbindgen_cb_drop = function(arg0) { - const obj = arg0.original; - if (obj.cnt-- == 1) { - obj.a = 0; - return true; - } - const ret = false; + imports.wbg.__wbg_messages_new = function(arg0) { + const ret = Messages.__wrap(arg0); return ret; }; imports.wbg.__wbg_error_d52bf4e1868fa715 = function(arg0, arg1) { @@ -13754,6 +13736,14 @@ function __wbg_get_imports() { const ret = arg0.sign(getStringFromWasm0(arg1, arg2), getStringFromWasm0(arg3, arg4)); return ret; }, arguments) }; + imports.wbg.__wbg_subscription_unwrap = function(arg0) { + const ret = Subscription.__unwrap(arg0); + return ret; + }; + imports.wbg.__wbg_messages_unwrap = function(arg0) { + const ret = Messages.__unwrap(arg0); + return ret; + }; imports.wbg.__wbindgen_is_undefined = function(arg0) { const ret = arg0 === undefined; return ret; @@ -13766,6 +13756,15 @@ function __wbg_get_imports() { const ret = arg0 === arg1; return ret; }; + imports.wbg.__wbindgen_cb_drop = function(arg0) { + const obj = arg0.original; + if (obj.cnt-- == 1) { + obj.a = 0; + return true; + } + const ret = false; + return ret; + }; imports.wbg.__wbg_log_a4ea4344db098de3 = function(arg0, arg1) { console.log(getStringFromWasm0(arg0, arg1)); }; @@ -14204,28 +14203,28 @@ function __wbg_get_imports() { const ret = wasm.memory; return ret; }; - imports.wbg.__wbindgen_closure_wrapper3777 = function(arg0, arg1, arg2) { - const ret = makeMutClosure(arg0, arg1, 821, __wbg_adapter_38); + imports.wbg.__wbindgen_closure_wrapper5161 = function(arg0, arg1, arg2) { + const ret = makeMutClosure(arg0, arg1, 938, __wbg_adapter_38); return ret; }; - imports.wbg.__wbindgen_closure_wrapper3779 = function(arg0, arg1, arg2) { - const ret = makeMutClosure(arg0, arg1, 821, __wbg_adapter_38); + imports.wbg.__wbindgen_closure_wrapper5163 = function(arg0, arg1, arg2) { + const ret = makeMutClosure(arg0, arg1, 938, __wbg_adapter_38); return ret; }; - imports.wbg.__wbindgen_closure_wrapper3781 = function(arg0, arg1, arg2) { - const ret = makeMutClosure(arg0, arg1, 821, __wbg_adapter_38); + imports.wbg.__wbindgen_closure_wrapper5165 = function(arg0, arg1, arg2) { + const ret = makeMutClosure(arg0, arg1, 938, __wbg_adapter_43); return ret; }; - imports.wbg.__wbindgen_closure_wrapper3783 = function(arg0, arg1, arg2) { - const ret = makeMutClosure(arg0, arg1, 821, __wbg_adapter_45); + imports.wbg.__wbindgen_closure_wrapper5167 = function(arg0, arg1, arg2) { + const ret = makeMutClosure(arg0, arg1, 938, __wbg_adapter_38); return ret; }; - imports.wbg.__wbindgen_closure_wrapper6007 = function(arg0, arg1, arg2) { - const ret = makeMutClosure(arg0, arg1, 1142, __wbg_adapter_48); + imports.wbg.__wbindgen_closure_wrapper6001 = function(arg0, arg1, arg2) { + const ret = makeMutClosure(arg0, arg1, 1140, __wbg_adapter_48); return ret; }; - imports.wbg.__wbindgen_closure_wrapper6059 = function(arg0, arg1, arg2) { - const ret = makeMutClosure(arg0, arg1, 1156, __wbg_adapter_51); + imports.wbg.__wbindgen_closure_wrapper6053 = function(arg0, arg1, arg2) { + const ret = makeMutClosure(arg0, arg1, 1154, __wbg_adapter_51); return ret; }; imports.wbg.__wbindgen_init_externref_table = function() { diff --git a/pkg/casper_rust_wasm_sdk_bg.wasm b/pkg/casper_rust_wasm_sdk_bg.wasm index 9a60cac58..977092a20 100644 Binary files a/pkg/casper_rust_wasm_sdk_bg.wasm and b/pkg/casper_rust_wasm_sdk_bg.wasm differ diff --git a/pkg/casper_rust_wasm_sdk_bg.wasm.d.ts b/pkg/casper_rust_wasm_sdk_bg.wasm.d.ts index 9dd69cf15..a83aac2c5 100644 --- a/pkg/casper_rust_wasm_sdk_bg.wasm.d.ts +++ b/pkg/casper_rust_wasm_sdk_bg.wasm.d.ts @@ -1,9 +1,6 @@ /* tslint:disable */ /* eslint-disable */ export const memory: WebAssembly.Memory; -export function __wbg_peerentry_free(a: number, b: number): void; -export function peerentry_node_id(a: number): Array; -export function peerentry_address(a: number): Array; export function __wbg_getbalanceresult_free(a: number, b: number): void; export function getbalanceresult_api_version(a: number): number; export function getbalanceresult_balance_value(a: number): number; @@ -67,6 +64,230 @@ export function __wbg_get_querycontractdictoptions_rpc_address(a: number): Array export function __wbg_get_querycontractdictoptions_verbosity(a: number): number; export function __wbg_set_querycontractdictoptions_dictionary_item_params(a: number, b: number): void; export function __wbg_set_querycontractdictoptions_dictionary_item_identifier(a: number, b: number): void; +export function __wbg_paymentstrparams_free(a: number, b: number): void; +export function paymentstrparams_new(a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number, n: number, o: number, p: number, q: number, r: number, s: number): number; +export function paymentstrparams_payment_amount(a: number): Array; +export function paymentstrparams_set_payment_amount(a: number, b: number, c: number): void; +export function paymentstrparams_payment_hash(a: number): Array; +export function paymentstrparams_set_payment_hash(a: number, b: number, c: number): void; +export function paymentstrparams_payment_name(a: number): Array; +export function paymentstrparams_set_payment_name(a: number, b: number, c: number): void; +export function paymentstrparams_payment_package_hash(a: number): Array; +export function paymentstrparams_set_payment_package_hash(a: number, b: number, c: number): void; +export function paymentstrparams_payment_package_name(a: number): Array; +export function paymentstrparams_set_payment_package_name(a: number, b: number, c: number): void; +export function paymentstrparams_payment_path(a: number): Array; +export function paymentstrparams_set_payment_path(a: number, b: number, c: number): void; +export function paymentstrparams_payment_args_simple(a: number): number; +export function paymentstrparams_set_payment_args_simple(a: number, b: number): void; +export function paymentstrparams_payment_args_json(a: number): Array; +export function paymentstrparams_set_payment_args_json(a: number, b: number, c: number): void; +export function paymentstrparams_payment_version(a: number): Array; +export function paymentstrparams_set_payment_version(a: number, b: number, c: number): void; +export function paymentstrparams_payment_entry_point(a: number): Array; +export function paymentstrparams_set_payment_entry_point(a: number, b: number, c: number): void; +export function __wbg_sessionstrparams_free(a: number, b: number): void; +export function sessionstrparams_new(a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number, n: number, o: number, p: number, q: number, r: number, s: number): number; +export function sessionstrparams_session_hash(a: number): Array; +export function sessionstrparams_set_session_hash(a: number, b: number, c: number): void; +export function sessionstrparams_session_name(a: number): Array; +export function sessionstrparams_set_session_name(a: number, b: number, c: number): void; +export function sessionstrparams_session_package_hash(a: number): Array; +export function sessionstrparams_set_session_package_hash(a: number, b: number, c: number): void; +export function sessionstrparams_session_package_name(a: number): Array; +export function sessionstrparams_set_session_package_name(a: number, b: number, c: number): void; +export function sessionstrparams_session_path(a: number): Array; +export function sessionstrparams_set_session_path(a: number, b: number, c: number): void; +export function sessionstrparams_session_bytes(a: number): number; +export function sessionstrparams_set_session_bytes(a: number, b: number): void; +export function sessionstrparams_session_args_simple(a: number): number; +export function sessionstrparams_set_session_args_simple(a: number, b: number): void; +export function sessionstrparams_session_args_json(a: number): Array; +export function sessionstrparams_set_session_args_json(a: number, b: number, c: number): void; +export function sessionstrparams_session_version(a: number): Array; +export function sessionstrparams_set_session_version(a: number, b: number, c: number): void; +export function sessionstrparams_session_entry_point(a: number): Array; +export function sessionstrparams_set_session_entry_point(a: number, b: number, c: number): void; +export function sessionstrparams_is_session_transfer(a: number): number; +export function sessionstrparams_set_is_session_transfer(a: number, b: number): void; +export function digest_new_js_alias(a: number, b: number): Array; +export function digest_fromString(a: number, b: number): Array; +export function digest_fromRaw(a: number, b: number): Array; +export function digest_toJson(a: number): number; +export function digest_toString(a: number): Array; +export function __wbg_addressableentityhash_free(a: number, b: number): void; +export function addressableentityhash_new_js_alias(a: number, b: number): Array; +export function addressableentityhash_fromFormattedStr(a: number, b: number): Array; +export function addressableentityhash_toFormattedString(a: number): Array; +export function addressableentityhash_fromUint8Array(a: number, b: number): number; +export function blockhash_new_js_alias(a: number, b: number): Array; +export function blockhash_fromDigest(a: number): Array; +export function blockhash_toJson(a: number): number; +export function blockhash_toString(a: number): Array; +export function contractpackagehash_new_js_alias(a: number, b: number): Array; +export function contractpackagehash_fromFormattedStr(a: number, b: number): Array; +export function contractpackagehash_toFormattedString(a: number): Array; +export function contractpackagehash_fromUint8Array(a: number, b: number): number; +export function deployhash_new_js_alias(a: number, b: number): Array; +export function deployhash_toJson(a: number): number; +export function deployhash_toString(a: number): Array; +export function __wbg_dictionaryitemidentifier_free(a: number, b: number): void; +export function dictionaryitemidentifier_newFromAccountInfo(a: number, b: number, c: number, d: number, e: number, f: number): Array; +export function dictionaryitemidentifier_newFromContractInfo(a: number, b: number, c: number, d: number, e: number, f: number): Array; +export function dictionaryitemidentifier_newFromEntityInfo(a: number, b: number, c: number, d: number, e: number, f: number): Array; +export function dictionaryitemidentifier_newFromSeedUref(a: number, b: number, c: number, d: number): Array; +export function dictionaryitemidentifier_newFromDictionaryKey(a: number, b: number): Array; +export function dictionaryitemidentifier_toJson(a: number): number; +export function __wbg_publickey_free(a: number, b: number): void; +export function publickey_new_js_alias(a: number, b: number): Array; +export function publickey_fromUint8Array(a: number, b: number): Array; +export function publickey_toAccountHash(a: number): number; +export function publickey_toPurseUref(a: number): number; +export function publickey_toJson(a: number): number; +export function __wbg_transaction_free(a: number, b: number): void; +export function transaction_new(a: number): number; +export function transaction_toJson(a: number): number; +export function transaction_newSession(a: number, b: number): Array; +export function transaction_newTransfer(a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number): Array; +export function transaction_withTTL(a: number, b: number, c: number, d: number, e: number): number; +export function transaction_withTimestamp(a: number, b: number, c: number, d: number, e: number): number; +export function transaction_withChainName(a: number, b: number, c: number, d: number, e: number): number; +export function transaction_withPublicKey(a: number, b: number, c: number, d: number): number; +export function transaction_withAccountHash(a: number, b: number, c: number, d: number): number; +export function transaction_withEntryPoint(a: number, b: number, c: number, d: number, e: number): number; +export function transaction_withEntityHash(a: number, b: number, c: number, d: number): number; +export function transaction_withPackageHash(a: number, b: number, c: number, d: number): number; +export function transaction_withTransactionBytes(a: number, b: number, c: number, d: number, e: number): number; +export function transaction_withSecretKey(a: number, b: number, c: number): number; +export function transaction_verify(a: number): number; +export function transaction_hash(a: number): number; +export function transaction_expired(a: number): number; +export function transaction_expires(a: number): number; +export function transaction_signers(a: number): number; +export function transaction_authorization_keys(a: number): number; +export function transaction_sign(a: number, b: number, c: number): number; +export function transaction_approvalsHash(a: number): number; +export function transaction_approvals(a: number): number; +export function transaction_is_native(a: number): number; +export function transaction_target(a: number): number; +export function transaction_is_standard_payment(a: number): number; +export function transaction_session_args(a: number): number; +export function transaction_addSignature(a: number, b: number, c: number, d: number, e: number): number; +export function transaction_entry_point(a: number): Array; +export function transaction_ttl(a: number): Array; +export function transaction_timestamp(a: number): Array; +export function transaction_size_estimate(a: number): number; +export function transaction_chain_name(a: number): Array; +export function transaction_initiator_addr(a: number): Array; +export function transaction_pricing_mode(a: number): number; +export function transaction_additional_computation_factor(a: number): number; +export function transaction_receipt(a: number): number; +export function transaction_gas_price_tolerance(a: number): number; +export function transaction_account_hash(a: number): number; +export function transaction_addArg(a: number, b: number, c: number, d: number): Array; +export function __wbg_transactionstrparams_free(a: number, b: number): void; +export function transactionstrparams_new(a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number, n: number, o: number, p: number, q: number, r: number, s: number, t: number, u: number, v: number, w: number, x: number): number; +export function transactionstrparams_new_with_defaults(a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number): number; +export function transactionstrparams_secret_key(a: number): Array; +export function transactionstrparams_set_secret_key(a: number, b: number, c: number): void; +export function transactionstrparams_timestamp(a: number): Array; +export function transactionstrparams_set_timestamp(a: number, b: number, c: number): void; +export function transactionstrparams_setDefaultTimestamp(a: number): void; +export function transactionstrparams_ttl(a: number): Array; +export function transactionstrparams_set_ttl(a: number, b: number, c: number): void; +export function transactionstrparams_setDefaultTTL(a: number): void; +export function transactionstrparams_chain_name(a: number): Array; +export function transactionstrparams_set_chain_name(a: number, b: number, c: number): void; +export function transactionstrparams_initiator_addr(a: number): Array; +export function transactionstrparams_set_initiator_addr(a: number, b: number, c: number): void; +export function transactionstrparams_session_args_simple(a: number): number; +export function transactionstrparams_set_session_args_simple(a: number, b: number, c: number): void; +export function transactionstrparams_session_args_json(a: number): Array; +export function transactionstrparams_set_session_args_json(a: number, b: number, c: number): void; +export function transactionstrparams_pricing_mode(a: number): number; +export function transactionstrparams_set_pricing_mode(a: number, b: number): void; +export function transactionstrparams_additional_computation_factor(a: number): Array; +export function transactionstrparams_set_additional_computation_factor(a: number, b: number, c: number): void; +export function transactionstrparams_payment_amount(a: number): Array; +export function transactionstrparams_set_payment_amount(a: number, b: number, c: number): void; +export function transactionstrparams_gas_price_tolerance(a: number): Array; +export function transactionstrparams_set_gas_price_tolerance(a: number, b: number, c: number): void; +export function transactionstrparams_receipt(a: number): Array; +export function transactionstrparams_set_receipt(a: number, b: number, c: number): void; +export function transactionstrparams_standard_payment(a: number): number; +export function transactionstrparams_set_standard_payment(a: number, b: number): void; +export function __wbg_uref_free(a: number, b: number): void; +export function uref_new_js_alias(a: number, b: number, c: number): Array; +export function uref_fromFormattedStr(a: number, b: number): Array; +export function uref_fromUint8Array(a: number, b: number, c: number): number; +export function uref_toFormattedString(a: number): Array; +export function uref_toJson(a: number): number; +export function __wbg_putdeployresult_free(a: number, b: number): void; +export function putdeployresult_api_version(a: number): number; +export function putdeployresult_deploy_hash(a: number): number; +export function putdeployresult_toJson(a: number): number; +export function sdk_deploy(a: number, b: number, c: number, d: number, e: number, f: number, g: number): number; +export function __wbg_getdeployresult_free(a: number, b: number): void; +export function getdeployresult_api_version(a: number): number; +export function getdeployresult_deploy(a: number): number; +export function getdeployresult_execution_info(a: number): number; +export function getdeployresult_toJson(a: number): number; +export function __wbg_getdeployoptions_free(a: number, b: number): void; +export function __wbg_get_getdeployoptions_deploy_hash_as_string(a: number): Array; +export function __wbg_set_getdeployoptions_deploy_hash_as_string(a: number, b: number, c: number): void; +export function __wbg_get_getdeployoptions_deploy_hash(a: number): number; +export function __wbg_set_getdeployoptions_deploy_hash(a: number, b: number): void; +export function __wbg_get_getdeployoptions_finalized_approvals(a: number): number; +export function __wbg_set_getdeployoptions_finalized_approvals(a: number, b: number): void; +export function __wbg_get_getdeployoptions_rpc_address(a: number): Array; +export function __wbg_set_getdeployoptions_rpc_address(a: number, b: number, c: number): void; +export function __wbg_get_getdeployoptions_verbosity(a: number): number; +export function __wbg_set_getdeployoptions_verbosity(a: number, b: number): void; +export function sdk_get_deploy_options(a: number, b: number): Array; +export function sdk_get_deploy(a: number, b: number): number; +export function sdk_info_get_deploy(a: number, b: number): number; +export function __wbg_gettransactionresult_free(a: number, b: number): void; +export function gettransactionresult_api_version(a: number): number; +export function gettransactionresult_transaction(a: number): number; +export function gettransactionresult_execution_info(a: number): number; +export function gettransactionresult_toJson(a: number): number; +export function __wbg_get_gettransactionoptions_transaction_hash(a: number): number; +export function __wbg_set_gettransactionoptions_transaction_hash(a: number, b: number): void; +export function sdk_get_transaction_options(a: number, b: number): Array; +export function sdk_get_transaction(a: number, b: number): number; +export function sdk_info_get_transaction(a: number, b: number): number; +export function __wbg_speculativeexectxnresult_free(a: number, b: number): void; +export function speculativeexectxnresult_api_version(a: number): number; +export function speculativeexectxnresult_block_hash(a: number): number; +export function speculativeexectxnresult_execution_result(a: number): number; +export function speculativeexectxnresult_toJson(a: number): number; +export function __wbg_getspeculativeexectxnoptions_free(a: number, b: number): void; +export function __wbg_get_getspeculativeexectxnoptions_transaction_as_string(a: number): Array; +export function __wbg_set_getspeculativeexectxnoptions_transaction_as_string(a: number, b: number, c: number): void; +export function __wbg_get_getspeculativeexectxnoptions_transaction(a: number): number; +export function __wbg_set_getspeculativeexectxnoptions_transaction(a: number, b: number): void; +export function __wbg_get_getspeculativeexectxnoptions_rpc_address(a: number): Array; +export function __wbg_set_getspeculativeexectxnoptions_rpc_address(a: number, b: number, c: number): void; +export function __wbg_get_getspeculativeexectxnoptions_verbosity(a: number): number; +export function __wbg_set_getspeculativeexectxnoptions_verbosity(a: number, b: number): void; +export function sdk_get_speculative_exec_options(a: number, b: number): Array; +export function sdk_speculative_exec(a: number, b: number): number; +export function sdk_make_transfer(a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number): Array; +export function sdk_make_transfer_transaction(a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number): Array; +export function __wbg_gettransactionoptions_free(a: number, b: number): void; +export function __wbg_set_gettransactionoptions_verbosity(a: number, b: number): void; +export function __wbg_set_gettransactionoptions_transaction_hash_as_string(a: number, b: number, c: number): void; +export function __wbg_set_gettransactionoptions_rpc_address(a: number, b: number, c: number): void; +export function deployhash_fromDigest(a: number): Array; +export function __wbg_get_gettransactionoptions_finalized_approvals(a: number): number; +export function __wbg_set_gettransactionoptions_finalized_approvals(a: number, b: number): void; +export function __wbg_get_gettransactionoptions_transaction_hash_as_string(a: number): Array; +export function __wbg_get_gettransactionoptions_rpc_address(a: number): Array; +export function __wbg_get_gettransactionoptions_verbosity(a: number): number; +export function __wbg_digest_free(a: number, b: number): void; +export function __wbg_blockhash_free(a: number, b: number): void; +export function __wbg_contractpackagehash_free(a: number, b: number): void; +export function __wbg_deployhash_free(a: number, b: number): void; export function __wbg_geterainforesult_free(a: number, b: number): void; export function geterainforesult_api_version(a: number): number; export function geterainforesult_era_summary(a: number): number; @@ -83,558 +304,115 @@ export function __wbg_set_geterainfooptions_verbosity(a: number, b: number): voi export function sdk_get_era_info_options(a: number, b: number): Array; export function sdk_get_era_info(a: number, b: number): number; export function sdk_chain_get_era_info_by_switch_block(a: number, b: number): number; -export function __wbg_accessrights_free(a: number, b: number): void; -export function accessrights_NONE(): number; -export function accessrights_READ(): number; -export function accessrights_WRITE(): number; -export function accessrights_ADD(): number; -export function accessrights_READ_ADD(): number; -export function accessrights_READ_WRITE(): number; -export function accessrights_ADD_WRITE(): number; -export function accessrights_READ_ADD_WRITE(): number; -export function accessrights_new(a: number): Array; -export function accessrights_from_bits(a: number, b: number, c: number): number; -export function accessrights_is_readable(a: number): number; -export function accessrights_is_writeable(a: number): number; -export function accessrights_is_addable(a: number): number; -export function accessrights_is_none(a: number): number; -export function __wbg_dictionaryaddr_free(a: number, b: number): void; -export function dictionaryaddr_new(a: number, b: number): Array; -export function transferaddr_new(a: number, b: number): Array; -export function urefaddr_new(a: number, b: number): Array; -export function __wbg_blockidentifier_free(a: number, b: number): void; -export function blockidentifier_new(a: number): number; -export function blockidentifier_from_hash(a: number): number; -export function blockidentifier_fromHeight(a: number): number; -export function blockidentifier_toJson(a: number): number; -export function __wbg_eraid_free(a: number, b: number): void; -export function eraid_new(a: number): number; -export function eraid_value(a: number): number; -export function __wbg_getauctioninforesult_free(a: number, b: number): void; -export function getauctioninforesult_api_version(a: number): number; -export function getauctioninforesult_auction_state(a: number): number; -export function getauctioninforesult_toJson(a: number): number; -export function __wbg_getauctioninfooptions_free(a: number, b: number): void; -export function __wbg_get_getauctioninfooptions_maybe_block_id_as_string(a: number): Array; -export function __wbg_set_getauctioninfooptions_maybe_block_id_as_string(a: number, b: number, c: number): void; -export function __wbg_get_getauctioninfooptions_maybe_block_identifier(a: number): number; -export function __wbg_set_getauctioninfooptions_maybe_block_identifier(a: number, b: number): void; -export function __wbg_get_getauctioninfooptions_rpc_address(a: number): Array; -export function __wbg_set_getauctioninfooptions_rpc_address(a: number, b: number, c: number): void; -export function __wbg_get_getauctioninfooptions_verbosity(a: number): number; -export function __wbg_set_getauctioninfooptions_verbosity(a: number, b: number): void; -export function sdk_get_auction_info_options(a: number, b: number): Array; -export function sdk_get_auction_info(a: number, b: number): number; -export function sdk_state_get_auction_info_js_alias(a: number, b: number): number; -export function __wbg_getblockresult_free(a: number, b: number): void; -export function getblockresult_api_version(a: number): number; -export function getblockresult_block(a: number): number; -export function getblockresult_toJson(a: number): number; -export function sdk_get_block_options(a: number, b: number): Array; -export function sdk_get_block(a: number, b: number): number; -export function sdk_chain_get_block(a: number, b: number): number; -export function __wbg_getchainspecresult_free(a: number, b: number): void; -export function getchainspecresult_api_version(a: number): number; -export function getchainspecresult_chainspec_bytes(a: number): number; -export function getchainspecresult_toJson(a: number): number; -export function sdk_get_chainspec(a: number, b: number, c: number, d: number): number; -export function sdk_info_get_chainspec(a: number, b: number, c: number, d: number): number; -export function __wbg_getnodestatusresult_free(a: number, b: number): void; -export function getnodestatusresult_api_version(a: number): number; -export function getnodestatusresult_chainspec_name(a: number): Array; -export function getnodestatusresult_starting_state_root_hash(a: number): number; -export function getnodestatusresult_peers(a: number): number; -export function getnodestatusresult_last_added_block_info(a: number): number; -export function getnodestatusresult_our_public_signing_key(a: number): number; -export function getnodestatusresult_round_length(a: number): number; -export function getnodestatusresult_next_upgrade(a: number): number; -export function getnodestatusresult_build_version(a: number): Array; -export function getnodestatusresult_uptime(a: number): number; -export function getnodestatusresult_reactor_state(a: number): number; -export function getnodestatusresult_last_progress(a: number): number; -export function getnodestatusresult_available_block_range(a: number): number; -export function getnodestatusresult_block_sync(a: number): number; -export function getnodestatusresult_toJson(a: number): number; -export function sdk_get_node_status(a: number, b: number, c: number, d: number): number; -export function sdk_info_get_status(a: number, b: number, c: number, d: number): number; -export function __wbg_getpeersresult_free(a: number, b: number): void; -export function getpeersresult_api_version(a: number): number; -export function getpeersresult_peers(a: number): number; -export function getpeersresult_toJson(a: number): number; -export function sdk_get_peers(a: number, b: number, c: number, d: number): number; -export function sdk_info_get_peers(a: number, b: number, c: number, d: number): number; -export function __wbg_getvalidatorchangesresult_free(a: number, b: number): void; -export function getvalidatorchangesresult_api_version(a: number): number; -export function getvalidatorchangesresult_changes(a: number): number; -export function getvalidatorchangesresult_toJson(a: number): number; -export function sdk_get_validator_changes(a: number, b: number, c: number, d: number): number; -export function sdk_info_get_validator_change(a: number, b: number, c: number, d: number): number; -export function __wbg_listrpcsresult_free(a: number, b: number): void; -export function listrpcsresult_api_version(a: number): number; -export function listrpcsresult_name(a: number): Array; -export function listrpcsresult_schema(a: number): number; -export function listrpcsresult_toJson(a: number): number; -export function sdk_list_rpcs(a: number, b: number, c: number, d: number): number; -export function sdk_make_deploy(a: number, b: number, c: number, d: number): Array; -export function sdk_sign_deploy(a: number, b: number, c: number, d: number): number; -export function sdk_make_transaction(a: number, b: number, c: number): Array; -export function sdk_sign_transaction(a: number, b: number, c: number, d: number): number; -export function __wbg_querycontractkeyoptions_free(a: number, b: number): void; -export function __wbg_get_querycontractkeyoptions_entity_identifier(a: number): number; -export function __wbg_set_querycontractkeyoptions_entity_identifier(a: number, b: number): void; -export function __wbg_get_querycontractkeyoptions_entity_identifier_as_string(a: number): Array; -export function __wbg_set_querycontractkeyoptions_entity_identifier_as_string(a: number, b: number, c: number): void; -export function __wbg_get_querycontractkeyoptions_maybe_block_id_as_string(a: number): Array; -export function __wbg_set_querycontractkeyoptions_maybe_block_id_as_string(a: number, b: number, c: number): void; -export function __wbg_get_querycontractkeyoptions_path_as_string(a: number): Array; -export function __wbg_set_querycontractkeyoptions_path_as_string(a: number, b: number, c: number): void; -export function __wbg_get_querycontractkeyoptions_path(a: number): number; -export function __wbg_set_querycontractkeyoptions_path(a: number, b: number): void; -export function __wbg_get_querycontractkeyoptions_rpc_address(a: number): Array; -export function __wbg_set_querycontractkeyoptions_rpc_address(a: number, b: number, c: number): void; -export function __wbg_get_querycontractkeyoptions_verbosity(a: number): number; -export function __wbg_set_querycontractkeyoptions_verbosity(a: number, b: number): void; -export function sdk_query_contract_key_options(a: number, b: number): Array; -export function sdk_query_contract_key(a: number, b: number): number; -export function __wbg_getblockoptions_free(a: number, b: number): void; -export function __wbg_set_getblockoptions_verbosity(a: number, b: number): void; -export function __wbg_get_getblockoptions_maybe_block_identifier(a: number): number; -export function __wbg_get_querycontractkeyoptions_maybe_block_identifier(a: number): number; -export function __wbg_set_getblockoptions_maybe_block_id_as_string(a: number, b: number, c: number): void; -export function __wbg_set_getblockoptions_rpc_address(a: number, b: number, c: number): void; -export function __wbg_get_getblockoptions_maybe_block_id_as_string(a: number): Array; -export function __wbg_get_getblockoptions_rpc_address(a: number): Array; -export function __wbg_get_getblockoptions_verbosity(a: number): number; -export function __wbg_set_getblockoptions_maybe_block_identifier(a: number, b: number): void; -export function __wbg_set_querycontractkeyoptions_maybe_block_identifier(a: number, b: number): void; -export function __wbg_transferaddr_free(a: number, b: number): void; -export function __wbg_urefaddr_free(a: number, b: number): void; -export function __wbg_accounthash_free(a: number, b: number): void; -export function accounthash_new_js_alias(a: number, b: number): Array; -export function accounthash_fromFormattedStr(a: number, b: number): Array; -export function accounthash_fromPublicKey(a: number): number; -export function accounthash_toFormattedString(a: number): Array; -export function accounthash_toHexString(a: number): Array; -export function accounthash_fromUint8Array(a: number, b: number): number; -export function accounthash_toJson(a: number): number; -export function __wbg_accountidentifier_free(a: number, b: number): void; -export function accountidentifier_fromFormattedStr(a: number, b: number): Array; -export function accountidentifier_fromPublicKey(a: number): number; -export function accountidentifier_fromAccountHash(a: number): number; -export function accountidentifier_toJson(a: number): number; -export function hashaddr_new(a: number, b: number): Array; -export function hashaddr_toBytes(a: number): Array; -export function hashaddr_toHexString(a: number): Array; -export function __wbg_dictionaryitemstrparams_free(a: number, b: number): void; -export function dictionaryitemstrparams_new(): number; -export function dictionaryitemstrparams_setAccountNamedKey(a: number, b: number, c: number, d: number, e: number, f: number, g: number): void; -export function dictionaryitemstrparams_setContractNamedKey(a: number, b: number, c: number, d: number, e: number, f: number, g: number): void; -export function dictionaryitemstrparams_setEntityNamedKey(a: number, b: number, c: number, d: number, e: number, f: number, g: number): void; -export function dictionaryitemstrparams_setUref(a: number, b: number, c: number, d: number, e: number): void; -export function dictionaryitemstrparams_setDictionary(a: number, b: number, c: number): void; -export function dictionaryitemstrparams_toJson(a: number): number; -export function packagehash_new_js_alias(a: number, b: number): Array; -export function packagehash_fromFormattedStr(a: number, b: number): Array; -export function packagehash_toFormattedString(a: number): Array; -export function packagehash_fromUint8Array(a: number, b: number): number; -export function __wbg_transactionhash_free(a: number, b: number): void; -export function transactionhash_new_js_alias(a: number, b: number): Array; -export function transactionhash_fromRaw(a: number, b: number): Array; -export function transactionhash_digest(a: number): Array; -export function transactionhash_toJson(a: number): number; -export function transactionhash_toString(a: number): Array; -export function __wbg_getstateroothashresult_free(a: number, b: number): void; -export function getstateroothashresult_api_version(a: number): number; -export function getstateroothashresult_state_root_hash(a: number): number; -export function getstateroothashresult_state_root_hash_as_string(a: number): Array; -export function getstateroothashresult_toString(a: number): Array; -export function getstateroothashresult_toJson(a: number): number; -export function __wbg_getstateroothashoptions_free(a: number, b: number): void; -export function __wbg_get_getstateroothashoptions_maybe_block_id_as_string(a: number): Array; -export function __wbg_set_getstateroothashoptions_maybe_block_id_as_string(a: number, b: number, c: number): void; -export function __wbg_get_getstateroothashoptions_maybe_block_identifier(a: number): number; -export function __wbg_set_getstateroothashoptions_maybe_block_identifier(a: number, b: number): void; -export function __wbg_get_getstateroothashoptions_rpc_address(a: number): Array; -export function __wbg_set_getstateroothashoptions_rpc_address(a: number, b: number, c: number): void; -export function __wbg_get_getstateroothashoptions_verbosity(a: number): number; -export function __wbg_set_getstateroothashoptions_verbosity(a: number, b: number): void; -export function sdk_get_state_root_hash_options(a: number, b: number): Array; -export function sdk_get_state_root_hash(a: number, b: number): number; -export function sdk_chain_get_state_root_hash(a: number, b: number): number; -export function sdk_watchDeploy(a: number, b: number, c: number, d: number, e: number): number; -export function sdk_watchTransaction(a: number, b: number, c: number, d: number, e: number): number; -export function sdk_waitDeploy(a: number, b: number, c: number, d: number, e: number, f: number, g: number): number; -export function sdk_waitTransaction(a: number, b: number, c: number, d: number, e: number, f: number, g: number): number; -export function __wbg_watcher_free(a: number, b: number): void; -export function watcher_new(a: number, b: number, c: number, d: number): number; -export function watcher_subscribe(a: number, b: number, c: number): Array; -export function watcher_unsubscribe(a: number, b: number, c: number): void; -export function watcher_start(a: number): number; -export function watcher_stop(a: number): void; -export function __wbg_subscription_free(a: number, b: number): void; -export function __wbg_get_subscription_eventHandlerFn(a: number): number; -export function __wbg_set_subscription_eventHandlerFn(a: number, b: number): void; -export function subscription_new(a: number, b: number, c: number): number; -export function __wbg_failure_free(a: number, b: number): void; -export function __wbg_get_failure_cost(a: number): Array; -export function __wbg_set_failure_cost(a: number, b: number, c: number): void; -export function __wbg_get_failure_error_message(a: number): Array; -export function __wbg_set_failure_error_message(a: number, b: number, c: number): void; -export function __wbg_version2_free(a: number, b: number): void; -export function __wbg_get_version2_error_message(a: number): Array; -export function __wbg_set_version2_error_message(a: number, b: number, c: number): void; -export function __wbg_executionresult_free(a: number, b: number): void; -export function __wbg_get_executionresult_Success(a: number): number; -export function __wbg_set_executionresult_Success(a: number, b: number): void; -export function __wbg_get_executionresult_Failure(a: number): number; -export function __wbg_set_executionresult_Failure(a: number, b: number): void; -export function __wbg_hashstring_free(a: number, b: number): void; -export function hashstring_Deploy(a: number): Array; -export function hashstring_toString(a: number): Array; -export function __wbg_messages_free(a: number, b: number): void; -export function __wbg_set_messages_entity_hash(a: number, b: number, c: number): void; -export function __wbg_get_messages_message(a: number): number; -export function __wbg_set_messages_message(a: number, b: number): void; -export function __wbg_get_messages_topic_name(a: number): Array; -export function __wbg_set_messages_topic_name(a: number, b: number, c: number): void; -export function __wbg_get_messages_topic_name_hash(a: number): Array; -export function __wbg_set_messages_topic_name_hash(a: number, b: number, c: number): void; -export function __wbg_get_messages_topic_index(a: number): number; -export function __wbg_set_messages_topic_index(a: number, b: number): void; -export function __wbg_get_messages_block_index(a: number): number; -export function __wbg_set_messages_block_index(a: number, b: number): void; -export function __wbg_transactionprocessed_free(a: number, b: number): void; -export function __wbg_get_transactionprocessed_hash(a: number): number; -export function __wbg_set_transactionprocessed_hash(a: number, b: number): void; -export function __wbg_get_transactionprocessed_initiator_addr(a: number): number; -export function __wbg_set_transactionprocessed_initiator_addr(a: number, b: number): void; -export function __wbg_get_transactionprocessed_timestamp(a: number): Array; -export function __wbg_set_transactionprocessed_timestamp(a: number, b: number, c: number): void; -export function __wbg_set_transactionprocessed_ttl(a: number, b: number, c: number): void; -export function __wbg_get_transactionprocessed_execution_result(a: number): number; -export function __wbg_set_transactionprocessed_execution_result(a: number, b: number): void; -export function __wbg_get_transactionprocessed_messages(a: number): Array; -export function __wbg_set_transactionprocessed_messages(a: number, b: number, c: number): void; -export function __wbg_body_free(a: number, b: number): void; -export function __wbg_get_body_transaction_processed(a: number): number; -export function __wbg_set_body_transaction_processed(a: number, b: number): void; -export function body_get_deploy_processed(a: number): number; -export function __wbg_eventparseresult_free(a: number, b: number): void; -export function __wbg_get_eventparseresult_err(a: number): Array; -export function __wbg_set_eventparseresult_err(a: number, b: number, c: number): void; -export function __wbg_get_eventparseresult_body(a: number): number; -export function __wbg_set_eventparseresult_body(a: number, b: number): void; -export function __wbg_payment_free(a: number, b: number): void; -export function __wbg_publickeystring_free(a: number, b: number): void; -export function __wbg_message_free(a: number, b: number): void; -export function __wbg_get_version2_initiator(a: number): number; -export function accountidentifier_new(a: number, b: number): Array; -export function __wbg_set_subscription_targetHash(a: number, b: number, c: number): void; -export function __wbg_set_version2_limit(a: number, b: number, c: number): void; -export function __wbg_set_payment_source(a: number, b: number, c: number): void; -export function __wbg_set_hashstring_hash(a: number, b: number, c: number): void; -export function __wbg_set_publickeystring_PublicKey(a: number, b: number, c: number): void; -export function __wbg_set_message_String(a: number, b: number, c: number): void; -export function __wbg_set_version2_consumed(a: number, b: number, c: number): void; -export function __wbg_set_version2_cost(a: number, b: number, c: number): void; -export function __wbg_set_transactionprocessed_block_hash(a: number, b: number, c: number): void; -export function body_get_transaction_processed(a: number): number; -export function hashstring_Version1(a: number): Array; -export function __wbg_set_version2_initiator(a: number, b: number): void; -export function __wbg_hashaddr_free(a: number, b: number): void; -export function __wbg_packagehash_free(a: number, b: number): void; -export function __wbg_get_subscription_targetHash(a: number): Array; -export function __wbg_get_version2_limit(a: number): Array; -export function __wbg_get_payment_source(a: number): Array; -export function __wbg_get_hashstring_hash(a: number): Array; -export function __wbg_get_publickeystring_PublicKey(a: number): Array; -export function __wbg_get_message_String(a: number): Array; -export function __wbg_get_messages_entity_hash(a: number): Array; -export function __wbg_get_version2_cost(a: number): Array; -export function __wbg_get_version2_consumed(a: number): Array; -export function __wbg_get_transactionprocessed_ttl(a: number): Array; -export function __wbg_get_transactionprocessed_block_hash(a: number): Array; -export function __wbg_addressableentityhash_free(a: number, b: number): void; -export function addressableentityhash_new_js_alias(a: number, b: number): Array; -export function addressableentityhash_fromFormattedStr(a: number, b: number): Array; -export function addressableentityhash_toFormattedString(a: number): Array; -export function addressableentityhash_fromUint8Array(a: number, b: number): number; -export function blockhash_new_js_alias(a: number, b: number): Array; -export function blockhash_fromDigest(a: number): Array; -export function blockhash_toJson(a: number): number; -export function blockhash_toString(a: number): Array; -export function contractpackagehash_new_js_alias(a: number, b: number): Array; -export function contractpackagehash_fromFormattedStr(a: number, b: number): Array; -export function contractpackagehash_toFormattedString(a: number): Array; -export function contractpackagehash_fromUint8Array(a: number, b: number): number; -export function deployhash_new_js_alias(a: number, b: number): Array; -export function deployhash_toJson(a: number): number; -export function deployhash_toString(a: number): Array; -export function __wbg_paymentstrparams_free(a: number, b: number): void; -export function paymentstrparams_new(a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number, n: number, o: number, p: number, q: number, r: number, s: number): number; -export function paymentstrparams_payment_amount(a: number): Array; -export function paymentstrparams_set_payment_amount(a: number, b: number, c: number): void; -export function paymentstrparams_payment_hash(a: number): Array; -export function paymentstrparams_set_payment_hash(a: number, b: number, c: number): void; -export function paymentstrparams_payment_name(a: number): Array; -export function paymentstrparams_set_payment_name(a: number, b: number, c: number): void; -export function paymentstrparams_payment_package_hash(a: number): Array; -export function paymentstrparams_set_payment_package_hash(a: number, b: number, c: number): void; -export function paymentstrparams_payment_package_name(a: number): Array; -export function paymentstrparams_set_payment_package_name(a: number, b: number, c: number): void; -export function paymentstrparams_payment_path(a: number): Array; -export function paymentstrparams_set_payment_path(a: number, b: number, c: number): void; -export function paymentstrparams_payment_args_simple(a: number): number; -export function paymentstrparams_set_payment_args_simple(a: number, b: number): void; -export function paymentstrparams_payment_args_json(a: number): Array; -export function paymentstrparams_set_payment_args_json(a: number, b: number, c: number): void; -export function paymentstrparams_payment_version(a: number): Array; -export function paymentstrparams_set_payment_version(a: number, b: number, c: number): void; -export function paymentstrparams_payment_entry_point(a: number): Array; -export function paymentstrparams_set_payment_entry_point(a: number, b: number, c: number): void; -export function __wbg_sessionstrparams_free(a: number, b: number): void; -export function sessionstrparams_new(a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number, n: number, o: number, p: number, q: number, r: number, s: number): number; -export function sessionstrparams_session_hash(a: number): Array; -export function sessionstrparams_set_session_hash(a: number, b: number, c: number): void; -export function sessionstrparams_session_name(a: number): Array; -export function sessionstrparams_set_session_name(a: number, b: number, c: number): void; -export function sessionstrparams_session_package_hash(a: number): Array; -export function sessionstrparams_set_session_package_hash(a: number, b: number, c: number): void; -export function sessionstrparams_session_package_name(a: number): Array; -export function sessionstrparams_set_session_package_name(a: number, b: number, c: number): void; -export function sessionstrparams_session_path(a: number): Array; -export function sessionstrparams_set_session_path(a: number, b: number, c: number): void; -export function sessionstrparams_session_bytes(a: number): number; -export function sessionstrparams_set_session_bytes(a: number, b: number): void; -export function sessionstrparams_session_args_simple(a: number): number; -export function sessionstrparams_set_session_args_simple(a: number, b: number): void; -export function sessionstrparams_session_args_json(a: number): Array; -export function sessionstrparams_set_session_args_json(a: number, b: number, c: number): void; -export function sessionstrparams_session_version(a: number): Array; -export function sessionstrparams_set_session_version(a: number, b: number, c: number): void; -export function sessionstrparams_session_entry_point(a: number): Array; -export function sessionstrparams_set_session_entry_point(a: number, b: number, c: number): void; -export function sessionstrparams_is_session_transfer(a: number): number; -export function sessionstrparams_set_is_session_transfer(a: number, b: number): void; -export function __wbg_dictionaryitemidentifier_free(a: number, b: number): void; -export function dictionaryitemidentifier_newFromAccountInfo(a: number, b: number, c: number, d: number, e: number, f: number): Array; -export function dictionaryitemidentifier_newFromContractInfo(a: number, b: number, c: number, d: number, e: number, f: number): Array; -export function dictionaryitemidentifier_newFromEntityInfo(a: number, b: number, c: number, d: number, e: number, f: number): Array; -export function dictionaryitemidentifier_newFromSeedUref(a: number, b: number, c: number, d: number): Array; -export function dictionaryitemidentifier_newFromDictionaryKey(a: number, b: number): Array; -export function dictionaryitemidentifier_toJson(a: number): number; -export function digest_new_js_alias(a: number, b: number): Array; -export function digest_fromString(a: number, b: number): Array; -export function digest_fromRaw(a: number, b: number): Array; -export function digest_toJson(a: number): number; -export function digest_toString(a: number): Array; -export function __wbg_publickey_free(a: number, b: number): void; -export function publickey_new_js_alias(a: number, b: number): Array; -export function publickey_fromUint8Array(a: number, b: number): Array; -export function publickey_toAccountHash(a: number): number; -export function publickey_toPurseUref(a: number): number; -export function publickey_toJson(a: number): number; -export function __wbg_transaction_free(a: number, b: number): void; -export function transaction_new(a: number): number; -export function transaction_toJson(a: number): number; -export function transaction_newSession(a: number, b: number): Array; -export function transaction_newTransfer(a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number): Array; -export function transaction_withTTL(a: number, b: number, c: number, d: number, e: number): number; -export function transaction_withTimestamp(a: number, b: number, c: number, d: number, e: number): number; -export function transaction_withChainName(a: number, b: number, c: number, d: number, e: number): number; -export function transaction_withPublicKey(a: number, b: number, c: number, d: number): number; -export function transaction_withAccountHash(a: number, b: number, c: number, d: number): number; -export function transaction_withEntryPoint(a: number, b: number, c: number, d: number, e: number): number; -export function transaction_withEntityHash(a: number, b: number, c: number, d: number): number; -export function transaction_withPackageHash(a: number, b: number, c: number, d: number): number; -export function transaction_withTransactionBytes(a: number, b: number, c: number, d: number, e: number): number; -export function transaction_withSecretKey(a: number, b: number, c: number): number; -export function transaction_verify(a: number): number; -export function transaction_hash(a: number): number; -export function transaction_expired(a: number): number; -export function transaction_expires(a: number): number; -export function transaction_signers(a: number): number; -export function transaction_authorization_keys(a: number): number; -export function transaction_sign(a: number, b: number, c: number): number; -export function transaction_approvalsHash(a: number): number; -export function transaction_approvals(a: number): number; -export function transaction_is_native(a: number): number; -export function transaction_target(a: number): number; -export function transaction_is_standard_payment(a: number): number; -export function transaction_session_args(a: number): number; -export function transaction_addSignature(a: number, b: number, c: number, d: number, e: number): number; -export function transaction_entry_point(a: number): Array; -export function transaction_ttl(a: number): Array; -export function transaction_timestamp(a: number): Array; -export function transaction_size_estimate(a: number): number; -export function transaction_chain_name(a: number): Array; -export function transaction_initiator_addr(a: number): Array; -export function transaction_pricing_mode(a: number): number; -export function transaction_additional_computation_factor(a: number): number; -export function transaction_receipt(a: number): number; -export function transaction_gas_price_tolerance(a: number): number; -export function transaction_account_hash(a: number): number; -export function transaction_addArg(a: number, b: number, c: number, d: number): Array; -export function __wbg_transactionstrparams_free(a: number, b: number): void; -export function transactionstrparams_new(a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number, n: number, o: number, p: number, q: number, r: number, s: number, t: number, u: number, v: number, w: number, x: number): number; -export function transactionstrparams_new_with_defaults(a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number): number; -export function transactionstrparams_secret_key(a: number): Array; -export function transactionstrparams_set_secret_key(a: number, b: number, c: number): void; -export function transactionstrparams_timestamp(a: number): Array; -export function transactionstrparams_set_timestamp(a: number, b: number, c: number): void; -export function transactionstrparams_setDefaultTimestamp(a: number): void; -export function transactionstrparams_ttl(a: number): Array; -export function transactionstrparams_set_ttl(a: number, b: number, c: number): void; -export function transactionstrparams_setDefaultTTL(a: number): void; -export function transactionstrparams_chain_name(a: number): Array; -export function transactionstrparams_set_chain_name(a: number, b: number, c: number): void; -export function transactionstrparams_initiator_addr(a: number): Array; -export function transactionstrparams_set_initiator_addr(a: number, b: number, c: number): void; -export function transactionstrparams_session_args_simple(a: number): number; -export function transactionstrparams_set_session_args_simple(a: number, b: number, c: number): void; -export function transactionstrparams_session_args_json(a: number): Array; -export function transactionstrparams_set_session_args_json(a: number, b: number, c: number): void; -export function transactionstrparams_pricing_mode(a: number): number; -export function transactionstrparams_set_pricing_mode(a: number, b: number): void; -export function transactionstrparams_additional_computation_factor(a: number): Array; -export function transactionstrparams_set_additional_computation_factor(a: number, b: number, c: number): void; -export function transactionstrparams_payment_amount(a: number): Array; -export function transactionstrparams_set_payment_amount(a: number, b: number, c: number): void; -export function transactionstrparams_gas_price_tolerance(a: number): Array; -export function transactionstrparams_set_gas_price_tolerance(a: number, b: number, c: number): void; -export function transactionstrparams_receipt(a: number): Array; -export function transactionstrparams_set_receipt(a: number, b: number, c: number): void; -export function transactionstrparams_standard_payment(a: number): number; -export function transactionstrparams_set_standard_payment(a: number, b: number): void; -export function __wbg_uref_free(a: number, b: number): void; -export function uref_new_js_alias(a: number, b: number, c: number): Array; -export function uref_fromFormattedStr(a: number, b: number): Array; -export function uref_fromUint8Array(a: number, b: number, c: number): number; -export function uref_toFormattedString(a: number): Array; -export function uref_toJson(a: number): number; -export function __wbg_putdeployresult_free(a: number, b: number): void; -export function putdeployresult_api_version(a: number): number; -export function putdeployresult_deploy_hash(a: number): number; -export function putdeployresult_toJson(a: number): number; -export function sdk_deploy(a: number, b: number, c: number, d: number, e: number, f: number, g: number): number; -export function sdk_speculative_transfer(a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number): number; -export function __wbg_getdeployresult_free(a: number, b: number): void; -export function getdeployresult_api_version(a: number): number; -export function getdeployresult_deploy(a: number): number; -export function getdeployresult_execution_info(a: number): number; -export function getdeployresult_toJson(a: number): number; -export function __wbg_getdeployoptions_free(a: number, b: number): void; -export function __wbg_get_getdeployoptions_deploy_hash_as_string(a: number): Array; -export function __wbg_set_getdeployoptions_deploy_hash_as_string(a: number, b: number, c: number): void; -export function __wbg_get_getdeployoptions_deploy_hash(a: number): number; -export function __wbg_set_getdeployoptions_deploy_hash(a: number, b: number): void; -export function __wbg_get_getdeployoptions_finalized_approvals(a: number): number; -export function __wbg_set_getdeployoptions_finalized_approvals(a: number, b: number): void; -export function __wbg_get_getdeployoptions_rpc_address(a: number): Array; -export function __wbg_set_getdeployoptions_rpc_address(a: number, b: number, c: number): void; -export function __wbg_get_getdeployoptions_verbosity(a: number): number; -export function __wbg_set_getdeployoptions_verbosity(a: number, b: number): void; -export function sdk_get_deploy_options(a: number, b: number): Array; -export function sdk_get_deploy(a: number, b: number): number; -export function sdk_info_get_deploy(a: number, b: number): number; -export function __wbg_gettransactionresult_free(a: number, b: number): void; -export function gettransactionresult_api_version(a: number): number; -export function gettransactionresult_transaction(a: number): number; -export function gettransactionresult_execution_info(a: number): number; -export function gettransactionresult_toJson(a: number): number; -export function __wbg_get_gettransactionoptions_transaction_hash(a: number): number; -export function __wbg_set_gettransactionoptions_transaction_hash(a: number, b: number): void; -export function sdk_get_transaction_options(a: number, b: number): Array; -export function sdk_get_transaction(a: number, b: number): number; -export function sdk_info_get_transaction(a: number, b: number): number; -export function __wbg_speculativeexectxnresult_free(a: number, b: number): void; -export function speculativeexectxnresult_api_version(a: number): number; -export function speculativeexectxnresult_block_hash(a: number): number; -export function speculativeexectxnresult_execution_result(a: number): number; -export function speculativeexectxnresult_toJson(a: number): number; -export function __wbg_getspeculativeexectxnoptions_free(a: number, b: number): void; -export function __wbg_get_getspeculativeexectxnoptions_transaction_as_string(a: number): Array; -export function __wbg_set_getspeculativeexectxnoptions_transaction_as_string(a: number, b: number, c: number): void; -export function __wbg_get_getspeculativeexectxnoptions_transaction(a: number): number; -export function __wbg_set_getspeculativeexectxnoptions_transaction(a: number, b: number): void; -export function __wbg_get_getspeculativeexectxnoptions_rpc_address(a: number): Array; -export function __wbg_set_getspeculativeexectxnoptions_rpc_address(a: number, b: number, c: number): void; -export function __wbg_get_getspeculativeexectxnoptions_verbosity(a: number): number; -export function __wbg_set_getspeculativeexectxnoptions_verbosity(a: number, b: number): void; -export function sdk_get_speculative_exec_options(a: number, b: number): Array; -export function sdk_speculative_exec(a: number, b: number): number; -export function sdk_make_transfer(a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number): Array; -export function sdk_make_transfer_transaction(a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number): Array; -export function sdk_call_entrypoint_deploy(a: number, b: number, c: number, d: number, e: number, f: number, g: number): number; -export function sdk_install(a: number, b: number, c: number, d: number, e: number): number; -export function __wbg_gettransactionoptions_free(a: number, b: number): void; -export function __wbg_set_gettransactionoptions_verbosity(a: number, b: number): void; -export function __wbg_set_gettransactionoptions_transaction_hash_as_string(a: number, b: number, c: number): void; -export function __wbg_set_gettransactionoptions_rpc_address(a: number, b: number, c: number): void; -export function deployhash_fromDigest(a: number): Array; -export function __wbg_get_gettransactionoptions_finalized_approvals(a: number): number; -export function __wbg_set_gettransactionoptions_finalized_approvals(a: number, b: number): void; -export function __wbg_get_gettransactionoptions_transaction_hash_as_string(a: number): Array; -export function __wbg_get_gettransactionoptions_rpc_address(a: number): Array; -export function __wbg_get_gettransactionoptions_verbosity(a: number): number; -export function __wbg_blockhash_free(a: number, b: number): void; -export function __wbg_contractpackagehash_free(a: number, b: number): void; -export function __wbg_deployhash_free(a: number, b: number): void; -export function __wbg_digest_free(a: number, b: number): void; -export function __wbg_bytes_free(a: number, b: number): void; -export function bytes_new(): number; -export function bytes_fromUint8Array(a: number): number; -export function __wbg_argssimple_free(a: number, b: number): void; -export function __wbg_getaccountresult_free(a: number, b: number): void; -export function getaccountresult_api_version(a: number): number; -export function getaccountresult_account(a: number): number; -export function getaccountresult_merkle_proof(a: number): Array; -export function getaccountresult_toJson(a: number): number; -export function __wbg_getaccountoptions_free(a: number, b: number): void; -export function __wbg_get_getaccountoptions_account_identifier(a: number): number; -export function __wbg_set_getaccountoptions_account_identifier(a: number, b: number): void; -export function __wbg_get_getaccountoptions_account_identifier_as_string(a: number): Array; -export function __wbg_set_getaccountoptions_account_identifier_as_string(a: number, b: number, c: number): void; -export function __wbg_get_getaccountoptions_maybe_block_id_as_string(a: number): Array; -export function __wbg_set_getaccountoptions_maybe_block_id_as_string(a: number, b: number, c: number): void; -export function __wbg_get_getaccountoptions_maybe_block_identifier(a: number): number; -export function __wbg_set_getaccountoptions_maybe_block_identifier(a: number, b: number): void; -export function __wbg_get_getaccountoptions_rpc_address(a: number): Array; -export function __wbg_set_getaccountoptions_rpc_address(a: number, b: number, c: number): void; -export function __wbg_get_getaccountoptions_verbosity(a: number): number; -export function __wbg_set_getaccountoptions_verbosity(a: number, b: number): void; -export function sdk_get_account_options(a: number, b: number): Array; -export function sdk_get_account(a: number, b: number): number; -export function sdk_state_get_account_info(a: number, b: number): number; -export function __wbg_geterasummaryresult_free(a: number, b: number): void; -export function geterasummaryresult_api_version(a: number): number; -export function geterasummaryresult_era_summary(a: number): number; -export function geterasummaryresult_toJson(a: number): number; -export function __wbg_geterasummaryoptions_free(a: number, b: number): void; -export function __wbg_get_geterasummaryoptions_maybe_block_id_as_string(a: number): Array; -export function __wbg_set_geterasummaryoptions_maybe_block_id_as_string(a: number, b: number, c: number): void; -export function __wbg_get_geterasummaryoptions_rpc_address(a: number): Array; -export function __wbg_set_geterasummaryoptions_rpc_address(a: number, b: number, c: number): void; -export function __wbg_get_geterasummaryoptions_verbosity(a: number): number; -export function __wbg_set_geterasummaryoptions_verbosity(a: number, b: number): void; -export function sdk_get_era_summary_options(a: number, b: number): Array; -export function sdk_get_era_summary(a: number, b: number): number; -export function sdk_chain_get_era_summary(a: number, b: number): number; -export function sdk_put_deploy(a: number, b: number, c: number, d: number, e: number): number; -export function sdk_account_put_deploy(a: number, b: number, c: number, d: number, e: number): number; +export function __wbg_globalstateidentifier_free(a: number, b: number): void; +export function globalstateidentifier_new(a: number): number; +export function globalstateidentifier_fromBlockHash(a: number): number; +export function globalstateidentifier_fromBlockHeight(a: number): number; +export function globalstateidentifier_fromStateRootHash(a: number): number; +export function globalstateidentifier_toJson(a: number): number; +export function __wbg_signatureresponse_free(a: number, b: number): void; +export function signatureresponse_is_cancelled(a: number): number; +export function signatureresponse_get_signature_hex(a: number): Array; +export function signatureresponse_get_signature(a: number): Array; +export function sdk_transfer(a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number): number; +export function __wbg_getaddressableentityresult_free(a: number, b: number): void; +export function getaddressableentityresult_api_version(a: number): number; +export function getaddressableentityresult_entity_result(a: number): number; +export function getaddressableentityresult_merkle_proof(a: number): Array; +export function getaddressableentityresult_toJson(a: number): number; +export function __wbg_getentityoptions_free(a: number, b: number): void; +export function __wbg_get_getentityoptions_entity_identifier(a: number): number; +export function __wbg_set_getentityoptions_entity_identifier(a: number, b: number): void; +export function __wbg_get_getentityoptions_entity_identifier_as_string(a: number): Array; +export function __wbg_set_getentityoptions_entity_identifier_as_string(a: number, b: number, c: number): void; +export function __wbg_get_getentityoptions_maybe_block_id_as_string(a: number): Array; +export function __wbg_set_getentityoptions_maybe_block_id_as_string(a: number, b: number, c: number): void; +export function __wbg_get_getentityoptions_maybe_block_identifier(a: number): number; +export function __wbg_set_getentityoptions_maybe_block_identifier(a: number, b: number): void; +export function __wbg_get_getentityoptions_rpc_address(a: number): Array; +export function __wbg_set_getentityoptions_rpc_address(a: number, b: number, c: number): void; +export function __wbg_get_getentityoptions_verbosity(a: number): number; +export function __wbg_set_getentityoptions_verbosity(a: number, b: number): void; +export function sdk_get_entity_options(a: number, b: number): Array; +export function sdk_get_entity(a: number, b: number): number; +export function sdk_state_get_entity(a: number, b: number): number; +export function sdk_put_transaction(a: number, b: number, c: number, d: number, e: number): number; +export function sdk_account_put_transaction(a: number, b: number, c: number, d: number, e: number): number; +export function __wbg_querybalancedetailsresult_free(a: number, b: number): void; +export function querybalancedetailsresult_api_version(a: number): number; +export function querybalancedetailsresult_total_balance(a: number): number; +export function querybalancedetailsresult_available_balance(a: number): number; +export function querybalancedetailsresult_total_balance_proof(a: number): number; +export function querybalancedetailsresult_holds(a: number): number; +export function querybalancedetailsresult_toJson(a: number): number; +export function __wbg_querybalancedetailsoptions_free(a: number, b: number): void; +export function __wbg_get_querybalancedetailsoptions_purse_identifier(a: number): number; +export function __wbg_set_querybalancedetailsoptions_purse_identifier(a: number, b: number): void; +export function __wbg_get_querybalancedetailsoptions_global_state_identifier(a: number): number; +export function __wbg_set_querybalancedetailsoptions_global_state_identifier(a: number, b: number): void; +export function __wbg_get_querybalancedetailsoptions_state_root_hash(a: number): number; +export function __wbg_set_querybalancedetailsoptions_state_root_hash(a: number, b: number): void; +export function __wbg_get_querybalancedetailsoptions_rpc_address(a: number): Array; +export function __wbg_set_querybalancedetailsoptions_rpc_address(a: number, b: number, c: number): void; +export function __wbg_get_querybalancedetailsoptions_verbosity(a: number): number; +export function __wbg_set_querybalancedetailsoptions_verbosity(a: number, b: number): void; +export function sdk_query_balance_details_options(a: number, b: number): Array; +export function sdk_query_balance_details(a: number, b: number): number; +export function __wbg_queryglobalstateresult_free(a: number, b: number): void; +export function queryglobalstateresult_api_version(a: number): number; +export function queryglobalstateresult_block_header(a: number): number; +export function queryglobalstateresult_stored_value(a: number): number; +export function queryglobalstateresult_merkle_proof(a: number): Array; +export function queryglobalstateresult_toJson(a: number): number; +export function __wbg_queryglobalstateoptions_free(a: number, b: number): void; +export function __wbg_get_queryglobalstateoptions_global_state_identifier(a: number): number; +export function __wbg_set_queryglobalstateoptions_global_state_identifier(a: number, b: number): void; +export function __wbg_get_queryglobalstateoptions_state_root_hash_as_string(a: number): Array; +export function __wbg_set_queryglobalstateoptions_state_root_hash_as_string(a: number, b: number, c: number): void; +export function __wbg_get_queryglobalstateoptions_state_root_hash(a: number): number; +export function __wbg_set_queryglobalstateoptions_state_root_hash(a: number, b: number): void; +export function __wbg_get_queryglobalstateoptions_maybe_block_id_as_string(a: number): Array; +export function __wbg_set_queryglobalstateoptions_maybe_block_id_as_string(a: number, b: number, c: number): void; +export function __wbg_get_queryglobalstateoptions_key_as_string(a: number): Array; +export function __wbg_set_queryglobalstateoptions_key_as_string(a: number, b: number, c: number): void; +export function __wbg_get_queryglobalstateoptions_key(a: number): number; +export function __wbg_set_queryglobalstateoptions_key(a: number, b: number): void; +export function __wbg_get_queryglobalstateoptions_path_as_string(a: number): Array; +export function __wbg_set_queryglobalstateoptions_path_as_string(a: number, b: number, c: number): void; +export function __wbg_get_queryglobalstateoptions_path(a: number): number; +export function __wbg_set_queryglobalstateoptions_path(a: number, b: number): void; +export function __wbg_get_queryglobalstateoptions_rpc_address(a: number): Array; +export function __wbg_set_queryglobalstateoptions_rpc_address(a: number, b: number, c: number): void; +export function __wbg_get_queryglobalstateoptions_verbosity(a: number): number; +export function __wbg_set_queryglobalstateoptions_verbosity(a: number, b: number): void; +export function sdk_query_global_state_options(a: number, b: number): Array; +export function sdk_query_global_state(a: number, b: number): number; +export function sdk_install(a: number, b: number, c: number, d: number, e: number): number; export function sdk_install_deploy(a: number, b: number, c: number, d: number, e: number, f: number, g: number): number; -export function __wbg_get_geterasummaryoptions_maybe_block_identifier(a: number): number; -export function __wbg_set_geterasummaryoptions_maybe_block_identifier(a: number, b: number): void; +export function __wbg_casperwallet_free(a: number, b: number): void; +export function casperwallet_new(): number; +export function casperwallet_signDeploy(a: number, b: number, c: number, d: number): number; +export function casperwallet_signTransaction(a: number, b: number, c: number, d: number): number; +export function casperwallet_signDeployHash(a: number, b: number, c: number, d: number, e: number): number; +export function casperwallet_signTransactionHash(a: number, b: number, c: number, d: number, e: number): number; +export function casperwallet_signMessage(a: number, b: number, c: number, d: number, e: number): number; +export function casperwallet_connect(a: number): number; +export function casperwallet_disconnect(a: number): number; +export function casperwallet_isConnected(a: number): number; +export function casperwallet_getVersion(a: number): number; +export function casperwallet_getActivePublicKey(a: number): number; +export function casperwallet_switchAccount(a: number): number; +export function __wbg_set_querybalancedetailsoptions_purse_identifier_as_string(a: number, b: number, c: number): void; +export function __wbg_set_querybalancedetailsoptions_state_root_hash_as_string(a: number, b: number, c: number): void; +export function __wbg_set_querybalancedetailsoptions_maybe_block_id_as_string(a: number, b: number, c: number): void; +export function __wbg_get_querybalancedetailsoptions_purse_identifier_as_string(a: number): Array; +export function __wbg_get_querybalancedetailsoptions_state_root_hash_as_string(a: number): Array; +export function __wbg_get_querybalancedetailsoptions_maybe_block_id_as_string(a: number): Array; export function __wbg_entityaddr_free(a: number, b: number): void; export function entityaddr_fromFormattedStr(a: number, b: number): Array; export function entityaddr_toFormattedString(a: number): Array; export function entityaddr_toHexString(a: number): Array; export function entityaddr_toJson(a: number): number; -export function __wbg_contracthash_free(a: number, b: number): void; -export function contracthash_new_js_alias(a: number, b: number): Array; -export function contracthash_fromFormattedStr(a: number, b: number): Array; -export function contracthash_toFormattedString(a: number): Array; -export function contracthash_fromUint8Array(a: number, b: number): number; export function __wbg_deploy_free(a: number, b: number): void; export function deploy_new(a: number): number; export function deploy_toJson(a: number): number; @@ -692,12 +470,19 @@ export function deploystrparams_session_account(a: number): Array; export function deploystrparams_set_session_account(a: number, b: number, c: number): void; export function deploystrparams_gas_price_tolerance(a: number): Array; export function deploystrparams_set_gas_price_tolerance(a: number, b: number, c: number): void; +export function __wbg_contracthash_free(a: number, b: number): void; +export function contracthash_new_js_alias(a: number, b: number): Array; +export function contracthash_fromFormattedStr(a: number, b: number): Array; +export function contracthash_toFormattedString(a: number): Array; +export function contracthash_fromUint8Array(a: number, b: number): number; export function __wbg_entityidentifier_free(a: number, b: number): void; export function entityidentifier_fromFormattedStr(a: number, b: number): Array; export function entityidentifier_fromPublicKey(a: number): number; export function entityidentifier_fromAccountHash(a: number): number; export function entityidentifier_fromEntityAddr(a: number): number; export function entityidentifier_toJson(a: number): number; +export function purseidentifier_fromURef(a: number): number; +export function purseidentifier_toJson(a: number): number; export function __wbg_key_free(a: number, b: number): void; export function key_new(a: number): Array; export function key_toJson(a: number): number; @@ -733,8 +518,9 @@ export function path_fromArray(a: number): number; export function path_toJson(a: number): number; export function path_toString(a: number): Array; export function path_is_empty(a: number): number; -export function purseidentifier_fromURef(a: number): number; -export function purseidentifier_toJson(a: number): number; +export function __wbg_peerentry_free(a: number, b: number): void; +export function peerentry_node_id(a: number): Array; +export function peerentry_address(a: number): Array; export function __wbg_recordid_free(a: number, b: number): void; export function recordid_new_js_alias(a: number): Array; export function __wbg_transfertarget_free(a: number, b: number): void; @@ -789,6 +575,7 @@ export function transactionbuilderparams_maximum_delegation_amount(a: number): A export function transactionbuilderparams_set_maximum_delegation_amount(a: number, b: number): void; export function transactionbuilderparams_is_install_upgrade(a: number): number; export function transactionbuilderparams_set_is_install_upgrade(a: number, b: number): void; +export function sdk_speculative_deploy(a: number, b: number, c: number, d: number, e: number, f: number, g: number): number; export function __wbg_getblocktransfersresult_free(a: number, b: number): void; export function getblocktransfersresult_api_version(a: number): number; export function getblocktransfersresult_block_hash(a: number): number; @@ -844,7 +631,7 @@ export function __wbg_get_getspeculativeexecdeployoptions_verbosity(a: number): export function __wbg_set_getspeculativeexecdeployoptions_verbosity(a: number, b: number): void; export function sdk_get_speculative_exec_deploy_options(a: number, b: number): Array; export function sdk_speculative_exec_deploy(a: number, b: number): number; -export function sdk_transfer_transaction(a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number): number; +export function sdk_call_entrypoint(a: number, b: number, c: number, d: number, e: number): number; export function __wbg_sdk_free(a: number, b: number): void; export function sdk_new(a: number, b: number, c: number, d: number, e: number): number; export function sdk_getRPCAddress(a: number, b: number, c: number): Array; @@ -865,115 +652,187 @@ export function accountHashToBase64Key(a: number, b: number): Array; export function getTimestamp(): number; export function encodeLowerBlake2b(a: number, b: number): number; export function makeDictionaryItemKey(a: number, b: number, c: number): Array; -export function __wbg_casperwallet_free(a: number, b: number): void; -export function casperwallet_new(): number; -export function casperwallet_signDeploy(a: number, b: number, c: number, d: number): number; -export function casperwallet_signTransaction(a: number, b: number, c: number, d: number): number; -export function casperwallet_signDeployHash(a: number, b: number, c: number, d: number, e: number): number; -export function casperwallet_signTransactionHash(a: number, b: number, c: number, d: number, e: number): number; -export function casperwallet_signMessage(a: number, b: number, c: number, d: number, e: number): number; -export function casperwallet_connect(a: number): number; -export function casperwallet_disconnect(a: number): number; -export function casperwallet_isConnected(a: number): number; -export function casperwallet_getVersion(a: number): number; -export function casperwallet_getActivePublicKey(a: number): number; -export function casperwallet_switchAccount(a: number): number; export function purseidentifier_fromPublicKey(a: number): number; export function purseidentifier_fromAccountHash(a: number): number; export function __wbg_purseidentifier_free(a: number, b: number): void; export function __wbg_querybalanceresult_free(a: number, b: number): void; export function entityidentifier_new_js_alias(a: number, b: number): Array; -export function __wbg_globalstateidentifier_free(a: number, b: number): void; -export function globalstateidentifier_new(a: number): number; -export function globalstateidentifier_fromBlockHash(a: number): number; -export function globalstateidentifier_fromBlockHeight(a: number): number; -export function globalstateidentifier_fromStateRootHash(a: number): number; -export function globalstateidentifier_toJson(a: number): number; -export function __wbg_signatureresponse_free(a: number, b: number): void; -export function signatureresponse_is_cancelled(a: number): number; -export function signatureresponse_get_signature_hex(a: number): Array; -export function signatureresponse_get_signature(a: number): Array; -export function sdk_transfer(a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number): number; -export function __wbg_getaddressableentityresult_free(a: number, b: number): void; -export function getaddressableentityresult_api_version(a: number): number; -export function getaddressableentityresult_entity_result(a: number): number; -export function getaddressableentityresult_merkle_proof(a: number): Array; -export function getaddressableentityresult_toJson(a: number): number; -export function __wbg_getentityoptions_free(a: number, b: number): void; -export function __wbg_get_getentityoptions_entity_identifier(a: number): number; -export function __wbg_set_getentityoptions_entity_identifier(a: number, b: number): void; -export function __wbg_get_getentityoptions_entity_identifier_as_string(a: number): Array; -export function __wbg_set_getentityoptions_entity_identifier_as_string(a: number, b: number, c: number): void; -export function __wbg_get_getentityoptions_maybe_block_id_as_string(a: number): Array; -export function __wbg_set_getentityoptions_maybe_block_id_as_string(a: number, b: number, c: number): void; -export function __wbg_get_getentityoptions_maybe_block_identifier(a: number): number; -export function __wbg_set_getentityoptions_maybe_block_identifier(a: number, b: number): void; -export function __wbg_get_getentityoptions_rpc_address(a: number): Array; -export function __wbg_set_getentityoptions_rpc_address(a: number, b: number, c: number): void; -export function __wbg_get_getentityoptions_verbosity(a: number): number; -export function __wbg_set_getentityoptions_verbosity(a: number, b: number): void; -export function sdk_get_entity_options(a: number, b: number): Array; -export function sdk_get_entity(a: number, b: number): number; -export function sdk_state_get_entity(a: number, b: number): number; -export function sdk_put_transaction(a: number, b: number, c: number, d: number, e: number): number; -export function sdk_account_put_transaction(a: number, b: number, c: number, d: number, e: number): number; -export function __wbg_querybalancedetailsresult_free(a: number, b: number): void; -export function querybalancedetailsresult_api_version(a: number): number; -export function querybalancedetailsresult_total_balance(a: number): number; -export function querybalancedetailsresult_available_balance(a: number): number; -export function querybalancedetailsresult_total_balance_proof(a: number): number; -export function querybalancedetailsresult_holds(a: number): number; -export function querybalancedetailsresult_toJson(a: number): number; -export function __wbg_querybalancedetailsoptions_free(a: number, b: number): void; -export function __wbg_get_querybalancedetailsoptions_purse_identifier(a: number): number; -export function __wbg_set_querybalancedetailsoptions_purse_identifier(a: number, b: number): void; -export function __wbg_get_querybalancedetailsoptions_global_state_identifier(a: number): number; -export function __wbg_set_querybalancedetailsoptions_global_state_identifier(a: number, b: number): void; -export function __wbg_get_querybalancedetailsoptions_state_root_hash(a: number): number; -export function __wbg_set_querybalancedetailsoptions_state_root_hash(a: number, b: number): void; -export function __wbg_get_querybalancedetailsoptions_rpc_address(a: number): Array; -export function __wbg_set_querybalancedetailsoptions_rpc_address(a: number, b: number, c: number): void; -export function __wbg_get_querybalancedetailsoptions_verbosity(a: number): number; -export function __wbg_set_querybalancedetailsoptions_verbosity(a: number, b: number): void; -export function sdk_query_balance_details_options(a: number, b: number): Array; -export function sdk_query_balance_details(a: number, b: number): number; -export function __wbg_queryglobalstateresult_free(a: number, b: number): void; -export function queryglobalstateresult_api_version(a: number): number; -export function queryglobalstateresult_block_header(a: number): number; -export function queryglobalstateresult_stored_value(a: number): number; -export function queryglobalstateresult_merkle_proof(a: number): Array; -export function queryglobalstateresult_toJson(a: number): number; -export function __wbg_queryglobalstateoptions_free(a: number, b: number): void; -export function __wbg_get_queryglobalstateoptions_global_state_identifier(a: number): number; -export function __wbg_set_queryglobalstateoptions_global_state_identifier(a: number, b: number): void; -export function __wbg_get_queryglobalstateoptions_state_root_hash_as_string(a: number): Array; -export function __wbg_set_queryglobalstateoptions_state_root_hash_as_string(a: number, b: number, c: number): void; -export function __wbg_get_queryglobalstateoptions_state_root_hash(a: number): number; -export function __wbg_set_queryglobalstateoptions_state_root_hash(a: number, b: number): void; -export function __wbg_get_queryglobalstateoptions_maybe_block_id_as_string(a: number): Array; -export function __wbg_set_queryglobalstateoptions_maybe_block_id_as_string(a: number, b: number, c: number): void; -export function __wbg_get_queryglobalstateoptions_key_as_string(a: number): Array; -export function __wbg_set_queryglobalstateoptions_key_as_string(a: number, b: number, c: number): void; -export function __wbg_get_queryglobalstateoptions_key(a: number): number; -export function __wbg_set_queryglobalstateoptions_key(a: number, b: number): void; -export function __wbg_get_queryglobalstateoptions_path_as_string(a: number): Array; -export function __wbg_set_queryglobalstateoptions_path_as_string(a: number, b: number, c: number): void; -export function __wbg_get_queryglobalstateoptions_path(a: number): number; -export function __wbg_set_queryglobalstateoptions_path(a: number, b: number): void; -export function __wbg_get_queryglobalstateoptions_rpc_address(a: number): Array; -export function __wbg_set_queryglobalstateoptions_rpc_address(a: number, b: number, c: number): void; -export function __wbg_get_queryglobalstateoptions_verbosity(a: number): number; -export function __wbg_set_queryglobalstateoptions_verbosity(a: number, b: number): void; -export function sdk_query_global_state_options(a: number, b: number): Array; -export function sdk_query_global_state(a: number, b: number): number; +export function hashaddr_new(a: number, b: number): Array; +export function hashaddr_toBytes(a: number): Array; +export function hashaddr_toHexString(a: number): Array; +export function __wbg_dictionaryitemstrparams_free(a: number, b: number): void; +export function dictionaryitemstrparams_new(): number; +export function dictionaryitemstrparams_setAccountNamedKey(a: number, b: number, c: number, d: number, e: number, f: number, g: number): void; +export function dictionaryitemstrparams_setContractNamedKey(a: number, b: number, c: number, d: number, e: number, f: number, g: number): void; +export function dictionaryitemstrparams_setEntityNamedKey(a: number, b: number, c: number, d: number, e: number, f: number, g: number): void; +export function dictionaryitemstrparams_setUref(a: number, b: number, c: number, d: number, e: number): void; +export function dictionaryitemstrparams_setDictionary(a: number, b: number, c: number): void; +export function dictionaryitemstrparams_toJson(a: number): number; +export function __wbg_accounthash_free(a: number, b: number): void; +export function accounthash_new_js_alias(a: number, b: number): Array; +export function accounthash_fromFormattedStr(a: number, b: number): Array; +export function accounthash_fromPublicKey(a: number): number; +export function accounthash_toFormattedString(a: number): Array; +export function accounthash_toHexString(a: number): Array; +export function accounthash_fromUint8Array(a: number, b: number): number; +export function accounthash_toJson(a: number): number; +export function packagehash_new_js_alias(a: number, b: number): Array; +export function packagehash_fromFormattedStr(a: number, b: number): Array; +export function packagehash_toFormattedString(a: number): Array; +export function packagehash_fromUint8Array(a: number, b: number): number; +export function __wbg_transactionhash_free(a: number, b: number): void; +export function transactionhash_new_js_alias(a: number, b: number): Array; +export function transactionhash_fromRaw(a: number, b: number): Array; +export function transactionhash_digest(a: number): Array; +export function transactionhash_toJson(a: number): number; +export function transactionhash_toString(a: number): Array; +export function __wbg_accountidentifier_free(a: number, b: number): void; +export function accountidentifier_fromFormattedStr(a: number, b: number): Array; +export function accountidentifier_fromPublicKey(a: number): number; +export function accountidentifier_fromAccountHash(a: number): number; +export function accountidentifier_toJson(a: number): number; +export function sdk_speculative_transfer(a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number): number; +export function __wbg_getstateroothashresult_free(a: number, b: number): void; +export function getstateroothashresult_api_version(a: number): number; +export function getstateroothashresult_state_root_hash(a: number): number; +export function getstateroothashresult_state_root_hash_as_string(a: number): Array; +export function getstateroothashresult_toString(a: number): Array; +export function getstateroothashresult_toJson(a: number): number; +export function __wbg_getstateroothashoptions_free(a: number, b: number): void; +export function __wbg_get_getstateroothashoptions_maybe_block_id_as_string(a: number): Array; +export function __wbg_set_getstateroothashoptions_maybe_block_id_as_string(a: number, b: number, c: number): void; +export function __wbg_get_getstateroothashoptions_maybe_block_identifier(a: number): number; +export function __wbg_set_getstateroothashoptions_maybe_block_identifier(a: number, b: number): void; +export function __wbg_get_getstateroothashoptions_rpc_address(a: number): Array; +export function __wbg_set_getstateroothashoptions_rpc_address(a: number, b: number, c: number): void; +export function __wbg_get_getstateroothashoptions_verbosity(a: number): number; +export function __wbg_set_getstateroothashoptions_verbosity(a: number, b: number): void; +export function sdk_get_state_root_hash_options(a: number, b: number): Array; +export function sdk_get_state_root_hash(a: number, b: number): number; +export function sdk_chain_get_state_root_hash(a: number, b: number): number; +export function sdk_put_deploy(a: number, b: number, c: number, d: number, e: number): number; +export function sdk_account_put_deploy(a: number, b: number, c: number, d: number, e: number): number; export function sdk_speculative_transaction(a: number, b: number, c: number, d: number, e: number, f: number): number; -export function sdk_speculative_transfer_transaction(a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number): number; -export function __wbg_set_querybalancedetailsoptions_purse_identifier_as_string(a: number, b: number, c: number): void; -export function __wbg_set_querybalancedetailsoptions_state_root_hash_as_string(a: number, b: number, c: number): void; -export function __wbg_set_querybalancedetailsoptions_maybe_block_id_as_string(a: number, b: number, c: number): void; -export function __wbg_get_querybalancedetailsoptions_purse_identifier_as_string(a: number): Array; -export function __wbg_get_querybalancedetailsoptions_state_root_hash_as_string(a: number): Array; -export function __wbg_get_querybalancedetailsoptions_maybe_block_id_as_string(a: number): Array; +export function sdk_watchDeploy(a: number, b: number, c: number, d: number, e: number): number; +export function sdk_watchTransaction(a: number, b: number, c: number, d: number, e: number): number; +export function sdk_waitDeploy(a: number, b: number, c: number, d: number, e: number, f: number, g: number): number; +export function sdk_waitTransaction(a: number, b: number, c: number, d: number, e: number, f: number, g: number): number; +export function __wbg_watcher_free(a: number, b: number): void; +export function watcher_new(a: number, b: number, c: number, d: number): number; +export function watcher_subscribe(a: number, b: number, c: number): Array; +export function watcher_unsubscribe(a: number, b: number, c: number): void; +export function watcher_start(a: number): number; +export function watcher_stop(a: number): void; +export function __wbg_subscription_free(a: number, b: number): void; +export function __wbg_get_subscription_eventHandlerFn(a: number): number; +export function __wbg_set_subscription_eventHandlerFn(a: number, b: number): void; +export function subscription_new(a: number, b: number, c: number): number; +export function __wbg_failure_free(a: number, b: number): void; +export function __wbg_get_failure_cost(a: number): Array; +export function __wbg_set_failure_cost(a: number, b: number, c: number): void; +export function __wbg_get_failure_error_message(a: number): Array; +export function __wbg_set_failure_error_message(a: number, b: number, c: number): void; +export function __wbg_version2_free(a: number, b: number): void; +export function __wbg_get_version2_error_message(a: number): Array; +export function __wbg_set_version2_error_message(a: number, b: number, c: number): void; +export function __wbg_executionresult_free(a: number, b: number): void; +export function __wbg_get_executionresult_Success(a: number): number; +export function __wbg_set_executionresult_Success(a: number, b: number): void; +export function __wbg_get_executionresult_Failure(a: number): number; +export function __wbg_set_executionresult_Failure(a: number, b: number): void; +export function __wbg_hashstring_free(a: number, b: number): void; +export function hashstring_Deploy(a: number): Array; +export function hashstring_toString(a: number): Array; +export function __wbg_messages_free(a: number, b: number): void; +export function __wbg_set_messages_entity_hash(a: number, b: number, c: number): void; +export function __wbg_get_messages_message(a: number): number; +export function __wbg_set_messages_message(a: number, b: number): void; +export function __wbg_get_messages_topic_name(a: number): Array; +export function __wbg_set_messages_topic_name(a: number, b: number, c: number): void; +export function __wbg_get_messages_topic_name_hash(a: number): Array; +export function __wbg_set_messages_topic_name_hash(a: number, b: number, c: number): void; +export function __wbg_get_messages_topic_index(a: number): number; +export function __wbg_set_messages_topic_index(a: number, b: number): void; +export function __wbg_get_messages_block_index(a: number): number; +export function __wbg_set_messages_block_index(a: number, b: number): void; +export function __wbg_transactionprocessed_free(a: number, b: number): void; +export function __wbg_get_transactionprocessed_hash(a: number): number; +export function __wbg_set_transactionprocessed_hash(a: number, b: number): void; +export function __wbg_get_transactionprocessed_initiator_addr(a: number): number; +export function __wbg_set_transactionprocessed_initiator_addr(a: number, b: number): void; +export function __wbg_get_transactionprocessed_timestamp(a: number): Array; +export function __wbg_set_transactionprocessed_timestamp(a: number, b: number, c: number): void; +export function __wbg_set_transactionprocessed_ttl(a: number, b: number, c: number): void; +export function __wbg_get_transactionprocessed_execution_result(a: number): number; +export function __wbg_set_transactionprocessed_execution_result(a: number, b: number): void; +export function __wbg_get_transactionprocessed_messages(a: number): Array; +export function __wbg_set_transactionprocessed_messages(a: number, b: number, c: number): void; +export function __wbg_body_free(a: number, b: number): void; +export function __wbg_get_body_transaction_processed(a: number): number; +export function __wbg_set_body_transaction_processed(a: number, b: number): void; +export function body_get_deploy_processed(a: number): number; +export function __wbg_eventparseresult_free(a: number, b: number): void; +export function __wbg_get_eventparseresult_err(a: number): Array; +export function __wbg_set_eventparseresult_err(a: number, b: number, c: number): void; +export function __wbg_get_eventparseresult_body(a: number): number; +export function __wbg_set_eventparseresult_body(a: number, b: number): void; +export function __wbg_payment_free(a: number, b: number): void; +export function __wbg_publickeystring_free(a: number, b: number): void; +export function __wbg_message_free(a: number, b: number): void; +export function __wbg_get_version2_initiator(a: number): number; +export function accountidentifier_new(a: number, b: number): Array; +export function __wbg_set_subscription_targetHash(a: number, b: number, c: number): void; +export function __wbg_set_version2_limit(a: number, b: number, c: number): void; +export function __wbg_set_payment_source(a: number, b: number, c: number): void; +export function __wbg_set_hashstring_hash(a: number, b: number, c: number): void; +export function __wbg_set_publickeystring_PublicKey(a: number, b: number, c: number): void; +export function __wbg_set_message_String(a: number, b: number, c: number): void; +export function __wbg_set_version2_consumed(a: number, b: number, c: number): void; +export function __wbg_set_version2_cost(a: number, b: number, c: number): void; +export function __wbg_set_transactionprocessed_block_hash(a: number, b: number, c: number): void; +export function body_get_transaction_processed(a: number): number; +export function hashstring_Version1(a: number): Array; +export function __wbg_set_version2_initiator(a: number, b: number): void; +export function __wbg_hashaddr_free(a: number, b: number): void; +export function __wbg_packagehash_free(a: number, b: number): void; +export function __wbg_get_subscription_targetHash(a: number): Array; +export function __wbg_get_version2_limit(a: number): Array; +export function __wbg_get_payment_source(a: number): Array; +export function __wbg_get_hashstring_hash(a: number): Array; +export function __wbg_get_publickeystring_PublicKey(a: number): Array; +export function __wbg_get_message_String(a: number): Array; +export function __wbg_get_messages_entity_hash(a: number): Array; +export function __wbg_get_version2_cost(a: number): Array; +export function __wbg_get_version2_consumed(a: number): Array; +export function __wbg_get_transactionprocessed_ttl(a: number): Array; +export function __wbg_get_transactionprocessed_block_hash(a: number): Array; +export function __wbg_accessrights_free(a: number, b: number): void; +export function accessrights_NONE(): number; +export function accessrights_READ(): number; +export function accessrights_WRITE(): number; +export function accessrights_ADD(): number; +export function accessrights_READ_ADD(): number; +export function accessrights_READ_WRITE(): number; +export function accessrights_ADD_WRITE(): number; +export function accessrights_READ_ADD_WRITE(): number; +export function accessrights_new(a: number): Array; +export function accessrights_from_bits(a: number, b: number, c: number): number; +export function accessrights_is_readable(a: number): number; +export function accessrights_is_writeable(a: number): number; +export function accessrights_is_addable(a: number): number; +export function accessrights_is_none(a: number): number; +export function __wbg_dictionaryaddr_free(a: number, b: number): void; +export function dictionaryaddr_new(a: number, b: number): Array; +export function transferaddr_new(a: number, b: number): Array; +export function urefaddr_new(a: number, b: number): Array; +export function __wbg_eraid_free(a: number, b: number): void; +export function eraid_new(a: number): number; +export function eraid_value(a: number): number; +export function __wbg_blockidentifier_free(a: number, b: number): void; +export function blockidentifier_new(a: number): number; +export function blockidentifier_from_hash(a: number): number; +export function blockidentifier_fromHeight(a: number): number; +export function blockidentifier_toJson(a: number): number; export function sdk_get_binary_latest_switch_block_header(a: number, b: number, c: number): number; export function sdk_get_binary_latest_block_header(a: number, b: number, c: number): number; export function sdk_get_binary_block_header_by_height(a: number, b: number, c: number, d: number): number; @@ -1008,8 +867,149 @@ export function sdk_get_binary_global_state_item_by_block_height(a: number, b: n export function sdk_get_binary_try_accept_transaction(a: number, b: number, c: number, d: number): number; export function sdk_get_binary_try_speculative_execution(a: number, b: number, c: number, d: number): number; export function sdk_get_binary_get_protocol_version(a: number, b: number, c: number): number; -export function sdk_speculative_deploy(a: number, b: number, c: number, d: number, e: number, f: number, g: number): number; -export function sdk_call_entrypoint(a: number, b: number, c: number, d: number, e: number): number; +export function __wbg_getauctioninforesult_free(a: number, b: number): void; +export function getauctioninforesult_api_version(a: number): number; +export function getauctioninforesult_auction_state(a: number): number; +export function getauctioninforesult_toJson(a: number): number; +export function __wbg_getauctioninfooptions_free(a: number, b: number): void; +export function __wbg_get_getauctioninfooptions_maybe_block_id_as_string(a: number): Array; +export function __wbg_set_getauctioninfooptions_maybe_block_id_as_string(a: number, b: number, c: number): void; +export function __wbg_get_getauctioninfooptions_maybe_block_identifier(a: number): number; +export function __wbg_set_getauctioninfooptions_maybe_block_identifier(a: number, b: number): void; +export function __wbg_get_getauctioninfooptions_rpc_address(a: number): Array; +export function __wbg_set_getauctioninfooptions_rpc_address(a: number, b: number, c: number): void; +export function __wbg_get_getauctioninfooptions_verbosity(a: number): number; +export function __wbg_set_getauctioninfooptions_verbosity(a: number, b: number): void; +export function sdk_get_auction_info_options(a: number, b: number): Array; +export function sdk_get_auction_info(a: number, b: number): number; +export function sdk_state_get_auction_info_js_alias(a: number, b: number): number; +export function __wbg_getblockresult_free(a: number, b: number): void; +export function getblockresult_api_version(a: number): number; +export function getblockresult_block(a: number): number; +export function getblockresult_toJson(a: number): number; +export function sdk_get_block_options(a: number, b: number): Array; +export function sdk_get_block(a: number, b: number): number; +export function sdk_chain_get_block(a: number, b: number): number; +export function __wbg_getchainspecresult_free(a: number, b: number): void; +export function getchainspecresult_api_version(a: number): number; +export function getchainspecresult_chainspec_bytes(a: number): number; +export function getchainspecresult_toJson(a: number): number; +export function sdk_get_chainspec(a: number, b: number, c: number, d: number): number; +export function sdk_info_get_chainspec(a: number, b: number, c: number, d: number): number; +export function __wbg_getnodestatusresult_free(a: number, b: number): void; +export function getnodestatusresult_api_version(a: number): number; +export function getnodestatusresult_chainspec_name(a: number): Array; +export function getnodestatusresult_starting_state_root_hash(a: number): number; +export function getnodestatusresult_peers(a: number): number; +export function getnodestatusresult_last_added_block_info(a: number): number; +export function getnodestatusresult_our_public_signing_key(a: number): number; +export function getnodestatusresult_round_length(a: number): number; +export function getnodestatusresult_next_upgrade(a: number): number; +export function getnodestatusresult_build_version(a: number): Array; +export function getnodestatusresult_uptime(a: number): number; +export function getnodestatusresult_reactor_state(a: number): number; +export function getnodestatusresult_last_progress(a: number): number; +export function getnodestatusresult_available_block_range(a: number): number; +export function getnodestatusresult_block_sync(a: number): number; +export function getnodestatusresult_toJson(a: number): number; +export function sdk_get_node_status(a: number, b: number, c: number, d: number): number; +export function sdk_info_get_status(a: number, b: number, c: number, d: number): number; +export function __wbg_getpeersresult_free(a: number, b: number): void; +export function getpeersresult_api_version(a: number): number; +export function getpeersresult_peers(a: number): number; +export function getpeersresult_toJson(a: number): number; +export function sdk_get_peers(a: number, b: number, c: number, d: number): number; +export function sdk_info_get_peers(a: number, b: number, c: number, d: number): number; +export function __wbg_getvalidatorchangesresult_free(a: number, b: number): void; +export function getvalidatorchangesresult_api_version(a: number): number; +export function getvalidatorchangesresult_changes(a: number): number; +export function getvalidatorchangesresult_toJson(a: number): number; +export function sdk_get_validator_changes(a: number, b: number, c: number, d: number): number; +export function sdk_info_get_validator_change(a: number, b: number, c: number, d: number): number; +export function __wbg_listrpcsresult_free(a: number, b: number): void; +export function listrpcsresult_api_version(a: number): number; +export function listrpcsresult_name(a: number): Array; +export function listrpcsresult_schema(a: number): number; +export function listrpcsresult_toJson(a: number): number; +export function sdk_list_rpcs(a: number, b: number, c: number, d: number): number; +export function sdk_speculative_transfer_transaction(a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number): number; +export function sdk_make_deploy(a: number, b: number, c: number, d: number): Array; +export function sdk_sign_deploy(a: number, b: number, c: number, d: number): number; +export function sdk_make_transaction(a: number, b: number, c: number): Array; +export function sdk_sign_transaction(a: number, b: number, c: number, d: number): number; +export function sdk_call_entrypoint_deploy(a: number, b: number, c: number, d: number, e: number, f: number, g: number): number; +export function __wbg_querycontractkeyoptions_free(a: number, b: number): void; +export function __wbg_get_querycontractkeyoptions_entity_identifier(a: number): number; +export function __wbg_set_querycontractkeyoptions_entity_identifier(a: number, b: number): void; +export function __wbg_get_querycontractkeyoptions_entity_identifier_as_string(a: number): Array; +export function __wbg_set_querycontractkeyoptions_entity_identifier_as_string(a: number, b: number, c: number): void; +export function __wbg_get_querycontractkeyoptions_maybe_block_id_as_string(a: number): Array; +export function __wbg_set_querycontractkeyoptions_maybe_block_id_as_string(a: number, b: number, c: number): void; +export function __wbg_get_querycontractkeyoptions_path_as_string(a: number): Array; +export function __wbg_set_querycontractkeyoptions_path_as_string(a: number, b: number, c: number): void; +export function __wbg_get_querycontractkeyoptions_path(a: number): number; +export function __wbg_set_querycontractkeyoptions_path(a: number, b: number): void; +export function __wbg_get_querycontractkeyoptions_rpc_address(a: number): Array; +export function __wbg_set_querycontractkeyoptions_rpc_address(a: number, b: number, c: number): void; +export function __wbg_get_querycontractkeyoptions_verbosity(a: number): number; +export function __wbg_set_querycontractkeyoptions_verbosity(a: number, b: number): void; +export function sdk_query_contract_key_options(a: number, b: number): Array; +export function sdk_query_contract_key(a: number, b: number): number; +export function __wbg_getblockoptions_free(a: number, b: number): void; +export function __wbg_set_getblockoptions_verbosity(a: number, b: number): void; +export function __wbg_get_getblockoptions_maybe_block_identifier(a: number): number; +export function __wbg_get_querycontractkeyoptions_maybe_block_identifier(a: number): number; +export function __wbg_set_getblockoptions_maybe_block_id_as_string(a: number, b: number, c: number): void; +export function __wbg_set_getblockoptions_rpc_address(a: number, b: number, c: number): void; +export function __wbg_get_getblockoptions_maybe_block_id_as_string(a: number): Array; +export function __wbg_get_getblockoptions_rpc_address(a: number): Array; +export function __wbg_get_getblockoptions_verbosity(a: number): number; +export function __wbg_set_getblockoptions_maybe_block_identifier(a: number, b: number): void; +export function __wbg_set_querycontractkeyoptions_maybe_block_identifier(a: number, b: number): void; +export function __wbg_transferaddr_free(a: number, b: number): void; +export function __wbg_urefaddr_free(a: number, b: number): void; +export function __wbg_bytes_free(a: number, b: number): void; +export function bytes_new(): number; +export function bytes_fromUint8Array(a: number): number; +export function __wbg_argssimple_free(a: number, b: number): void; +export function __wbg_getaccountresult_free(a: number, b: number): void; +export function getaccountresult_api_version(a: number): number; +export function getaccountresult_account(a: number): number; +export function getaccountresult_merkle_proof(a: number): Array; +export function getaccountresult_toJson(a: number): number; +export function __wbg_getaccountoptions_free(a: number, b: number): void; +export function __wbg_get_getaccountoptions_account_identifier(a: number): number; +export function __wbg_set_getaccountoptions_account_identifier(a: number, b: number): void; +export function __wbg_get_getaccountoptions_account_identifier_as_string(a: number): Array; +export function __wbg_set_getaccountoptions_account_identifier_as_string(a: number, b: number, c: number): void; +export function __wbg_get_getaccountoptions_maybe_block_id_as_string(a: number): Array; +export function __wbg_set_getaccountoptions_maybe_block_id_as_string(a: number, b: number, c: number): void; +export function __wbg_get_getaccountoptions_maybe_block_identifier(a: number): number; +export function __wbg_set_getaccountoptions_maybe_block_identifier(a: number, b: number): void; +export function __wbg_get_getaccountoptions_rpc_address(a: number): Array; +export function __wbg_set_getaccountoptions_rpc_address(a: number, b: number, c: number): void; +export function __wbg_get_getaccountoptions_verbosity(a: number): number; +export function __wbg_set_getaccountoptions_verbosity(a: number, b: number): void; +export function sdk_get_account_options(a: number, b: number): Array; +export function sdk_get_account(a: number, b: number): number; +export function sdk_state_get_account_info(a: number, b: number): number; +export function __wbg_geterasummaryresult_free(a: number, b: number): void; +export function geterasummaryresult_api_version(a: number): number; +export function geterasummaryresult_era_summary(a: number): number; +export function geterasummaryresult_toJson(a: number): number; +export function __wbg_geterasummaryoptions_free(a: number, b: number): void; +export function __wbg_get_geterasummaryoptions_maybe_block_id_as_string(a: number): Array; +export function __wbg_set_geterasummaryoptions_maybe_block_id_as_string(a: number, b: number, c: number): void; +export function __wbg_get_geterasummaryoptions_rpc_address(a: number): Array; +export function __wbg_set_geterasummaryoptions_rpc_address(a: number, b: number, c: number): void; +export function __wbg_get_geterasummaryoptions_verbosity(a: number): number; +export function __wbg_set_geterasummaryoptions_verbosity(a: number, b: number): void; +export function sdk_get_era_summary_options(a: number, b: number): Array; +export function sdk_get_era_summary(a: number, b: number): number; +export function sdk_chain_get_era_summary(a: number, b: number): number; +export function sdk_transfer_transaction(a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number): number; +export function __wbg_get_geterasummaryoptions_maybe_block_identifier(a: number): number; +export function __wbg_set_geterasummaryoptions_maybe_block_identifier(a: number, b: number): void; export function __wbg_intounderlyingbytesource_free(a: number, b: number): void; export function intounderlyingbytesource_type(a: number): number; export function intounderlyingbytesource_autoAllocateChunkSize(a: number): number; @@ -1027,14 +1027,14 @@ export function __wbindgen_malloc(a: number, b: number): number; export function __wbindgen_realloc(a: number, b: number, c: number, d: number): number; export const __wbindgen_export_2: WebAssembly.Table; export const __wbindgen_export_3: WebAssembly.Table; -export function closure820_externref_shim(a: number, b: number, c: number): void; -export function _dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__hbccf68cb4005f2b4(a: number, b: number): void; -export function closure1141_externref_shim(a: number, b: number, c: number): void; -export function closure1155_externref_shim(a: number, b: number, c: number): void; +export function closure937_externref_shim(a: number, b: number, c: number): void; +export function _dyn_core__ops__function__FnMut_____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h6b87dddcaa71d61d(a: number, b: number): void; +export function closure1139_externref_shim(a: number, b: number, c: number): void; +export function closure1153_externref_shim(a: number, b: number, c: number): void; export function __wbindgen_free(a: number, b: number, c: number): void; export function __externref_table_dealloc(a: number): void; export function __externref_table_alloc(): number; -export function __externref_drop_slice(a: number, b: number): void; export function __wbindgen_exn_store(a: number): void; -export function closure1703_externref_shim(a: number, b: number, c: number, d: number): void; +export function __externref_drop_slice(a: number, b: number): void; +export function closure1701_externref_shim(a: number, b: number, c: number, d: number): void; export function __wbindgen_start(): void; diff --git a/src/helpers/mod.rs b/src/helpers/mod.rs index b477b0618..49d9b6f7c 100644 --- a/src/helpers/mod.rs +++ b/src/helpers/mod.rs @@ -1,4 +1,4 @@ -use crate::types::account_hash::AccountHash; +use crate::types::hash::account_hash::AccountHash; use crate::types::{key::Key, public_key::PublicKey, sdk_error::SdkError, verbosity::Verbosity}; use base64::engine::general_purpose; use base64::Engine; diff --git a/src/sdk/binary_port/mod.rs b/src/sdk/binary_port/mod.rs index e46b039da..6e1ea22c4 100644 --- a/src/sdk/binary_port/mod.rs +++ b/src/sdk/binary_port/mod.rs @@ -1,5 +1,4 @@ -use super::SDK; -use crate::types::sdk_error::SdkError; +use crate::{types::sdk_error::SdkError, SDK}; use casper_binary_port::{ ConsensusStatus, ConsensusValidatorChanges, GlobalStateQueryResult, LastProgress, NetworkName, NodeStatus, ReactorStateName, RecordId, RewardResponse, SpeculativeExecutionResult, diff --git a/src/sdk/binary_port/wasm32.rs b/src/sdk/binary_port/wasm32.rs index b078688a9..8e3d33540 100644 --- a/src/sdk/binary_port/wasm32.rs +++ b/src/sdk/binary_port/wasm32.rs @@ -1,12 +1,18 @@ #[cfg(target_arch = "wasm32")] -use crate::types::{ - block_hash::BlockHash, digest::Digest, era_id::EraId, key::Key, public_key::PublicKey, - record_id::RecordId, sdk_error::SdkError, transaction::Transaction, - transaction_hash::TransactionHash, +use crate::{ + types::{ + digest::Digest, + era_id::EraId, + hash::{block_hash::BlockHash, transaction_hash::TransactionHash}, + key::Key, + public_key::PublicKey, + record_id::RecordId, + sdk_error::SdkError, + transaction::Transaction, + }, + SDK, }; #[cfg(target_arch = "wasm32")] -use crate::SDK; -#[cfg(target_arch = "wasm32")] use gloo_utils::format::JsValueSerdeExt; #[cfg(target_arch = "wasm32")] use wasm_bindgen::prelude::*; diff --git a/src/sdk/contract/call_entrypoint.rs b/src/sdk/contract/call_entrypoint.rs index 45b03c8c9..592b64733 100644 --- a/src/sdk/contract/call_entrypoint.rs +++ b/src/sdk/contract/call_entrypoint.rs @@ -1,10 +1,15 @@ #[cfg(target_arch = "wasm32")] use crate::transaction::transaction::PutTransactionResult; -use crate::types::transaction_params::{ - transaction_builder_params::TransactionBuilderParams, - transaction_str_params::TransactionStrParams, +use crate::{ + types::{ + sdk_error::SdkError, + transaction_params::{ + transaction_builder_params::TransactionBuilderParams, + transaction_str_params::TransactionStrParams, + }, + }, + SDK, }; -use crate::{types::sdk_error::SdkError, SDK}; use casper_client::{ rpcs::results::PutTransactionResult as _PutTransactionResult, SuccessResponse, }; diff --git a/src/sdk/contract/mod.rs b/src/sdk/contract/mod.rs index 2f1f6be07..398ef4395 100644 --- a/src/sdk/contract/mod.rs +++ b/src/sdk/contract/mod.rs @@ -88,7 +88,7 @@ pub async fn get_dictionary_item(as_params: bool) -> DictionaryItemInput { #[cfg(test)] async fn get_dictionary_item_input(entity_addr: &str) -> DictionaryItemInput { - use crate::types::dictionary_item_identifier::DictionaryItemIdentifier; + use crate::types::identifier::dictionary_item_identifier::DictionaryItemIdentifier; DictionaryItemInput::Identifier( DictionaryItemIdentifier::new_from_entity_info( diff --git a/src/sdk/contract/query_contract_dict.rs b/src/sdk/contract/query_contract_dict.rs index 18179e3c2..0250c9d54 100644 --- a/src/sdk/contract/query_contract_dict.rs +++ b/src/sdk/contract/query_contract_dict.rs @@ -5,7 +5,7 @@ use crate::types::digest::Digest; #[cfg(target_arch = "wasm32")] use crate::types::{ deploy_params::dictionary_item_str_params::DictionaryItemStrParams, - dictionary_item_identifier::DictionaryItemIdentifier, + identifier::dictionary_item_identifier::DictionaryItemIdentifier, }; use crate::{ rpcs::get_dictionary_item::DictionaryItemInput, diff --git a/src/sdk/contract/query_contract_key.rs b/src/sdk/contract/query_contract_key.rs index b439edcb6..a9f6a1663 100644 --- a/src/sdk/contract/query_contract_key.rs +++ b/src/sdk/contract/query_contract_key.rs @@ -1,12 +1,13 @@ #[cfg(target_arch = "wasm32")] -use crate::types::block_identifier::BlockIdentifier; +use crate::types::identifier::block_identifier::BlockIdentifier; #[cfg(target_arch = "wasm32")] use crate::{rpcs::query_global_state::QueryGlobalStateResult, types::path::Path}; use crate::{ rpcs::query_global_state::{KeyIdentifierInput, PathIdentifierInput, QueryGlobalStateParams}, types::{ - block_identifier::BlockIdentifierInput, entity_identifier::EntityIdentifier, - sdk_error::SdkError, verbosity::Verbosity, + identifier::{block_identifier::BlockIdentifierInput, entity_identifier::EntityIdentifier}, + sdk_error::SdkError, + verbosity::Verbosity, }, SDK, }; @@ -198,7 +199,7 @@ mod tests { use crate::{ install_cep78, types::{ - block_identifier::BlockIdentifier, entity_identifier::EntityIdentifier, + identifier::{block_identifier::BlockIdentifier, entity_identifier::EntityIdentifier}, verbosity::Verbosity, }, }; diff --git a/src/sdk/deploy/deploy.rs b/src/sdk/deploy/deploy.rs index 8e300ccb0..d8f8608ee 100644 --- a/src/sdk/deploy/deploy.rs +++ b/src/sdk/deploy/deploy.rs @@ -1,5 +1,5 @@ #[cfg(target_arch = "wasm32")] -use crate::types::deploy_hash::DeployHash; +use crate::types::hash::deploy_hash::DeployHash; use crate::{ types::{ deploy_params::{ diff --git a/src/sdk/deploy/transfer.rs b/src/sdk/deploy/transfer.rs index 470257c41..9ce63f298 100644 --- a/src/sdk/deploy/transfer.rs +++ b/src/sdk/deploy/transfer.rs @@ -1,5 +1,5 @@ #[cfg(target_arch = "wasm32")] -use super::deploy::PutDeployResult; +use crate::deploy::deploy::PutDeployResult; use crate::{ types::{ deploy_params::{ diff --git a/src/sdk/deploy_utils/sign_deploy.rs b/src/sdk/deploy_utils/sign_deploy.rs index 433a6eb99..c8e99e594 100644 --- a/src/sdk/deploy_utils/sign_deploy.rs +++ b/src/sdk/deploy_utils/sign_deploy.rs @@ -1,5 +1,4 @@ -use crate::types::deploy::Deploy; -use crate::SDK; +use crate::{types::deploy::Deploy, SDK}; #[cfg(target_arch = "wasm32")] use wasm_bindgen::prelude::*; diff --git a/src/sdk/rpcs/get_account.rs b/src/sdk/rpcs/get_account.rs index 00f1723c5..fff30d287 100644 --- a/src/sdk/rpcs/get_account.rs +++ b/src/sdk/rpcs/get_account.rs @@ -1,9 +1,12 @@ #[cfg(target_arch = "wasm32")] -use crate::types::block_identifier::BlockIdentifier; +use crate::types::identifier::block_identifier::BlockIdentifier; use crate::{ types::{ - account_identifier::AccountIdentifier, block_identifier::BlockIdentifierInput, - sdk_error::SdkError, verbosity::Verbosity, + identifier::{ + account_identifier::AccountIdentifier, block_identifier::BlockIdentifierInput, + }, + sdk_error::SdkError, + verbosity::Verbosity, }, SDK, }; @@ -248,7 +251,7 @@ mod tests { use super::*; use crate::{ helpers::public_key_from_secret_key, - types::{block_identifier::BlockIdentifier, public_key::PublicKey}, + types::{identifier::block_identifier::BlockIdentifier, public_key::PublicKey}, }; use sdk_tests::tests::helpers::{ get_enable_addressable_entity, get_network_constants, get_user_secret_key, diff --git a/src/sdk/rpcs/get_auction_info.rs b/src/sdk/rpcs/get_auction_info.rs index 1d999a643..bba75669a 100644 --- a/src/sdk/rpcs/get_auction_info.rs +++ b/src/sdk/rpcs/get_auction_info.rs @@ -1,7 +1,10 @@ #[cfg(target_arch = "wasm32")] -use crate::types::block_identifier::BlockIdentifier; +use crate::types::identifier::block_identifier::BlockIdentifier; use crate::{ - types::{block_identifier::BlockIdentifierInput, sdk_error::SdkError, verbosity::Verbosity}, + types::{ + identifier::block_identifier::BlockIdentifierInput, sdk_error::SdkError, + verbosity::Verbosity, + }, SDK, }; use casper_client::{ @@ -203,7 +206,9 @@ impl SDK { #[cfg(test)] mod tests { use super::*; - use crate::types::{block_hash::BlockHash, block_identifier::BlockIdentifier}; + use crate::types::{ + hash::block_hash::BlockHash, identifier::block_identifier::BlockIdentifier, + }; use sdk_tests::tests::helpers::get_network_constants; #[tokio::test] diff --git a/src/sdk/rpcs/get_block.rs b/src/sdk/rpcs/get_block.rs index 4e8fe4fe8..3f53f414c 100644 --- a/src/sdk/rpcs/get_block.rs +++ b/src/sdk/rpcs/get_block.rs @@ -1,7 +1,10 @@ #[cfg(target_arch = "wasm32")] -use crate::types::block_identifier::BlockIdentifier; +use crate::types::identifier::block_identifier::BlockIdentifier; use crate::{ - types::{block_identifier::BlockIdentifierInput, sdk_error::SdkError, verbosity::Verbosity}, + types::{ + identifier::block_identifier::BlockIdentifierInput, sdk_error::SdkError, + verbosity::Verbosity, + }, SDK, }; use casper_client::{ @@ -218,7 +221,9 @@ impl SDK { #[cfg(test)] mod tests { use super::*; - use crate::types::{block_hash::BlockHash, block_identifier::BlockIdentifier}; + use crate::types::{ + hash::block_hash::BlockHash, identifier::block_identifier::BlockIdentifier, + }; use sdk_tests::tests::helpers::get_network_constants; #[tokio::test] diff --git a/src/sdk/rpcs/get_block_transfers.rs b/src/sdk/rpcs/get_block_transfers.rs index b2fee394f..2033f25e3 100644 --- a/src/sdk/rpcs/get_block_transfers.rs +++ b/src/sdk/rpcs/get_block_transfers.rs @@ -1,9 +1,12 @@ #[cfg(target_arch = "wasm32")] -use crate::types::block_hash::BlockHash; +use crate::types::hash::block_hash::BlockHash; #[cfg(target_arch = "wasm32")] -use crate::types::block_identifier::BlockIdentifier; +use crate::types::identifier::block_identifier::BlockIdentifier; use crate::{ - types::{block_identifier::BlockIdentifierInput, sdk_error::SdkError, verbosity::Verbosity}, + types::{ + identifier::block_identifier::BlockIdentifierInput, sdk_error::SdkError, + verbosity::Verbosity, + }, SDK, }; use casper_client::{ @@ -213,7 +216,9 @@ impl SDK { #[cfg(test)] mod tests { use super::*; - use crate::types::{block_hash::BlockHash, block_identifier::BlockIdentifier}; + use crate::types::{ + hash::block_hash::BlockHash, identifier::block_identifier::BlockIdentifier, + }; use sdk_tests::tests::helpers::get_network_constants; #[tokio::test] diff --git a/src/sdk/rpcs/get_deploy.rs b/src/sdk/rpcs/get_deploy.rs index 8ed270473..7c60d6997 100644 --- a/src/sdk/rpcs/get_deploy.rs +++ b/src/sdk/rpcs/get_deploy.rs @@ -1,6 +1,6 @@ #[cfg(target_arch = "wasm32")] use crate::types::deploy::Deploy; -use crate::types::deploy_hash::DeployHash; +use crate::types::hash::deploy_hash::DeployHash; use crate::{types::verbosity::Verbosity, SDK}; use casper_client::{ get_deploy, rpcs::results::GetDeployResult as _GetDeployResult, Error, JsonRpcId, diff --git a/src/sdk/rpcs/get_dictionary_item.rs b/src/sdk/rpcs/get_dictionary_item.rs index 6eb6325c2..1847058a4 100644 --- a/src/sdk/rpcs/get_dictionary_item.rs +++ b/src/sdk/rpcs/get_dictionary_item.rs @@ -4,8 +4,8 @@ use crate::{ deploy_params::dictionary_item_str_params::{ dictionary_item_str_params_to_casper_client, DictionaryItemStrParams, }, - dictionary_item_identifier::DictionaryItemIdentifier, digest::ToDigest, + identifier::dictionary_item_identifier::DictionaryItemIdentifier, sdk_error::SdkError, verbosity::Verbosity, }, @@ -19,7 +19,6 @@ use casper_client::{ #[cfg(target_arch = "wasm32")] use gloo_utils::format::JsValueSerdeExt; use rand::Rng; - #[cfg(target_arch = "wasm32")] use serde::{Deserialize, Serialize}; #[cfg(target_arch = "wasm32")] diff --git a/src/sdk/rpcs/get_entity.rs b/src/sdk/rpcs/get_entity.rs index d46a3df15..4c822b920 100644 --- a/src/sdk/rpcs/get_entity.rs +++ b/src/sdk/rpcs/get_entity.rs @@ -1,17 +1,18 @@ #[cfg(target_arch = "wasm32")] -use crate::types::block_identifier::BlockIdentifier; +use crate::types::identifier::block_identifier::BlockIdentifier; use crate::{ types::{ - block_identifier::BlockIdentifierInput, entity_identifier::EntityIdentifier, - sdk_error::SdkError, verbosity::Verbosity, + identifier::{block_identifier::BlockIdentifierInput, entity_identifier::EntityIdentifier}, + sdk_error::SdkError, + verbosity::Verbosity, }, SDK, }; -use casper_client::cli::parse::entity_identifier as parse_entity_identifier; use casper_client::{ - cli::get_entity as get_entity_cli, get_entity as get_entity_lib, - rpcs::results::GetAddressableEntityResult as _GetAddressableEntityResult, JsonRpcId, - SuccessResponse, + cli::{get_entity as get_entity_cli, parse::entity_identifier as parse_entity_identifier}, + get_entity as get_entity_lib, + rpcs::results::GetAddressableEntityResult as _GetAddressableEntityResult, + JsonRpcId, SuccessResponse, }; #[cfg(target_arch = "wasm32")] use gloo_utils::format::JsValueSerdeExt; @@ -241,7 +242,7 @@ mod tests { use super::*; use crate::{ helpers::public_key_from_secret_key, - types::{block_identifier::BlockIdentifier, public_key::PublicKey}, + types::{identifier::block_identifier::BlockIdentifier, public_key::PublicKey}, }; use sdk_tests::tests::helpers::{ get_enable_addressable_entity, get_network_constants, get_user_secret_key, diff --git a/src/sdk/rpcs/get_era_info.rs b/src/sdk/rpcs/get_era_info.rs index f5ac028da..3229de019 100644 --- a/src/sdk/rpcs/get_era_info.rs +++ b/src/sdk/rpcs/get_era_info.rs @@ -1,7 +1,10 @@ #[cfg(target_arch = "wasm32")] -use crate::types::block_identifier::BlockIdentifier; +use crate::types::identifier::block_identifier::BlockIdentifier; use crate::{ - types::{block_identifier::BlockIdentifierInput, sdk_error::SdkError, verbosity::Verbosity}, + types::{ + identifier::block_identifier::BlockIdentifierInput, sdk_error::SdkError, + verbosity::Verbosity, + }, SDK, }; #[allow(deprecated)] @@ -164,7 +167,9 @@ impl SDK { #[cfg(test)] mod tests { use super::*; - use crate::types::{block_hash::BlockHash, block_identifier::BlockIdentifier}; + use crate::types::{ + hash::block_hash::BlockHash, identifier::block_identifier::BlockIdentifier, + }; use sdk_tests::tests::helpers::get_network_constants; #[tokio::test] diff --git a/src/sdk/rpcs/get_era_summary.rs b/src/sdk/rpcs/get_era_summary.rs index 420583f79..6c4f3cdf8 100644 --- a/src/sdk/rpcs/get_era_summary.rs +++ b/src/sdk/rpcs/get_era_summary.rs @@ -1,7 +1,10 @@ #[cfg(target_arch = "wasm32")] -use crate::types::block_identifier::BlockIdentifier; +use crate::types::identifier::block_identifier::BlockIdentifier; use crate::{ - types::{block_identifier::BlockIdentifierInput, sdk_error::SdkError, verbosity::Verbosity}, + types::{ + identifier::block_identifier::BlockIdentifierInput, sdk_error::SdkError, + verbosity::Verbosity, + }, SDK, }; use casper_client::{ @@ -203,7 +206,9 @@ impl SDK { #[cfg(test)] mod tests { use super::*; - use crate::types::{block_hash::BlockHash, block_identifier::BlockIdentifier}; + use crate::types::{ + hash::block_hash::BlockHash, identifier::block_identifier::BlockIdentifier, + }; use sdk_tests::tests::helpers::get_network_constants; #[tokio::test] diff --git a/src/sdk/rpcs/get_state_root_hash.rs b/src/sdk/rpcs/get_state_root_hash.rs index 71afc15b0..87dde559b 100644 --- a/src/sdk/rpcs/get_state_root_hash.rs +++ b/src/sdk/rpcs/get_state_root_hash.rs @@ -1,9 +1,12 @@ #[cfg(target_arch = "wasm32")] -use crate::types::block_identifier::BlockIdentifier; -#[cfg(target_arch = "wasm32")] use crate::types::digest::Digest; +#[cfg(target_arch = "wasm32")] +use crate::types::identifier::block_identifier::BlockIdentifier; use crate::{ - types::{block_identifier::BlockIdentifierInput, sdk_error::SdkError, verbosity::Verbosity}, + types::{ + identifier::block_identifier::BlockIdentifierInput, sdk_error::SdkError, + verbosity::Verbosity, + }, SDK, }; use casper_client::{ @@ -236,7 +239,9 @@ impl SDK { #[cfg(test)] mod tests { use super::*; - use crate::types::{block_hash::BlockHash, block_identifier::BlockIdentifier}; + use crate::types::{ + hash::block_hash::BlockHash, identifier::block_identifier::BlockIdentifier, + }; use sdk_tests::tests::helpers::get_network_constants; #[tokio::test] diff --git a/src/sdk/rpcs/get_transaction.rs b/src/sdk/rpcs/get_transaction.rs index c976200c9..edd646416 100644 --- a/src/sdk/rpcs/get_transaction.rs +++ b/src/sdk/rpcs/get_transaction.rs @@ -1,6 +1,6 @@ +use crate::types::hash::transaction_hash::TransactionHash; #[cfg(target_arch = "wasm32")] use crate::types::transaction::Transaction; -use crate::types::transaction_hash::TransactionHash; use crate::{types::verbosity::Verbosity, SDK}; use casper_client::{ get_transaction, rpcs::results::GetTransactionResult as _GetTransactionResult, Error, diff --git a/src/sdk/rpcs/query_balance.rs b/src/sdk/rpcs/query_balance.rs index 137bd695a..1d04e3313 100644 --- a/src/sdk/rpcs/query_balance.rs +++ b/src/sdk/rpcs/query_balance.rs @@ -1,16 +1,20 @@ #[cfg(target_arch = "wasm32")] use crate::types::digest::Digest; -use crate::types::{ - global_state_identifier::GlobalStateIdentifier, purse_identifier::PurseIdentifier, -}; use crate::{ - types::{sdk_error::SdkError, verbosity::Verbosity}, + types::{ + identifier::{ + global_state_identifier::GlobalStateIdentifier, purse_identifier::PurseIdentifier, + }, + sdk_error::SdkError, + verbosity::Verbosity, + }, SDK, }; -use casper_client::cli::parse::purse_identifier as parse_purse_identifier; use casper_client::{ - cli::query_balance as query_balance_cli, query_balance as query_balance_lib, - rpcs::results::QueryBalanceResult as _QueryBalanceResult, JsonRpcId, SuccessResponse, + cli::{parse::purse_identifier as parse_purse_identifier, query_balance as query_balance_cli}, + query_balance as query_balance_lib, + rpcs::results::QueryBalanceResult as _QueryBalanceResult, + JsonRpcId, SuccessResponse, }; #[cfg(target_arch = "wasm32")] use gloo_utils::format::JsValueSerdeExt; diff --git a/src/sdk/rpcs/query_balance_details.rs b/src/sdk/rpcs/query_balance_details.rs index f64f590b7..8995fa3ea 100644 --- a/src/sdk/rpcs/query_balance_details.rs +++ b/src/sdk/rpcs/query_balance_details.rs @@ -1,14 +1,17 @@ #[cfg(target_arch = "wasm32")] use crate::types::digest::Digest; -use crate::types::{ - global_state_identifier::GlobalStateIdentifier, purse_identifier::PurseIdentifier, -}; use crate::{ - types::{sdk_error::SdkError, verbosity::Verbosity}, + types::{ + identifier::{ + global_state_identifier::GlobalStateIdentifier, purse_identifier::PurseIdentifier, + }, + sdk_error::SdkError, + verbosity::Verbosity, + }, SDK, }; -use casper_client::cli::parse::purse_identifier as parse_purse_identifier; use casper_client::{ + cli::parse::purse_identifier as parse_purse_identifier, cli::query_balance_details as query_balance_details_cli, query_balance_details as query_balance_details_lib, rpcs::results::QueryBalanceDetailsResult as _QueryBalanceDetailsResult, JsonRpcId, diff --git a/src/sdk/rpcs/query_global_state.rs b/src/sdk/rpcs/query_global_state.rs index 8a7b1af35..7c68e9948 100644 --- a/src/sdk/rpcs/query_global_state.rs +++ b/src/sdk/rpcs/query_global_state.rs @@ -1,7 +1,8 @@ -use crate::types::digest::Digest; -use crate::types::global_state_identifier::GlobalStateIdentifier; use crate::{ - types::{key::Key, path::Path, sdk_error::SdkError, verbosity::Verbosity}, + types::{ + digest::Digest, identifier::global_state_identifier::GlobalStateIdentifier, key::Key, + path::Path, sdk_error::SdkError, verbosity::Verbosity, + }, SDK, }; use casper_client::{ diff --git a/src/sdk/rpcs/speculative_exec.rs b/src/sdk/rpcs/speculative_exec.rs index 4714e83d1..3ff8a3350 100644 --- a/src/sdk/rpcs/speculative_exec.rs +++ b/src/sdk/rpcs/speculative_exec.rs @@ -1,5 +1,5 @@ #[cfg(target_arch = "wasm32")] -use crate::types::block_hash::BlockHash; +use crate::types::hash::block_hash::BlockHash; use crate::types::transaction::Transaction; use crate::{ types::{sdk_error::SdkError, verbosity::Verbosity}, diff --git a/src/sdk/rpcs/speculative_exec_deploy.rs b/src/sdk/rpcs/speculative_exec_deploy.rs index d02603483..da711b663 100644 --- a/src/sdk/rpcs/speculative_exec_deploy.rs +++ b/src/sdk/rpcs/speculative_exec_deploy.rs @@ -1,6 +1,6 @@ -#[cfg(target_arch = "wasm32")] -use crate::types::block_hash::BlockHash; use crate::types::deploy::Deploy; +#[cfg(target_arch = "wasm32")] +use crate::types::hash::block_hash::BlockHash; use crate::{ types::{sdk_error::SdkError, verbosity::Verbosity}, SDK, diff --git a/src/sdk/transaction/transaction.rs b/src/sdk/transaction/transaction.rs index 79bc89cf1..e0f798435 100644 --- a/src/sdk/transaction/transaction.rs +++ b/src/sdk/transaction/transaction.rs @@ -1,5 +1,5 @@ #[cfg(target_arch = "wasm32")] -use crate::types::transaction_hash::TransactionHash; +use crate::types::hash::transaction_hash::TransactionHash; use crate::{ types::{ sdk_error::SdkError, diff --git a/src/sdk/transaction_utils/sign_transaction.rs b/src/sdk/transaction_utils/sign_transaction.rs index fd8b356ed..425ad5ccf 100644 --- a/src/sdk/transaction_utils/sign_transaction.rs +++ b/src/sdk/transaction_utils/sign_transaction.rs @@ -1,5 +1,4 @@ -use crate::types::transaction::Transaction; -use crate::SDK; +use crate::{types::transaction::Transaction, SDK}; #[cfg(target_arch = "wasm32")] use wasm_bindgen::prelude::*; diff --git a/src/types/addr/entity_addr.rs b/src/types/addr/entity_addr.rs index 64a498e8c..5d42566ab 100644 --- a/src/types/addr/entity_addr.rs +++ b/src/types/addr/entity_addr.rs @@ -1,4 +1,4 @@ -use crate::types::sdk_error::SdkError; +use crate::types::{addr::hash_addr::HashAddr, sdk_error::SdkError}; use casper_types::{ bytesrepr::{self, FromBytes, ToBytes}, EntityAddr as _EntityAddr, @@ -8,8 +8,6 @@ use gloo_utils::format::JsValueSerdeExt; use serde::{Deserialize, Serialize}; use wasm_bindgen::prelude::*; -use super::hash_addr::HashAddr; - #[derive(Debug, Deserialize, Clone, Serialize)] #[wasm_bindgen] pub struct EntityAddr(_EntityAddr); diff --git a/src/types/deploy.rs b/src/types/deploy.rs index 70bc493cd..64c58d380 100644 --- a/src/types/deploy.rs +++ b/src/types/deploy.rs @@ -1,17 +1,18 @@ -use super::{ +#[cfg(target_arch = "wasm32")] +use crate::helpers::insert_js_value_arg; +use crate::types::{ cl::bytes::Bytes, - contract_hash::ContractHash, - contract_package_hash::ContractPackageHash, - deploy_hash::DeployHash, deploy_params::{ deploy_str_params::DeployStrParams, payment_str_params::PaymentStrParams, session_str_params::SessionStrParams, }, + hash::{ + contract_hash::ContractHash, contract_package_hash::ContractPackageHash, + deploy_hash::DeployHash, + }, public_key::PublicKey, sdk_error::SdkError, }; -#[cfg(target_arch = "wasm32")] -use crate::helpers::insert_js_value_arg; use crate::{ debug::{error, log}, helpers::{ diff --git a/src/types/deploy_params/payment_str_params.rs b/src/types/deploy_params/payment_str_params.rs index bc3c5153d..d5023492e 100644 --- a/src/types/deploy_params/payment_str_params.rs +++ b/src/types/deploy_params/payment_str_params.rs @@ -1,5 +1,4 @@ -use super::args_simple::ArgsSimple; -use crate::helpers::get_str_or_default; +use crate::{helpers::get_str_or_default, types::deploy_params::args_simple::ArgsSimple}; use casper_client::cli::PaymentStrParams as _PaymentStrParams; use js_sys::Array; use once_cell::sync::OnceCell; diff --git a/src/types/deploy_params/session_str_params.rs b/src/types/deploy_params/session_str_params.rs index daccb1bb6..07af21359 100644 --- a/src/types/deploy_params/session_str_params.rs +++ b/src/types/deploy_params/session_str_params.rs @@ -1,5 +1,7 @@ -use super::args_simple::ArgsSimple; -use crate::{helpers::get_str_or_default, types::cl::bytes::Bytes}; +use crate::{ + helpers::get_str_or_default, + types::{cl::bytes::Bytes, deploy_params::args_simple::ArgsSimple}, +}; use casper_client::cli::SessionStrParams as _SessionStrParams; use js_sys::Array; use once_cell::sync::OnceCell; diff --git a/src/types/digest.rs b/src/types/digest.rs index 735e3f0b3..7aa60b2bf 100644 --- a/src/types/digest.rs +++ b/src/types/digest.rs @@ -1,4 +1,4 @@ -use super::sdk_error::SdkError; +use crate::types::sdk_error::SdkError; use casper_types::{ bytesrepr::{self, FromBytes, ToBytes}, Digest as _Digest, DigestError, diff --git a/src/types/account_hash.rs b/src/types/hash/account_hash.rs similarity index 98% rename from src/types/account_hash.rs rename to src/types/hash/account_hash.rs index dd72022df..eb9dea224 100644 --- a/src/types/account_hash.rs +++ b/src/types/hash/account_hash.rs @@ -1,4 +1,4 @@ -use super::{public_key::PublicKey, sdk_error::SdkError}; +use crate::types::{public_key::PublicKey, sdk_error::SdkError}; use blake2::{ digest::{Update, VariableOutput}, VarBlake2b, diff --git a/src/types/addressable_entity_hash.rs b/src/types/hash/addressable_entity_hash.rs similarity index 99% rename from src/types/addressable_entity_hash.rs rename to src/types/hash/addressable_entity_hash.rs index 197a4e7a0..23b85fae8 100644 --- a/src/types/addressable_entity_hash.rs +++ b/src/types/hash/addressable_entity_hash.rs @@ -1,4 +1,4 @@ -use super::{ +use crate::types::{ addr::{entity_addr::EntityAddr, hash_addr::HashAddr}, sdk_error::SdkError, }; diff --git a/src/types/block_hash.rs b/src/types/hash/block_hash.rs similarity index 93% rename from src/types/block_hash.rs rename to src/types/hash/block_hash.rs index b7f5e1083..20965ae43 100644 --- a/src/types/block_hash.rs +++ b/src/types/hash/block_hash.rs @@ -1,7 +1,5 @@ -use super::digest::Digest; -use super::sdk_error::SdkError; -use casper_types::BlockHash as _BlockHash; -use casper_types::Digest as _Digest; +use crate::types::{digest::Digest, sdk_error::SdkError}; +use casper_types::{BlockHash as _BlockHash, Digest as _Digest}; #[cfg(target_arch = "wasm32")] use gloo_utils::format::JsValueSerdeExt; use serde::{Deserialize, Serialize}; diff --git a/src/types/contract_hash.rs b/src/types/hash/contract_hash.rs similarity index 97% rename from src/types/contract_hash.rs rename to src/types/hash/contract_hash.rs index 3f90c7faa..a2380dd03 100644 --- a/src/types/contract_hash.rs +++ b/src/types/hash/contract_hash.rs @@ -1,4 +1,4 @@ -use super::{addressable_entity_hash::AddressableEntityHash, sdk_error::SdkError}; +use crate::types::{hash::addressable_entity_hash::AddressableEntityHash, sdk_error::SdkError}; use casper_types::{ addressable_entity::CONTRACT_ENTITY_PREFIX, bytesrepr::{self, FromBytes, ToBytes, U8_SERIALIZED_LENGTH}, diff --git a/src/types/contract_package_hash.rs b/src/types/hash/contract_package_hash.rs similarity index 99% rename from src/types/contract_package_hash.rs rename to src/types/hash/contract_package_hash.rs index a1d56dfbd..a16953a18 100644 --- a/src/types/contract_package_hash.rs +++ b/src/types/hash/contract_package_hash.rs @@ -1,4 +1,4 @@ -use super::sdk_error::SdkError; +use crate::types::sdk_error::SdkError; use casper_types::{ bytesrepr::{self, FromBytes, ToBytes, U8_SERIALIZED_LENGTH}, contracts::ContractPackageHash as _ContractPackageHash, diff --git a/src/types/deploy_hash.rs b/src/types/hash/deploy_hash.rs similarity index 93% rename from src/types/deploy_hash.rs rename to src/types/hash/deploy_hash.rs index 6e53f83d8..689d26595 100644 --- a/src/types/deploy_hash.rs +++ b/src/types/hash/deploy_hash.rs @@ -1,7 +1,5 @@ -use super::digest::Digest; -use super::sdk_error::SdkError; -use casper_types::DeployHash as _DeployHash; -use casper_types::Digest as _Digest; +use crate::types::{digest::Digest, sdk_error::SdkError}; +use casper_types::{DeployHash as _DeployHash, Digest as _Digest}; #[cfg(target_arch = "wasm32")] use gloo_utils::format::JsValueSerdeExt; use serde::{Deserialize, Serialize}; diff --git a/src/types/hash/mod.rs b/src/types/hash/mod.rs new file mode 100644 index 000000000..fd63f5b95 --- /dev/null +++ b/src/types/hash/mod.rs @@ -0,0 +1,8 @@ +pub mod account_hash; +pub mod addressable_entity_hash; +pub mod block_hash; +pub mod contract_hash; +pub mod contract_package_hash; +pub mod deploy_hash; +pub mod package_hash; +pub mod transaction_hash; diff --git a/src/types/package_hash.rs b/src/types/hash/package_hash.rs similarity index 98% rename from src/types/package_hash.rs rename to src/types/hash/package_hash.rs index 1fdb5f3b0..e8eefe849 100644 --- a/src/types/package_hash.rs +++ b/src/types/hash/package_hash.rs @@ -1,4 +1,4 @@ -use super::sdk_error::SdkError; +use crate::types::sdk_error::SdkError; use casper_types::{ bytesrepr::{self, FromBytes, ToBytes, U8_SERIALIZED_LENGTH}, PackageAddr, PackageHash as _PackageHash, diff --git a/src/types/transaction_hash.rs b/src/types/hash/transaction_hash.rs similarity index 93% rename from src/types/transaction_hash.rs rename to src/types/hash/transaction_hash.rs index fdb9897ab..29e106fba 100644 --- a/src/types/transaction_hash.rs +++ b/src/types/hash/transaction_hash.rs @@ -1,8 +1,5 @@ -use super::digest::Digest; -use super::sdk_error::SdkError; -use casper_types::Digest as _Digest; -use casper_types::DigestError; -use casper_types::TransactionHash as _TransactionHash; +use crate::types::{digest::Digest, sdk_error::SdkError}; +use casper_types::{Digest as _Digest, DigestError, TransactionHash as _TransactionHash}; #[cfg(target_arch = "wasm32")] use gloo_utils::format::JsValueSerdeExt; use serde::{Deserialize, Serialize}; diff --git a/src/types/account_identifier.rs b/src/types/identifier/account_identifier.rs similarity index 97% rename from src/types/account_identifier.rs rename to src/types/identifier/account_identifier.rs index a2d975ab7..b6ee36b5b 100644 --- a/src/types/account_identifier.rs +++ b/src/types/identifier/account_identifier.rs @@ -1,4 +1,4 @@ -use super::{account_hash::AccountHash, public_key::PublicKey, sdk_error::SdkError}; +use crate::types::{hash::account_hash::AccountHash, public_key::PublicKey, sdk_error::SdkError}; use casper_client::rpcs::AccountIdentifier as _AccountIdentifier; use casper_types::account::ACCOUNT_HASH_FORMATTED_STRING_PREFIX; #[cfg(target_arch = "wasm32")] diff --git a/src/types/block_identifier.rs b/src/types/identifier/block_identifier.rs similarity index 96% rename from src/types/block_identifier.rs rename to src/types/identifier/block_identifier.rs index 6333eba98..d115e5868 100644 --- a/src/types/block_identifier.rs +++ b/src/types/identifier/block_identifier.rs @@ -1,4 +1,4 @@ -use super::block_hash::BlockHash; +use crate::types::hash::block_hash::BlockHash; use casper_client::rpcs::common::BlockIdentifier as _BlockIdentifier; #[cfg(target_arch = "wasm32")] use gloo_utils::format::JsValueSerdeExt; diff --git a/src/types/dictionary_item_identifier.rs b/src/types/identifier/dictionary_item_identifier.rs similarity index 99% rename from src/types/dictionary_item_identifier.rs rename to src/types/identifier/dictionary_item_identifier.rs index 9b0dfda4a..d5e741388 100644 --- a/src/types/dictionary_item_identifier.rs +++ b/src/types/identifier/dictionary_item_identifier.rs @@ -1,4 +1,4 @@ -use super::{key::Key, sdk_error::SdkError}; +use crate::types::{key::Key, sdk_error::SdkError}; use casper_client::rpcs::DictionaryItemIdentifier as _DictionaryItemIdentifier; #[cfg(target_arch = "wasm32")] use gloo_utils::format::JsValueSerdeExt; diff --git a/src/types/entity_identifier.rs b/src/types/identifier/entity_identifier.rs similarity index 97% rename from src/types/entity_identifier.rs rename to src/types/identifier/entity_identifier.rs index 41aa38027..1070130d5 100644 --- a/src/types/entity_identifier.rs +++ b/src/types/identifier/entity_identifier.rs @@ -1,5 +1,5 @@ -use super::{ - account_hash::AccountHash, addr::entity_addr::EntityAddr, public_key::PublicKey, +use crate::types::{ + addr::entity_addr::EntityAddr, hash::account_hash::AccountHash, public_key::PublicKey, sdk_error::SdkError, }; use casper_client::rpcs::EntityIdentifier as _EntityIdentifier; diff --git a/src/types/global_state_identifier.rs b/src/types/identifier/global_state_identifier.rs similarity index 96% rename from src/types/global_state_identifier.rs rename to src/types/identifier/global_state_identifier.rs index 612277546..312bbecde 100644 --- a/src/types/global_state_identifier.rs +++ b/src/types/identifier/global_state_identifier.rs @@ -1,4 +1,4 @@ -use super::{block_hash::BlockHash, digest::Digest}; +use crate::types::{digest::Digest, hash::block_hash::BlockHash}; use casper_client::rpcs::GlobalStateIdentifier as _GlobalStateIdentifier; #[cfg(target_arch = "wasm32")] use gloo_utils::format::JsValueSerdeExt; diff --git a/src/types/identifier/mod.rs b/src/types/identifier/mod.rs new file mode 100644 index 000000000..89f61c1b0 --- /dev/null +++ b/src/types/identifier/mod.rs @@ -0,0 +1,6 @@ +pub mod account_identifier; +pub mod block_identifier; +pub mod dictionary_item_identifier; +pub mod entity_identifier; +pub mod global_state_identifier; +pub mod purse_identifier; diff --git a/src/types/purse_identifier.rs b/src/types/identifier/purse_identifier.rs similarity index 97% rename from src/types/purse_identifier.rs rename to src/types/identifier/purse_identifier.rs index f87484d8c..a41494dad 100644 --- a/src/types/purse_identifier.rs +++ b/src/types/identifier/purse_identifier.rs @@ -1,4 +1,4 @@ -use super::{account_hash::AccountHash, public_key::PublicKey, uref::URef}; +use crate::types::{hash::account_hash::AccountHash, public_key::PublicKey, uref::URef}; use casper_client::rpcs::PurseIdentifier as _PurseIdentifier; #[cfg(target_arch = "wasm32")] use gloo_utils::format::JsValueSerdeExt; diff --git a/src/types/key.rs b/src/types/key.rs index 91a24eacf..9682bbefd 100644 --- a/src/types/key.rs +++ b/src/types/key.rs @@ -1,10 +1,14 @@ -use super::addr::transfer_addr::TransferAddr; -use super::addr::{dictionary_addr::DictionaryAddr, hash_addr::HashAddr, uref_addr::URefAddr}; -use super::era_id::EraId; -use super::{account_hash::AccountHash, deploy_hash::DeployHash, uref::URef}; -use crate::types::sdk_error::SdkError; -use casper_types::bytesrepr::ToBytes; -use casper_types::Key as _Key; +use crate::types::{ + addr::{ + dictionary_addr::DictionaryAddr, hash_addr::HashAddr, transfer_addr::TransferAddr, + uref_addr::URefAddr, + }, + era_id::EraId, + hash::{account_hash::AccountHash, deploy_hash::DeployHash}, + sdk_error::SdkError, + uref::URef, +}; +use casper_types::{bytesrepr::ToBytes, Key as _Key}; #[cfg(target_arch = "wasm32")] use gloo_utils::format::JsValueSerdeExt; use serde::{Deserialize, Serialize}; diff --git a/src/types/mod.rs b/src/types/mod.rs index bc55557b7..8b6cf9073 100644 --- a/src/types/mod.rs +++ b/src/types/mod.rs @@ -1,32 +1,20 @@ pub mod access_rights; -pub mod account_hash; -pub mod account_identifier; pub mod addr; -pub mod addressable_entity_hash; -pub mod block_hash; -pub mod block_identifier; pub mod cl; -pub mod contract_hash; -pub mod contract_package_hash; pub mod deploy; -pub mod deploy_hash; pub mod deploy_params; -pub mod dictionary_item_identifier; pub mod digest; -pub mod entity_identifier; pub mod era_id; -pub mod global_state_identifier; +pub mod hash; +pub mod identifier; pub mod key; -pub mod package_hash; pub mod path; pub mod peer_entry; pub mod pricing_mode; pub mod public_key; -pub mod purse_identifier; pub mod record_id; pub mod sdk_error; pub mod transaction; -pub mod transaction_hash; pub mod transaction_params; pub mod uref; pub mod verbosity; diff --git a/src/types/public_key.rs b/src/types/public_key.rs index 00dd81688..032ac8963 100644 --- a/src/types/public_key.rs +++ b/src/types/public_key.rs @@ -1,4 +1,7 @@ -use crate::types::{account_hash::AccountHash, purse_identifier::PurseIdentifier, uref::URef}; +use crate::types::sdk_error::SdkError; +use crate::types::{ + hash::account_hash::AccountHash, identifier::purse_identifier::PurseIdentifier, uref::URef, +}; use casper_types::{ bytesrepr::{self, FromBytes, ToBytes}, PublicKey as _PublicKey, ED25519_TAG, SECP256K1_TAG, SYSTEM_TAG, @@ -9,8 +12,6 @@ use serde::{Deserialize, Serialize}; use std::fmt::{Display, Formatter, Result as FmtResult}; use wasm_bindgen::prelude::*; -use super::sdk_error::SdkError; - #[wasm_bindgen] #[derive(Debug, Deserialize, Clone, Serialize, PartialEq, Eq, PartialOrd, Ord)] pub struct PublicKey(_PublicKey); diff --git a/src/types/record_id.rs b/src/types/record_id.rs index 97e094358..11020c64d 100644 --- a/src/types/record_id.rs +++ b/src/types/record_id.rs @@ -1,8 +1,7 @@ +use crate::types::sdk_error::SdkError; use casper_binary_port::RecordId as _RecordId; use wasm_bindgen::prelude::*; -use super::sdk_error::SdkError; - #[wasm_bindgen] #[derive(Clone, Copy, Debug, PartialEq, Eq)] diff --git a/src/types/transaction.rs b/src/types/transaction.rs index aa2d56287..4b3f657cd 100644 --- a/src/types/transaction.rs +++ b/src/types/transaction.rs @@ -1,8 +1,11 @@ -use super::{ - account_hash::AccountHash, - addressable_entity_hash::AddressableEntityHash, +#[cfg(target_arch = "wasm32")] +use crate::helpers::insert_js_value_arg; +use crate::types::{ cl::bytes::Bytes, - package_hash::PackageHash, + hash::{ + account_hash::AccountHash, addressable_entity_hash::AddressableEntityHash, + package_hash::PackageHash, + }, public_key::PublicKey, sdk_error::SdkError, transaction_params::{ @@ -11,8 +14,6 @@ use super::{ }, uref::URef, }; -#[cfg(target_arch = "wasm32")] -use crate::helpers::insert_js_value_arg; use crate::{ debug::{error, log}, helpers::{ @@ -23,12 +24,11 @@ use crate::{ make_transfer_transaction::make_transfer_transaction, types::{ digest::Digest, + hash::transaction_hash::TransactionHash, pricing_mode::PricingMode, - transaction_hash::TransactionHash, transaction_params::transaction_builder_params::{TransferTarget, TransferTargetKind}, }, }; - use casper_types::{ account::AccountHash as _AccountHash, bytesrepr::{self, Bytes as _Bytes, ToBytes}, @@ -1042,7 +1042,7 @@ mod tests { #[test] fn test_add_arg_without_secret_key() { - let (_, _, _, chain_name) = get_network_constants(); + let (_, _, _, _, chain_name) = get_network_constants(); let secret_key = get_user_secret_key(None).unwrap(); let transaction_params = TransactionStrParams::default(); @@ -1064,7 +1064,7 @@ mod tests { #[test] fn test_add_arg_with_secret_key() { - let (_, _, _, chain_name) = get_network_constants(); + let (_, _, _, _, chain_name) = get_network_constants(); let secret_key = get_user_secret_key(None).unwrap(); let initiator_addr = public_key_from_secret_key(&secret_key).unwrap(); diff --git a/src/types/transaction_category.rs b/src/types/transaction_category.rs deleted file mode 100644 index 7c05a044d..000000000 --- a/src/types/transaction_category.rs +++ /dev/null @@ -1,145 +0,0 @@ -// use casper_types::TransactionCategory as _TransactionCategory; -// use core::fmt; -// use serde::{Deserialize, Deserializer, Serialize}; -// use wasm_bindgen::prelude::*; - -// #[derive(Copy, Clone, Ord, PartialOrd, Eq, PartialEq, Hash, Serialize, Debug, Default)] -// #[wasm_bindgen] -// #[repr(u8)] -// pub enum TransactionCategory { -// Mint = 0, -// Auction = 1, -// #[default] -// InstallUpgrade = 2, -// Large = 3, -// Medium = 4, -// Small = 5, -// } - -// impl TransactionCategory { -// const MINT: &'static str = "Mint"; -// const AUCTION: &'static str = "Auction"; -// const INSTALL_UPGRADE: &'static str = "InstallUpgrade"; -// const LARGE: &'static str = "Large"; -// const MEDIUM: &'static str = "Medium"; -// const SMALL: &'static str = "Small"; -// } - -// impl<'de> Deserialize<'de> for TransactionCategory { -// fn deserialize(deserializer: D) -> Result -// where -// D: Deserializer<'de>, -// { -// #[derive(Deserialize)] -// #[serde(untagged)] -// enum Value { -// IntValue(u8), -// StrValue(String), -// } - -// let value: Value = Deserialize::deserialize(deserializer)?; - -// match value { -// Value::IntValue(v) => match v { -// 0 => Ok(TransactionCategory::Mint), -// 1 => Ok(TransactionCategory::Auction), -// 2 => Ok(TransactionCategory::InstallUpgrade), -// 3 => Ok(TransactionCategory::Large), -// 4 => Ok(TransactionCategory::Medium), -// 5 => Ok(TransactionCategory::Small), -// _ => Err(serde::de::Error::custom( -// "Invalid transaction_category value", -// )), -// }, -// Value::StrValue(s) => Ok(TransactionCategory::from(s.as_str())), -// } -// } -// } - -// impl From for u8 { -// fn from(transaction_category: TransactionCategory) -> Self { -// match transaction_category { -// TransactionCategory::Mint => 0, -// TransactionCategory::Auction => 1, -// TransactionCategory::InstallUpgrade => 2, -// TransactionCategory::Large => 3, -// TransactionCategory::Medium => 4, -// TransactionCategory::Small => 5, -// } -// } -// } - -// impl From for TransactionCategory { -// fn from(value: u8) -> Self { -// match value { -// 0 => Self::Mint, -// 1 => Self::Auction, -// 2 => Self::InstallUpgrade, -// 3 => Self::Large, -// 4 => Self::Medium, -// 5 => Self::Small, -// _ => unreachable!("Invalid u8 value for TransactionCategory"), -// } -// } -// } - -// impl From<&str> for TransactionCategory { -// fn from(s: &str) -> Self { -// match s { -// Self::MINT => Self::Mint, -// Self::AUCTION => Self::Auction, -// Self::INSTALL_UPGRADE => Self::InstallUpgrade, -// Self::LARGE => Self::Large, -// Self::MEDIUM => Self::Medium, -// Self::SMALL => Self::Small, -// _ => unreachable!("Invalid transaction_category string"), -// } -// } -// } - -// impl From for TransactionCategory { -// fn from(s: String) -> Self { -// s.as_str().into() -// } -// } - -// impl fmt::Display for TransactionCategory { -// fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { -// match self { -// TransactionCategory::Mint => write!(f, "{}", TransactionCategory::MINT), -// TransactionCategory::Auction => write!(f, "{}", TransactionCategory::AUCTION), -// TransactionCategory::InstallUpgrade => { -// write!(f, "{}", TransactionCategory::INSTALL_UPGRADE) -// } -// TransactionCategory::Large => write!(f, "{}", TransactionCategory::LARGE), -// TransactionCategory::Medium => write!(f, "{}", TransactionCategory::MEDIUM), -// TransactionCategory::Small => write!(f, "{}", TransactionCategory::SMALL), -// } -// } -// } - -// impl From for _TransactionCategory { -// fn from(transaction_category: TransactionCategory) -> Self { -// match transaction_category { -// TransactionCategory::Mint => _TransactionCategory::Mint, -// TransactionCategory::Auction => _TransactionCategory::Auction, -// TransactionCategory::InstallUpgrade => _TransactionCategory::InstallUpgrade, -// TransactionCategory::Large => _TransactionCategory::Large, -// TransactionCategory::Medium => _TransactionCategory::Medium, -// TransactionCategory::Small => _TransactionCategory::Small, -// } -// } -// } - -// impl From<_TransactionCategory> for TransactionCategory { -// fn from(transaction_category: _TransactionCategory) -> Self { -// match transaction_category { -// _TransactionCategory::Mint => TransactionCategory::Mint, -// _TransactionCategory::Auction => TransactionCategory::Auction, -// _TransactionCategory::InstallUpgrade => TransactionCategory::InstallUpgrade, -// _TransactionCategory::Large => TransactionCategory::Large, -// _TransactionCategory::Medium => TransactionCategory::Medium, -// _TransactionCategory::Small => TransactionCategory::Small, -// } -// } -// } diff --git a/src/types/transaction_params/transaction_builder_params.rs b/src/types/transaction_params/transaction_builder_params.rs index ca9c18f0c..dc0231c6d 100644 --- a/src/types/transaction_params/transaction_builder_params.rs +++ b/src/types/transaction_params/transaction_builder_params.rs @@ -1,10 +1,16 @@ use crate::{ debug::error, types::{ - account_hash::AccountHash, addressable_entity_hash::AddressableEntityHash, - cl::bytes::Bytes, package_hash::PackageHash, public_key::PublicKey, uref::URef, + cl::bytes::Bytes, + hash::{ + account_hash::AccountHash, addressable_entity_hash::AddressableEntityHash, + package_hash::PackageHash, + }, + public_key::PublicKey, + uref::URef, }, }; + use casper_client::cli::TransactionBuilderParams as _TransactionBuilderParams; use casper_types::{TransferTarget as _TransferTarget, U512}; use wasm_bindgen::prelude::*; diff --git a/src/types/uref.rs b/src/types/uref.rs index 139484b95..e4229dc89 100644 --- a/src/types/uref.rs +++ b/src/types/uref.rs @@ -1,6 +1,4 @@ -use super::sdk_error::SdkError; -use crate::types::access_rights::AccessRights; -use crate::types::addr::uref_addr::URefAddr; +use crate::types::{access_rights::AccessRights, addr::uref_addr::URefAddr, sdk_error::SdkError}; use casper_types::URef as _URef; #[cfg(target_arch = "wasm32")] use gloo_utils::format::JsValueSerdeExt; diff --git a/tests/integration/rust/Cargo.toml b/tests/integration/rust/Cargo.toml index 6a2eea2e7..f94b8eae8 100644 --- a/tests/integration/rust/Cargo.toml +++ b/tests/integration/rust/Cargo.toml @@ -25,3 +25,5 @@ path = "src/lib.rs" [patch.crates-io] casper-types = { version = "5.0.0", git = "https://github.com/casper-network/casper-node", branch = "feat-2.0" } casper-client = { version = "2.0.0", git = "https://github.com/casper-ecosystem/casper-client-rs", branch = "feat-track-node-2.0" } +casper-binary-port = { version = "1.0.0", git = "https://github.com/casper-network/casper-node", branch = "feat-2.0" } +casper-binary-port-access = { version = "0.1.0", git = "https://github.com/casper-ecosystem/casper-binary-port-client", branch = "rustSDK-feat-2.0" } diff --git a/tests/integration/rust/src/tests/helpers.rs b/tests/integration/rust/src/tests/helpers.rs index 8719de71b..a24bd4095 100644 --- a/tests/integration/rust/src/tests/helpers.rs +++ b/tests/integration/rust/src/tests/helpers.rs @@ -1,17 +1,15 @@ use self::intern::{create_test_sdk, install_cep78}; use crate::config::{ - CONTRACT_CEP78_KEY, DEFAULT_ENABLE_ADDRESSABLE_ENTITY, PACKAGE_CEP78_KEY, SPECULATIVE_ADDRESS, + CONTRACT_CEP78_KEY, DEFAULT_CHAIN_NAME, DEFAULT_ENABLE_ADDRESSABLE_ENTITY, + DEFAULT_EVENT_ADDRESS, DEFAULT_NODE_ADDRESS, DEFAULT_RPC_ADDRESS, DEFAULT_SECRET_KEY_NAME, + DEFAULT_SECRET_KEY_NCTL_PATH, ENTRYPOINT_MINT, PACKAGE_CEP78_KEY, PAYMENT_AMOUNT, + SPECULATIVE_ADDRESS, }; -use crate::config::{ - DEFAULT_CHAIN_NAME, DEFAULT_EVENT_ADDRESS, DEFAULT_RPC_ADDRESS, DEFAULT_SECRET_KEY_NAME, - DEFAULT_SECRET_KEY_NCTL_PATH, ENTRYPOINT_MINT, PAYMENT_AMOUNT, -}; -use casper_rust_wasm_sdk::types::addr::entity_addr::EntityAddr; use casper_rust_wasm_sdk::{ types::{ - block_hash::BlockHash, - entity_identifier::EntityIdentifier, - transaction_hash::TransactionHash, + addr::entity_addr::EntityAddr, + hash::{block_hash::BlockHash, transaction_hash::TransactionHash}, + identifier::entity_identifier::EntityIdentifier, transaction_params::{ transaction_builder_params::TransactionBuilderParams, transaction_str_params::TransactionStrParams, @@ -46,7 +44,8 @@ pub(crate) mod intern { }, types::{ deploy_params::dictionary_item_str_params::DictionaryItemStrParams, - entity_identifier::EntityIdentifier, transaction_hash::TransactionHash, + hash::transaction_hash::TransactionHash, + identifier::entity_identifier::EntityIdentifier, transaction_params::transaction_str_params::TransactionStrParams, }, SDK, diff --git a/tests/integration/rust/src/tests/integration/params/mod.rs b/tests/integration/rust/src/tests/integration/params/mod.rs index ba81b4f03..93530e591 100644 --- a/tests/integration/rust/src/tests/integration/params/mod.rs +++ b/tests/integration/rust/src/tests/integration/params/mod.rs @@ -7,12 +7,12 @@ pub mod test_module { }; use casper_rust_wasm_sdk::types::{ addr::entity_addr::EntityAddr, - addressable_entity_hash::AddressableEntityHash, deploy_params::{ deploy_str_params::DeployStrParams, dictionary_item_str_params::DictionaryItemStrParams, payment_str_params::PaymentStrParams, session_str_params::SessionStrParams, }, + hash::addressable_entity_hash::AddressableEntityHash, transaction_params::{ transaction_builder_params::TransactionBuilderParams, transaction_str_params::TransactionStrParams, diff --git a/tests/integration/rust/src/tests/integration/rpcs/mod.rs b/tests/integration/rust/src/tests/integration/rpcs/mod.rs index 43ef7428a..00457e193 100644 --- a/tests/integration/rust/src/tests/integration/rpcs/mod.rs +++ b/tests/integration/rust/src/tests/integration/rpcs/mod.rs @@ -5,23 +5,29 @@ pub mod test_module { DICTIONARY_NAME, TEST_HELLO_KEY, TEST_HELLO_MESSAGE, }; use crate::tests::helpers::intern::create_test_sdk; - use crate::tests::integration::contract::test_module::test_install_deploy; - use crate::tests::integration::deploy::test_module::test_deploy; - use casper_rust_wasm_sdk::helpers::cl_value_to_json; - use casper_rust_wasm_sdk::types::account_hash::AccountHash; - use casper_rust_wasm_sdk::types::account_identifier::AccountIdentifier; - use casper_rust_wasm_sdk::types::entity_identifier::EntityIdentifier; - use casper_rust_wasm_sdk::types::transaction_hash::TransactionHash; + use crate::tests::integration::{ + contract::test_module::test_install_deploy, deploy::test_module::test_deploy, + }; use casper_rust_wasm_sdk::{ + helpers::cl_value_to_json, rpcs::{ get_balance::GetBalanceInput, get_dictionary_item::DictionaryItemInput, query_global_state::{KeyIdentifierInput, PathIdentifierInput, QueryGlobalStateParams}, }, types::{ - block_identifier::BlockIdentifierInput, deploy_hash::DeployHash, - deploy_params::dictionary_item_str_params::DictionaryItemStrParams, digest::Digest, - global_state_identifier::GlobalStateIdentifier, public_key::PublicKey, + deploy_params::dictionary_item_str_params::DictionaryItemStrParams, + digest::Digest, + hash::{ + account_hash::AccountHash, deploy_hash::DeployHash, + transaction_hash::TransactionHash, + }, + identifier::{ + account_identifier::AccountIdentifier, block_identifier::BlockIdentifierInput, + entity_identifier::EntityIdentifier, + global_state_identifier::GlobalStateIdentifier, + }, + public_key::PublicKey, }, }; diff --git a/tests/integration/rust/src/tests/integration/types/deploy.rs b/tests/integration/rust/src/tests/integration/types/deploy.rs index d22947226..619dc3db3 100644 --- a/tests/integration/rust/src/tests/integration/types/deploy.rs +++ b/tests/integration/rust/src/tests/integration/types/deploy.rs @@ -12,13 +12,13 @@ pub mod test_module_deploy { use casper_rust_wasm_sdk::{ helpers::get_current_timestamp, types::{ - contract_hash::ContractHash, - contract_package_hash::ContractPackageHash, deploy::Deploy, deploy_params::{ deploy_str_params::DeployStrParams, payment_str_params::PaymentStrParams, session_str_params::SessionStrParams, }, + hash::contract_hash::ContractHash, + hash::contract_package_hash::ContractPackageHash, public_key::PublicKey, }, }; diff --git a/tests/integration/rust/src/tests/integration/types/transaction.rs b/tests/integration/rust/src/tests/integration/types/transaction.rs index 21c394151..ba5be29d9 100644 --- a/tests/integration/rust/src/tests/integration/types/transaction.rs +++ b/tests/integration/rust/src/tests/integration/types/transaction.rs @@ -12,9 +12,8 @@ pub mod test_module_transaction { helpers::get_current_timestamp, types::{ addr::entity_addr::EntityAddr, - addressable_entity_hash::AddressableEntityHash, cl::bytes::Bytes, - package_hash::PackageHash, + hash::{addressable_entity_hash::AddressableEntityHash, package_hash::PackageHash}, public_key::PublicKey, transaction::Transaction, transaction_params::{ diff --git a/tests/integration/rust/src/tests/mod.rs b/tests/integration/rust/src/tests/mod.rs index 12a32e7b1..d3d23a8fd 100644 --- a/tests/integration/rust/src/tests/mod.rs +++ b/tests/integration/rust/src/tests/mod.rs @@ -29,7 +29,7 @@ pub async fn _run_example_1() { None, Some(Verbosity::High), ); - use casper_rust_wasm_sdk::types::transaction_hash::TransactionHash; + use casper_rust_wasm_sdk::types::hash::transaction_hash::TransactionHash; let transaction_hash = TransactionHash::new("27d81df41801602f47cdb4618a814407daf38d0c39be32c7f6c109d7e39a3f4b") @@ -57,7 +57,7 @@ pub async fn _run_example_2() { let get_auction_info = sdk.get_auction_info(None, None, None).await; let auction_state = get_auction_info.unwrap().result.auction_state; let state_root_hash = auction_state.state_root_hash(); - println!("{:?}", state_root_hash); + println!("{state_root_hash}"); let block_height = auction_state.block_height(); println!("{block_height}"); } @@ -74,7 +74,19 @@ pub async fn _run_example_3() { let peers = get_peers.unwrap().result.peers; for peer in &peers { - println!("{:?}", peer) + println!("{:?}", peer); + } +} + +// get_peers binary port +pub async fn _run_example_3_binary() { + let sdk = SDK::new(None, Some("localhost:28101".to_string()), None); + + let get_binary_peers = sdk.get_binary_peers(None).await; + + let peers = get_binary_peers.unwrap().into_inner(); + for peer in &peers { + println!("{:?}", peer); } } @@ -95,7 +107,7 @@ pub async fn _run_example_4() { .unwrap() .block; let block_hash = block.hash().to_hex_string(); - println!("{:?}", block_hash); + println!("{block_hash}"); } // make_transfer_transaction @@ -432,7 +444,7 @@ MC4CAQAwBQYDK2VwBCIEII8ULlk1CJ12ZQ+bScjBt/IxMAZNggClWqK56D1/7CbI let transaction_hash = install.as_ref().unwrap().result.transaction_hash; // println!("{:?}", transaction_hash_result); let transaction_hash_as_string = transaction_hash.to_hex_string(); - println!("wait transaction_hash {}", transaction_hash_as_string); + println!("wait transaction_hash {transaction_hash_as_string}"); let event_parse_result: EventParseResult = sdk .wait_transaction(DEFAULT_EVENT_ADDRESS, &transaction_hash_as_string, None) .await @@ -626,7 +638,7 @@ pub async fn _run_example_1_legacy() { None, Some(Verbosity::High), ); - use casper_rust_wasm_sdk::types::deploy_hash::DeployHash; + use casper_rust_wasm_sdk::types::hash::deploy_hash::DeployHash; let deploy_hash = DeployHash::new("a8778b2e4bd1ad02c168329a1f6f3674513f4d350da1b5f078e058a3422ad0b9") @@ -838,7 +850,7 @@ MC4CAQAwBQYDK2VwBCIEII8ULlk1CJ12ZQ+bScjBt/IxMAZNggClWqK56D1/7CbI let deploy = sdk .deploy(deploy_params, session_params, payment_params, None, None) .await; - println!("{:?}", deploy.as_ref().unwrap().result.deploy_hash); + println!("{}", deploy.as_ref().unwrap().result.deploy_hash); } // put_deploy @@ -890,7 +902,7 @@ MC4CAQAwBQYDK2VwBCIEII8ULlk1CJ12ZQ+bScjBt/IxMAZNggClWqK56D1/7CbI Deploy::with_payment_and_session(deploy_params, session_params, payment_params).unwrap(); let put_deploy = sdk.put_deploy(deploy, None, None).await; - println!("{:?}", put_deploy.as_ref().unwrap().result.deploy_hash); + println!("{}", put_deploy.as_ref().unwrap().result.deploy_hash); } // put_deploy transfer @@ -941,7 +953,7 @@ MC4CAQAwBQYDK2VwBCIEII8ULlk1CJ12ZQ+bScjBt/IxMAZNggClWqK56D1/7CbI .unwrap(); let put_deploy = sdk.put_deploy(transfer_deploy, None, None).await; - println!("{:?}", put_deploy.as_ref().unwrap().result.deploy_hash); + println!("{}", put_deploy.as_ref().unwrap().result.deploy_hash); } // install_deploy @@ -1024,7 +1036,7 @@ MC4CAQAwBQYDK2VwBCIEII8ULlk1CJ12ZQ+bScjBt/IxMAZNggClWqK56D1/7CbI let deploy_hash = install.as_ref().unwrap().result.deploy_hash; // println!("{:?}", deploy_hash_result); let deploy_hash_as_string = deploy_hash.to_hex_string(); - println!("wait deploy_hash {}", deploy_hash_as_string); + println!("wait deploy_hash {deploy_hash_as_string}"); let event_parse_result: EventParseResult = sdk .wait_deploy(DEFAULT_EVENT_ADDRESS, &deploy_hash_as_string, None) .await