From 48160d1f3a83e82c468c4580364a6f57a735e354 Mon Sep 17 00:00:00 2001 From: gRoussac Date: Sun, 9 Jun 2024 12:08:33 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20@=20casper-e?= =?UTF-8?q?cosystem/rustSDK@323f3c53ee41cfc50037007fe74d21a155b25853=20?= =?UTF-8?q?=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../casper_rust_wasm_sdk-desc-0-.js | 1 + .../contract/call_entrypoint_deploy.rs.html | 635 +++++ .../sdk/contract/install_deploy.rs.html | 637 +++++ .../sdk/rpcs/get_entity.rs.html | 773 ++++++ .../sdk/rpcs/get_transaction.rs.html | 727 +++++ .../sdk/rpcs/put_transaction.rs.html | 363 +++ .../sdk/rpcs/query_balance_details.rs.html | 1031 +++++++ .../sdk/rpcs/speculative_exec_deploy.rs.html | 661 +++++ .../sdk/transaction/mod.rs.html | 13 + .../speculative_transaction.rs.html | 583 ++++ .../speculative_transfer_transaction.rs.html | 577 ++++ .../sdk/transaction/transaction.rs.html | 545 ++++ .../transaction/transfer_transaction.rs.html | 461 ++++ .../make_transaction.rs.html | 371 +++ .../make_transfer_transaction.rs.html | 449 ++++ .../sdk/transaction_utils/mod.rs.html | 15 + .../sign_transaction.rs.html | 303 +++ .../sdk/watcher/mod.rs.html | 15 + .../sdk/watcher/watcher.rs.html | 2363 +++++++++++++++++ .../types/addr/entity_addr.rs.html | 205 ++ .../types/addressable_entity_hash.rs.html | 183 ++ .../types/entity_identifier.rs.html | 279 ++ .../types/package_hash.rs.html | 177 ++ .../types/transaction.rs.html | 1627 ++++++++++++ .../types/transaction_hash.rs.html | 159 ++ .../types/transaction_params/mod.rs.html | 5 + .../transaction_builder_params.rs.html | 1005 +++++++ .../transaction_str_params.rs.html | 859 ++++++ .../static.files/main-20a3ad099b048cf2.js | 11 + .../noscript-df360f571f6edeae.css | 1 + .../static.files/rustdoc-dd39b87e5fcfba68.css | 46 + .../static.files/search-d52510db62a78183.js | 5 + .../static.files/storage-118b08c4c78b968e.js | 24 + api-wasm/classes/AccessRights.html | 4 +- api-wasm/classes/AccountHash.html | 4 +- api-wasm/classes/AccountIdentifier.html | 4 +- api-wasm/classes/ArgsSimple.html | 4 +- api-wasm/classes/BlockHash.html | 4 +- api-wasm/classes/BlockIdentifier.html | 4 +- api-wasm/classes/Body.html | 4 +- api-wasm/classes/Bytes.html | 4 +- api-wasm/classes/CLType.html | 4 +- api-wasm/classes/ContractHash.html | 4 +- api-wasm/classes/ContractPackageHash.html | 4 +- api-wasm/classes/Deploy.html | 4 +- api-wasm/classes/DeployHash.html | 4 +- api-wasm/classes/DeployProcessed.html | 6 +- api-wasm/classes/DeployStrParams.html | 4 +- api-wasm/classes/DeploySubscription.html | 8 +- api-wasm/classes/DeployWatcher.html | 12 +- api-wasm/classes/DictionaryAddr.html | 4 +- .../classes/DictionaryItemIdentifier.html | 4 +- api-wasm/classes/DictionaryItemStrParams.html | 4 +- api-wasm/classes/Digest.html | 4 +- api-wasm/classes/EraId.html | 4 +- api-wasm/classes/EventParseResult.html | 4 +- api-wasm/classes/ExecutionResult.html | 6 +- api-wasm/classes/Failure.html | 4 +- api-wasm/classes/GetAccountResult.html | 4 +- api-wasm/classes/GetAuctionInfoResult.html | 8 +- api-wasm/classes/GetBalanceResult.html | 10 +- api-wasm/classes/GetBlockResult.html | 8 +- api-wasm/classes/GetBlockTransfersResult.html | 10 +- api-wasm/classes/GetChainspecResult.html | 8 +- api-wasm/classes/GetDeployResult.html | 8 +- api-wasm/classes/GetDictionaryItemResult.html | 12 +- api-wasm/classes/GetEraInfoResult.html | 4 +- api-wasm/classes/GetEraSummaryResult.html | 8 +- api-wasm/classes/GetNodeStatusResult.html | 32 +- api-wasm/classes/GetPeersResult.html | 8 +- api-wasm/classes/GetStateRootHashResult.html | 12 +- .../classes/GetValidatorChangesResult.html | 8 +- api-wasm/classes/GlobalStateIdentifier.html | 4 +- api-wasm/classes/HashAddr.html | 4 +- .../classes/IntoUnderlyingByteSource.html | 4 +- api-wasm/classes/IntoUnderlyingSink.html | 4 +- api-wasm/classes/IntoUnderlyingSource.html | 4 +- api-wasm/classes/Key.html | 4 +- api-wasm/classes/ListRpcsResult.html | 10 +- api-wasm/classes/Path.html | 4 +- api-wasm/classes/PaymentStrParams.html | 4 +- api-wasm/classes/PeerEntry.html | 4 +- api-wasm/classes/PublicKey.html | 4 +- api-wasm/classes/PurseIdentifier.html | 4 +- api-wasm/classes/PutDeployResult.html | 8 +- api-wasm/classes/QueryBalanceResult.html | 8 +- api-wasm/classes/QueryGlobalStateResult.html | 12 +- api-wasm/classes/SDK.html | 102 +- api-wasm/classes/SessionStrParams.html | 4 +- api-wasm/classes/SpeculativeExecResult.html | 10 +- api-wasm/classes/Success.html | 4 +- api-wasm/classes/TransferAddr.html | 4 +- api-wasm/classes/URef.html | 4 +- api-wasm/classes/URefAddr.html | 4 +- api-wasm/classes/getAccountOptions.html | 4 +- api-wasm/classes/getAuctionInfoOptions.html | 4 +- api-wasm/classes/getBalanceOptions.html | 4 +- api-wasm/classes/getBlockOptions.html | 4 +- .../classes/getBlockTransfersOptions.html | 4 +- api-wasm/classes/getDeployOptions.html | 4 +- .../classes/getDictionaryItemOptions.html | 4 +- api-wasm/classes/getEraInfoOptions.html | 4 +- api-wasm/classes/getEraSummaryOptions.html | 4 +- .../classes/getSpeculativeExecOptions.html | 14 +- api-wasm/classes/getStateRootHashOptions.html | 4 +- api-wasm/classes/queryBalanceOptions.html | 4 +- .../classes/queryContractDictOptions.html | 4 +- api-wasm/classes/queryContractKeyOptions.html | 4 +- api-wasm/classes/queryGlobalStateOptions.html | 4 +- api-wasm/enums/CLTypeEnum.html | 4 +- api-wasm/enums/Verbosity.html | 4 +- api-wasm/functions/accountHashToBase64.html | 2 +- api-wasm/functions/default.html | 2 +- api-wasm/functions/encodeLowerBlake2b.html | 2 +- api-wasm/functions/fromTransfer.html | 2 +- api-wasm/functions/generatePrivateKey.html | 2 +- .../generatePrivateKey_secp256k1.html | 2 +- api-wasm/functions/getTimestamp.html | 2 +- api-wasm/functions/hexToString.html | 2 +- api-wasm/functions/hexToUint8Array.html | 2 +- api-wasm/functions/initSync.html | 2 +- api-wasm/functions/jsonPrettyPrint.html | 2 +- api-wasm/functions/makeDictionaryItemKey.html | 2 +- api-wasm/functions/motesToCSPR.html | 2 +- api-wasm/functions/privateToPublicKey.html | 2 +- api-wasm/functions/uint8ArrayToBytes.html | 2 +- api-wasm/interfaces/InitOutput.html | 4 +- api-wasm/types/InitInput.html | 2 +- api-wasm/types/SyncInitInput.html | 2 +- 129 files changed, 15402 insertions(+), 293 deletions(-) create mode 100644 api-rust/search.desc/casper_rust_wasm_sdk/casper_rust_wasm_sdk-desc-0-.js create mode 100644 api-rust/src/casper_rust_wasm_sdk/sdk/contract/call_entrypoint_deploy.rs.html create mode 100644 api-rust/src/casper_rust_wasm_sdk/sdk/contract/install_deploy.rs.html create mode 100644 api-rust/src/casper_rust_wasm_sdk/sdk/rpcs/get_entity.rs.html create mode 100644 api-rust/src/casper_rust_wasm_sdk/sdk/rpcs/get_transaction.rs.html create mode 100644 api-rust/src/casper_rust_wasm_sdk/sdk/rpcs/put_transaction.rs.html create mode 100644 api-rust/src/casper_rust_wasm_sdk/sdk/rpcs/query_balance_details.rs.html create mode 100644 api-rust/src/casper_rust_wasm_sdk/sdk/rpcs/speculative_exec_deploy.rs.html create mode 100644 api-rust/src/casper_rust_wasm_sdk/sdk/transaction/mod.rs.html create mode 100644 api-rust/src/casper_rust_wasm_sdk/sdk/transaction/speculative_transaction.rs.html create mode 100644 api-rust/src/casper_rust_wasm_sdk/sdk/transaction/speculative_transfer_transaction.rs.html create mode 100644 api-rust/src/casper_rust_wasm_sdk/sdk/transaction/transaction.rs.html create mode 100644 api-rust/src/casper_rust_wasm_sdk/sdk/transaction/transfer_transaction.rs.html create mode 100644 api-rust/src/casper_rust_wasm_sdk/sdk/transaction_utils/make_transaction.rs.html create mode 100644 api-rust/src/casper_rust_wasm_sdk/sdk/transaction_utils/make_transfer_transaction.rs.html create mode 100644 api-rust/src/casper_rust_wasm_sdk/sdk/transaction_utils/mod.rs.html create mode 100644 api-rust/src/casper_rust_wasm_sdk/sdk/transaction_utils/sign_transaction.rs.html create mode 100644 api-rust/src/casper_rust_wasm_sdk/sdk/watcher/mod.rs.html create mode 100644 api-rust/src/casper_rust_wasm_sdk/sdk/watcher/watcher.rs.html create mode 100644 api-rust/src/casper_rust_wasm_sdk/types/addr/entity_addr.rs.html create mode 100644 api-rust/src/casper_rust_wasm_sdk/types/addressable_entity_hash.rs.html create mode 100644 api-rust/src/casper_rust_wasm_sdk/types/entity_identifier.rs.html create mode 100644 api-rust/src/casper_rust_wasm_sdk/types/package_hash.rs.html create mode 100644 api-rust/src/casper_rust_wasm_sdk/types/transaction.rs.html create mode 100644 api-rust/src/casper_rust_wasm_sdk/types/transaction_hash.rs.html create mode 100644 api-rust/src/casper_rust_wasm_sdk/types/transaction_params/mod.rs.html create mode 100644 api-rust/src/casper_rust_wasm_sdk/types/transaction_params/transaction_builder_params.rs.html create mode 100644 api-rust/src/casper_rust_wasm_sdk/types/transaction_params/transaction_str_params.rs.html create mode 100644 api-rust/static.files/main-20a3ad099b048cf2.js create mode 100644 api-rust/static.files/noscript-df360f571f6edeae.css create mode 100644 api-rust/static.files/rustdoc-dd39b87e5fcfba68.css create mode 100644 api-rust/static.files/search-d52510db62a78183.js create mode 100644 api-rust/static.files/storage-118b08c4c78b968e.js diff --git a/api-rust/search.desc/casper_rust_wasm_sdk/casper_rust_wasm_sdk-desc-0-.js b/api-rust/search.desc/casper_rust_wasm_sdk/casper_rust_wasm_sdk-desc-0-.js new file mode 100644 index 000000000..ad5a38b5e --- /dev/null +++ b/api-rust/search.desc/casper_rust_wasm_sdk/casper_rust_wasm_sdk-desc-0-.js @@ -0,0 +1 @@ +searchState.loadedDescShard("casper_rust_wasm_sdk", 0, "Calls a smart contract entry point with the specified …\nPerform a deploy operation.\nReturns the argument unchanged.\nRetrieves account information based on the provided …\nRetrieves auction information based on the provided …\nRetrieves balance information based on the provided …\nRetrieves block information using the provided options.\nRetrieves block transfers information based on the …\nAsynchronously retrieves the chainspec.\nRetrieves deploy information based on the provided options.\nRetrieves dictionary item information based on the …\nRetrieves era summary information based on the provided …\nRetrieves node status information based on the provided …\nRetrieves peers.\nRetrieves state root hash information based on the …\nRetrieves validator changes based on the provided options.\nInstalls a smart contract with the specified parameters …\nCalls U::from(self).\nLists available RPCs based on the provided options.\nCreates a deploy using the provided parameters.\nCreates a transfer deploy with the provided parameters.\nPuts a deploy based on the provided options.\nRetrieves balance information based on the provided …\nQuery a contract dictionary item.\nQuery a contract key.\nRetrieves global state information based on the provided …\nBuilds parameters for querying global state based on the …\nSigns a deploy using the provided secret key.\nThis function allows executing a deploy speculatively.\nPerform speculative execution.\nPerform a speculative transfer.\nPerform a transfer of funds.\nWaits for a deploy event to be processed asynchronously.\nCreates a new DeployWatcher instance to watch deploys.\nRepresents the body of an event, containing processed …\nRepresents processed deploy information.\nRepresents a subscription to deploy events for non-wasm32 …\nRepresents a deploy watcher responsible for monitoring …\nA wrapper for an event handler function, providing …\nRepresents the result of parsing an event, containing …\nRepresents the result of an execution, either Success or …\nRepresents a failure response containing an error message.\nRepresents a success response containing a cost value.\nCalls the stored event handling function with the provided …\nImplements the Clone trait for creating a cloned instance …\nImplements the Default trait, creating a default instance …\nDeploy hash to identify the subscription.\nHandler function for deploy events.\nResult of the execution, either Success or Failure.\nOptional Failure information.\nImplements the Debug trait for better debugging support.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCreates a new EventHandlerFn with the specified event …\nCreates a new DeployWatcher instance.\nConstructor for DeploySubscription for non-wasm32 target …\nAsynchronously starts watching for deploy events and …\nStops watching for deploy events.\nSubscribes to deploy events.\nOptional Success information.\nUnsubscribes from deploy events based on the provided …\nConverts a CLValue to a JSON Value.\nConvert a formatted account hash to a base64-encoded …\nComputes the Blake2b hash of the provided metadata.\nGets the current timestamp.\nGets the gas price or returns the default value if not …\nGets the time to live (TTL) value or returns the default …\nConverts a hexadecimal string to a regular string.\nConverts a hexadecimal string to a vector of unsigned …\nPretty prints a serializable value as a JSON string.\nCreates a dictionary item key by concatenating the …\nConverts motes to CSPR (Casper tokens).\nParses a timestamp string into a Timestamp object.\nParses a TTL (time to live) string into a TimeDiff object.\nConverts a secret key in PEM format to its corresponding …\nParses a secret key in PEM format into a SecretKey object.\nGenerates a secret key using the Ed25519 algorithm.\nGenerates a secret key using the secp256k1 algorithm.\nEnum representing different ways to specify the purse uref.\nReturns the argument unchanged.\nCalls U::from(self).\nReturns the argument unchanged.\nCalls U::from(self).\nEnum to represent input for KeyIdentifier.\nEnum to represent input for PathIdentifier.\nOptions for the query_global_state method.\nStruct to store parameters for querying global state.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nReturns the argument unchanged.\nCalls U::from(self).\nReturns the argument unchanged.\nCalls U::from(self).\nReturns the argument unchanged.\nCalls U::from(self).\nReturns the argument unchanged.\nCalls U::from(self).\nReturns the argument unchanged.\nCalls U::from(self).\nReturns the argument unchanged.\nCalls U::from(self).\nReturns the argument unchanged.\nCalls U::from(self).\nReturns the argument unchanged.\nCalls U::from(self).\nReturns the argument unchanged.\nReturns the argument unchanged.\nCalls U::from(self).\nCalls U::from(self).\nReturns the argument unchanged.\nCalls U::from(self).\nReturns the argument unchanged.\nReturns the argument unchanged.\nCalls U::from(self).\nCalls U::from(self).\nReturns the argument unchanged.\nCalls U::from(self).\nReturns the argument unchanged.\nCalls U::from(self).\nReturns the argument unchanged.\nCalls U::from(self).\nReturns the argument unchanged.\nCalls U::from(self).\nReturns the argument unchanged.\nCalls U::from(self).\nReturns the argument unchanged.\nCalls U::from(self).\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nReturns the argument unchanged.\nCalls U::from(self).\nReturns the argument unchanged.\nCalls U::from(self).\nReturns the argument unchanged.\nCalls U::from(self).\nReturns the argument unchanged.\nCalls U::from(self).\nReturns the argument unchanged.\nCalls U::from(self).\nReturns the argument unchanged.\nCalls U::from(self).\nReturns the argument unchanged.\nCalls U::from(self).\nReturns the argument unchanged.\nCalls U::from(self).\nReturns the argument unchanged.\nCalls U::from(self).\nReturns the argument unchanged.\nCalls U::from(self).\nReturns the argument unchanged.\nCalls U::from(self).\nReturns the argument unchanged.\nCalls U::from(self).\nReturns the argument unchanged.\nCalls U::from(self).\nReturns the argument unchanged.\nCalls U::from(self).") \ No newline at end of file diff --git a/api-rust/src/casper_rust_wasm_sdk/sdk/contract/call_entrypoint_deploy.rs.html b/api-rust/src/casper_rust_wasm_sdk/sdk/contract/call_entrypoint_deploy.rs.html new file mode 100644 index 000000000..afef057e1 --- /dev/null +++ b/api-rust/src/casper_rust_wasm_sdk/sdk/contract/call_entrypoint_deploy.rs.html @@ -0,0 +1,635 @@ +call_entrypoint_deploy.rs - source
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+
#[cfg(target_arch = "wasm32")]
+use crate::deploy::deploy::PutDeployResult;
+use crate::types::deploy_params::{
+    deploy_str_params::{deploy_str_params_to_casper_client, DeployStrParams},
+    payment_str_params::{payment_str_params_to_casper_client, PaymentStrParams},
+    session_str_params::{session_str_params_to_casper_client, SessionStrParams},
+};
+use crate::{debug::error, types::sdk_error::SdkError, SDK};
+use casper_client::{
+    cli::deploy::make_deploy, rpcs::results::PutDeployResult as _PutDeployResult, SuccessResponse,
+};
+#[cfg(target_arch = "wasm32")]
+use wasm_bindgen::prelude::*;
+
+/// A set of functions for working with smart contract entry points.
+#[cfg(target_arch = "wasm32")]
+#[wasm_bindgen]
+impl SDK {
+    /// 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.
+    /// * `node_address` - An optional node 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.
+    #[wasm_bindgen(js_name = "call_entrypoint_deploy")]
+    #[deprecated(note = "prefer 'call_entrypoint' with transaction")]
+    #[allow(deprecated)]
+    pub async fn call_entrypoint_deploy_js_alias(
+        &self,
+        deploy_params: DeployStrParams,
+        session_params: SessionStrParams,
+        payment_amount: &str,
+        node_address: Option<String>,
+    ) -> Result<PutDeployResult, JsError> {
+        let payment_params = PaymentStrParams::default();
+        payment_params.set_payment_amount(payment_amount);
+
+        let result = self
+            .call_entrypoint_deploy(deploy_params, session_params, payment_params, node_address)
+            .await;
+        match result {
+            Ok(data) => Ok(data.result.into()),
+            Err(err) => {
+                let err = &format!("Error occurred with {:?}", err);
+                error(err);
+                Err(JsError::new(err))
+            }
+        }
+    }
+}
+
+/// A set of functions for working with smart contract entry points.
+/// Alias of sdk.deploy
+impl SDK {
+    /// 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_params` - The payment parameters.
+    /// * `node_address` - An optional node address to send the request to.
+    ///
+    /// # Returns
+    ///
+    /// A `Result` containing either a `_PutDeployResult` or a `SdkError` in case of an error.
+    ///
+    /// # Errors
+    ///
+    /// Returns a `SdkError` if there is an error during the call.
+    #[deprecated(note = "prefer 'call_entrypoint' with transaction")]
+    #[allow(deprecated)]
+    pub async fn call_entrypoint_deploy(
+        &self,
+        deploy_params: DeployStrParams,
+        session_params: SessionStrParams,
+        payment_params: PaymentStrParams,
+        node_address: Option<String>,
+    ) -> Result<SuccessResponse<_PutDeployResult>, SdkError> {
+        //log("call_entrypoint_deploy!");
+        let deploy = make_deploy(
+            "",
+            deploy_str_params_to_casper_client(&deploy_params),
+            session_str_params_to_casper_client(&session_params),
+            payment_str_params_to_casper_client(&payment_params),
+            false,
+        );
+
+        if let Err(err) = deploy {
+            let err_msg = format!("Error during install: {}", err);
+            error(&err_msg);
+            return Err(SdkError::from(err));
+        }
+
+        self.put_deploy(deploy.unwrap().into(), None, node_address)
+            .await
+            .map_err(SdkError::from)
+    }
+}
+
+#[cfg(test)]
+#[allow(deprecated)]
+mod tests {
+    use super::*;
+    use crate::{helpers::public_key_from_secret_key, install_cep78};
+    use sdk_tests::{
+        config::{ARGS_SIMPLE, ENTRYPOINT_MINT, PAYMENT_AMOUNT, TTL},
+        tests::helpers::{get_network_constants, get_user_private_key},
+    };
+    use tokio;
+
+    async fn get_contract_hash() -> String {
+        install_cep78().await
+    }
+
+    #[tokio::test]
+    async fn test_call_entrypoint_deploy_with_none_values() {
+        // Arrange
+        let sdk = SDK::new(None, None);
+        let deploy_params = DeployStrParams::new("", "", None, None, None, None);
+        let session_params = SessionStrParams::default();
+        let payment_params = PaymentStrParams::default();
+
+        let error_message =
+            "Invalid argument 'is_session_transfer': requires --session-arg to be present";
+
+        // Act
+        let result = sdk
+            .call_entrypoint_deploy(deploy_params, session_params, payment_params, None)
+            .await;
+
+        // Assert
+        assert!(result.is_err());
+        let err_string = result.err().unwrap().to_string();
+        assert!(err_string.contains(error_message));
+    }
+
+    #[tokio::test]
+    async fn test_call_entrypoint_deploy_with_valid_input() {
+        // Arrange
+        let sdk = SDK::new(None, None);
+        let (node_address, _, _, chain_name) = get_network_constants();
+        let private_key = get_user_private_key(None).unwrap();
+        let account = public_key_from_secret_key(&private_key).unwrap();
+
+        let deploy_params =
+            DeployStrParams::new(&chain_name, &account, Some(private_key), None, None, None);
+
+        let payment_params = PaymentStrParams::default();
+        payment_params.set_payment_amount(PAYMENT_AMOUNT);
+
+        let mut session_params = SessionStrParams::default();
+        session_params.set_session_hash(&get_contract_hash().await);
+        session_params.set_session_entry_point(ENTRYPOINT_MINT);
+        let args_simple: Vec<String> = ARGS_SIMPLE.iter().map(|s| s.to_string()).collect();
+        session_params.set_session_args(args_simple);
+
+        // Act
+        let result = sdk
+            .call_entrypoint_deploy(
+                deploy_params,
+                session_params,
+                payment_params,
+                Some(node_address),
+            )
+            .await;
+
+        // Assert
+        // dbg!(result);
+        assert!(result.is_ok());
+        let deploy_hash = result.unwrap().result.deploy_hash;
+        assert!(!deploy_hash.to_string().is_empty());
+    }
+
+    #[tokio::test]
+    async fn test_call_entrypoint_deploy_with_invalid_input() {
+        // Arrange
+        let sdk = SDK::new(None, None);
+        let (node_address, _, _, chain_name) = get_network_constants();
+        let private_key = get_user_private_key(None).unwrap();
+        let account = public_key_from_secret_key(&private_key).unwrap();
+
+        let error_message =
+            "Missing a required arg - exactly one of the following must be provided";
+
+        let deploy_params = DeployStrParams::new(
+            &chain_name,
+            &account,
+            Some(private_key.clone()),
+            None,
+            Some(TTL.to_string()),
+            None,
+        );
+
+        let payment_params = PaymentStrParams::default();
+        payment_params.set_payment_amount(""); // This is not valid payment amount
+
+        let mut session_params = SessionStrParams::default();
+        session_params.set_session_hash(
+            "hash-cfa781f5eb69c3eee952c2944ce9670a049f88c5e46b83fb5881ebe13fb98e6d",
+        );
+        session_params.set_session_entry_point(ENTRYPOINT_MINT);
+        let args_simple: Vec<String> = ARGS_SIMPLE.iter().map(|s| s.to_string()).collect();
+        session_params.set_session_args(args_simple);
+
+        // Act
+        let result = sdk
+            .call_entrypoint_deploy(
+                deploy_params,
+                session_params,
+                payment_params,
+                Some(node_address),
+            )
+            .await;
+
+        // Assert
+        assert!(result.is_err());
+        let err_string = result.err().unwrap().to_string();
+        assert!(err_string.contains(error_message));
+    }
+
+    #[tokio::test]
+    async fn test_call_entrypoint_deploy_without_private_key() {
+        // Arrange
+        let sdk = SDK::new(None, None);
+        let (node_address, _, _, chain_name) = get_network_constants();
+        let private_key = get_user_private_key(None).unwrap();
+        let account = public_key_from_secret_key(&private_key).unwrap();
+
+        let error_message = "the deploy was invalid: The transaction or deploy sent to the network was invalid for an unspecified reason";
+
+        let deploy_params = DeployStrParams::new(
+            &chain_name,
+            &account,
+            None,
+            None,
+            Some(TTL.to_string()),
+            None,
+        );
+        let payment_params = PaymentStrParams::default();
+        payment_params.set_payment_amount(PAYMENT_AMOUNT);
+
+        let mut session_params = SessionStrParams::default();
+        session_params.set_session_hash(
+            "hash-cfa781f5eb69c3eee952c2944ce9670a049f88c5e46b83fb5881ebe13fb98e6d",
+        );
+        session_params.set_session_entry_point(ENTRYPOINT_MINT);
+        let args_simple: Vec<String> = ARGS_SIMPLE.iter().map(|s| s.to_string()).collect();
+        session_params.set_session_args(args_simple);
+
+        // Act
+        let result = sdk
+            .call_entrypoint_deploy(
+                deploy_params,
+                session_params,
+                payment_params,
+                Some(node_address),
+            )
+            .await;
+
+        // Assert
+        assert!(result.is_err());
+        let err_string = result.err().unwrap().to_string();
+        assert!(err_string.contains(error_message));
+    }
+
+    #[tokio::test]
+    async fn test_call_entrypoint_deploy_with_error() {
+        // Arrange
+        let sdk = SDK::new(Some("http://localhost".to_string()), None);
+        let (_, _, _, chain_name) = get_network_constants();
+        let private_key = get_user_private_key(None).unwrap();
+        let account = public_key_from_secret_key(&private_key).unwrap();
+
+        let deploy_params = DeployStrParams::new(
+            &chain_name,
+            &account,
+            Some(private_key.clone()),
+            None,
+            None,
+            None,
+        );
+
+        let error_message = "error sending request for url (http://localhost/rpc)";
+
+        let payment_params = PaymentStrParams::default();
+        payment_params.set_payment_amount(PAYMENT_AMOUNT);
+
+        let mut session_params = SessionStrParams::default();
+        session_params.set_session_hash(
+            "hash-cfa781f5eb69c3eee952c2944ce9670a049f88c5e46b83fb5881ebe13fb98e6d",
+        );
+        session_params.set_session_entry_point(ENTRYPOINT_MINT);
+        let args_simple: Vec<String> = ARGS_SIMPLE.iter().map(|s| s.to_string()).collect();
+        session_params.set_session_args(args_simple);
+
+        // Act
+        let result = sdk
+            .call_entrypoint_deploy(deploy_params, session_params, payment_params, None)
+            .await;
+
+        // Assert
+        assert!(result.is_err());
+        let err_string = result.err().unwrap().to_string();
+        assert!(err_string.contains(error_message));
+    }
+}
+
\ No newline at end of file diff --git a/api-rust/src/casper_rust_wasm_sdk/sdk/contract/install_deploy.rs.html b/api-rust/src/casper_rust_wasm_sdk/sdk/contract/install_deploy.rs.html new file mode 100644 index 000000000..3c7e8f39a --- /dev/null +++ b/api-rust/src/casper_rust_wasm_sdk/sdk/contract/install_deploy.rs.html @@ -0,0 +1,637 @@ +install_deploy.rs - source
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+
#[cfg(target_arch = "wasm32")]
+use crate::deploy::deploy::PutDeployResult;
+use crate::types::deploy_params::{
+    deploy_str_params::{deploy_str_params_to_casper_client, DeployStrParams},
+    payment_str_params::{payment_str_params_to_casper_client, PaymentStrParams},
+    session_str_params::{session_str_params_to_casper_client, SessionStrParams},
+};
+use crate::{debug::error, types::sdk_error::SdkError, SDK};
+use casper_client::{
+    cli::deploy::make_deploy, rpcs::results::PutDeployResult as _PutDeployResult, SuccessResponse,
+};
+#[cfg(target_arch = "wasm32")]
+use wasm_bindgen::prelude::*;
+
+/// A set of functions for installing smart contracts on the blockchain.
+#[cfg(target_arch = "wasm32")]
+#[wasm_bindgen]
+impl SDK {
+    /// Installs a smart contract 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.
+    /// * `node_address` - An optional node 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 installation.
+    #[wasm_bindgen(js_name = "install_deploy")]
+    #[deprecated(note = "prefer 'install' with transaction")]
+    #[allow(deprecated)]
+    pub async fn install_deploy_js_alias(
+        &self,
+        deploy_params: DeployStrParams,
+        session_params: SessionStrParams,
+        payment_amount: &str,
+        node_address: Option<String>,
+    ) -> Result<PutDeployResult, JsError> {
+        let result = self
+            .install_deploy(deploy_params, session_params, payment_amount, node_address)
+            .await;
+        match result {
+            Ok(data) => Ok(data.result.into()),
+            Err(err) => {
+                let err = &format!("Error occurred with {:?}", err);
+                error(err);
+                Err(JsError::new(err))
+            }
+        }
+    }
+}
+
+/// A set of functions for installing smart contracts on the blockchain.
+/// Alias of sdk.deploy
+impl SDK {
+    /// Installs a smart contract 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.
+    /// * `node_address` - An optional node address to send the request to.
+    ///
+    /// # Returns
+    ///
+    /// A `Result` containing either a `_PutDeployResult` or a `SdkError` in case of an error.
+    ///
+    /// # Errors
+    ///
+    /// Returns a `SdkError` if there is an error during the installation.
+    #[deprecated(note = "prefer 'install' with transaction")]
+    #[allow(deprecated)]
+    pub async fn install_deploy(
+        &self,
+        deploy_params: DeployStrParams,
+        session_params: SessionStrParams,
+        payment_amount: &str,
+        node_address: Option<String>,
+    ) -> Result<SuccessResponse<_PutDeployResult>, SdkError> {
+        //log("install!");
+        let payment_params = PaymentStrParams::default();
+        payment_params.set_payment_amount(payment_amount);
+
+        let deploy = make_deploy(
+            "",
+            deploy_str_params_to_casper_client(&deploy_params),
+            session_str_params_to_casper_client(&session_params),
+            payment_str_params_to_casper_client(&payment_params),
+            false,
+        );
+        if let Err(err) = deploy {
+            let err_msg = format!("Error during install: {}", err);
+            error(&err_msg);
+            return Err(SdkError::from(err));
+        }
+        self.put_deploy(deploy.unwrap().into(), None, node_address)
+            .await
+            .map_err(SdkError::from)
+    }
+}
+
+#[cfg(test)]
+#[allow(deprecated)]
+mod tests {
+    use super::*;
+    use crate::helpers::public_key_from_secret_key;
+    use sdk_tests::{
+        config::{ARGS_SIMPLE, HELLO_CONTRACT, PAYMENT_AMOUNT, TTL, WASM_PATH},
+        tests::helpers::{get_network_constants, get_user_private_key, read_wasm_file},
+    };
+    use tokio;
+
+    #[tokio::test]
+    async fn test_install_deploy_with_none_values() {
+        // Arrange
+        let sdk = SDK::new(None, None);
+        let deploy_params = DeployStrParams::new("", "", None, None, None, None);
+        let session_params = SessionStrParams::default();
+
+        let error_message =
+            "Invalid argument 'is_session_transfer': requires --session-arg to be present";
+
+        // Act
+        let result = sdk
+            .install_deploy(deploy_params, session_params, "", None)
+            .await;
+
+        // Assert
+        assert!(result.is_err());
+        let err_string = result.err().unwrap().to_string();
+        assert!(err_string.contains(error_message));
+    }
+
+    #[tokio::test]
+    async fn test_install_deploy_with_valid_input() {
+        // Arrange
+        let sdk = SDK::new(None, None);
+        let (node_address, _, _, chain_name) = get_network_constants();
+        let private_key = get_user_private_key(None).unwrap();
+        let account = public_key_from_secret_key(&private_key).unwrap();
+
+        let deploy_params =
+            DeployStrParams::new(&chain_name, &account, Some(private_key), None, None, None);
+        let mut session_params = SessionStrParams::default();
+
+        let module_bytes = match read_wasm_file(&format!("{WASM_PATH}{HELLO_CONTRACT}")) {
+            Ok(module_bytes) => module_bytes,
+            Err(err) => {
+                eprintln!("Error reading file: {:?}", err);
+                return;
+            }
+        };
+        session_params.set_session_bytes(module_bytes.into());
+        let args_simple: Vec<String> = ARGS_SIMPLE.iter().map(|s| s.to_string()).collect();
+        session_params.set_session_args(args_simple);
+
+        // Act
+        let result = sdk
+            .install_deploy(
+                deploy_params,
+                session_params,
+                PAYMENT_AMOUNT,
+                Some(node_address),
+            )
+            .await;
+
+        // Assert
+
+        assert!(result.is_ok());
+        let deploy_hash = result.unwrap().result.deploy_hash;
+        assert!(!deploy_hash.to_string().is_empty());
+    }
+
+    #[tokio::test]
+    async fn test_install_deploy_with_invalid_input() {
+        // Arrange
+        let sdk = SDK::new(None, None);
+        let (node_address, _, _, chain_name) = get_network_constants();
+        let private_key = get_user_private_key(None).unwrap();
+        let account = public_key_from_secret_key(&private_key).unwrap();
+
+        let error_message =
+            "Missing a required arg - exactly one of the following must be provided";
+
+        let deploy_params = DeployStrParams::new(
+            &chain_name,
+            &account,
+            Some(private_key.clone()),
+            None,
+            Some(TTL.to_string()),
+            None,
+        );
+        let mut session_params = SessionStrParams::default();
+
+        let module_bytes = match read_wasm_file(&format!("{WASM_PATH}{HELLO_CONTRACT}")) {
+            Ok(module_bytes) => module_bytes,
+            Err(err) => {
+                eprintln!("Error reading file: {:?}", err);
+                return;
+            }
+        };
+        session_params.set_session_bytes(module_bytes.into());
+        let args_simple: Vec<String> = ARGS_SIMPLE.iter().map(|s| s.to_string()).collect();
+        session_params.set_session_args(args_simple);
+
+        // Act
+        let result = sdk
+            .install_deploy(
+                deploy_params,
+                session_params,
+                "", // This is not valid payment amount
+                Some(node_address),
+            )
+            .await;
+
+        // Assert
+        assert!(result.is_err());
+        let err_string = result.err().unwrap().to_string();
+        assert!(err_string.contains(error_message));
+    }
+
+    #[tokio::test]
+    async fn test_install_deploy_without_private_key() {
+        // Arrange
+        let sdk = SDK::new(None, None);
+        let (node_address, _, _, chain_name) = get_network_constants();
+        let private_key = get_user_private_key(None).unwrap();
+        let account = public_key_from_secret_key(&private_key).unwrap();
+
+        let error_message = "the deploy was invalid: The transaction or deploy sent to the network was invalid for an unspecified reason";
+
+        let deploy_params = DeployStrParams::new(
+            &chain_name,
+            &account,
+            None,
+            None,
+            Some(TTL.to_string()),
+            None,
+        );
+        let mut session_params = SessionStrParams::default();
+
+        let module_bytes = match read_wasm_file(&format!("{WASM_PATH}{HELLO_CONTRACT}")) {
+            Ok(module_bytes) => module_bytes,
+            Err(err) => {
+                eprintln!("Error reading file: {:?}", err);
+                return;
+            }
+        };
+        session_params.set_session_bytes(module_bytes.into());
+        let args_simple: Vec<String> = ARGS_SIMPLE.iter().map(|s| s.to_string()).collect();
+        session_params.set_session_args(args_simple);
+
+        // Act
+        let result = sdk
+            .install_deploy(
+                deploy_params,
+                session_params,
+                PAYMENT_AMOUNT,
+                Some(node_address),
+            )
+            .await;
+
+        // Assert
+        assert!(result.is_err());
+        let err_string = result.err().unwrap().to_string();
+        assert!(err_string.contains(error_message));
+    }
+
+    #[tokio::test]
+    async fn test_install_deploy_with_error() {
+        // Arrange
+        let sdk = SDK::new(Some("http://localhost".to_string()), None);
+        let (_, _, _, chain_name) = get_network_constants();
+        let private_key = get_user_private_key(None).unwrap();
+        let account = public_key_from_secret_key(&private_key).unwrap();
+
+        let deploy_params = DeployStrParams::new(
+            &chain_name,
+            &account,
+            Some(private_key.clone()),
+            None,
+            None,
+            None,
+        );
+
+        let error_message = "error sending request for url (http://localhost/rpc)";
+
+        let mut session_params = SessionStrParams::default();
+
+        let module_bytes = match read_wasm_file(&format!("{WASM_PATH}{HELLO_CONTRACT}")) {
+            Ok(module_bytes) => module_bytes,
+            Err(err) => {
+                eprintln!("Error reading file: {:?}", err);
+                return;
+            }
+        };
+        session_params.set_session_bytes(module_bytes.into());
+        let args_simple: Vec<String> = ARGS_SIMPLE.iter().map(|s| s.to_string()).collect();
+        session_params.set_session_args(args_simple);
+
+        // Act
+        let result = sdk
+            .install_deploy(deploy_params, session_params, PAYMENT_AMOUNT, None)
+            .await;
+
+        // Assert
+        assert!(result.is_err());
+        let err_string = result.err().unwrap().to_string();
+        assert!(err_string.contains(error_message));
+    }
+}
+
\ No newline at end of file diff --git a/api-rust/src/casper_rust_wasm_sdk/sdk/rpcs/get_entity.rs.html b/api-rust/src/casper_rust_wasm_sdk/sdk/rpcs/get_entity.rs.html new file mode 100644 index 000000000..e51864548 --- /dev/null +++ b/api-rust/src/casper_rust_wasm_sdk/sdk/rpcs/get_entity.rs.html @@ -0,0 +1,773 @@ +get_entity.rs - source
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
+339
+340
+341
+342
+343
+344
+345
+346
+347
+348
+349
+350
+351
+352
+353
+354
+355
+356
+357
+358
+359
+360
+361
+362
+363
+364
+365
+366
+367
+368
+369
+370
+371
+372
+373
+374
+375
+376
+377
+378
+379
+380
+381
+382
+383
+384
+385
+386
+
#[cfg(target_arch = "wasm32")]
+use crate::types::block_identifier::BlockIdentifier;
+use crate::{
+    debug::error,
+    types::{
+        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,
+};
+#[cfg(target_arch = "wasm32")]
+use gloo_utils::format::JsValueSerdeExt;
+use rand::Rng;
+#[cfg(target_arch = "wasm32")]
+use serde::{Deserialize, Serialize};
+#[cfg(target_arch = "wasm32")]
+use wasm_bindgen::prelude::*;
+
+// Define the GetAddressableEntityResult struct to wrap the result from Casper Client RPC call
+#[cfg(target_arch = "wasm32")]
+#[derive(Debug, Deserialize, Clone, Serialize)]
+#[wasm_bindgen]
+pub struct GetAddressableEntityResult(_GetAddressableEntityResult);
+
+// Implement conversions between GetAddressableEntityResult and _GetAddressableEntityResult
+#[cfg(target_arch = "wasm32")]
+impl From<GetAddressableEntityResult> for _GetAddressableEntityResult {
+    fn from(result: GetAddressableEntityResult) -> Self {
+        result.0
+    }
+}
+
+#[cfg(target_arch = "wasm32")]
+impl From<_GetAddressableEntityResult> for GetAddressableEntityResult {
+    fn from(result: _GetAddressableEntityResult) -> Self {
+        GetAddressableEntityResult(result)
+    }
+}
+
+#[cfg(target_arch = "wasm32")]
+#[wasm_bindgen]
+impl GetAddressableEntityResult {
+    // Define getters for various fields of GetAddressableEntityResult
+    #[wasm_bindgen(getter)]
+    pub fn api_version(&self) -> JsValue {
+        JsValue::from_serde(&self.0.api_version).unwrap()
+    }
+
+    #[wasm_bindgen(getter)]
+    pub fn entity_result(&self) -> JsValue {
+        JsValue::from_serde(&self.0.entity_result).unwrap()
+    }
+
+    #[wasm_bindgen(getter)]
+    pub fn merkle_proof(&self) -> String {
+        self.0.merkle_proof.clone()
+    }
+
+    #[wasm_bindgen(js_name = "toJson")]
+    pub fn to_json(&self) -> JsValue {
+        JsValue::from_serde(&self.0).unwrap_or(JsValue::null())
+    }
+}
+
+// Define options for the `get_entity` function
+#[derive(Debug, Deserialize, Clone, Default, Serialize)]
+#[cfg(target_arch = "wasm32")]
+#[wasm_bindgen(js_name = "getEntityOptions", getter_with_clone)]
+pub struct GetEntityOptions {
+    pub entity_identifier: Option<EntityIdentifier>,
+    pub entity_identifier_as_string: Option<String>,
+    pub maybe_block_id_as_string: Option<String>,
+    pub maybe_block_identifier: Option<BlockIdentifier>,
+    pub node_address: Option<String>,
+    pub verbosity: Option<Verbosity>,
+}
+
+#[cfg(target_arch = "wasm32")]
+#[wasm_bindgen]
+impl SDK {
+    // Deserialize options for `get_entity` from a JavaScript object
+    #[wasm_bindgen(js_name = "get_entity_options")]
+    pub fn get_entity_options(&self, options: JsValue) -> GetEntityOptions {
+        let options_result = options.into_serde::<GetEntityOptions>();
+        match options_result {
+            Ok(options) => options,
+            Err(err) => {
+                error(&format!("Error deserializing options: {:?}", err));
+                GetEntityOptions::default()
+            }
+        }
+    }
+
+    /// 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.
+    ///   - `node_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.
+    /// ```
+    #[wasm_bindgen(js_name = "get_entity")]
+    pub async fn get_entity_js_alias(
+        &self,
+        options: Option<GetEntityOptions>,
+    ) -> Result<GetAddressableEntityResult, JsError> {
+        let GetEntityOptions {
+            entity_identifier,
+            entity_identifier_as_string,
+            maybe_block_id_as_string,
+            maybe_block_identifier,
+            verbosity,
+            node_address,
+        } = options.unwrap_or_default();
+
+        let maybe_block_identifier = if let Some(maybe_block_identifier) = maybe_block_identifier {
+            Some(BlockIdentifierInput::BlockIdentifier(
+                maybe_block_identifier,
+            ))
+        } else {
+            maybe_block_id_as_string.map(BlockIdentifierInput::String)
+        };
+
+        let result = self
+            .get_entity(
+                entity_identifier,
+                entity_identifier_as_string,
+                maybe_block_identifier,
+                verbosity,
+                node_address,
+            )
+            .await;
+        match result {
+            Ok(data) => Ok(data.result.into()),
+            Err(err) => {
+                let err = &format!("Error occurred with {:?}", err);
+                error(err);
+                Err(JsError::new(err))
+            }
+        }
+    }
+
+    // JavaScript alias for `get_entity`
+    #[wasm_bindgen(js_name = "state_get_entity")]
+    pub async fn state_get_entity(
+        &self,
+        options: Option<GetEntityOptions>,
+    ) -> Result<GetAddressableEntityResult, JsError> {
+        self.get_entity_js_alias(options).await
+    }
+}
+
+impl SDK {
+    /// Retrieves account information based on the provided options.
+    ///
+    /// # Arguments
+    ///
+    /// * `entity_identifier` - An optional `EntityIdentifier` for specifying the entity identifier.
+    /// * `entity_identifier_as_string` - An optional string representing the entity identifier.
+    /// * `maybe_block_identifier` - An optional `BlockIdentifierInput` for specifying a block identifier.
+    /// * `verbosity` - An optional `Verbosity` level for controlling the output verbosity.
+    /// * `node_address` - An optional string specifying the node address to use for the request.
+    ///
+    /// # Returns
+    ///
+    /// A `Result` containing either a `SuccessResponse<_GetAddressableEntityResult>` or a `SdkError` in case of an error.
+    ///
+    /// # Errors
+    ///
+    /// Returns a `SdkError` if there is an error during the retrieval process.
+    pub async fn get_entity(
+        &self,
+        entity_identifier: Option<EntityIdentifier>,
+        entity_identifier_as_string: Option<String>,
+        maybe_block_identifier: Option<BlockIdentifierInput>,
+        verbosity: Option<Verbosity>,
+        node_address: Option<String>,
+    ) -> Result<SuccessResponse<_GetAddressableEntityResult>, SdkError> {
+        let entity_identifier = if let Some(entity_identifier) = entity_identifier {
+            entity_identifier
+        } else if let Some(entity_identifier_as_string) = entity_identifier_as_string.clone() {
+            match parse_entity_identifier(&entity_identifier_as_string) {
+                Ok(parsed) => parsed.into(),
+                Err(err) => {
+                    error(&err.to_string());
+                    return Err(SdkError::FailedToParseEntityIdentifier);
+                }
+            }
+        } else {
+            let err = "Error: Missing entity identifier".to_string();
+            error(&err);
+            return Err(SdkError::InvalidArgument {
+                context: "get_entity",
+                error: err,
+            });
+        };
+        if let Some(BlockIdentifierInput::String(maybe_block_id)) = maybe_block_identifier {
+            get_entity_cli(
+                &rand::thread_rng().gen::<i64>().to_string(),
+                &self.get_node_address(node_address),
+                self.get_verbosity(verbosity).into(),
+                &maybe_block_id,
+                &entity_identifier.to_string(),
+            )
+            .await
+            .map_err(SdkError::from)
+        } else {
+            let maybe_block_identifier =
+                if let Some(BlockIdentifierInput::BlockIdentifier(maybe_block_identifier)) =
+                    maybe_block_identifier
+                {
+                    Some(maybe_block_identifier)
+                } else {
+                    None
+                };
+            get_entity_lib(
+                JsonRpcId::from(rand::thread_rng().gen::<i64>().to_string()),
+                &self.get_node_address(node_address),
+                self.get_verbosity(verbosity).into(),
+                maybe_block_identifier.map(Into::into),
+                entity_identifier.into(),
+            )
+            .await
+            .map_err(SdkError::from)
+        }
+    }
+}
+
+#[cfg(test)]
+mod tests {
+    use super::*;
+    use crate::{
+        helpers::public_key_from_secret_key,
+        types::{block_identifier::BlockIdentifier, public_key::PublicKey},
+    };
+    use sdk_tests::tests::helpers::{get_network_constants, get_user_private_key};
+
+    fn get_entity_identifier() -> EntityIdentifier {
+        let private_key = get_user_private_key(None).unwrap();
+        let account = public_key_from_secret_key(&private_key).unwrap();
+        let public_key = PublicKey::new(&account).unwrap();
+
+        EntityIdentifier::from_entity_under_public_key(public_key)
+    }
+
+    #[tokio::test]
+    async fn test_get_entity_with_none_values() {
+        // Arrange
+        let sdk = SDK::new(None, None);
+        let error_message = "builder error";
+        let entity_identifier = get_entity_identifier();
+
+        // Act
+        let result = sdk
+            .get_entity(Some(entity_identifier), None, None, None, None)
+            .await;
+
+        // Assert
+        assert!(result.is_err());
+        let err_string = result.err().unwrap().to_string();
+        assert!(err_string.contains(error_message));
+    }
+
+    #[tokio::test]
+    async fn test_get_entity_with_missing_entity() {
+        // Arrange
+        let sdk = SDK::new(None, None);
+        let error_message = "Error: Missing entity identifier";
+
+        // Act
+        let result = sdk.get_entity(None, None, None, None, None).await;
+
+        // Assert
+        assert!(result.is_err());
+        let err_string = result.err().unwrap().to_string();
+        assert!(err_string.contains(error_message));
+    }
+
+    #[tokio::test]
+    async fn test_get_entity_with_entity_identifier() {
+        // Arrange
+        let sdk = SDK::new(None, None);
+        let entity_identifier = get_entity_identifier();
+        let verbosity = Some(Verbosity::High);
+        let (node_address, _, _, _) = get_network_constants();
+
+        // Act
+        let result = sdk
+            .get_entity(
+                Some(entity_identifier),
+                None,
+                None,
+                verbosity,
+                Some(node_address),
+            )
+            .await;
+        // Assert
+        assert!(result.is_ok());
+    }
+
+    #[tokio::test]
+    async fn test_get_entity_with_entity_identifier_as_string() {
+        // Arrange
+        let sdk = SDK::new(None, None);
+        let entity_identifier_as_string = get_entity_identifier().to_string();
+        let verbosity = Some(Verbosity::High);
+        let (node_address, _, _, _) = get_network_constants();
+
+        // Act
+        let result = sdk
+            .get_entity(
+                None,
+                Some(entity_identifier_as_string),
+                None,
+                verbosity,
+                Some(node_address),
+            )
+            .await;
+
+        // Assert
+        assert!(result.is_ok());
+    }
+
+    #[tokio::test]
+    async fn test_get_entity_with_block_identifier() {
+        // Arrange
+        let sdk = SDK::new(None, None);
+        let block_identifier =
+            BlockIdentifierInput::BlockIdentifier(BlockIdentifier::from_height(1));
+        let entity_identifier = get_entity_identifier();
+        let verbosity = Some(Verbosity::High);
+        let (node_address, _, _, _) = get_network_constants();
+
+        // Act
+        let result = sdk
+            .get_entity(
+                Some(entity_identifier),
+                None,
+                Some(block_identifier),
+                verbosity,
+                Some(node_address),
+            )
+            .await;
+
+        // Assert
+        assert!(result.is_ok());
+    }
+
+    #[tokio::test]
+    async fn test_get_entity_with_error() {
+        // Arrange
+        let sdk = SDK::new(Some("http://localhost".to_string()), None);
+        let entity_identifier = get_entity_identifier();
+        let error_message = "error sending request for url (http://localhost/rpc)";
+
+        // Act
+        let result = sdk
+            .get_entity(Some(entity_identifier), None, None, None, None)
+            .await;
+
+        // Assert
+        assert!(result.is_err());
+        let err_string = result.err().unwrap().to_string();
+        assert!(err_string.contains(error_message));
+    }
+}
+
\ No newline at end of file diff --git a/api-rust/src/casper_rust_wasm_sdk/sdk/rpcs/get_transaction.rs.html b/api-rust/src/casper_rust_wasm_sdk/sdk/rpcs/get_transaction.rs.html new file mode 100644 index 000000000..f927926ae --- /dev/null +++ b/api-rust/src/casper_rust_wasm_sdk/sdk/rpcs/get_transaction.rs.html @@ -0,0 +1,727 @@ +get_transaction.rs - source
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
+339
+340
+341
+342
+343
+344
+345
+346
+347
+348
+349
+350
+351
+352
+353
+354
+355
+356
+357
+358
+359
+360
+361
+362
+363
+
#[cfg(target_arch = "wasm32")]
+use crate::types::transaction::Transaction;
+use crate::types::transaction_hash::TransactionHash;
+#[cfg(target_arch = "wasm32")]
+use crate::{debug::error, types::digest::Digest};
+use crate::{types::verbosity::Verbosity, SDK};
+use casper_client::{
+    get_transaction, rpcs::results::GetTransactionResult as _GetTransactionResult, Error,
+    JsonRpcId, SuccessResponse,
+};
+#[cfg(target_arch = "wasm32")]
+use gloo_utils::format::JsValueSerdeExt;
+use rand::Rng;
+#[cfg(target_arch = "wasm32")]
+use serde::{Deserialize, Serialize};
+#[cfg(target_arch = "wasm32")]
+use wasm_bindgen::prelude::*;
+
+// Define a struct to wrap the GetTransactionResult
+#[cfg(target_arch = "wasm32")]
+#[derive(Debug, Deserialize, Clone, Serialize)]
+#[wasm_bindgen]
+pub struct GetTransactionResult(_GetTransactionResult);
+
+#[cfg(target_arch = "wasm32")]
+impl From<GetTransactionResult> for _GetTransactionResult {
+    fn from(result: GetTransactionResult) -> Self {
+        result.0
+    }
+}
+#[cfg(target_arch = "wasm32")]
+impl From<_GetTransactionResult> for GetTransactionResult {
+    fn from(result: _GetTransactionResult) -> Self {
+        GetTransactionResult(result)
+    }
+}
+
+#[cfg(target_arch = "wasm32")]
+#[wasm_bindgen]
+impl GetTransactionResult {
+    #[wasm_bindgen(getter)]
+    /// Gets the API version as a JavaScript value.
+    pub fn api_version(&self) -> JsValue {
+        JsValue::from_serde(&self.0.api_version).unwrap()
+    }
+
+    #[wasm_bindgen(getter)]
+    /// Gets the transaction information.
+    pub fn transaction(&self) -> Transaction {
+        self.0.transaction.clone().into()
+    }
+
+    #[wasm_bindgen(getter)]
+    /// Gets the execution info as a JavaScript value.
+    pub fn execution_info(&self) -> JsValue {
+        JsValue::from_serde(&self.0.execution_info).unwrap()
+    }
+
+    #[wasm_bindgen(js_name = "toJson")]
+    /// Converts the result to a JSON JavaScript value.
+    pub fn to_json(&self) -> JsValue {
+        JsValue::from_serde(&self.0).unwrap_or(JsValue::null())
+    }
+}
+
+/// Options for the `get_transaction` method.
+#[derive(Debug, Clone, Default, Deserialize, Serialize)]
+#[cfg(target_arch = "wasm32")]
+#[wasm_bindgen(js_name = "getTransactionOptions", getter_with_clone)]
+pub struct GetTransactionOptions {
+    pub transaction_hash_as_string: Option<String>,
+    pub transaction_hash: Option<TransactionHash>,
+    pub finalized_approvals: Option<bool>,
+    pub node_address: Option<String>,
+    pub verbosity: Option<Verbosity>,
+}
+
+#[cfg(target_arch = "wasm32")]
+#[wasm_bindgen]
+impl SDK {
+    /// Parses transaction options from a JsValue.
+    ///
+    /// # Arguments
+    ///
+    /// * `options` - A JsValue containing transaction options to be parsed.
+    ///
+    /// # Returns
+    ///
+    /// Parsed transaction options as a `GetTransactionOptions` struct.
+    #[wasm_bindgen(js_name = "get_transaction_options")]
+    pub fn get_transaction_options(&self, options: JsValue) -> GetTransactionOptions {
+        let options_result = options.into_serde::<GetTransactionOptions>();
+        match options_result {
+            Ok(mut options) => {
+                if let Some(finalized_approvals) = options.finalized_approvals {
+                    options.finalized_approvals =
+                        Some(JsValue::from_bool(finalized_approvals) == JsValue::TRUE);
+                }
+                options
+            }
+            Err(err) => {
+                error(&format!("Error deserializing options: {:?}", err));
+                GetTransactionOptions::default()
+            }
+        }
+    }
+
+    /// 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.
+    #[wasm_bindgen(js_name = "get_transaction")]
+    pub async fn get_transaction_js_alias(
+        &self,
+        options: Option<GetTransactionOptions>,
+    ) -> Result<GetTransactionResult, JsError> {
+        let GetTransactionOptions {
+            transaction_hash_as_string,
+            transaction_hash,
+            finalized_approvals,
+            verbosity,
+            node_address,
+        } = options.unwrap_or_default();
+
+        let err_msg = "Error: Missing transaction hash as string or transaction hash".to_string();
+        let transaction_hash = if let Some(transaction_hash_as_string) = transaction_hash_as_string
+        {
+            let hash = Digest::new(&transaction_hash_as_string);
+            if let Err(err) = hash {
+                let err_msg = format!("Failed to parse AccountHash from formatted string: {}", err);
+                error(&err_msg);
+                return Err(JsError::new(&err_msg));
+            }
+            let transaction_hash = TransactionHash::from_digest(hash.unwrap());
+            if transaction_hash.is_err() {
+                error(&err_msg);
+                return Err(JsError::new(&err_msg));
+            }
+            transaction_hash.unwrap()
+        } else {
+            if transaction_hash.is_none() {
+                error(&err_msg);
+                return Err(JsError::new(&err_msg));
+            }
+            transaction_hash.unwrap()
+        };
+
+        let result = self
+            .get_transaction(
+                transaction_hash,
+                finalized_approvals,
+                verbosity,
+                node_address,
+            )
+            .await;
+        match result {
+            Ok(data) => Ok(data.result.into()),
+            Err(err) => {
+                let err = &format!("Error occurred with {:?}", err);
+                error(err);
+                Err(JsError::new(err))
+            }
+        }
+    }
+
+    /// Retrieves transaction information using the provided options, alias for `get_transaction`.
+    #[deprecated(note = "This function is an alias. Please use `get_transaction` instead.")]
+    #[allow(deprecated)]
+    pub async fn info_get_transaction(
+        &self,
+        options: Option<GetTransactionOptions>,
+    ) -> Result<GetTransactionResult, JsError> {
+        self.get_transaction_js_alias(options).await
+    }
+}
+
+impl SDK {
+    /// Retrieves transaction information based on the provided options.
+    ///
+    /// # Arguments
+    ///
+    /// * `transaction_hash` - The transaction hash.
+    /// * `finalized_approvals` - An optional boolean indicating finalized approvals.
+    /// * `verbosity` - An optional verbosity level.
+    /// * `node_address` - An optional node address.
+    ///
+    /// # Returns
+    ///
+    /// A `Result` containing either a `_GetTransactionResult` or an error.
+    pub async fn get_transaction(
+        &self,
+        transaction_hash: TransactionHash,
+        finalized_approvals: Option<bool>,
+        verbosity: Option<Verbosity>,
+        node_address: Option<String>,
+    ) -> Result<SuccessResponse<_GetTransactionResult>, Error> {
+        //log("get_transaction!");
+        get_transaction(
+            JsonRpcId::from(rand::thread_rng().gen::<i64>().to_string()),
+            &self.get_node_address(node_address),
+            self.get_verbosity(verbosity).into(),
+            transaction_hash.into(),
+            finalized_approvals.unwrap_or_default(),
+        )
+        .await
+    }
+}
+
+#[cfg(test)]
+mod tests {
+    use super::*;
+    use crate::{
+        helpers::public_key_from_secret_key,
+        types::transaction_params::transaction_str_params::TransactionStrParams,
+    };
+    use sdk_tests::{
+        config::TRANSFER_AMOUNT,
+        tests::helpers::{get_network_constants, get_user_private_key},
+    };
+
+    #[tokio::test]
+    async fn test_get_transaction_with_none_values() {
+        // Arrange
+        let sdk = SDK::new(None, None);
+        let transaction_hash = TransactionHash::from_digest([1u8; 32].into()).unwrap();
+        let error_message = "builder error";
+
+        // Act
+        let result = sdk
+            .get_transaction(transaction_hash, None, None, None)
+            .await;
+
+        // Assert
+        assert!(result.is_err());
+        let err_string = result.err().unwrap().to_string();
+        assert!(err_string.contains(error_message));
+    }
+
+    #[tokio::test]
+    async fn test_get_transaction_with_invalid_transaction_hash() {
+        // Arrange
+        let sdk = SDK::new(None, None);
+        let transaction_hash = TransactionHash::from_digest([1u8; 32].into()).unwrap();
+        let verbosity = Some(Verbosity::High);
+        let (node_address, _, _, _) = get_network_constants();
+
+        // Act
+        let result = sdk
+            .get_transaction(transaction_hash, None, verbosity, Some(node_address))
+            .await;
+
+        // Assert
+        assert!(result.is_err());
+    }
+
+    #[tokio::test]
+    async fn test_get_transaction_with_valid_transaction_hash() {
+        // Arrange
+        let sdk = SDK::new(None, None);
+        let verbosity = Some(Verbosity::High);
+        let (node_address, _, _, chain_name) = get_network_constants();
+
+        let private_key = get_user_private_key(None).unwrap();
+        let initiator_addr = public_key_from_secret_key(&private_key).unwrap();
+
+        let transaction_params = TransactionStrParams::default();
+        transaction_params.set_secret_key(&private_key);
+        transaction_params.set_chain_name(&chain_name);
+        transaction_params.set_payment_amount(TRANSFER_AMOUNT);
+
+        let transfer = sdk
+            .transfer_transaction(
+                None,
+                &initiator_addr, // self transfer
+                TRANSFER_AMOUNT,
+                transaction_params,
+                None,
+                verbosity,
+                Some(node_address.clone()),
+            )
+            .await
+            .unwrap();
+        let transaction_hash = transfer.result.transaction_hash;
+        assert!(!transaction_hash.to_string().is_empty());
+
+        // Act
+        let result = sdk
+            .get_transaction(transaction_hash.into(), None, verbosity, Some(node_address))
+            .await;
+
+        // Assert
+        // dbg!(result);
+        assert!(result.is_ok());
+    }
+
+    #[tokio::test]
+    async fn test_get_transaction_with_finalized_approvals() {
+        // Arrange
+        let sdk = SDK::new(None, None);
+        let verbosity = Some(Verbosity::High);
+        let (node_address, _, _, chain_name) = get_network_constants();
+
+        let private_key = get_user_private_key(None).unwrap();
+        let initiator_addr = public_key_from_secret_key(&private_key).unwrap();
+
+        let transaction_params = TransactionStrParams::default();
+        transaction_params.set_secret_key(&private_key);
+        transaction_params.set_chain_name(&chain_name);
+        transaction_params.set_payment_amount(TRANSFER_AMOUNT);
+
+        let transfer = sdk
+            .transfer_transaction(
+                None,
+                &initiator_addr, // self transfer
+                TRANSFER_AMOUNT,
+                transaction_params,
+                None,
+                verbosity,
+                Some(node_address.clone()),
+            )
+            .await
+            .unwrap();
+        let transaction_hash = transfer.result.transaction_hash;
+        assert!(!transaction_hash.to_string().is_empty());
+        let finalized_approvals = true;
+
+        // Act
+        let result = sdk
+            .get_transaction(
+                transaction_hash.into(),
+                Some(finalized_approvals),
+                verbosity,
+                Some(node_address),
+            )
+            .await;
+
+        // Assert
+        assert!(result.is_ok());
+    }
+
+    #[tokio::test]
+    async fn test_get_transaction_with_error() {
+        // Arrange
+        let sdk = SDK::new(Some("http://localhost".to_string()), None);
+        let transaction_hash = TransactionHash::from_digest([1u8; 32].into()).unwrap();
+        let error_message = "error sending request for url (http://localhost/rpc)";
+
+        // Act
+        let result = sdk
+            .get_transaction(transaction_hash, None, None, None)
+            .await;
+
+        // Assert
+        assert!(result.is_err());
+        let err_string = result.err().unwrap().to_string();
+        assert!(err_string.contains(error_message));
+    }
+}
+
\ No newline at end of file diff --git a/api-rust/src/casper_rust_wasm_sdk/sdk/rpcs/put_transaction.rs.html b/api-rust/src/casper_rust_wasm_sdk/sdk/rpcs/put_transaction.rs.html new file mode 100644 index 000000000..22faa3203 --- /dev/null +++ b/api-rust/src/casper_rust_wasm_sdk/sdk/rpcs/put_transaction.rs.html @@ -0,0 +1,363 @@ +put_transaction.rs - source
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+
#[cfg(target_arch = "wasm32")]
+use crate::{debug::error, transaction::transaction::PutTransactionResult};
+use crate::{
+    types::{transaction::Transaction, verbosity::Verbosity},
+    SDK,
+};
+use casper_client::{
+    put_transaction, rpcs::results::PutTransactionResult as _PutTransactionResult, Error,
+    JsonRpcId, SuccessResponse,
+};
+use rand::Rng;
+#[cfg(target_arch = "wasm32")]
+use wasm_bindgen::prelude::*;
+
+/// SDK methods for putting a transaction.
+#[cfg(target_arch = "wasm32")]
+#[wasm_bindgen]
+impl SDK {
+    /// 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.
+    /// * `node_address` - An optional string specifying the node 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.
+    #[wasm_bindgen(js_name = "put_transaction")]
+    pub async fn put_transaction_js_alias(
+        &self,
+        transaction: Transaction,
+        verbosity: Option<Verbosity>,
+        node_address: Option<String>,
+    ) -> Result<PutTransactionResult, JsError> {
+        let result = self
+            .put_transaction(transaction, verbosity, node_address)
+            .await;
+        match result {
+            Ok(data) => Ok(data.result.into()),
+            Err(err) => {
+                let err = &format!("Error occurred with {:?}", err);
+                error(err);
+                Err(JsError::new(err))
+            }
+        }
+    }
+
+    /// JavaScript Alias for `put_transaction`.
+    #[deprecated(note = "This function is an alias. Please use `put_transaction` instead.")]
+    #[allow(deprecated)]
+    pub async fn account_put_transaction(
+        &self,
+        transaction: Transaction,
+        verbosity: Option<Verbosity>,
+        node_address: Option<String>,
+    ) -> Result<PutTransactionResult, JsError> {
+        self.put_transaction_js_alias(transaction, verbosity, node_address)
+            .await
+    }
+}
+
+impl SDK {
+    /// Puts a transaction based on the provided options.
+    ///
+    /// # Arguments
+    ///
+    /// * `transaction` - The `Transaction` object to be sent.
+    /// * `verbosity` - An optional `Verbosity` level for controlling the output verbosity.
+    /// * `node_address` - An optional string specifying the node address to use for the request.
+    ///
+    /// # Returns
+    ///
+    /// A `Result` containing either a `_PutTransactionResult` or an `Error` in case of an error.
+    ///
+    /// # Errors
+    ///
+    /// Returns an `Error` if there is an error during the transaction process.
+    pub async fn put_transaction(
+        &self,
+        transaction: Transaction,
+        verbosity: Option<Verbosity>,
+        node_address: Option<String>,
+    ) -> Result<SuccessResponse<_PutTransactionResult>, Error> {
+        //log("account_put_transaction!");
+        put_transaction(
+            JsonRpcId::from(rand::thread_rng().gen::<i64>().to_string()),
+            &self.get_node_address(node_address),
+            self.get_verbosity(verbosity).into(),
+            transaction.into(),
+        )
+        .await
+    }
+}
+
+#[cfg(test)]
+mod tests {
+    use super::*;
+    use crate::{
+        helpers::public_key_from_secret_key,
+        types::transaction_params::transaction_str_params::TransactionStrParams,
+    };
+    use sdk_tests::{
+        config::TRANSFER_AMOUNT,
+        tests::helpers::{get_network_constants, get_user_private_key},
+    };
+
+    fn get_transaction() -> Transaction {
+        let private_key = get_user_private_key(None).unwrap();
+        let initiator_addr = public_key_from_secret_key(&private_key).unwrap();
+        let (_, _, _, chain_name) = get_network_constants();
+
+        let transaction_params = TransactionStrParams::default();
+        transaction_params.set_secret_key(&private_key);
+        transaction_params.set_chain_name(&chain_name);
+        transaction_params.set_payment_amount(TRANSFER_AMOUNT);
+
+        Transaction::new_transfer(
+            None,
+            &initiator_addr, // self transfer
+            TRANSFER_AMOUNT,
+            None,
+            transaction_params,
+        )
+        .unwrap()
+    }
+
+    #[tokio::test]
+    async fn test_put_transaction_with_none_values() {
+        // Arrange
+        let sdk = SDK::new(None, None);
+        let error_message = "builder error";
+        let transaction = get_transaction();
+
+        // Act
+        let result = sdk.put_transaction(transaction, None, None).await;
+
+        // Assert
+        assert!(result.is_err());
+        let err_string = result.err().unwrap().to_string();
+        assert!(err_string.contains(error_message));
+    }
+
+    #[tokio::test]
+    async fn test_put_transaction() {
+        // Arrange
+        let sdk = SDK::new(None, None);
+        let verbosity = Some(Verbosity::High);
+        let (node_address, _, _, _) = get_network_constants();
+        let transaction = get_transaction();
+
+        // Act
+        let result = sdk
+            .put_transaction(transaction, verbosity, Some(node_address))
+            .await;
+
+        // Assert
+        assert!(result.is_ok());
+    }
+
+    #[tokio::test]
+    async fn test_put_transaction_with_error() {
+        // Arrange
+        let sdk = SDK::new(Some("http://localhost".to_string()), None);
+        let error_message = "error sending request for url (http://localhost/rpc)";
+        let transaction = get_transaction();
+
+        // Act
+        let result = sdk.put_transaction(transaction, None, None).await;
+
+        // Assert
+        assert!(result.is_err());
+        let err_string = result.err().unwrap().to_string();
+        assert!(err_string.contains(error_message));
+    }
+}
+
\ No newline at end of file diff --git a/api-rust/src/casper_rust_wasm_sdk/sdk/rpcs/query_balance_details.rs.html b/api-rust/src/casper_rust_wasm_sdk/sdk/rpcs/query_balance_details.rs.html new file mode 100644 index 000000000..d83e107e2 --- /dev/null +++ b/api-rust/src/casper_rust_wasm_sdk/sdk/rpcs/query_balance_details.rs.html @@ -0,0 +1,1031 @@ +query_balance_details.rs - source
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
+339
+340
+341
+342
+343
+344
+345
+346
+347
+348
+349
+350
+351
+352
+353
+354
+355
+356
+357
+358
+359
+360
+361
+362
+363
+364
+365
+366
+367
+368
+369
+370
+371
+372
+373
+374
+375
+376
+377
+378
+379
+380
+381
+382
+383
+384
+385
+386
+387
+388
+389
+390
+391
+392
+393
+394
+395
+396
+397
+398
+399
+400
+401
+402
+403
+404
+405
+406
+407
+408
+409
+410
+411
+412
+413
+414
+415
+416
+417
+418
+419
+420
+421
+422
+423
+424
+425
+426
+427
+428
+429
+430
+431
+432
+433
+434
+435
+436
+437
+438
+439
+440
+441
+442
+443
+444
+445
+446
+447
+448
+449
+450
+451
+452
+453
+454
+455
+456
+457
+458
+459
+460
+461
+462
+463
+464
+465
+466
+467
+468
+469
+470
+471
+472
+473
+474
+475
+476
+477
+478
+479
+480
+481
+482
+483
+484
+485
+486
+487
+488
+489
+490
+491
+492
+493
+494
+495
+496
+497
+498
+499
+500
+501
+502
+503
+504
+505
+506
+507
+508
+509
+510
+511
+512
+513
+514
+515
+
#[cfg(target_arch = "wasm32")]
+use crate::types::digest::Digest;
+use crate::types::{
+    global_state_identifier::GlobalStateIdentifier, purse_identifier::PurseIdentifier,
+};
+use crate::{
+    debug::error,
+    types::{sdk_error::SdkError, verbosity::Verbosity},
+    SDK,
+};
+use casper_client::cli::parse::purse_identifier as parse_purse_identifier;
+use casper_client::{
+    cli::query_balance_details as query_balance_details_cli,
+    query_balance_details as query_balance_details_lib,
+    rpcs::results::QueryBalanceDetailsResult as _QueryBalanceDetailsResult, JsonRpcId,
+    SuccessResponse,
+};
+#[cfg(target_arch = "wasm32")]
+use gloo_utils::format::JsValueSerdeExt;
+use rand::Rng;
+#[cfg(target_arch = "wasm32")]
+use serde::{Deserialize, Serialize};
+#[cfg(target_arch = "wasm32")]
+use wasm_bindgen::prelude::*;
+
+// Define a struct to wrap the QueryBalanceDetailsResult
+#[cfg(target_arch = "wasm32")]
+#[derive(Debug, Deserialize, Clone, Serialize)]
+#[wasm_bindgen]
+pub struct QueryBalanceDetailsResult(_QueryBalanceDetailsResult);
+
+#[cfg(target_arch = "wasm32")]
+impl From<QueryBalanceDetailsResult> for _QueryBalanceDetailsResult {
+    fn from(result: QueryBalanceDetailsResult) -> Self {
+        result.0
+    }
+}
+
+#[cfg(target_arch = "wasm32")]
+impl From<_QueryBalanceDetailsResult> for QueryBalanceDetailsResult {
+    fn from(result: _QueryBalanceDetailsResult) -> Self {
+        QueryBalanceDetailsResult(result)
+    }
+}
+
+#[cfg(target_arch = "wasm32")]
+#[wasm_bindgen]
+impl QueryBalanceDetailsResult {
+    /// Gets the API version as a JsValue.
+    #[wasm_bindgen(getter)]
+    pub fn api_version(&self) -> JsValue {
+        JsValue::from_serde(&self.0.api_version).unwrap()
+    }
+
+    #[wasm_bindgen(getter)]
+    pub fn total_balance(&self) -> JsValue {
+        JsValue::from_serde(&self.0.total_balance).unwrap()
+    }
+
+    #[wasm_bindgen(getter)]
+    pub fn available_balance(&self) -> JsValue {
+        JsValue::from_serde(&self.0.available_balance).unwrap()
+    }
+
+    #[wasm_bindgen(getter)]
+    pub fn total_balance_proof(&self) -> JsValue {
+        JsValue::from_serde(&self.0.total_balance_proof).unwrap()
+    }
+
+    #[wasm_bindgen(getter)]
+    pub fn holds(&self) -> JsValue {
+        JsValue::from_serde(&self.0.holds).unwrap()
+    }
+
+    /// Converts the QueryBalanceDetailsResult to a JsValue.
+    #[wasm_bindgen(js_name = "toJson")]
+    pub fn to_json(&self) -> JsValue {
+        JsValue::from_serde(&self.0).unwrap_or(JsValue::null())
+    }
+}
+
+/// Options for the `query_balance` method.
+#[derive(Debug, Deserialize, Clone, Default, Serialize)]
+#[cfg(target_arch = "wasm32")]
+#[wasm_bindgen(js_name = "queryBalanceDetailsOptions", getter_with_clone)]
+pub struct QueryBalanceDetailsOptions {
+    pub purse_identifier_as_string: Option<String>,
+    pub purse_identifier: Option<PurseIdentifier>,
+    pub global_state_identifier: Option<GlobalStateIdentifier>,
+    pub state_root_hash_as_string: Option<String>,
+    pub state_root_hash: Option<Digest>,
+    pub maybe_block_id_as_string: Option<String>,
+    pub node_address: Option<String>,
+    pub verbosity: Option<Verbosity>,
+}
+
+#[cfg(target_arch = "wasm32")]
+#[wasm_bindgen]
+impl SDK {
+    /// 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.
+    #[wasm_bindgen(js_name = "query_balance_details_options")]
+    pub fn query_balance_details_options(&self, options: JsValue) -> QueryBalanceDetailsOptions {
+        let options_result = options.into_serde::<QueryBalanceDetailsOptions>();
+        match options_result {
+            Ok(options) => options,
+            Err(err) => {
+                error(&format!("Error deserializing options: {:?}", err));
+                QueryBalanceDetailsOptions::default()
+            }
+        }
+    }
+
+    /// 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.
+    #[wasm_bindgen(js_name = "query_balance_details")]
+    pub async fn query_balance_details_js_alias(
+        &self,
+        options: Option<QueryBalanceDetailsOptions>,
+    ) -> Result<QueryBalanceDetailsResult, JsError> {
+        let QueryBalanceDetailsOptions {
+            global_state_identifier,
+            purse_identifier_as_string,
+            purse_identifier,
+            state_root_hash_as_string,
+            state_root_hash,
+            maybe_block_id_as_string,
+            verbosity,
+            node_address,
+        } = options.unwrap_or_default();
+
+        let result = if let Some(hash) = state_root_hash {
+            self.query_balance_details(
+                global_state_identifier,
+                purse_identifier_as_string,
+                purse_identifier,
+                Some(hash.to_string()),
+                None,
+                verbosity,
+                node_address,
+            )
+            .await
+        } else if let Some(hash) = state_root_hash_as_string {
+            self.query_balance_details(
+                global_state_identifier,
+                purse_identifier_as_string,
+                purse_identifier,
+                Some(hash.to_string()),
+                None,
+                verbosity,
+                node_address,
+            )
+            .await
+        } else if let Some(maybe_block_id_as_string) = maybe_block_id_as_string {
+            self.query_balance_details(
+                global_state_identifier,
+                purse_identifier_as_string,
+                purse_identifier,
+                None,
+                Some(maybe_block_id_as_string),
+                verbosity,
+                node_address,
+            )
+            .await
+        } else {
+            self.query_balance_details(
+                global_state_identifier,
+                purse_identifier_as_string,
+                purse_identifier,
+                None,
+                None,
+                verbosity,
+                node_address,
+            )
+            .await
+        };
+        match result {
+            Ok(data) => Ok(data.result.into()),
+            Err(err) => {
+                let err = &format!("Error occurred with {:?}", err);
+                error(err);
+                Err(JsError::new(err))
+            }
+        }
+    }
+}
+
+impl SDK {
+    /// Retrieves balance information details based on the provided options.
+    ///
+    /// # Arguments
+    ///
+    /// * `maybe_global_state_identifier` - An optional `GlobalStateIdentifier` for specifying global state.
+    /// * `purse_identifier_as_string` - An optional string representing a purse identifier.
+    /// * `purse_identifier` - An optional `PurseIdentifier`.
+    /// * `state_root_hash` - An optional string representing a state root hash.
+    /// * `maybe_block_id` - An optional string representing a block identifier.
+    /// * `verbosity` - An optional `Verbosity` level for controlling the output verbosity.
+    /// * `node_address` - An optional string specifying the node address to use for the request.
+    ///
+    /// # Returns
+    ///
+    /// A `Result` containing either a `SuccessResponse<_QueryBalanceDetailsResult>` or a `SdkError` in case of an error.
+    ///
+    /// # Errors
+    ///
+    /// Returns a `SdkError` if there is an error during the retrieval process.
+    #[allow(clippy::too_many_arguments)]
+    pub async fn query_balance_details(
+        &self,
+        maybe_global_state_identifier: Option<GlobalStateIdentifier>,
+        purse_identifier_as_string: Option<String>,
+        purse_identifier: Option<PurseIdentifier>,
+        state_root_hash: Option<String>,
+        maybe_block_id: Option<String>,
+        verbosity: Option<Verbosity>,
+        node_address: Option<String>,
+    ) -> Result<SuccessResponse<_QueryBalanceDetailsResult>, SdkError> {
+        //log("query_balance_details!");
+
+        let purse_identifier: PurseIdentifier = if let Some(purse_identifier) = purse_identifier {
+            purse_identifier
+        } else if let Some(purse_id) = purse_identifier_as_string.clone() {
+            match parse_purse_identifier(&purse_id) {
+                Ok(parsed) => parsed.into(),
+                Err(err) => {
+                    error(&err.to_string());
+                    return Err(SdkError::FailedToParsePurseIdentifier);
+                }
+            }
+        } else {
+            let err = "Error: Missing purse identifier".to_string();
+            error(&err);
+            return Err(SdkError::InvalidArgument {
+                context: "query_global_state",
+                error: err,
+            });
+        };
+
+        if let Some(maybe_global_state_identifier) = maybe_global_state_identifier {
+            query_balance_details_lib(
+                JsonRpcId::from(rand::thread_rng().gen::<i64>().to_string()),
+                &self.get_node_address(node_address),
+                self.get_verbosity(verbosity).into(),
+                Some(maybe_global_state_identifier.into()),
+                purse_identifier.into(),
+            )
+            .await
+            .map_err(SdkError::from)
+        } else if maybe_global_state_identifier.is_none() {
+            query_balance_details_lib(
+                JsonRpcId::from(rand::thread_rng().gen::<i64>().to_string()),
+                &self.get_node_address(node_address),
+                self.get_verbosity(verbosity).into(),
+                None,
+                purse_identifier.into(),
+            )
+            .await
+            .map_err(SdkError::from)
+        } else if let Some(state_root_hash) = state_root_hash {
+            query_balance_details_cli(
+                &rand::thread_rng().gen::<i64>().to_string(),
+                &self.get_node_address(node_address),
+                self.get_verbosity(verbosity).into(),
+                "",
+                &state_root_hash,
+                &purse_identifier.to_string(),
+            )
+            .await
+            .map_err(SdkError::from)
+        } else {
+            query_balance_details_cli(
+                &rand::thread_rng().gen::<i64>().to_string(),
+                &self.get_node_address(node_address),
+                self.get_verbosity(verbosity).into(),
+                &maybe_block_id.unwrap_or_default(),
+                "",
+                &purse_identifier.to_string(),
+            )
+            .await
+            .map_err(SdkError::from)
+        }
+    }
+}
+
+#[cfg(test)]
+mod tests {
+    use super::*;
+    use crate::{
+        helpers::public_key_from_secret_key,
+        types::{digest::Digest, public_key::PublicKey},
+    };
+    use sdk_tests::tests::helpers::{get_network_constants, get_user_private_key};
+
+    fn get_purse_identifier() -> PurseIdentifier {
+        let private_key = get_user_private_key(None).unwrap();
+        let account = public_key_from_secret_key(&private_key).unwrap();
+        let public_key = PublicKey::new(&account).unwrap();
+        PurseIdentifier::from_main_purse_under_public_key(public_key)
+    }
+
+    #[tokio::test]
+    async fn test_query_balance_details_with_none_values() {
+        // Arrange
+        let sdk = SDK::new(None, None);
+        let error_message = "builder error";
+
+        // Act
+        let result = sdk
+            .query_balance_details(
+                None,
+                None,
+                Some(get_purse_identifier()),
+                None,
+                None,
+                None,
+                None,
+            )
+            .await;
+
+        // Assert
+        assert!(result.is_err());
+        let err_string = result.err().unwrap().to_string();
+        assert!(err_string.contains(error_message));
+    }
+
+    #[tokio::test]
+    async fn test_query_balance_details_with_missing_purse() {
+        // Arrange
+        let sdk = SDK::new(None, None);
+        let error_message = "Error: Missing purse identifier";
+
+        // Act
+        let result = sdk
+            .query_balance_details(None, None, None, None, None, None, None)
+            .await;
+
+        // Assert
+        assert!(result.is_err());
+        let err_string = result.err().unwrap().to_string();
+
+        assert!(err_string.contains(error_message));
+    }
+
+    #[tokio::test]
+    async fn test_query_balance_details_with_global_state_identifier() {
+        // Arrange
+        let sdk = SDK::new(None, None);
+        let global_state_identifier = GlobalStateIdentifier::from_block_height(1);
+        let verbosity = Some(Verbosity::High);
+        let (node_address, _, _, _) = get_network_constants();
+        // Act
+        let result = sdk
+            .query_balance_details(
+                Some(global_state_identifier.clone()),
+                None,
+                Some(get_purse_identifier()),
+                None,
+                None,
+                verbosity,
+                Some(node_address),
+            )
+            .await;
+
+        // Assert
+        assert!(result.is_ok());
+    }
+
+    #[tokio::test]
+    async fn test_query_balance_details_with_state_root_hash() {
+        // Arrange
+        let sdk = SDK::new(None, None);
+        let verbosity = Some(Verbosity::High);
+        let (node_address, _, _, _) = get_network_constants();
+        let state_root_hash: Digest = sdk
+            .get_state_root_hash(None, verbosity, Some(node_address.clone()))
+            .await
+            .unwrap()
+            .result
+            .state_root_hash
+            .unwrap()
+            .into();
+
+        // Act
+        let result = sdk
+            .query_balance_details(
+                None,
+                None,
+                Some(get_purse_identifier()),
+                Some(state_root_hash.to_string()),
+                None,
+                verbosity,
+                Some(node_address),
+            )
+            .await;
+
+        // Assert
+        assert!(result.is_ok());
+    }
+
+    #[tokio::test]
+    async fn test_query_balance_details_with_block_id() {
+        // Arrange
+        let sdk = SDK::new(None, None);
+        let verbosity = Some(Verbosity::High);
+        let (node_address, _, _, _) = get_network_constants();
+
+        // Act
+        let result = sdk
+            .query_balance_details(
+                None,
+                None,
+                Some(get_purse_identifier()),
+                None,
+                Some("1".to_string()),
+                verbosity,
+                Some(node_address.clone()),
+            )
+            .await;
+        // Assert
+        assert!(result.is_ok());
+    }
+
+    #[tokio::test]
+    async fn test_query_balance_details_with_purse_identifier() {
+        // Arrange
+        let sdk = SDK::new(None, None);
+        let verbosity = Some(Verbosity::High);
+        let (node_address, _, _, _) = get_network_constants();
+
+        // Act
+        let result = sdk
+            .query_balance_details(
+                None,
+                None,
+                Some(get_purse_identifier()),
+                None,
+                None,
+                verbosity,
+                Some(node_address.clone()),
+            )
+            .await;
+
+        // Assert
+        assert!(result.is_ok());
+    }
+
+    #[tokio::test]
+    async fn test_query_balance_details_with_purse_identifier_as_string() {
+        // Arrange
+        let sdk = SDK::new(None, None);
+        let verbosity = Some(Verbosity::High);
+        let (node_address, _, _, _) = get_network_constants();
+
+        // Act
+        let result = sdk
+            .query_balance_details(
+                None,
+                Some(get_purse_identifier().to_string()),
+                None,
+                None,
+                None,
+                verbosity,
+                Some(node_address),
+            )
+            .await;
+
+        // Assert
+        assert!(result.is_ok());
+    }
+
+    #[tokio::test]
+    async fn test_query_balance_details_with_error() {
+        // Arrange
+        let sdk = SDK::new(Some("http://localhost".to_string()), None);
+
+        let error_message = "error sending request for url (http://localhost/rpc)";
+
+        // Act
+        let result = sdk
+            .query_balance_details(
+                None,
+                Some(get_purse_identifier().to_string()),
+                None,
+                None,
+                None,
+                None,
+                None,
+            )
+            .await;
+
+        // Assert
+        assert!(result.is_err());
+        let err_string = result.err().unwrap().to_string();
+        assert!(err_string.contains(error_message));
+    }
+}
+
\ No newline at end of file diff --git a/api-rust/src/casper_rust_wasm_sdk/sdk/rpcs/speculative_exec_deploy.rs.html b/api-rust/src/casper_rust_wasm_sdk/sdk/rpcs/speculative_exec_deploy.rs.html new file mode 100644 index 000000000..ed8e7c8f9 --- /dev/null +++ b/api-rust/src/casper_rust_wasm_sdk/sdk/rpcs/speculative_exec_deploy.rs.html @@ -0,0 +1,661 @@ +speculative_exec_deploy.rs - source
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+
#[cfg(target_arch = "wasm32")]
+use crate::debug::error;
+#[cfg(target_arch = "wasm32")]
+use crate::types::block_hash::BlockHash;
+#[cfg(target_arch = "wasm32")]
+use crate::types::block_identifier::BlockIdentifier;
+use crate::types::deploy::Deploy;
+use crate::{
+    types::{block_identifier::BlockIdentifierInput, sdk_error::SdkError, verbosity::Verbosity},
+    SDK,
+};
+use casper_client::{
+    rpcs::results::SpeculativeExecResult as _SpeculativeExecResult,
+    speculative_exec as speculative_exec_deploy_lib, JsonRpcId, SuccessResponse,
+};
+#[cfg(target_arch = "wasm32")]
+use gloo_utils::format::JsValueSerdeExt;
+use rand::Rng;
+#[cfg(target_arch = "wasm32")]
+use serde::{Deserialize, Serialize};
+#[cfg(target_arch = "wasm32")]
+use wasm_bindgen::prelude::*;
+
+// Define a struct to wrap the result of a speculative execution.
+#[cfg(target_arch = "wasm32")]
+#[derive(Debug, Deserialize, Clone, Serialize)]
+#[wasm_bindgen]
+pub struct SpeculativeExecResult(_SpeculativeExecResult);
+
+#[cfg(target_arch = "wasm32")]
+impl From<SpeculativeExecResult> for _SpeculativeExecResult {
+    fn from(result: SpeculativeExecResult) -> Self {
+        result.0
+    }
+}
+
+#[cfg(target_arch = "wasm32")]
+impl From<_SpeculativeExecResult> for SpeculativeExecResult {
+    fn from(result: _SpeculativeExecResult) -> Self {
+        SpeculativeExecResult(result)
+    }
+}
+
+#[cfg(target_arch = "wasm32")]
+#[wasm_bindgen]
+impl SpeculativeExecResult {
+    /// Get the API version of the result.
+    #[wasm_bindgen(getter)]
+    pub fn api_version(&self) -> JsValue {
+        JsValue::from_serde(&self.0.api_version).unwrap()
+    }
+
+    /// Get the block hash.
+    #[wasm_bindgen(getter)]
+    pub fn block_hash(&self) -> BlockHash {
+        self.0.block_hash.into()
+    }
+
+    /// Get the execution result.
+    #[wasm_bindgen(getter)]
+    pub fn execution_result(&self) -> JsValue {
+        JsValue::from_serde(&self.0.execution_result).unwrap()
+    }
+
+    /// Convert the result to JSON format.
+    #[wasm_bindgen(js_name = "toJson")]
+    pub fn to_json(&self) -> JsValue {
+        JsValue::from_serde(&self.0).unwrap_or(JsValue::null())
+    }
+}
+
+/// Options for speculative execution.
+#[derive(Debug, Deserialize, Clone, Default, Serialize)]
+#[cfg(target_arch = "wasm32")]
+#[wasm_bindgen(js_name = "getSpeculativeExecDeployOptions", getter_with_clone)]
+pub struct GetSpeculativeExecDeployOptions {
+    /// The deploy as a JSON string.
+    pub deploy_as_string: Option<String>,
+
+    /// The deploy to execute.
+    pub deploy: Option<Deploy>,
+
+    /// The block identifier as a string.
+    pub maybe_block_id_as_string: Option<String>,
+
+    /// The block identifier.
+    pub maybe_block_identifier: Option<BlockIdentifier>,
+
+    /// The node address.
+    pub node_address: Option<String>,
+
+    /// The verbosity level for logging.
+    pub verbosity: Option<Verbosity>,
+}
+
+#[cfg(target_arch = "wasm32")]
+#[wasm_bindgen]
+impl SDK {
+    /// Get options for speculative execution from a JavaScript value.
+    #[wasm_bindgen(js_name = "speculative_exec_deploy_options")]
+    pub fn get_speculative_exec_deploy_options(
+        &self,
+        options: JsValue,
+    ) -> GetSpeculativeExecDeployOptions {
+        let options_result = options.into_serde::<GetSpeculativeExecDeployOptions>();
+        match options_result {
+            Ok(options) => options,
+            Err(err) => {
+                error(&format!("Error deserializing options: {:?}", err));
+                GetSpeculativeExecDeployOptions::default()
+            }
+        }
+    }
+
+    /// 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.
+    #[wasm_bindgen(js_name = "speculative_exec_deploy")]
+    pub async fn speculative_exec_deploy_js_alias(
+        &self,
+        options: Option<GetSpeculativeExecDeployOptions>,
+    ) -> Result<SpeculativeExecResult, JsError> {
+        let GetSpeculativeExecDeployOptions {
+            deploy_as_string,
+            deploy,
+            maybe_block_id_as_string,
+            maybe_block_identifier,
+            verbosity,
+            node_address,
+        } = options.unwrap_or_default();
+
+        let deploy = if let Some(deploy_as_string) = deploy_as_string {
+            Deploy::new(deploy_as_string.into())
+        } else if let Some(deploy) = deploy {
+            deploy
+        } else {
+            let err = "Error: Missing deploy as json or deploy".to_string();
+            error(&err);
+            return Err(JsError::new(&err));
+        };
+
+        let maybe_block_identifier = if let Some(maybe_block_identifier) = maybe_block_identifier {
+            Some(BlockIdentifierInput::BlockIdentifier(
+                maybe_block_identifier,
+            ))
+        } else {
+            maybe_block_id_as_string.map(BlockIdentifierInput::String)
+        };
+
+        let result = self
+            .speculative_exec_deploy(deploy, maybe_block_identifier, verbosity, node_address)
+            .await;
+        match result {
+            Ok(data) => Ok(data.result.into()),
+            Err(err) => {
+                let err = &format!("Error occurred with {:?}", err);
+                error(err);
+                Err(JsError::new(err))
+            }
+        }
+    }
+}
+
+impl SDK {
+    /// Perform speculative execution.
+    ///
+    /// # Arguments
+    ///
+    /// * `deploy` - The deploy to execute.
+    /// * `maybe_block_identifier` - The block identifier.
+    /// * `verbosity` - The verbosity level for logging.
+    /// * `node_address` - The address of the node to connect to.
+    ///
+    /// # Returns
+    ///
+    /// A `Result` containing the result of _SpeculativeExecResult or a `SdkError` in case of an error.
+    pub async fn speculative_exec_deploy(
+        &self,
+        deploy: Deploy,
+        maybe_block_identifier: Option<BlockIdentifierInput>,
+        verbosity: Option<Verbosity>,
+        node_address: Option<String>,
+    ) -> Result<SuccessResponse<_SpeculativeExecResult>, SdkError> {
+        //log("speculative_exec_deploy!");
+
+        let maybe_block_identifier =
+            if let Some(BlockIdentifierInput::BlockIdentifier(maybe_block_identifier)) =
+                maybe_block_identifier
+            {
+                Some(maybe_block_identifier)
+            } else {
+                None
+            };
+        speculative_exec_deploy_lib(
+            JsonRpcId::from(rand::thread_rng().gen::<i64>().to_string()),
+            &self.get_node_address(node_address),
+            maybe_block_identifier.map(Into::into),
+            self.get_verbosity(verbosity).into(),
+            deploy.into(),
+        )
+        .await
+        .map_err(SdkError::from)
+    }
+}
+
+#[cfg(test)]
+mod tests {
+    use super::*;
+    use crate::{
+        helpers::public_key_from_secret_key,
+        types::{
+            block_identifier::BlockIdentifier,
+            deploy_params::{
+                deploy_str_params::DeployStrParams, payment_str_params::PaymentStrParams,
+            },
+        },
+    };
+    use sdk_tests::{
+        config::{PAYMENT_TRANSFER_AMOUNT, TRANSFER_AMOUNT},
+        tests::helpers::{get_network_constants, get_user_private_key},
+    };
+    use tokio;
+
+    fn get_deploy() -> Deploy {
+        let private_key = get_user_private_key(None).unwrap();
+        let account = public_key_from_secret_key(&private_key).unwrap();
+        let (_, _, _, chain_name) = get_network_constants();
+        let deploy_params =
+            DeployStrParams::new(&chain_name, &account, Some(private_key), None, None, None);
+        let payment_params = PaymentStrParams::default();
+        payment_params.set_payment_amount(PAYMENT_TRANSFER_AMOUNT);
+
+        Deploy::with_transfer(
+            TRANSFER_AMOUNT,
+            &account, // self transfer
+            None,
+            deploy_params,
+            payment_params,
+        )
+        .unwrap()
+    }
+
+    #[tokio::test]
+    async fn test_speculative_exec_deploy_with_none_values() {
+        // Arrange
+        let sdk = SDK::new(None, None);
+        let deploy = get_deploy();
+        let error_message = "builder error";
+
+        // Act
+        let result = sdk.speculative_exec_deploy(deploy, None, None, None).await;
+
+        // Assert
+        assert!(result.is_err());
+        let err_string = result.err().unwrap().to_string();
+        assert!(err_string.contains(error_message));
+    }
+
+    #[tokio::test]
+    #[ignore]
+    async fn _test_speculative_exec_deploy() {
+        // Arrange
+        let sdk = SDK::new(None, None);
+        let verbosity = Some(Verbosity::High);
+        let (_, _, default_speculative_address, _) = get_network_constants();
+        let deploy = get_deploy();
+        let block_identifier =
+            BlockIdentifierInput::BlockIdentifier(BlockIdentifier::from_height(1));
+
+        // Act
+        let result = sdk
+            .speculative_exec_deploy(
+                deploy,
+                Some(block_identifier),
+                verbosity,
+                Some(default_speculative_address),
+            )
+            .await;
+
+        // Assert
+        assert!(result.is_ok());
+    }
+
+    #[tokio::test]
+    #[ignore]
+    async fn _test_speculative_exec_deploy_with_block_identifier() {
+        // Arrange
+        let sdk = SDK::new(None, None);
+        let verbosity = Some(Verbosity::High);
+        let (_, _, default_speculative_address, _) = get_network_constants();
+        let deploy = get_deploy();
+        let block_identifier =
+            BlockIdentifierInput::BlockIdentifier(BlockIdentifier::from_height(1));
+
+        // Act
+        let result = sdk
+            .speculative_exec_deploy(
+                deploy,
+                Some(block_identifier),
+                verbosity,
+                Some(default_speculative_address),
+            )
+            .await;
+
+        // Assert
+        assert!(result.is_ok());
+    }
+
+    #[tokio::test]
+    async fn test_speculative_exec_deploy_with_error() {
+        // Arrange
+        let sdk = SDK::new(Some("http://localhost".to_string()), None);
+        let deploy = get_deploy();
+        let error_message = "error sending request for url (http://localhost/rpc)";
+
+        // Act
+        let result = sdk.speculative_exec_deploy(deploy, None, None, None).await;
+
+        // Assert
+        assert!(result.is_err());
+        let err_string = result.err().unwrap().to_string();
+        assert!(err_string.contains(error_message));
+    }
+}
+
\ No newline at end of file diff --git a/api-rust/src/casper_rust_wasm_sdk/sdk/transaction/mod.rs.html b/api-rust/src/casper_rust_wasm_sdk/sdk/transaction/mod.rs.html new file mode 100644 index 000000000..ffe4ad428 --- /dev/null +++ b/api-rust/src/casper_rust_wasm_sdk/sdk/transaction/mod.rs.html @@ -0,0 +1,13 @@ +mod.rs - source
1
+2
+3
+4
+5
+6
+
#[allow(clippy::module_inception)]
+pub mod speculative_transaction;
+pub mod speculative_transfer_transaction;
+#[allow(clippy::module_inception)]
+pub mod transaction;
+pub mod transfer_transaction;
+
\ No newline at end of file diff --git a/api-rust/src/casper_rust_wasm_sdk/sdk/transaction/speculative_transaction.rs.html b/api-rust/src/casper_rust_wasm_sdk/sdk/transaction/speculative_transaction.rs.html new file mode 100644 index 000000000..591f3e334 --- /dev/null +++ b/api-rust/src/casper_rust_wasm_sdk/sdk/transaction/speculative_transaction.rs.html @@ -0,0 +1,583 @@ +speculative_transaction.rs - source
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+
#[cfg(target_arch = "wasm32")]
+use crate::rpcs::speculative_exec::SpeculativeExecTxnResult;
+#[cfg(target_arch = "wasm32")]
+use crate::types::block_identifier::BlockIdentifier;
+use crate::{
+    debug::error,
+    types::{
+        block_identifier::BlockIdentifierInput,
+        sdk_error::SdkError,
+        transaction_params::{
+            transaction_builder_params::{
+                transaction_builder_params_to_casper_client, TransactionBuilderParams,
+            },
+            transaction_str_params::{
+                transaction_str_params_to_casper_client, TransactionStrParams,
+            },
+        },
+        verbosity::Verbosity,
+    },
+    SDK,
+};
+use casper_client::{
+    cli::make_transaction, rpcs::results::SpeculativeExecTxnResult as _SpeculativeExecTxnResult,
+    SuccessResponse,
+};
+#[cfg(target_arch = "wasm32")]
+use wasm_bindgen::prelude::*;
+
+#[cfg(target_arch = "wasm32")]
+#[wasm_bindgen]
+impl SDK {
+    /// This function allows executing a transaction speculatively.
+    ///
+    /// # Arguments
+    ///
+    /// * `builder_params` - Transaction Builder parameters.
+    /// * `transaction_params` - Transactionment parameters for the transaction.
+    /// * `maybe_block_id_as_string` - An optional block ID as a string.
+    /// * `maybe_block_identifier` - Optional block identifier.
+    /// * `verbosity` - Optional verbosity level.
+    /// * `node_address` - Optional node address.
+    ///
+    /// # Returns
+    ///
+    /// A `Result` containing either a `SpeculativeExecTxnResult` or a `JsError` in case of an error.
+    #[wasm_bindgen(js_name = "speculative_transaction")]
+    #[allow(clippy::too_many_arguments)]
+    pub async fn speculative_transaction_js_alias(
+        &self,
+        builder_params: TransactionBuilderParams,
+        transaction_params: TransactionStrParams,
+        maybe_block_id_as_string: Option<String>,
+        maybe_block_identifier: Option<BlockIdentifier>,
+        verbosity: Option<Verbosity>,
+        node_address: Option<String>,
+    ) -> Result<SpeculativeExecTxnResult, JsError> {
+        let maybe_block_identifier = if let Some(maybe_block_identifier) = maybe_block_identifier {
+            Some(BlockIdentifierInput::BlockIdentifier(
+                maybe_block_identifier,
+            ))
+        } else {
+            maybe_block_id_as_string.map(BlockIdentifierInput::String)
+        };
+        let result = self
+            .speculative_transaction(
+                builder_params,
+                transaction_params,
+                maybe_block_identifier,
+                verbosity,
+                node_address,
+            )
+            .await;
+        match result {
+            Ok(data) => Ok(data.result.into()),
+            Err(err) => {
+                let err = &format!("Error occurred with {:?}", err);
+                error(err);
+                Err(JsError::new(err))
+            }
+        }
+    }
+}
+
+impl SDK {
+    /// This function allows executing a transaction speculatively.
+    ///
+    /// # Arguments
+    ///
+    /// * `builder_params` - Transaction Builder parameters.
+    /// * `transaction_params` - Transactionment parameters for the transaction.
+    /// * `maybe_block_identifier` - Optional block identifier.
+    /// * `verbosity` - Optional verbosity level.
+    /// * `node_address` - Optional node address.
+    ///
+    /// # Returns
+    ///
+    /// A `Result` containing either a `SuccessResponse<_SpeculativeExecTxnResult>` or a `SdkError` in case of an error.
+    pub async fn speculative_transaction(
+        &self,
+        builder_params: TransactionBuilderParams,
+        transaction_params: TransactionStrParams,
+        maybe_block_identifier: Option<BlockIdentifierInput>,
+        verbosity: Option<Verbosity>,
+        node_address: Option<String>,
+    ) -> Result<SuccessResponse<_SpeculativeExecTxnResult>, SdkError> {
+        // log("speculative_transaction!");
+        let transaction = make_transaction(
+            transaction_builder_params_to_casper_client(&builder_params),
+            transaction_str_params_to_casper_client(&transaction_params),
+            false,
+        );
+
+        if let Err(err) = transaction {
+            let err_msg = format!("Error during speculative_transaction: {}", err);
+            error(&err_msg);
+            return Err(SdkError::from(err));
+        }
+
+        self.speculative_exec(
+            transaction.unwrap().into(),
+            maybe_block_identifier,
+            verbosity,
+            node_address,
+        )
+        .await
+        .map_err(SdkError::from)
+    }
+}
+
+#[cfg(test)]
+mod tests {
+    use super::*;
+    use crate::{helpers::public_key_from_secret_key, types::block_identifier::BlockIdentifier};
+    use once_cell::sync::Lazy;
+    use sdk_tests::{
+        config::{ARGS_SIMPLE, HELLO_CONTRACT, PAYMENT_AMOUNT, WASM_PATH},
+        tests::helpers::{get_network_constants, get_user_private_key, read_wasm_file},
+    };
+
+    static ARGS: Lazy<Vec<String>> =
+        Lazy::new(|| ARGS_SIMPLE.iter().map(|s| s.to_string()).collect());
+
+    fn get_builder_params() -> &'static TransactionBuilderParams {
+        static mut BUILDER_PARAMS: Option<TransactionBuilderParams> = None;
+
+        unsafe {
+            if BUILDER_PARAMS.is_none() {
+                let file_path = &format!("{WASM_PATH}{HELLO_CONTRACT}");
+                let transaction_bytes = match read_wasm_file(file_path) {
+                    Ok(transaction_bytes) => transaction_bytes,
+                    Err(err) => {
+                        eprintln!("Error reading file: {:?}", err);
+                        unimplemented!()
+                    }
+                };
+                let builder_params =
+                    TransactionBuilderParams::new_session(Some(transaction_bytes.into()));
+                BUILDER_PARAMS = Some(builder_params);
+            }
+            BUILDER_PARAMS.as_ref().unwrap()
+        }
+    }
+
+    #[tokio::test]
+    #[ignore]
+    async fn _test_speculative_transaction_with_valid_params() {
+        // Arrange
+        let sdk = SDK::new(None, None);
+        let verbosity = Some(Verbosity::High);
+        let (_, _, default_speculative_address, chain_name) = get_network_constants();
+
+        let private_key = get_user_private_key(None).unwrap();
+
+        let mut transaction_params = TransactionStrParams::default();
+        transaction_params.set_secret_key(&private_key);
+        transaction_params.set_chain_name(&chain_name);
+        transaction_params.set_payment_amount(PAYMENT_AMOUNT);
+        transaction_params.set_session_args_simple(ARGS.to_vec());
+
+        // Act
+        let result = sdk
+            .speculative_transaction(
+                get_builder_params().clone(),
+                transaction_params,
+                None,
+                verbosity,
+                Some(default_speculative_address),
+            )
+            .await;
+
+        // Assert
+        assert!(result.is_ok());
+    }
+
+    #[tokio::test]
+    #[ignore]
+    async fn _test_speculative_transaction_with_block_identifier() {
+        // Arrange
+        let sdk = SDK::new(None, None);
+        let verbosity = Some(Verbosity::High);
+        let (_, _, default_speculative_address, chain_name) = get_network_constants();
+        let block_identifier =
+            BlockIdentifierInput::BlockIdentifier(BlockIdentifier::from_height(1));
+        let private_key = get_user_private_key(None).unwrap();
+
+        let mut transaction_params = TransactionStrParams::default();
+        transaction_params.set_secret_key(&private_key);
+        transaction_params.set_chain_name(&chain_name);
+        transaction_params.set_payment_amount(PAYMENT_AMOUNT);
+        transaction_params.set_session_args_simple(ARGS.to_vec());
+
+        // Act
+        let result = sdk
+            .speculative_transaction(
+                get_builder_params().clone(),
+                transaction_params,
+                Some(block_identifier),
+                verbosity,
+                Some(default_speculative_address),
+            )
+            .await;
+
+        // Assert
+        assert!(result.is_ok());
+    }
+
+    #[tokio::test]
+    async fn test_speculative_transaction_with_valid_params_without_private_key() {
+        // Arrange
+        let sdk = SDK::new(None, None);
+        let verbosity = Some(Verbosity::High);
+        let (_, _, default_speculative_address, chain_name) = get_network_constants();
+        let private_key = get_user_private_key(None).unwrap();
+        let initiator_addr = public_key_from_secret_key(&private_key).unwrap();
+
+        let mut transaction_params = TransactionStrParams::default();
+        transaction_params.set_chain_name(&chain_name);
+        transaction_params.set_initiator_addr(&initiator_addr);
+        transaction_params.set_payment_amount(PAYMENT_AMOUNT);
+        transaction_params.set_session_args_simple(ARGS.to_vec());
+
+        // Act
+        let result = sdk
+            .speculative_transaction(
+                get_builder_params().clone(),
+                transaction_params,
+                None,
+                verbosity,
+                Some(default_speculative_address),
+            )
+            .await;
+
+        // Assert
+        assert!(result.is_err());
+    }
+
+    #[tokio::test]
+    async fn test_speculative_transaction_with_invalid_params() {
+        // Arrange
+        let sdk = SDK::new(None, None);
+        let verbosity = Some(Verbosity::High);
+        let (_, _, default_speculative_address, chain_name) = get_network_constants();
+
+        let private_key = get_user_private_key(None).unwrap();
+
+        let error_message = "Invalid argument 'create_transaction (payment_amount)': payment_amount is required to be non empty";
+
+        let transaction_params = TransactionStrParams::default();
+        transaction_params.set_secret_key(&private_key);
+        transaction_params.set_chain_name(&chain_name);
+        transaction_params.set_payment_amount(""); // This is not valid payment amount
+
+        // Act
+        let result = sdk
+            .speculative_transaction(
+                get_builder_params().clone(),
+                transaction_params,
+                None,
+                verbosity,
+                Some(default_speculative_address),
+            )
+            .await;
+
+        // Assert
+        assert!(result.is_err());
+
+        let err_string = result.err().unwrap().to_string();
+
+        assert!(err_string.contains(error_message));
+    }
+}
+
\ No newline at end of file diff --git a/api-rust/src/casper_rust_wasm_sdk/sdk/transaction/speculative_transfer_transaction.rs.html b/api-rust/src/casper_rust_wasm_sdk/sdk/transaction/speculative_transfer_transaction.rs.html new file mode 100644 index 000000000..e3f3b31b0 --- /dev/null +++ b/api-rust/src/casper_rust_wasm_sdk/sdk/transaction/speculative_transfer_transaction.rs.html @@ -0,0 +1,577 @@ +speculative_transfer_transaction.rs - source
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+
#[cfg(target_arch = "wasm32")]
+use crate::rpcs::speculative_exec::SpeculativeExecTxnResult;
+#[cfg(target_arch = "wasm32")]
+use crate::types::block_identifier::BlockIdentifier;
+use crate::{
+    debug::error,
+    make_transfer_transaction,
+    types::{
+        block_identifier::BlockIdentifierInput, sdk_error::SdkError,
+        transaction_params::transaction_str_params::TransactionStrParams, uref::URef,
+        verbosity::Verbosity,
+    },
+    SDK,
+};
+use casper_client::{
+    rpcs::results::SpeculativeExecTxnResult as _SpeculativeExecTxnResult, SuccessResponse,
+};
+#[cfg(target_arch = "wasm32")]
+use wasm_bindgen::prelude::*;
+
+#[cfg(target_arch = "wasm32")]
+#[wasm_bindgen]
+impl SDK {
+    /// 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.
+    /// * `maybe_block_id_as_string` - An optional block ID as a string.
+    /// * `maybe_block_identifier` - An optional block identifier.
+    /// * `verbosity` - The verbosity level for logging (optional).
+    /// * `node_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.
+    #[allow(clippy::too_many_arguments)]
+    #[wasm_bindgen(js_name = "speculative_transfer_transaction")]
+    pub async fn speculative_transfer_transaction_js_alias(
+        &self,
+        maybe_source: Option<URef>,
+        target_account: &str,
+        amount: &str,
+        transaction_params: TransactionStrParams,
+        maybe_id: Option<String>,
+        maybe_block_id_as_string: Option<String>,
+        maybe_block_identifier: Option<BlockIdentifier>,
+        verbosity: Option<Verbosity>,
+        node_address: Option<String>,
+    ) -> Result<SpeculativeExecTxnResult, JsError> {
+        let maybe_block_identifier = if let Some(maybe_block_identifier) = maybe_block_identifier {
+            Some(BlockIdentifierInput::BlockIdentifier(
+                maybe_block_identifier,
+            ))
+        } else {
+            maybe_block_id_as_string.map(BlockIdentifierInput::String)
+        };
+        let result = self
+            .speculative_transfer_transaction(
+                maybe_source,
+                target_account,
+                amount,
+                transaction_params,
+                maybe_id,
+                maybe_block_identifier,
+                verbosity,
+                node_address,
+            )
+            .await;
+        match result {
+            Ok(data) => Ok(data.result.into()),
+            Err(err) => {
+                let err = &format!("Error occurred with {:?}", err);
+                error(err);
+                Err(JsError::new(err))
+            }
+        }
+    }
+}
+
+impl SDK {
+    /// Perform a speculative transfer transaction.
+    ///
+    /// # Arguments
+    ///
+    /// * `maybe_source` - Optional transfer source uref.
+    /// * `amount` - The amount to transfer.
+    /// * `target_account` - The target account.
+    /// * `transaction_params` - The transactionment parameters.
+    /// * `maybe_id` - An optional transfer ID (defaults to a random number).
+    /// * `maybe_block_identifier` - An optional block identifier.
+    /// * `verbosity` - The verbosity level for logging (optional).
+    /// * `node_address` - The address of the node to connect to (optional).
+    ///
+    /// # Returns
+    ///
+    /// A `Result` containing the result a `SuccessResponse<_SpeculativeExecTxnResult>` or a `SdkError` in case of an error.
+    #[allow(clippy::too_many_arguments)]
+    pub async fn speculative_transfer_transaction(
+        &self,
+        maybe_source: Option<URef>,
+        target_account: &str,
+        amount: &str,
+        transaction_params: TransactionStrParams,
+        maybe_id: Option<String>,
+        maybe_block_identifier: Option<BlockIdentifierInput>,
+        verbosity: Option<Verbosity>,
+        node_address: Option<String>,
+    ) -> Result<SuccessResponse<_SpeculativeExecTxnResult>, SdkError> {
+        // log("speculative_transfer_transaction!");
+        let transaction = make_transfer_transaction(
+            maybe_source,
+            target_account,
+            amount,
+            transaction_params,
+            maybe_id,
+        );
+
+        if let Err(err) = transaction {
+            let err_msg = format!("Error during speculative_transfer_transaction: {}", err);
+            error(&err_msg);
+            return Err(err);
+        }
+
+        self.speculative_exec(
+            transaction.unwrap(),
+            maybe_block_identifier,
+            verbosity,
+            node_address,
+        )
+        .await
+        .map_err(SdkError::from)
+    }
+}
+
+#[cfg(test)]
+mod tests {
+    use super::*;
+    use crate::{helpers::public_key_from_secret_key, types::block_identifier::BlockIdentifier};
+    use sdk_tests::{
+        config::{PAYMENT_TRANSFER_AMOUNT, TRANSFER_AMOUNT},
+        tests::helpers::{get_network_constants, get_user_private_key},
+    };
+
+    #[tokio::test]
+    #[ignore]
+    async fn _test_speculative_transfer_transaction_with_valid_params() {
+        // Arrange
+        let sdk = SDK::new(None, None);
+        let verbosity = Some(Verbosity::High);
+        let (_, _, default_speculative_address, chain_name) = get_network_constants();
+
+        let private_key = get_user_private_key(None).unwrap();
+        let initiator_addr = public_key_from_secret_key(&private_key).unwrap();
+
+        let transaction_params = TransactionStrParams::default();
+        transaction_params.set_secret_key(&private_key);
+        transaction_params.set_chain_name(&chain_name);
+        transaction_params.set_payment_amount(PAYMENT_TRANSFER_AMOUNT);
+
+        // Act
+        let result = sdk
+            .speculative_transfer_transaction(
+                None,
+                &initiator_addr,
+                TRANSFER_AMOUNT,
+                transaction_params,
+                None,
+                None,
+                verbosity,
+                Some(default_speculative_address),
+            )
+            .await;
+
+        // Assert
+        assert!(result.is_ok());
+    }
+
+    #[tokio::test]
+    #[ignore]
+    async fn _test_speculative_transfer_transaction_with_block_identifier() {
+        // Arrange
+        let sdk = SDK::new(None, None);
+        let verbosity = Some(Verbosity::High);
+        let (_, _, default_speculative_address, chain_name) = get_network_constants();
+        let block_identifier =
+            BlockIdentifierInput::BlockIdentifier(BlockIdentifier::from_height(1));
+
+        let private_key = get_user_private_key(None).unwrap();
+        let initiator_addr = public_key_from_secret_key(&private_key).unwrap();
+
+        let transaction_params = TransactionStrParams::default();
+        transaction_params.set_secret_key(&private_key);
+        transaction_params.set_chain_name(&chain_name);
+        transaction_params.set_payment_amount(PAYMENT_TRANSFER_AMOUNT);
+
+        // Act
+        let result = sdk
+            .speculative_transfer_transaction(
+                None,
+                &initiator_addr,
+                TRANSFER_AMOUNT,
+                transaction_params,
+                None,
+                Some(block_identifier),
+                verbosity,
+                Some(default_speculative_address),
+            )
+            .await;
+
+        // Assert
+        assert!(result.is_ok());
+    }
+
+    #[tokio::test]
+    async fn test_speculative_transfer_transaction_with_valid_params_without_private_key() {
+        // Arrange
+        let sdk = SDK::new(None, None);
+        let verbosity = Some(Verbosity::High);
+        let (_, _, default_speculative_address, chain_name) = get_network_constants();
+
+        let private_key = get_user_private_key(None).unwrap();
+        let initiator_addr = public_key_from_secret_key(&private_key).unwrap();
+
+        let transaction_params = TransactionStrParams::default();
+        transaction_params.set_chain_name(&chain_name);
+        transaction_params.set_initiator_addr(&initiator_addr);
+        transaction_params.set_payment_amount(PAYMENT_TRANSFER_AMOUNT);
+
+        // Act
+        let result = sdk
+            .speculative_transfer_transaction(
+                None,
+                &initiator_addr,
+                TRANSFER_AMOUNT,
+                transaction_params,
+                None,
+                None,
+                verbosity,
+                Some(default_speculative_address),
+            )
+            .await;
+
+        // Assert
+        assert!(result.is_err());
+    }
+
+    #[tokio::test]
+    async fn test_speculative_transfer_transaction_with_invalid_params() {
+        // Arrange
+        let sdk = SDK::new(None, None);
+        let verbosity = Some(Verbosity::High);
+        let (_, _, default_speculative_address, chain_name) = get_network_constants();
+
+        let error_message = "Invalid argument 'create_transaction (payment_amount)': payment_amount is required to be non empty";
+        let private_key = get_user_private_key(None).unwrap();
+        let initiator_addr = public_key_from_secret_key(&private_key).unwrap();
+
+        let transaction_params = TransactionStrParams::default();
+        transaction_params.set_chain_name(&chain_name);
+        transaction_params.set_secret_key(&private_key);
+        transaction_params.set_payment_amount(""); // This is not valid payment amount
+
+        // Act
+        let result = sdk
+            .speculative_transfer_transaction(
+                None,
+                &initiator_addr,
+                TRANSFER_AMOUNT,
+                transaction_params,
+                None,
+                None,
+                verbosity,
+                Some(default_speculative_address),
+            )
+            .await;
+
+        // Assert
+        assert!(result.is_err());
+
+        let err_string = result.err().unwrap().to_string();
+        assert!(err_string.contains(error_message));
+    }
+}
+
\ No newline at end of file diff --git a/api-rust/src/casper_rust_wasm_sdk/sdk/transaction/transaction.rs.html b/api-rust/src/casper_rust_wasm_sdk/sdk/transaction/transaction.rs.html new file mode 100644 index 000000000..308d622b8 --- /dev/null +++ b/api-rust/src/casper_rust_wasm_sdk/sdk/transaction/transaction.rs.html @@ -0,0 +1,545 @@ +transaction.rs - source
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+
use crate::{
+    debug::error,
+    types::{
+        sdk_error::SdkError,
+        transaction_params::{
+            transaction_builder_params::{
+                transaction_builder_params_to_casper_client, TransactionBuilderParams,
+            },
+            transaction_str_params::{
+                transaction_str_params_to_casper_client, TransactionStrParams,
+            },
+        },
+        verbosity::Verbosity,
+    },
+    SDK,
+};
+use casper_client::{
+    cli::make_transaction, rpcs::results::PutTransactionResult as _PutTransactionResult,
+    SuccessResponse,
+};
+#[cfg(target_arch = "wasm32")]
+use gloo_utils::format::JsValueSerdeExt;
+#[cfg(target_arch = "wasm32")]
+use serde::{Deserialize, Serialize};
+#[cfg(target_arch = "wasm32")]
+use wasm_bindgen::prelude::*;
+
+// Define a struct to wrap the result of a transaction.
+#[cfg(target_arch = "wasm32")]
+#[derive(Debug, Deserialize, Clone, Serialize)]
+#[wasm_bindgen]
+pub struct PutTransactionResult(_PutTransactionResult);
+
+/// Implement conversions between PutTransactionResult and _PutTransactionResult.
+#[cfg(target_arch = "wasm32")]
+impl From<PutTransactionResult> for _PutTransactionResult {
+    fn from(result: PutTransactionResult) -> Self {
+        result.0
+    }
+}
+#[cfg(target_arch = "wasm32")]
+impl From<_PutTransactionResult> for PutTransactionResult {
+    fn from(result: _PutTransactionResult) -> Self {
+        PutTransactionResult(result)
+    }
+}
+
+/// Implement JavaScript bindings for PutTransactionResult.
+#[cfg(target_arch = "wasm32")]
+#[wasm_bindgen]
+impl PutTransactionResult {
+    /// Gets the API version as a JavaScript value.
+    #[wasm_bindgen(getter)]
+    pub fn api_version(&self) -> JsValue {
+        JsValue::from_serde(&self.0.api_version).unwrap()
+    }
+
+    // /// Gets the transaction hash associated with this result.
+    // #[wasm_bindgen(getter)]
+    // pub fn transaction_hash(&self) -> TransactionV1Hash {
+    //     self.0.transaction_hash.into()
+    // }
+
+    /// Converts PutTransactionResult to a JavaScript object.
+    #[wasm_bindgen(js_name = "toJson")]
+    pub fn to_json(&self) -> JsValue {
+        JsValue::from_serde(&self.0).unwrap_or(JsValue::null())
+    }
+}
+
+#[cfg(target_arch = "wasm32")]
+#[wasm_bindgen]
+impl SDK {
+    /// JavaScript function for transactioning with deserialized parameters.
+    ///
+    /// # Arguments
+    ///
+    /// * `transaction_params` - Transaction parameters.
+    /// * `builder_params` - Session parameters.
+    /// * `verbosity` - An optional verbosity level.
+    /// * `node_address` - An optional node address.
+    ///
+    /// # Returns
+    ///
+    /// A result containing PutTransactionResult or a JsError.
+    #[wasm_bindgen(js_name = "transaction")]
+    pub async fn transaction_js_alias(
+        &self,
+        builder_params: TransactionBuilderParams,
+        transaction_params: TransactionStrParams,
+        verbosity: Option<Verbosity>,
+        node_address: Option<String>,
+    ) -> Result<PutTransactionResult, JsError> {
+        let result = self
+            .transaction(builder_params, transaction_params, verbosity, node_address)
+            .await;
+        match result {
+            Ok(data) => Ok(data.result.into()),
+            Err(err) => {
+                let err = &format!("Error occurred with {:?}", err);
+                error(err);
+                Err(JsError::new(err))
+            }
+        }
+    }
+}
+
+impl SDK {
+    /// Perform a transaction operation.
+    ///
+    /// # Arguments
+    ///
+    /// * `builder_params` - Transaction Builder parameters.
+    /// * `transaction_params` - Transaction parameters.
+    /// * `verbosity` - An optional verbosity level.
+    /// * `node_address` - An optional node address.
+    ///
+    /// # Returns
+    ///
+    /// A result containing a `SuccessResponse<_PutTransactionResult>` or an SdkError.
+    pub async fn transaction(
+        &self,
+        builder_params: TransactionBuilderParams,
+        transaction_params: TransactionStrParams,
+        verbosity: Option<Verbosity>,
+        node_address: Option<String>,
+    ) -> Result<SuccessResponse<_PutTransactionResult>, SdkError> {
+        //log("transaction!");
+        let transaction = match make_transaction(
+            transaction_builder_params_to_casper_client(&builder_params),
+            transaction_str_params_to_casper_client(&transaction_params),
+            false,
+        ) {
+            Ok(transaction) => transaction,
+            Err(err) => {
+                let err_msg = format!("Error during transaction: {}", err);
+                error(&err_msg);
+                return Err(SdkError::from(err));
+            }
+        };
+
+        self.put_transaction(transaction.into(), verbosity, node_address)
+            .await
+            .map_err(SdkError::from)
+    }
+}
+
+#[cfg(test)]
+mod tests {
+    use super::*;
+    use crate::helpers::public_key_from_secret_key;
+    use once_cell::sync::Lazy;
+    use sdk_tests::{
+        config::{ARGS_SIMPLE, HELLO_CONTRACT, PAYMENT_AMOUNT, WASM_PATH},
+        tests::helpers::{get_network_constants, get_user_private_key, read_wasm_file},
+    };
+
+    static ARGS: Lazy<Vec<String>> =
+        Lazy::new(|| ARGS_SIMPLE.iter().map(|s| s.to_string()).collect());
+
+    fn get_builder_params() -> &'static TransactionBuilderParams {
+        static mut BUILDER_PARAMS: Option<TransactionBuilderParams> = None;
+
+        unsafe {
+            if BUILDER_PARAMS.is_none() {
+                let file_path = &format!("{WASM_PATH}{HELLO_CONTRACT}");
+                let transaction_bytes = match read_wasm_file(file_path) {
+                    Ok(transaction_bytes) => transaction_bytes,
+                    Err(err) => {
+                        eprintln!("Error reading file: {:?}", err);
+                        unimplemented!()
+                    }
+                };
+                let builder_params =
+                    TransactionBuilderParams::new_session(Some(transaction_bytes.into()));
+                BUILDER_PARAMS = Some(builder_params);
+            }
+            BUILDER_PARAMS.as_ref().unwrap()
+        }
+    }
+
+    #[tokio::test]
+    async fn test_transaction_with_valid_transaction_params() {
+        // Arrange
+        let sdk = SDK::new(None, None);
+        let verbosity = Some(Verbosity::High);
+        let (node_address, _, _, chain_name) = get_network_constants();
+        let private_key = get_user_private_key(None).unwrap();
+
+        let mut transaction_params = TransactionStrParams::default();
+        transaction_params.set_secret_key(&private_key);
+        transaction_params.set_chain_name(&chain_name);
+        transaction_params.set_payment_amount(PAYMENT_AMOUNT);
+        transaction_params.set_session_args_simple(ARGS.to_vec());
+
+        // Act
+        let result = sdk
+            .transaction(
+                get_builder_params().clone(),
+                transaction_params,
+                verbosity,
+                Some(node_address),
+            )
+            .await;
+
+        // Assert
+        assert!(result.is_ok());
+    }
+
+    #[tokio::test]
+    async fn test_transaction_with_valid_transaction_params_without_private_key() {
+        // Arrange
+        let sdk = SDK::new(None, None);
+        let verbosity = Some(Verbosity::High);
+        let (node_address, _, _, chain_name) = get_network_constants();
+        let private_key = get_user_private_key(None).unwrap();
+        let initiator_addr = public_key_from_secret_key(&private_key).unwrap();
+        let error_message = "Invalid transaction";
+
+        let mut transaction_params = TransactionStrParams::default();
+        transaction_params.set_chain_name(&chain_name);
+        transaction_params.set_initiator_addr(&initiator_addr);
+        transaction_params.set_payment_amount(PAYMENT_AMOUNT);
+        transaction_params.set_session_args_simple(ARGS.to_vec());
+
+        // Act
+        let result = sdk
+            .transaction(
+                get_builder_params().clone(),
+                transaction_params,
+                verbosity,
+                Some(node_address),
+            )
+            .await;
+
+        // Assert
+        assert!(result.is_err());
+        let err_string = result.err().unwrap().to_string();
+        assert!(err_string.contains(error_message));
+    }
+
+    #[tokio::test]
+    async fn test_transaction_with_invalid_transaction_params() {
+        // Arrange
+        let sdk = SDK::new(None, None);
+        let verbosity = Some(Verbosity::High);
+        let (node_address, _, _, chain_name) = get_network_constants();
+
+        let error_message = "Invalid argument 'create_transaction (payment_amount)': payment_amount is required to be non empty";
+        let private_key = get_user_private_key(None).unwrap();
+
+        let transaction_params = TransactionStrParams::default();
+        transaction_params.set_secret_key(&private_key);
+        transaction_params.set_chain_name(&chain_name);
+        transaction_params.set_payment_amount(""); // This is not valid payment amount
+
+        // Act
+        let result = sdk
+            .transaction(
+                get_builder_params().clone(),
+                transaction_params,
+                verbosity,
+                Some(node_address),
+            )
+            .await;
+        // Assert
+        assert!(result.is_err());
+
+        let err_string = result.err().unwrap().to_string();
+        assert!(err_string.contains(error_message));
+    }
+}
+
\ No newline at end of file diff --git a/api-rust/src/casper_rust_wasm_sdk/sdk/transaction/transfer_transaction.rs.html b/api-rust/src/casper_rust_wasm_sdk/sdk/transaction/transfer_transaction.rs.html new file mode 100644 index 000000000..b2ad10a50 --- /dev/null +++ b/api-rust/src/casper_rust_wasm_sdk/sdk/transaction/transfer_transaction.rs.html @@ -0,0 +1,461 @@ +transfer_transaction.rs - source
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+
#[cfg(target_arch = "wasm32")]
+use crate::transaction::transaction::PutTransactionResult;
+use crate::{
+    debug::error,
+    make_transfer_transaction,
+    types::{
+        sdk_error::SdkError, transaction_params::transaction_str_params::TransactionStrParams,
+        uref::URef, verbosity::Verbosity,
+    },
+    SDK,
+};
+use casper_client::{
+    rpcs::results::PutTransactionResult as _PutTransactionResult, SuccessResponse,
+};
+#[cfg(target_arch = "wasm32")]
+use wasm_bindgen::prelude::*;
+
+#[cfg(target_arch = "wasm32")]
+#[wasm_bindgen]
+impl SDK {
+    /// 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).
+    /// * `node_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.
+    #[wasm_bindgen(js_name = "transfer_transaction")]
+    #[allow(clippy::too_many_arguments)]
+    pub async fn transfer_transactionjs_alias(
+        &self,
+        maybe_source: Option<URef>,
+        target_account: &str,
+        amount: &str,
+        transaction_params: TransactionStrParams,
+        maybe_id: Option<String>,
+        verbosity: Option<Verbosity>,
+        node_address: Option<String>,
+    ) -> Result<PutTransactionResult, JsError> {
+        let result = self
+            .transfer_transaction(
+                maybe_source,
+                target_account,
+                amount,
+                transaction_params,
+                maybe_id,
+                verbosity,
+                node_address,
+            )
+            .await;
+        match result {
+            Ok(data) => Ok(data.result.into()),
+            Err(err) => {
+                let err = &format!("Error occurred with {:?}", err);
+                error(err);
+                Err(JsError::new(err))
+            }
+        }
+    }
+}
+
+impl SDK {
+    /// Perform a transfer transaction of 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).
+    /// * `node_address` - The address of the node to connect to (optional).
+    ///
+    /// # Returns
+    ///
+    /// A `Result` containing the result a `SuccessResponse<_PutTransactionResult>` of the transfer or a `SdkError` in case of an error.
+    #[allow(clippy::too_many_arguments)]
+    pub async fn transfer_transaction(
+        &self,
+        maybe_source: Option<URef>,
+        target_account: &str,
+        amount: &str,
+        transaction_params: TransactionStrParams,
+        maybe_id: Option<String>,
+        verbosity: Option<Verbosity>,
+        node_address: Option<String>,
+    ) -> Result<SuccessResponse<_PutTransactionResult>, SdkError> {
+        //log("transfer!");
+        let transaction = make_transfer_transaction(
+            maybe_source,
+            target_account,
+            amount,
+            transaction_params,
+            maybe_id,
+        );
+
+        if let Err(err) = transaction {
+            let err_msg = format!("Error during transfer: {}", err);
+            error(&err_msg);
+            return Err(err);
+        }
+
+        self.put_transaction(transaction.unwrap(), verbosity, node_address)
+            .await
+            .map_err(SdkError::from)
+    }
+}
+
+#[cfg(test)]
+mod tests {
+
+    use super::*;
+    use crate::helpers::public_key_from_secret_key;
+    use sdk_tests::{
+        config::TRANSFER_AMOUNT,
+        tests::helpers::{get_network_constants, get_user_private_key},
+    };
+
+    #[tokio::test]
+    async fn test_transfer_with_valid_transfer_params() {
+        // Arrange
+        let sdk = SDK::new(None, None);
+        let verbosity = Some(Verbosity::High);
+        let (node_address, _, _, chain_name) = get_network_constants();
+
+        let private_key = get_user_private_key(None).unwrap();
+        let initiator_addr = public_key_from_secret_key(&private_key).unwrap();
+
+        let transaction_params = TransactionStrParams::default();
+        transaction_params.set_secret_key(&private_key);
+        transaction_params.set_chain_name(&chain_name);
+        transaction_params.set_payment_amount(TRANSFER_AMOUNT);
+
+        // Act
+        let result = sdk
+            .transfer_transaction(
+                None,
+                &initiator_addr,
+                TRANSFER_AMOUNT,
+                transaction_params,
+                None,
+                verbosity,
+                Some(node_address),
+            )
+            .await;
+
+        // Assert
+        assert!(result.is_ok());
+    }
+
+    #[tokio::test]
+    async fn test_transfer_with_valid_transfer_params_without_private_key() {
+        // Arrange
+        let sdk = SDK::new(None, None);
+        let verbosity = Some(Verbosity::High);
+        let (node_address, _, _, chain_name) = get_network_constants();
+
+        let error_message = "Invalid transaction";
+
+        let private_key = get_user_private_key(None).unwrap();
+        let initiator_addr = public_key_from_secret_key(&private_key).unwrap();
+
+        let transaction_params = TransactionStrParams::default();
+        transaction_params.set_chain_name(&chain_name);
+        transaction_params.set_initiator_addr(&initiator_addr);
+        transaction_params.set_payment_amount(TRANSFER_AMOUNT);
+
+        // Act
+        let result = sdk
+            .transfer_transaction(
+                None,
+                &initiator_addr,
+                TRANSFER_AMOUNT,
+                transaction_params,
+                None,
+                verbosity,
+                Some(node_address),
+            )
+            .await;
+
+        // Assert
+        assert!(result.is_err());
+        let err_string = result.err().unwrap().to_string();
+        assert!(err_string.contains(error_message));
+    }
+
+    #[tokio::test]
+    async fn test_transfer_with_invalid_transfer_params() {
+        // Arrange
+        let sdk = SDK::new(None, None);
+        let verbosity = Some(Verbosity::High);
+        let (node_address, _, _, chain_name) = get_network_constants();
+
+        let error_message = "Invalid argument 'create_transaction (payment_amount)': payment_amount is required to be non empty";
+        let private_key = get_user_private_key(None).unwrap();
+        let initiator_addr = public_key_from_secret_key(&private_key).unwrap();
+
+        let transaction_params = TransactionStrParams::default();
+        transaction_params.set_secret_key(&private_key);
+        transaction_params.set_chain_name(&chain_name);
+        transaction_params.set_payment_amount(""); // This is not valid payment amount
+
+        // Act
+        let result = sdk
+            .transfer_transaction(
+                None,
+                &initiator_addr,
+                TRANSFER_AMOUNT,
+                transaction_params,
+                None,
+                verbosity,
+                Some(node_address),
+            )
+            .await;
+        // Assert
+        assert!(result.is_err());
+
+        let err_string = result.err().unwrap().to_string();
+        assert!(err_string.contains(error_message));
+    }
+}
+
\ No newline at end of file diff --git a/api-rust/src/casper_rust_wasm_sdk/sdk/transaction_utils/make_transaction.rs.html b/api-rust/src/casper_rust_wasm_sdk/sdk/transaction_utils/make_transaction.rs.html new file mode 100644 index 000000000..da38bdb79 --- /dev/null +++ b/api-rust/src/casper_rust_wasm_sdk/sdk/transaction_utils/make_transaction.rs.html @@ -0,0 +1,371 @@ +make_transaction.rs - source
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+
#[cfg(target_arch = "wasm32")]
+use crate::debug::error;
+use crate::{
+    types::{
+        sdk_error::SdkError,
+        transaction::Transaction,
+        transaction_params::{
+            transaction_builder_params::{
+                transaction_builder_params_to_casper_client, TransactionBuilderParams,
+            },
+            transaction_str_params::{
+                transaction_str_params_to_casper_client, TransactionStrParams,
+            },
+        },
+    },
+    SDK,
+};
+use casper_client::cli::make_transaction as client_make_transaction;
+#[cfg(target_arch = "wasm32")]
+use wasm_bindgen::prelude::*;
+
+/// Exposes the `make_transaction` function to JavaScript with an alias.
+#[cfg(target_arch = "wasm32")]
+#[wasm_bindgen]
+impl SDK {
+    /// 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.
+    #[wasm_bindgen(js_name = "make_transaction")]
+    pub fn make_transaction_js_alias(
+        &self,
+        builder_params: TransactionBuilderParams,
+        transaction_params: TransactionStrParams,
+    ) -> Result<Transaction, JsError> {
+        let result = make_transaction(builder_params, transaction_params);
+        match result {
+            Ok(data) => Ok(data),
+            Err(err) => {
+                let err = &format!("Error occurred with {:?}", err);
+                error(err);
+                Err(JsError::new(err))
+            }
+        }
+    }
+}
+
+impl SDK {
+    /// Creates a transaction using the provided parameters.
+    ///
+    /// # Arguments
+    ///
+    /// * `builder_params` - Transaction Builder parameters.
+    /// * `transaction_params` - The transaction parameters.
+    ///
+    /// # Returns
+    ///
+    /// A `Result` containing the created `Transaction` or a `SdkError` in case of an error.
+    pub fn make_transaction(
+        &self,
+        builder_params: TransactionBuilderParams,
+        transaction_params: TransactionStrParams,
+    ) -> Result<Transaction, SdkError> {
+        make_transaction(builder_params, transaction_params).map_err(SdkError::from)
+    }
+}
+
+/// Internal function to create a transaction.
+pub(crate) fn make_transaction(
+    builder_params: TransactionBuilderParams,
+    transaction_params: TransactionStrParams,
+) -> Result<Transaction, SdkError> {
+    let transaction_builder_params = transaction_builder_params_to_casper_client(&builder_params);
+    let transaction_str_params = transaction_str_params_to_casper_client(&transaction_params);
+    let transaction =
+        client_make_transaction(transaction_builder_params, transaction_str_params, false);
+    transaction.map(Into::into).map_err(SdkError::from)
+}
+
+#[cfg(test)]
+mod tests {
+
+    use super::*;
+    use crate::{
+        helpers::public_key_from_secret_key, types::addressable_entity_hash::AddressableEntityHash,
+    };
+    use sdk_tests::{
+        config::{ENTRYPOINT_MINT, PAYMENT_AMOUNT},
+        tests::helpers::{get_network_constants, get_user_private_key},
+    };
+
+    #[tokio::test]
+    async fn test_make_transaction_with_valid_params() {
+        // Arrange
+        let sdk = SDK::new(None, None);
+        let (_, _, _, chain_name) = get_network_constants();
+        let private_key = get_user_private_key(None).unwrap();
+
+        let transaction_params = TransactionStrParams::default();
+        transaction_params.set_secret_key(&private_key);
+        transaction_params.set_chain_name(&chain_name);
+        transaction_params.set_payment_amount(PAYMENT_AMOUNT);
+
+        let entity_hash = AddressableEntityHash::from_formatted_str(
+            "addressable-entity-cfa781f5eb69c3eee952c2944ce9670a049f88c5e46b83fb5881ebe13fb98e6d",
+        )
+        .unwrap();
+        let builder_params = TransactionBuilderParams::new_invocable_entity(
+            &entity_hash.to_formatted_string(),
+            ENTRYPOINT_MINT,
+        );
+
+        // Act
+        let result = sdk.make_transaction(builder_params, transaction_params);
+
+        // Assert
+        assert!(result.is_ok());
+    }
+
+    #[tokio::test]
+    async fn test_make_transaction_with_valid_params_without_private_key() {
+        // Arrange
+        let sdk = SDK::new(None, None);
+        let (_, _, _, chain_name) = get_network_constants();
+        let private_key = get_user_private_key(None).unwrap();
+        let initiator_addr = public_key_from_secret_key(&private_key).unwrap();
+
+        let transaction_params = TransactionStrParams::default();
+        transaction_params.set_chain_name(&chain_name);
+        transaction_params.set_initiator_addr(&initiator_addr);
+        transaction_params.set_payment_amount(PAYMENT_AMOUNT);
+
+        let entity_hash = AddressableEntityHash::from_formatted_str(
+            "addressable-entity-cfa781f5eb69c3eee952c2944ce9670a049f88c5e46b83fb5881ebe13fb98e6d",
+        )
+        .unwrap();
+        let builder_params = TransactionBuilderParams::new_invocable_entity(
+            &entity_hash.to_formatted_string(),
+            ENTRYPOINT_MINT,
+        );
+
+        // Act
+        let result = sdk.make_transaction(builder_params, transaction_params);
+        // Assert
+        assert!(result.is_ok());
+    }
+
+    #[tokio::test]
+    async fn test_make_transaction_with_invalid_params() {
+        // Arrange
+        let sdk = SDK::new(None, None);
+        let (_, _, _, chain_name) = get_network_constants();
+        let error_message = "Invalid argument 'create_transaction (payment_amount)': payment_amount is required to be non empty";
+        let private_key = get_user_private_key(None).unwrap();
+
+        let transaction_params = TransactionStrParams::default();
+        transaction_params.set_secret_key(&private_key);
+        transaction_params.set_chain_name(&chain_name);
+        transaction_params.set_payment_amount(""); // This is not valid payment amount
+
+        let entity_hash = AddressableEntityHash::from_formatted_str(
+            "addressable-entity-cfa781f5eb69c3eee952c2944ce9670a049f88c5e46b83fb5881ebe13fb98e6d",
+        )
+        .unwrap();
+        let builder_params = TransactionBuilderParams::new_invocable_entity(
+            &entity_hash.to_formatted_string(),
+            ENTRYPOINT_MINT,
+        );
+
+        // Act
+        let result = sdk.make_transaction(builder_params, transaction_params);
+
+        // Assert
+        assert!(result.is_err());
+
+        let err_string = result.err().unwrap().to_string();
+        assert!(err_string.contains(error_message));
+    }
+}
+
\ No newline at end of file diff --git a/api-rust/src/casper_rust_wasm_sdk/sdk/transaction_utils/make_transfer_transaction.rs.html b/api-rust/src/casper_rust_wasm_sdk/sdk/transaction_utils/make_transfer_transaction.rs.html new file mode 100644 index 000000000..3f0b6eeef --- /dev/null +++ b/api-rust/src/casper_rust_wasm_sdk/sdk/transaction_utils/make_transfer_transaction.rs.html @@ -0,0 +1,449 @@ +make_transfer_transaction.rs - source
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+
#[cfg(target_arch = "wasm32")]
+use crate::debug::error;
+use crate::{
+    types::{
+        sdk_error::SdkError,
+        transaction::Transaction,
+        transaction_params::transaction_str_params::{
+            transaction_str_params_to_casper_client, TransactionStrParams,
+        },
+        uref::URef,
+    },
+    SDK,
+};
+use casper_client::cli::{
+    make_transaction as client_make_transaction, parse::transfer_target, TransactionBuilderParams,
+};
+use casper_types::U512;
+use rand::Rng;
+use std::str::FromStr;
+#[cfg(target_arch = "wasm32")]
+use wasm_bindgen::prelude::*;
+
+/// Exposes the `make_transfer_transaction` function to JavaScript with an alias.
+#[cfg(target_arch = "wasm32")]
+#[wasm_bindgen]
+impl SDK {
+    /// JS function for `make_transfer_transaction`.
+    ///
+    /// # 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.
+    ///
+    /// # Returns
+    ///
+    /// A `Result` containing the created `Transaction` or a `JsError` in case of an error.
+    #[wasm_bindgen(js_name = "make_transfer_transaction")]
+    pub fn make_transfer_transaction_js_alias(
+        &self,
+        maybe_source: Option<URef>,
+        target: &str,
+        amount: &str,
+        transaction_params: TransactionStrParams,
+        maybe_id: Option<String>,
+    ) -> Result<Transaction, JsError> {
+        // log("make_transfer_transaction");
+        let result = self.make_transfer_transaction(
+            maybe_source,
+            target,
+            amount,
+            transaction_params,
+            maybe_id,
+        );
+        match result {
+            Ok(data) => Ok(data),
+            Err(err) => {
+                let err = &format!("Error occurred with {:?}", err);
+                error(err);
+                Err(JsError::new(err))
+            }
+        }
+    }
+}
+
+impl SDK {
+    /// Creates a transfer transaction with the provided parameters.
+    ///
+    /// # 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.
+    ///
+    /// # Returns
+    ///
+    /// A `Result` containing the created `Transaction` or a `SdkError` in case of an error.
+    pub fn make_transfer_transaction(
+        &self,
+        maybe_source: Option<URef>,
+        target: &str,
+        amount: &str,
+        transaction_params: TransactionStrParams,
+        maybe_id: Option<String>,
+    ) -> Result<Transaction, SdkError> {
+        // log("make_transfer_transaction");
+        make_transfer_transaction(maybe_source, target, amount, transaction_params, maybe_id)
+            .map_err(SdkError::from)
+    }
+}
+
+/// Internal function to create a transfer transaction.
+pub(crate) fn make_transfer_transaction(
+    maybe_source: Option<URef>,
+    target: &str,
+    amount: &str,
+    transaction_params: TransactionStrParams,
+    maybe_id: Option<String>,
+) -> Result<Transaction, SdkError> {
+    let id = if let Some(maybe_id) = maybe_id {
+        u64::from_str(&maybe_id).unwrap_or_else(|_| rand::thread_rng().gen::<u64>())
+    } else {
+        rand::thread_rng().gen::<u64>()
+    };
+
+    let target = transfer_target(target)?;
+
+    let amount = U512::from_str(amount).map_err(|error| SdkError::FailedToDecodeHex {
+        context: "make_transfer_transaction",
+        error: error.to_string(),
+    })?;
+
+    let builder_params = TransactionBuilderParams::Transfer {
+        maybe_source: maybe_source.map(Into::into),
+        target,
+        amount,
+        maybe_id: Some(id),
+    };
+
+    transaction_params.set_standard_payment(true);
+
+    let transaction = client_make_transaction(
+        builder_params,
+        transaction_str_params_to_casper_client(&transaction_params),
+        false,
+    );
+    transaction.map(Into::into).map_err(SdkError::from)
+}
+
+#[cfg(test)]
+mod tests {
+    use super::*;
+    use crate::helpers::public_key_from_secret_key;
+    use sdk_tests::{
+        config::{PAYMENT_TRANSFER_AMOUNT, TRANSFER_AMOUNT},
+        tests::helpers::{get_network_constants, get_user_private_key},
+    };
+
+    #[tokio::test]
+    async fn test_make_transfer_transaction_with_valid_transfer_params() {
+        // Arrange
+        let sdk = SDK::new(None, None);
+        let (_, _, _, chain_name) = get_network_constants();
+        let private_key = get_user_private_key(None).unwrap();
+        let initiator_addr = public_key_from_secret_key(&private_key).unwrap();
+
+        let transaction_params = TransactionStrParams::default();
+        transaction_params.set_secret_key(&private_key);
+        transaction_params.set_chain_name(&chain_name);
+        transaction_params.set_payment_amount(PAYMENT_TRANSFER_AMOUNT);
+
+        // Act
+        let result = sdk.make_transfer_transaction(
+            None,
+            &initiator_addr,
+            TRANSFER_AMOUNT,
+            transaction_params,
+            None,
+        );
+
+        // Assert
+        assert!(result.is_ok());
+    }
+
+    #[tokio::test]
+    async fn test_make_transfer_transaction_with_valid_transfer_params_without_private_key() {
+        // Arrange
+        let sdk = SDK::new(None, None);
+        let (_, _, _, chain_name) = get_network_constants();
+        let private_key = get_user_private_key(None).unwrap();
+        let initiator_addr = public_key_from_secret_key(&private_key).unwrap();
+
+        let transaction_params = TransactionStrParams::default();
+        transaction_params.set_chain_name(&chain_name);
+        transaction_params.set_initiator_addr(&initiator_addr);
+        transaction_params.set_payment_amount(PAYMENT_TRANSFER_AMOUNT);
+
+        // Act
+        let result = sdk.make_transfer_transaction(
+            None,
+            &initiator_addr,
+            TRANSFER_AMOUNT,
+            transaction_params,
+            None,
+        );
+
+        // Assert
+        assert!(result.is_ok());
+    }
+
+    #[tokio::test]
+    async fn test_make_transfer_transaction_with_invalid_transfer_params() {
+        // Arrange
+        let sdk = SDK::new(None, None);
+        let (_, _, _, chain_name) = get_network_constants();
+        let error_message = "Invalid argument 'create_transaction (payment_amount)': payment_amount is required to be non empty";
+        let private_key = get_user_private_key(None).unwrap();
+        let initiator_addr = public_key_from_secret_key(&private_key).unwrap();
+
+        let transaction_params = TransactionStrParams::default();
+        transaction_params.set_secret_key(&private_key);
+        transaction_params.set_chain_name(&chain_name);
+        transaction_params.set_payment_amount(""); // This is not valid payment amoun
+
+        // Act
+        let result = sdk.make_transfer_transaction(
+            None,
+            &initiator_addr,
+            TRANSFER_AMOUNT,
+            transaction_params,
+            None,
+        );
+        // Assert
+
+        assert!(result.is_err());
+
+        let err_string = result.err().unwrap().to_string();
+        assert!(err_string.contains(error_message));
+    }
+}
+
\ No newline at end of file diff --git a/api-rust/src/casper_rust_wasm_sdk/sdk/transaction_utils/mod.rs.html b/api-rust/src/casper_rust_wasm_sdk/sdk/transaction_utils/mod.rs.html new file mode 100644 index 000000000..c670f5a59 --- /dev/null +++ b/api-rust/src/casper_rust_wasm_sdk/sdk/transaction_utils/mod.rs.html @@ -0,0 +1,15 @@ +mod.rs - source
1
+2
+3
+4
+5
+6
+7
+
pub(crate) mod make_transaction;
+pub(crate) use make_transaction::make_transaction;
+
+pub(crate) mod make_transfer_transaction;
+pub(crate) use make_transfer_transaction::make_transfer_transaction;
+
+pub(crate) mod sign_transaction;
+
\ No newline at end of file diff --git a/api-rust/src/casper_rust_wasm_sdk/sdk/transaction_utils/sign_transaction.rs.html b/api-rust/src/casper_rust_wasm_sdk/sdk/transaction_utils/sign_transaction.rs.html new file mode 100644 index 000000000..f2c301ce0 --- /dev/null +++ b/api-rust/src/casper_rust_wasm_sdk/sdk/transaction_utils/sign_transaction.rs.html @@ -0,0 +1,303 @@ +sign_transaction.rs - source
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+
use crate::types::transaction::Transaction;
+use crate::SDK;
+#[cfg(target_arch = "wasm32")]
+use wasm_bindgen::prelude::*;
+
+/// Exposes the `sign_transaction` function to JavaScript with an alias.
+#[cfg(target_arch = "wasm32")]
+#[wasm_bindgen]
+impl SDK {
+    /// JS function for `sign_transaction`.
+    ///
+    /// # Arguments
+    ///
+    /// * `transaction` - The transaction to sign.
+    /// * `secret_key` - The secret key for signing.
+    ///
+    /// # Returns
+    ///
+    /// The signed `Transaction`.
+    #[wasm_bindgen(js_name = "sign_transaction")]
+    pub fn sign_transaction_js_alias(
+        &self,
+        transaction: Transaction,
+        secret_key: &str,
+    ) -> Transaction {
+        sign_transaction(transaction, secret_key)
+    }
+}
+
+impl SDK {
+    /// Signs a transaction using the provided secret key.
+    ///
+    /// # Arguments
+    ///
+    /// * `transaction` - The transaction to sign.
+    /// * `secret_key` - The secret key for signing.
+    ///
+    /// # Returns
+    ///
+    /// The signed `Transaction`.
+    pub fn sign_transaction(&self, transaction: Transaction, secret_key: &str) -> Transaction {
+        sign_transaction(transaction, secret_key)
+    }
+}
+
+/// Internal function to sign a transaction.
+pub(crate) fn sign_transaction(mut transaction: Transaction, secret_key: &str) -> Transaction {
+    // log("sign_transaction!");
+    transaction.sign(secret_key)
+}
+
+#[cfg(test)]
+mod tests {
+    use super::*;
+    use crate::{
+        helpers::public_key_from_secret_key,
+        types::{
+            addressable_entity_hash::AddressableEntityHash,
+            transaction_params::{
+                transaction_builder_params::TransactionBuilderParams,
+                transaction_str_params::TransactionStrParams,
+            },
+        },
+    };
+    use sdk_tests::{
+        config::{ENTRYPOINT_MINT, PAYMENT_AMOUNT},
+        tests::helpers::{get_network_constants, get_user_private_key},
+    };
+
+    #[tokio::test]
+    async fn test_sign_transaction_with_valid_params() {
+        // Arrange
+        let sdk = SDK::new(None, None);
+        let (_, _, _, chain_name) = get_network_constants();
+
+        let private_key = get_user_private_key(None).unwrap();
+        let initiator_addr = public_key_from_secret_key(&private_key).unwrap();
+
+        let transaction_params = TransactionStrParams::default();
+        transaction_params.set_secret_key(&private_key);
+        transaction_params.set_chain_name(&chain_name);
+        transaction_params.set_payment_amount(PAYMENT_AMOUNT);
+
+        let entity_hash = AddressableEntityHash::from_formatted_str(
+            "addressable-entity-cfa781f5eb69c3eee952c2944ce9670a049f88c5e46b83fb5881ebe13fb98e6d",
+        )
+        .unwrap();
+        let builder_params = TransactionBuilderParams::new_invocable_entity(
+            &entity_hash.to_formatted_string(),
+            ENTRYPOINT_MINT,
+        );
+
+        // Act
+        let transaction = sdk
+            .make_transaction(builder_params, transaction_params)
+            .unwrap();
+
+        let signed_transaction = sdk.sign_transaction(transaction, &private_key);
+
+        // Assert
+        assert!(signed_transaction.verify());
+        // assert!(signed_transaction.has_valid_hash());
+        assert!(!signed_transaction
+            .compute_approvals_hash()
+            .unwrap()
+            .to_string()
+            .is_empty());
+        assert_eq!(signed_transaction.initiator_addr(), initiator_addr);
+    }
+
+    #[tokio::test]
+    async fn test_sign_transaction_with_invalid_signature() {
+        // Arrange
+        let sdk = SDK::new(None, None);
+        let (_, _, _, chain_name) = get_network_constants();
+
+        let private_key = get_user_private_key(None).unwrap();
+        let initiator_addr = public_key_from_secret_key(&private_key).unwrap();
+
+        let transaction_params = TransactionStrParams::default();
+        transaction_params.set_secret_key(&private_key);
+        transaction_params.set_chain_name(&chain_name);
+        transaction_params.set_payment_amount(PAYMENT_AMOUNT);
+
+        let entity_hash = AddressableEntityHash::from_formatted_str(
+            "addressable-entity-cfa781f5eb69c3eee952c2944ce9670a049f88c5e46b83fb5881ebe13fb98e6d",
+        )
+        .unwrap();
+        let builder_params = TransactionBuilderParams::new_invocable_entity(
+            &entity_hash.to_formatted_string(),
+            ENTRYPOINT_MINT,
+        );
+
+        // Act
+        let transaction = sdk
+            .make_transaction(builder_params, transaction_params)
+            .unwrap();
+
+        let signed_transaction = sdk.sign_transaction(transaction, "test_wrong_signature");
+
+        // Assert
+        // assert!(signed_transaction.has_valid_hash());
+        assert!(signed_transaction.verify());
+        assert!(!signed_transaction
+            .compute_approvals_hash()
+            .unwrap()
+            .to_string()
+            .is_empty());
+        assert_eq!(signed_transaction.initiator_addr(), initiator_addr);
+    }
+}
+
\ No newline at end of file diff --git a/api-rust/src/casper_rust_wasm_sdk/sdk/watcher/mod.rs.html b/api-rust/src/casper_rust_wasm_sdk/sdk/watcher/mod.rs.html new file mode 100644 index 000000000..74c679aa8 --- /dev/null +++ b/api-rust/src/casper_rust_wasm_sdk/sdk/watcher/mod.rs.html @@ -0,0 +1,15 @@ +mod.rs - source
1
+2
+3
+4
+5
+6
+7
+
#[cfg(test)]
+pub(crate) mod deploy_mock;
+#[cfg(test)]
+pub(crate) mod transaction_mock;
+#[allow(clippy::module_inception)]
+pub mod watcher;
+pub use self::watcher::*;
+
\ No newline at end of file diff --git a/api-rust/src/casper_rust_wasm_sdk/sdk/watcher/watcher.rs.html b/api-rust/src/casper_rust_wasm_sdk/sdk/watcher/watcher.rs.html new file mode 100644 index 000000000..2107facc5 --- /dev/null +++ b/api-rust/src/casper_rust_wasm_sdk/sdk/watcher/watcher.rs.html @@ -0,0 +1,2363 @@ +watcher.rs - source
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
+339
+340
+341
+342
+343
+344
+345
+346
+347
+348
+349
+350
+351
+352
+353
+354
+355
+356
+357
+358
+359
+360
+361
+362
+363
+364
+365
+366
+367
+368
+369
+370
+371
+372
+373
+374
+375
+376
+377
+378
+379
+380
+381
+382
+383
+384
+385
+386
+387
+388
+389
+390
+391
+392
+393
+394
+395
+396
+397
+398
+399
+400
+401
+402
+403
+404
+405
+406
+407
+408
+409
+410
+411
+412
+413
+414
+415
+416
+417
+418
+419
+420
+421
+422
+423
+424
+425
+426
+427
+428
+429
+430
+431
+432
+433
+434
+435
+436
+437
+438
+439
+440
+441
+442
+443
+444
+445
+446
+447
+448
+449
+450
+451
+452
+453
+454
+455
+456
+457
+458
+459
+460
+461
+462
+463
+464
+465
+466
+467
+468
+469
+470
+471
+472
+473
+474
+475
+476
+477
+478
+479
+480
+481
+482
+483
+484
+485
+486
+487
+488
+489
+490
+491
+492
+493
+494
+495
+496
+497
+498
+499
+500
+501
+502
+503
+504
+505
+506
+507
+508
+509
+510
+511
+512
+513
+514
+515
+516
+517
+518
+519
+520
+521
+522
+523
+524
+525
+526
+527
+528
+529
+530
+531
+532
+533
+534
+535
+536
+537
+538
+539
+540
+541
+542
+543
+544
+545
+546
+547
+548
+549
+550
+551
+552
+553
+554
+555
+556
+557
+558
+559
+560
+561
+562
+563
+564
+565
+566
+567
+568
+569
+570
+571
+572
+573
+574
+575
+576
+577
+578
+579
+580
+581
+582
+583
+584
+585
+586
+587
+588
+589
+590
+591
+592
+593
+594
+595
+596
+597
+598
+599
+600
+601
+602
+603
+604
+605
+606
+607
+608
+609
+610
+611
+612
+613
+614
+615
+616
+617
+618
+619
+620
+621
+622
+623
+624
+625
+626
+627
+628
+629
+630
+631
+632
+633
+634
+635
+636
+637
+638
+639
+640
+641
+642
+643
+644
+645
+646
+647
+648
+649
+650
+651
+652
+653
+654
+655
+656
+657
+658
+659
+660
+661
+662
+663
+664
+665
+666
+667
+668
+669
+670
+671
+672
+673
+674
+675
+676
+677
+678
+679
+680
+681
+682
+683
+684
+685
+686
+687
+688
+689
+690
+691
+692
+693
+694
+695
+696
+697
+698
+699
+700
+701
+702
+703
+704
+705
+706
+707
+708
+709
+710
+711
+712
+713
+714
+715
+716
+717
+718
+719
+720
+721
+722
+723
+724
+725
+726
+727
+728
+729
+730
+731
+732
+733
+734
+735
+736
+737
+738
+739
+740
+741
+742
+743
+744
+745
+746
+747
+748
+749
+750
+751
+752
+753
+754
+755
+756
+757
+758
+759
+760
+761
+762
+763
+764
+765
+766
+767
+768
+769
+770
+771
+772
+773
+774
+775
+776
+777
+778
+779
+780
+781
+782
+783
+784
+785
+786
+787
+788
+789
+790
+791
+792
+793
+794
+795
+796
+797
+798
+799
+800
+801
+802
+803
+804
+805
+806
+807
+808
+809
+810
+811
+812
+813
+814
+815
+816
+817
+818
+819
+820
+821
+822
+823
+824
+825
+826
+827
+828
+829
+830
+831
+832
+833
+834
+835
+836
+837
+838
+839
+840
+841
+842
+843
+844
+845
+846
+847
+848
+849
+850
+851
+852
+853
+854
+855
+856
+857
+858
+859
+860
+861
+862
+863
+864
+865
+866
+867
+868
+869
+870
+871
+872
+873
+874
+875
+876
+877
+878
+879
+880
+881
+882
+883
+884
+885
+886
+887
+888
+889
+890
+891
+892
+893
+894
+895
+896
+897
+898
+899
+900
+901
+902
+903
+904
+905
+906
+907
+908
+909
+910
+911
+912
+913
+914
+915
+916
+917
+918
+919
+920
+921
+922
+923
+924
+925
+926
+927
+928
+929
+930
+931
+932
+933
+934
+935
+936
+937
+938
+939
+940
+941
+942
+943
+944
+945
+946
+947
+948
+949
+950
+951
+952
+953
+954
+955
+956
+957
+958
+959
+960
+961
+962
+963
+964
+965
+966
+967
+968
+969
+970
+971
+972
+973
+974
+975
+976
+977
+978
+979
+980
+981
+982
+983
+984
+985
+986
+987
+988
+989
+990
+991
+992
+993
+994
+995
+996
+997
+998
+999
+1000
+1001
+1002
+1003
+1004
+1005
+1006
+1007
+1008
+1009
+1010
+1011
+1012
+1013
+1014
+1015
+1016
+1017
+1018
+1019
+1020
+1021
+1022
+1023
+1024
+1025
+1026
+1027
+1028
+1029
+1030
+1031
+1032
+1033
+1034
+1035
+1036
+1037
+1038
+1039
+1040
+1041
+1042
+1043
+1044
+1045
+1046
+1047
+1048
+1049
+1050
+1051
+1052
+1053
+1054
+1055
+1056
+1057
+1058
+1059
+1060
+1061
+1062
+1063
+1064
+1065
+1066
+1067
+1068
+1069
+1070
+1071
+1072
+1073
+1074
+1075
+1076
+1077
+1078
+1079
+1080
+1081
+1082
+1083
+1084
+1085
+1086
+1087
+1088
+1089
+1090
+1091
+1092
+1093
+1094
+1095
+1096
+1097
+1098
+1099
+1100
+1101
+1102
+1103
+1104
+1105
+1106
+1107
+1108
+1109
+1110
+1111
+1112
+1113
+1114
+1115
+1116
+1117
+1118
+1119
+1120
+1121
+1122
+1123
+1124
+1125
+1126
+1127
+1128
+1129
+1130
+1131
+1132
+1133
+1134
+1135
+1136
+1137
+1138
+1139
+1140
+1141
+1142
+1143
+1144
+1145
+1146
+1147
+1148
+1149
+1150
+1151
+1152
+1153
+1154
+1155
+1156
+1157
+1158
+1159
+1160
+1161
+1162
+1163
+1164
+1165
+1166
+1167
+1168
+1169
+1170
+1171
+1172
+1173
+1174
+1175
+1176
+1177
+1178
+1179
+1180
+1181
+
use crate::SDK;
+use chrono::{Duration, Utc};
+use futures_util::StreamExt;
+#[cfg(target_arch = "wasm32")]
+use gloo_utils::format::JsValueSerdeExt;
+#[cfg(target_arch = "wasm32")]
+use js_sys::Promise;
+use serde::{Deserialize, Deserializer, Serialize};
+use serde_json::Value;
+use std::{
+    cell::RefCell,
+    fmt,
+    rc::Rc,
+    sync::{Arc, Mutex},
+};
+use wasm_bindgen::prelude::*;
+#[cfg(target_arch = "wasm32")]
+use wasm_bindgen_futures::future_to_promise;
+
+const DEFAULT_TIMEOUT_MS: u64 = 60000;
+
+impl SDK {
+    /// Creates a new Watcher instance to watch deploys.
+    /// Legacy alias
+    ///
+    /// # Arguments
+    ///
+    /// * `events_url` - The URL to monitor for transaction events.
+    /// * `timeout_duration` - An optional timeout duration in seconds.
+    ///
+    /// # Returns
+    ///
+    /// A `Watcher` instance.
+    #[deprecated(note = "prefer 'watch_transaction'")]
+    pub fn watch_deploy(&self, events_url: &str, timeout_duration: Option<u64>) -> Watcher {
+        Watcher::new(events_url.to_string(), timeout_duration)
+    }
+
+    /// Creates a new Watcher instance to watch deploys.
+    ///
+    /// # Arguments
+    ///
+    /// * `events_url` - The URL to monitor for transaction events.
+    /// * `timeout_duration` - An optional timeout duration in seconds.
+    ///
+    /// # Returns
+    ///
+    /// A `Watcher` instance.
+    pub fn watch_transaction(&self, events_url: &str, timeout_duration: Option<u64>) -> Watcher {
+        Watcher::new(events_url.to_string(), timeout_duration)
+    }
+
+    /// Waits for a deploy event to be processed asynchronously.
+    /// 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 milliseconds.
+    ///
+    /// # Returns
+    ///
+    /// A `Result` containing either the processed `EventParseResult` or an error message.
+    #[deprecated(note = "prefer 'wait_transaction' with transaction")]
+    pub async fn wait_deploy(
+        &self,
+        events_url: &str,
+        deploy_hash: &str,
+        timeout_duration: Option<u64>,
+    ) -> Result<EventParseResult, String> {
+        Self::wait_transaction_internal(
+            events_url.to_string(),
+            deploy_hash.to_string(),
+            timeout_duration,
+        )
+        .await
+    }
+
+    /// Alias for wait_deploy Waits for a deploy event to be processed asynchronously.
+    ///
+    /// # 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 milliseconds.
+    ///
+    /// # Returns
+    ///
+    /// A `Result` containing either the processed `EventParseResult` or an error message
+    pub async fn wait_transaction(
+        &self,
+        events_url: &str,
+        target_hash: &str,
+        timeout_duration: Option<u64>,
+    ) -> Result<EventParseResult, String> {
+        Self::wait_transaction_internal(
+            events_url.to_string(),
+            target_hash.to_string(),
+            timeout_duration,
+        )
+        .await
+    }
+
+    /// Internal function to wait for a deploy event.
+    ///
+    /// # 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 milliseconds.
+    ///
+    /// # Returns
+    ///
+    /// A `Result` containing either the processed `EventParseResult` or an error message.
+    async fn wait_transaction_internal(
+        events_url: String,
+        target_hash: String,
+        timeout_duration: Option<u64>,
+    ) -> Result<EventParseResult, String> {
+        let watcher = Watcher::new(events_url, timeout_duration);
+        let result = watcher.start_internal(Some(target_hash)).await;
+        match result {
+            Some(event_parse_results) => {
+                if let Some(event_parse_result) = event_parse_results.first() {
+                    return Ok(event_parse_result.clone());
+                }
+                Err("No first event result".to_string())
+            }
+            None => Err("No event result found".to_string()),
+        }
+    }
+}
+
+#[wasm_bindgen]
+impl SDK {
+    /// Creates a new Watcher instance to watch deploys (JavaScript-friendly).
+    /// Legacy alias
+    ///
+    /// # Arguments
+    ///
+    /// * `events_url` - The URL to monitor for transaction events.
+    /// * `timeout_duration` - An optional timeout duration in seconds.
+    ///
+    /// # Returns
+    ///
+    /// A `Watcher` instance.
+    #[cfg(target_arch = "wasm32")]
+    #[wasm_bindgen(js_name = "watchDeploy")]
+    #[deprecated(note = "prefer 'watchTransaction'")]
+    #[allow(deprecated)]
+    pub fn watch_deploy_js_alias(
+        &self,
+        events_url: &str,
+        timeout_duration: Option<u32>,
+    ) -> Watcher {
+        self.watch_deploy(events_url, timeout_duration.map(Into::into))
+    }
+
+    /// Creates a new Watcher instance to watch deploys (JavaScript-friendly).
+    ///
+    /// # Arguments
+    ///
+    /// * `events_url` - The URL to monitor for transaction events.
+    /// * `timeout_duration` - An optional timeout duration in seconds.
+    ///
+    /// # Returns
+    ///
+    /// A `Watcher` instance.
+    #[cfg(target_arch = "wasm32")]
+    #[wasm_bindgen(js_name = "watchTransaction")]
+    pub fn watch_transaction_js_alias(
+        &self,
+        events_url: &str,
+        timeout_duration: Option<u32>,
+    ) -> Watcher {
+        self.watch_transaction(events_url, timeout_duration.map(Into::into))
+    }
+
+    /// 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.
+    #[cfg(target_arch = "wasm32")]
+    #[wasm_bindgen(js_name = "waitDeploy")]
+    #[deprecated(note = "prefer 'waitTransaction' with transaction")]
+    #[allow(deprecated)]
+    pub async fn wait_deploy_js_alias(
+        &self,
+        events_url: &str,
+        deploy_hash: &str,
+        timeout_duration: Option<u32>,
+    ) -> Promise {
+        self.wait_transaction_js_alias(events_url, deploy_hash, timeout_duration)
+            .await
+    }
+
+    /// 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.
+    #[cfg(target_arch = "wasm32")]
+    #[wasm_bindgen(js_name = "waitTransaction")]
+    pub async fn wait_transaction_js_alias(
+        &self,
+        events_url: &str,
+        target_hash: &str,
+        timeout_duration: Option<u32>,
+    ) -> Promise {
+        let events_url = events_url.to_string();
+        let target_hash = target_hash.to_string();
+        let future = async move {
+            let result = Self::wait_transaction_internal(
+                events_url,
+                target_hash,
+                timeout_duration.map(Into::into),
+            )
+            .await;
+            match result {
+                Ok(event_parse_result) => JsValue::from_serde(&event_parse_result)
+                    .map_err(|err| JsValue::from_str(&format!("{err}"))),
+                Err(err) => Err(JsValue::from_str(&err)),
+            }
+        };
+
+        future_to_promise(future)
+    }
+}
+
+/// Represents a deploy watcher responsible for monitoring transaction events.
+///
+/// This struct allows clients to subscribe to transaction events, start watching for events,
+/// or wait for an event and handle the received deploy event data.
+///
+/// # Fields
+///
+/// * `events_url` - The URL for transaction events.
+/// * `subscriptions` - Vector containing deploy subscriptions.
+/// * `active` - Reference-counted cell indicating whether the deploy watcher is active.
+/// * `timeout_duration` - Duration representing the optional timeout for watching events.
+#[derive(Clone)]
+#[wasm_bindgen]
+pub struct Watcher {
+    events_url: String,
+    subscriptions: Vec<Subscription>,
+    active: Rc<RefCell<bool>>,
+    timeout_duration: Duration,
+}
+
+#[wasm_bindgen]
+impl Watcher {
+    /// Creates a new `Watcher` instance.
+    ///
+    /// # Arguments
+    ///
+    /// * `events_url` - The URL for transaction events.
+    /// * `timeout_duration` - Optional duration in milliseconds for watching events. If not provided,
+    ///   a default timeout of 60,000 milliseconds (1 minute) is used.
+    ///
+    /// # Returns
+    ///
+    /// A new `Watcher` instance.
+    #[wasm_bindgen(constructor)]
+    pub fn new(events_url: String, timeout_duration: Option<u64>) -> Self {
+        let timeout_duration = Duration::try_milliseconds(
+            timeout_duration
+                .unwrap_or(DEFAULT_TIMEOUT_MS)
+                .try_into()
+                .unwrap(),
+        )
+        .unwrap_or_default();
+
+        Watcher {
+            events_url,
+            subscriptions: Vec::new(),
+            active: Rc::new(RefCell::new(true)),
+            timeout_duration,
+        }
+    }
+
+    /// Subscribes to transaction events.
+    ///
+    /// # Arguments
+    ///
+    /// * `subscriptions` - Vector of deploy subscriptions to be added.
+    ///
+    /// # Returns
+    ///
+    /// Result indicating success or an error message.
+    #[cfg(target_arch = "wasm32")]
+    #[wasm_bindgen(js_name = "subscribe")]
+    pub fn subscribe_js_alias(&mut self, subscriptions: Vec<Subscription>) -> Result<(), String> {
+        self.subscribe(subscriptions)
+    }
+
+    /// Unsubscribes from transaction events based on the provided transaction hash.
+    ///
+    /// # Arguments
+    ///
+    /// * `transaction_hash` - The transaction hash to unsubscribe.
+    ///
+    /// This method removes the deploy subscription associated with the provided transaction hash.
+    #[wasm_bindgen]
+    pub fn unsubscribe(&mut self, target_hash: String) {
+        self.subscriptions.retain(|s| s.target_hash != target_hash);
+    }
+
+    /// Starts watching for transaction events (JavaScript-friendly).
+    ///
+    /// # Returns
+    ///
+    /// Result containing the serialized transaction events data or an error message.
+    #[cfg(target_arch = "wasm32")]
+    #[wasm_bindgen(js_name = "start")]
+    pub async fn start_js_alias(&self) -> Result<JsValue, JsValue> {
+        let result: Option<Vec<EventParseResult>> = self.start_internal(None).await;
+
+        match result {
+            Some(vec) => JsValue::from_serde(&vec)
+                .map_err(|err| JsValue::from_str(&format!("{:?}", err)).clone()),
+            None => Ok(JsValue::NULL),
+        }
+    }
+
+    /// Stops watching for transaction events.
+    ///
+    /// This method sets the deploy watcher as inactive and stops the event listener if it exists.
+    #[wasm_bindgen]
+    pub fn stop(&self) {
+        *self.active.borrow_mut() = false;
+    }
+}
+
+impl Watcher {
+    /// Asynchronously starts watching for transaction events and execute callback handler functions from deploy subscriptions
+    ///
+    /// # Returns
+    ///
+    /// An `Option` containing the serialized deploy event data or `None` if no events are received.
+    pub async fn start(&self) -> Option<Vec<EventParseResult>> {
+        self.start_internal(None).await
+    }
+
+    /// Asynchronously starts watching for transaction events
+    ///
+    /// # Arguments
+    ///
+    /// * `transaction_hash` - Optional transaction hash to directly return processed event. If provided, it directly returns matched events without executing callback handler functions from deploy subscriptions. If `None`, it executes callback handler functions from deploy subscriptions.
+    ///
+    /// # Returns
+    ///
+    /// An `Option` containing the serialized deploy event data or `None` if no events are received.
+    async fn start_internal(&self, target_hash: Option<String>) -> Option<Vec<EventParseResult>> {
+        *self.active.borrow_mut() = true;
+
+        let client = reqwest::Client::new();
+        let url = self.events_url.clone();
+
+        let watcher = Rc::new(RefCell::new(self.clone()));
+
+        let start_time = Utc::now();
+        let timeout_duration = self.timeout_duration;
+
+        let response = match client.get(&url).send().await {
+            Ok(res) => res,
+            Err(err) => {
+                let err = err.to_string();
+                let event_parse_result = EventParseResult {
+                    err: Some(err.to_string()),
+                    body: None,
+                };
+                return Some([event_parse_result].to_vec());
+            }
+        };
+
+        if response.status().is_success() {
+            let buffer_size = 1;
+            let mut buffer = Vec::with_capacity(buffer_size);
+
+            let mut bytes_stream = response.bytes_stream();
+            while let Some(chunk) = bytes_stream.next().await {
+                match chunk {
+                    Ok(bytes) => {
+                        let this_clone = Rc::clone(&watcher);
+                        if !*this_clone.borrow_mut().active.borrow() {
+                            return None;
+                        }
+
+                        if Utc::now() - start_time >= timeout_duration {
+                            let event_parse_result = EventParseResult {
+                                err: Some("Timeout expired".to_string()),
+                                body: None,
+                            };
+                            return Some([event_parse_result].to_vec());
+                        }
+
+                        buffer.extend_from_slice(&bytes);
+
+                        while let Some(index) = buffer.iter().position(|&b| b == b'\n') {
+                            let message = buffer.drain(..=index).collect::<Vec<_>>();
+
+                            if let Ok(message) = std::str::from_utf8(&message) {
+                                let watcher_clone = this_clone.borrow_mut().clone();
+                                let result =
+                                    watcher_clone.process_events(message, target_hash.as_deref());
+                                match result {
+                                    Some(event_parse_result) => return Some(event_parse_result),
+                                    None => {
+                                        continue;
+                                    }
+                                };
+                            } else {
+                                let event_parse_result = EventParseResult {
+                                    err: Some("Error decoding UTF-8 data".to_string()),
+                                    body: None,
+                                };
+                                return Some([event_parse_result].to_vec());
+                            }
+                        }
+                    }
+                    Err(err) => {
+                        let event_parse_result = EventParseResult {
+                            err: Some(format!("Error reading chunk: {}", err)),
+                            body: None,
+                        };
+                        return Some([event_parse_result].to_vec());
+                    }
+                }
+            }
+        } else {
+            let event_parse_result = EventParseResult {
+                err: Some("Failed to fetch stream".to_string()),
+                body: None,
+            };
+            return Some([event_parse_result].to_vec());
+        }
+        None
+    }
+
+    /// Subscribes to transaction events.
+    ///
+    /// # Arguments
+    ///
+    /// * `subscriptions` - Vector of subscriptions to be added.
+    ///
+    /// # Returns
+    ///
+    /// Result indicating success or an error message.
+    pub fn subscribe(&mut self, subscriptions: Vec<Subscription>) -> Result<(), String> {
+        for new_subscription in &subscriptions {
+            if self
+                .subscriptions
+                .iter()
+                .any(|s| s.target_hash == new_subscription.target_hash)
+            {
+                return Err(String::from("Already subscribed to this event"));
+            }
+        }
+        self.subscriptions.extend(subscriptions);
+        Ok(())
+    }
+
+    /// Processes events received from the stream and notifies subscribers.
+    ///
+    /// # Arguments
+    ///
+    /// * `message` - The raw message received from the event stream.
+    /// * `target_transaction_hash` - Optional transaction hash to directly return. If provided, it directly returns matched events without executing callback handler functions from subscriptions. If `None`, it executes callback handler functions from subscriptions.
+    ///
+    /// # Returns
+    ///
+    /// An `Option` containing the serialized transaction/deploy event data or `None` if an error occurs.
+    fn process_events(
+        mut self,
+        message: &str,
+        target_hash: Option<&str>,
+    ) -> Option<Vec<EventParseResult>> {
+        let data_stream = Self::extract_data_stream(message);
+
+        for data_item in data_stream {
+            let trimmed_item = data_item.trim();
+            let transaction_processed_str = EventName::TransactionProcessed.to_string();
+
+            if !trimmed_item.contains(&transaction_processed_str) {
+                continue;
+            }
+
+            if let Ok(parsed_json) = serde_json::from_str::<Value>(trimmed_item) {
+                let transaction = parsed_json.get(transaction_processed_str);
+                if let Some(transaction_processed) =
+                    transaction.and_then(|transaction| transaction.as_object())
+                {
+                    if let Some(transaction_hash_processed) = transaction_processed
+                        .get("transaction_hash")
+                        .and_then(|transaction_hash| {
+                            transaction_hash
+                                .get("Version1")
+                                .or_else(|| transaction_hash.get("Deploy"))
+                                .and_then(|transaction_hash| transaction_hash.as_str())
+                        })
+                    {
+                        let mut transaction_hash_found = target_hash.map_or(false, |target_hash| {
+                            target_hash == transaction_hash_processed
+                        });
+
+                        let transaction_processed: Option<TransactionProcessed> =
+                            serde_json::from_value(transaction.unwrap().clone()).ok();
+
+                        let body = Some(Body {
+                            transaction_processed,
+                        });
+
+                        let event_parse_result = EventParseResult { err: None, body };
+
+                        if transaction_hash_found {
+                            self.unsubscribe(target_hash.unwrap().to_string());
+                            self.stop();
+                            return Some([event_parse_result].to_vec());
+                        }
+
+                        let mut results: Vec<EventParseResult> = [].to_vec();
+                        for subscription in self.subscriptions.clone().iter() {
+                            if transaction_hash_processed == subscription.target_hash {
+                                let event_handler = &subscription.event_handler_fn;
+
+                                #[cfg(not(target_arch = "wasm32"))]
+                                {
+                                    event_handler.call(event_parse_result.clone());
+                                }
+                                #[cfg(target_arch = "wasm32")]
+                                {
+                                    let this = JsValue::null();
+                                    let args = js_sys::Array::new();
+                                    args.push(
+                                        &JsValue::from_serde(&event_parse_result.clone()).unwrap(),
+                                    );
+                                    event_handler.apply(&this, &args).unwrap();
+                                }
+
+                                self.unsubscribe(transaction_hash_processed.to_string());
+                                transaction_hash_found = true;
+                                results.push(event_parse_result.clone())
+                            }
+                        }
+
+                        if transaction_hash_found && self.subscriptions.is_empty() {
+                            self.stop();
+                            return Some(results);
+                        }
+                    }
+                }
+            } else {
+                let event_parse_result = EventParseResult {
+                    err: Some("Failed to parse JSON data.".to_string()),
+                    body: None,
+                };
+                return Some([event_parse_result].to_vec());
+            }
+        }
+        None
+    }
+
+    /// Extracts the data stream from the raw JSON data.
+    ///
+    /// # Arguments
+    ///
+    /// * `json_data` - The raw JSON data containing the data stream.
+    ///
+    /// # Returns
+    ///
+    /// A vector of data items within the data stream.
+    fn extract_data_stream(json_data: &str) -> Vec<&str> {
+        let data_stream: Vec<&str> = json_data
+            .split("data:")
+            .filter(|s| !s.is_empty())
+            .map(|s| s.split("id:").next().unwrap_or(""))
+            .collect();
+        data_stream
+    }
+}
+
+/// A wrapper for an event handler function, providing synchronization and cloning capabilities.
+pub struct EventHandlerFn(Arc<Mutex<dyn Fn(EventParseResult) + Send + Sync>>);
+
+#[allow(dead_code)]
+impl EventHandlerFn {
+    /// Creates a new `EventHandlerFn` with the specified event handling function.
+    ///
+    /// # Arguments
+    ///
+    /// * `func` - A function that takes an `EventParseResult` as an argument.
+    ///
+    /// # Returns
+    ///
+    /// A new `EventHandlerFn` instance.
+    pub fn new<F>(func: F) -> Self
+    where
+        F: Fn(EventParseResult) + Send + Sync + 'static,
+    {
+        EventHandlerFn(Arc::new(Mutex::new(func)))
+    }
+
+    /// Calls the stored event handling function with the provided `EventParseResult`.
+    ///
+    /// # Arguments
+    ///
+    /// * `event_result` - The result of an event to be passed to the stored event handling function.
+    pub fn call(&self, event_result: EventParseResult) {
+        let func = self.0.lock().unwrap();
+        (*func)(event_result); // Call the stored function with arguments
+    }
+}
+
+impl fmt::Debug for EventHandlerFn {
+    /// Implements the `Debug` trait for better debugging support.
+    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
+        write!(f, "EventHandlerFn")
+    }
+}
+
+impl Clone for EventHandlerFn {
+    /// Implements the `Clone` trait for creating a cloned instance with shared underlying data.
+    fn clone(&self) -> Self {
+        EventHandlerFn(self.0.clone())
+    }
+}
+
+impl Default for EventHandlerFn {
+    /// Implements the `Default` trait, creating a default instance with a no-op event handling function.
+    fn default() -> Self {
+        EventHandlerFn(Arc::new(Mutex::new(|_event_result| {})))
+    }
+}
+
+// Define Subscription struct with different configurations based on the target architecture.
+#[cfg(not(target_arch = "wasm32"))]
+/// Represents a subscription to transaction events for non-wasm32 target architecture.
+#[derive(Debug, Clone, Default)]
+pub struct Subscription {
+    /// Transaction target hash to identify the subscription.
+    pub target_hash: String,
+    /// Handler function for transaction events.
+    pub event_handler_fn: EventHandlerFn,
+}
+
+#[cfg(target_arch = "wasm32")]
+/// Represents a subscription to transaction events for wasm32 target architecture.
+#[derive(Debug, Clone, Default)]
+#[wasm_bindgen(getter_with_clone)]
+pub struct Subscription {
+    /// Transaction target hash to identify the subscription.
+    #[wasm_bindgen(js_name = "targetHash")]
+    pub target_hash: String,
+    /// Handler function for transaction events.
+    #[wasm_bindgen(js_name = "eventHandlerFn")]
+    pub event_handler_fn: js_sys::Function,
+}
+
+impl Subscription {
+    /// Constructor for Subscription for non-wasm32 target architecture.
+    ///
+    /// # Arguments
+    ///
+    /// * `target_hash` - Transaction target hash to identify the subscription.
+    /// * `event_handler_fn` - Handler function for transaction events.
+    #[cfg(not(target_arch = "wasm32"))]
+    pub fn new(target_hash: String, event_handler_fn: EventHandlerFn) -> Self {
+        Self {
+            target_hash,
+            event_handler_fn,
+        }
+    }
+}
+
+#[wasm_bindgen]
+impl Subscription {
+    /// Constructor for Subscription for wasm32 target architecture.
+    ///
+    /// # Arguments
+    ///
+    /// * `transaction_hash` - Transaction hash to identify the subscription.
+    /// * `event_handler_fn` - Handler function for transaction events.
+    #[cfg(target_arch = "wasm32")]
+    #[wasm_bindgen(constructor)]
+    pub fn new(target_hash: String, event_handler_fn: js_sys::Function) -> Self {
+        Self {
+            target_hash,
+            event_handler_fn,
+        }
+    }
+}
+
+/// Represents a failure response containing an error message.
+#[derive(Debug, Deserialize, Clone, Default, Serialize)]
+#[wasm_bindgen(getter_with_clone)]
+pub struct Failure {
+    pub cost: String,
+    pub error_message: String,
+}
+
+/// Represents a success response containing a cost value.
+#[derive(Debug, Deserialize, Clone, Default, Serialize)]
+#[wasm_bindgen(getter_with_clone)]
+pub struct Version2 {
+    pub initiator: PublicKeyString,
+    pub error_message: Option<String>,
+    pub limit: String,
+    pub consumed: String,
+    pub cost: String,
+    // pub payment: Vec<Payment>,
+}
+
+#[derive(Debug, Deserialize, Clone, Default, Serialize)]
+#[wasm_bindgen(getter_with_clone)]
+pub struct Payment {
+    pub source: String,
+}
+
+/// Represents the result of an execution, either Success or Failure.
+#[derive(Debug, Deserialize, Clone, Default, Serialize)]
+#[wasm_bindgen(getter_with_clone)]
+pub struct ExecutionResult {
+    /// Optional Success information.
+    #[serde(rename = "Version2")]
+    #[wasm_bindgen(js_name = "Success")]
+    pub success: Option<Version2>,
+    /// Optional Failure information.
+    #[serde(rename = "Failure")]
+    #[wasm_bindgen(js_name = "Failure")]
+    pub failure: Option<Failure>,
+}
+
+#[derive(Debug, Clone, Serialize, Default)]
+#[wasm_bindgen(getter_with_clone)]
+pub struct HashString {
+    pub hash: String,
+}
+
+impl HashString {
+    fn from_hash(hash: String) -> Self {
+        HashString { hash }
+    }
+}
+
+impl<'de> Deserialize<'de> for HashString {
+    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
+    where
+        D: Deserializer<'de>,
+    {
+        let map: std::collections::HashMap<String, String> =
+            Deserialize::deserialize(deserializer)?;
+
+        if let Some(hash) = map.get("Version1").or_else(|| map.get("Deploy")) {
+            Ok(HashString::from_hash(hash.clone()))
+        } else {
+            Err(serde::de::Error::missing_field("Deploy or Version1"))
+        }
+    }
+}
+
+#[wasm_bindgen]
+impl HashString {
+    #[wasm_bindgen(getter, js_name = "Deploy")]
+    pub fn deploy(&self) -> String {
+        self.hash.clone()
+    }
+
+    #[wasm_bindgen(getter, js_name = "Version1")]
+    pub fn version1(&self) -> String {
+        self.hash.clone()
+    }
+
+    #[wasm_bindgen(js_name = "toString")]
+    pub fn to_string_js(&self) -> String {
+        self.to_string()
+    }
+}
+
+impl fmt::Display for HashString {
+    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
+        write!(f, "{}", self.hash)
+    }
+}
+
+#[derive(Debug, Deserialize, Clone, Serialize, Default)]
+#[wasm_bindgen(getter_with_clone)]
+pub struct PublicKeyString {
+    #[serde(rename = "PublicKey")]
+    #[wasm_bindgen(js_name = "PublicKey")]
+    pub public_key: String,
+}
+
+#[derive(Debug, Deserialize, Clone, Serialize, Default)]
+#[wasm_bindgen(getter_with_clone)]
+pub struct Message {
+    #[serde(rename = "String")]
+    #[wasm_bindgen(js_name = "String")]
+    pub string: String,
+}
+
+#[derive(Debug, Deserialize, Clone, Serialize, Default)]
+#[wasm_bindgen(getter_with_clone)]
+pub struct Messages {
+    pub entity_hash: String,
+    pub message: Message,
+    pub topic_name: String,
+    pub topic_name_hash: String,
+    pub topic_index: u32,
+    pub block_index: u64,
+}
+
+/// Represents processed deploy information.
+#[derive(Debug, Deserialize, Clone, Default, Serialize)]
+#[wasm_bindgen(getter_with_clone)]
+pub struct TransactionProcessed {
+    #[serde(alias = "transaction_hash")]
+    pub hash: HashString,
+    pub initiator_addr: PublicKeyString,
+    pub timestamp: String,
+    pub ttl: String,
+    pub block_hash: String,
+    /// Result of the execution, either Success or Failure.
+    pub execution_result: ExecutionResult,
+    pub messages: Vec<Messages>,
+}
+
+/// Represents the body of an event, containing processed deploy information.
+#[derive(Debug, Deserialize, Clone, Default, Serialize)]
+#[wasm_bindgen(getter_with_clone)]
+pub struct Body {
+    #[serde(rename = "TransactionProcessed")]
+    transaction_processed: Option<TransactionProcessed>,
+}
+
+// Implementing methods to get the field using different aliases
+#[wasm_bindgen]
+impl Body {
+    #[wasm_bindgen(getter, js_name = "DeployProcessed")]
+    #[deprecated(note = "prefer 'get_transaction_processed'")]
+    #[allow(deprecated)]
+    pub fn get_deploy_processed(&self) -> Option<TransactionProcessed> {
+        self.transaction_processed.clone()
+    }
+
+    #[wasm_bindgen(getter, js_name = "TransactionProcessed")]
+    pub fn get_transaction_processed(&self) -> Option<TransactionProcessed> {
+        self.transaction_processed.clone()
+    }
+}
+
+/// Represents the result of parsing an event, containing error information and the event body.
+#[derive(Debug, Deserialize, Clone, Default, Serialize)]
+#[wasm_bindgen(getter_with_clone)]
+pub struct EventParseResult {
+    pub err: Option<String>,
+    pub body: Option<Body>,
+}
+
+/// Enum representing different event names.
+#[derive(Debug, Deserialize, Clone, Serialize)]
+enum EventName {
+    BlockAdded,
+    TransactionAccepted,
+    TransactionExpired,
+    TransactionProcessed,
+    Step,
+    FinalitySignature,
+    Fault,
+}
+
+impl fmt::Display for EventName {
+    /// Implements the `fmt::Display` trait for converting the enum variant to its string representation.
+    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
+        match self {
+            EventName::BlockAdded => write!(f, "BlockAdded"),
+            EventName::TransactionAccepted => write!(f, "TransactionAccepted"),
+            EventName::TransactionExpired => write!(f, "TransactionExpired"),
+            EventName::TransactionProcessed => write!(f, "TransactionProcessed"),
+            EventName::Step => write!(f, "Step"),
+            EventName::FinalitySignature => write!(f, "FinalitySignature"),
+            EventName::Fault => write!(f, "Fault"),
+        }
+    }
+}
+
+#[cfg(test)]
+mod tests {
+    use super::*;
+    use crate::watcher::{deploy_mock::DEPLOY_MOCK, transaction_mock::TRANSACTION_MOCK};
+    use sdk_tests::tests::helpers::get_network_constants;
+    use tokio;
+
+    #[test]
+    fn test_new() {
+        // Arrange
+        let (_, events_url, _, _) = get_network_constants();
+        let timeout_duration = 5000;
+
+        // Act
+        let watcher = Watcher::new(events_url.clone(), Some(timeout_duration));
+
+        // Assert
+        assert_eq!(watcher.events_url, events_url);
+        assert_eq!(watcher.subscriptions.len(), 0);
+        assert!(*watcher.active.borrow());
+        assert_eq!(
+            watcher.timeout_duration,
+            Duration::try_milliseconds(timeout_duration.try_into().unwrap()).unwrap()
+        );
+    }
+
+    #[test]
+    fn test_new_default_timeout() {
+        // Arrange
+        let (_, events_url, _, _) = get_network_constants();
+
+        // Act
+        let watcher = Watcher::new(events_url.clone(), None);
+
+        // Assert
+        assert_eq!(watcher.events_url, events_url);
+        assert_eq!(watcher.subscriptions.len(), 0);
+        assert!(*watcher.active.borrow());
+        assert_eq!(
+            watcher.timeout_duration,
+            Duration::try_milliseconds(DEFAULT_TIMEOUT_MS.try_into().unwrap()).unwrap()
+        );
+    }
+
+    #[tokio::test]
+    async fn test_extract_data_stream() {
+        // Arrange
+        let json_data = r#"data:segment1id:data:segment2id:data:segment3id:"#;
+
+        // Act
+        let result = Watcher::extract_data_stream(json_data);
+
+        // Assert
+        assert_eq!(result, vec!["segment1", "segment2", "segment3"]);
+    }
+
+    #[tokio::test]
+    #[allow(deprecated)]
+    async fn test_process_events_legacy() {
+        // Arrange
+        let (_, events_url, _, _) = get_network_constants();
+        let watcher = Watcher::new(events_url, None);
+        let deploy_hash = "19dbf9bdcd821e55392393c74c86deede02d9434d62d0bc72ab381ce7ea1c4f2";
+
+        let target_deploy_hash = Some(deploy_hash);
+
+        // Act
+        let result = watcher.process_events(DEPLOY_MOCK, target_deploy_hash);
+
+        // Assert
+        assert!(result.is_some());
+        let results = result.unwrap();
+        assert_eq!(results.len(), 1);
+
+        let event_parse_result = &results[0];
+        assert!(event_parse_result.err.is_none());
+
+        let body = event_parse_result.body.as_ref().unwrap();
+        let get_deploy_processed = body.get_deploy_processed().unwrap();
+        assert_eq!(get_deploy_processed.hash.to_string(), deploy_hash);
+    }
+
+    #[tokio::test]
+    async fn test_process_events() {
+        // Arrange
+        let (_, events_url, _, _) = get_network_constants();
+        let watcher = Watcher::new(events_url, None);
+        let transaction_hash = "8c6823d9480eee9fe0cfb5ed1fbf77f928cc6af21121298c05b4e3d87a328271";
+
+        let target_transaction_hash = Some(transaction_hash);
+
+        // Act
+        let result = watcher.process_events(TRANSACTION_MOCK, target_transaction_hash);
+
+        // Assert
+        assert!(result.is_some());
+        let results = result.unwrap();
+        assert_eq!(results.len(), 1);
+
+        let event_parse_result = &results[0];
+        assert!(event_parse_result.err.is_none());
+
+        let body = event_parse_result.body.as_ref().unwrap();
+        let transaction_processed = body.get_transaction_processed().unwrap();
+        assert_eq!(transaction_processed.hash.to_string(), transaction_hash);
+    }
+
+    #[tokio::test]
+    async fn test_start_timeout() {
+        // Arrange
+        let (_, events_url, _, _) = get_network_constants();
+        let watcher = Watcher::new(events_url, Some(1));
+
+        // Act
+        let result = watcher.start().await;
+
+        // Assert
+        assert!(result.is_some());
+        let results = result.unwrap();
+        assert_eq!(results.len(), 1);
+        assert_eq!(results[0].err, Some("Timeout expired".to_string()));
+        assert!(results[0].body.is_none());
+    }
+
+    #[test]
+    fn test_stop() {
+        // Arrange
+        let (_, events_url, _, _) = get_network_constants();
+        let watcher = Watcher::new(events_url, None);
+        assert!(*watcher.active.borrow());
+
+        // Act
+        watcher.stop();
+
+        // Assert
+        assert!(!(*watcher.active.borrow()));
+    }
+
+    #[test]
+    fn test_subscribe() {
+        // Arrange
+        let (_, events_url, _, _) = get_network_constants();
+        let mut watcher = Watcher::new(events_url, None);
+        let transaction_hash = "8c6823d9480eee9fe0cfb5ed1fbf77f928cc6af21121298c05b4e3d87a328271";
+
+        // Create a subscription
+        let subscription =
+            Subscription::new(transaction_hash.to_string(), EventHandlerFn::default());
+
+        // Act
+        let result = watcher.subscribe(vec![subscription]);
+
+        // Assert
+        assert!(result.is_ok());
+
+        // Try subscribing to the same deploy hash again
+        let duplicate_subscription =
+            Subscription::new(transaction_hash.to_string(), EventHandlerFn::default());
+        let result_duplicate = watcher.subscribe(vec![duplicate_subscription]);
+
+        // Assert
+        assert!(result_duplicate.is_err());
+        assert_eq!(
+            result_duplicate.err().unwrap(),
+            "Already subscribed to this event"
+        );
+    }
+
+    #[test]
+    fn test_unsubscribe() {
+        // Arrange
+        let (_, events_url, _, _) = get_network_constants();
+        let mut watcher = Watcher::new(events_url, None);
+        let transaction_hash = "8c6823d9480eee9fe0cfb5ed1fbf77f928cc6af21121298c05b4e3d87a328271";
+
+        // Subscribe to a transaction hash
+        let transaction_hash_to_subscribe = transaction_hash.to_string();
+        let subscription = Subscription::new(
+            transaction_hash_to_subscribe.clone(),
+            EventHandlerFn::default(),
+        );
+        let _ = watcher.subscribe(vec![subscription]);
+
+        // Assert that the deploy hash is initially subscribed
+        assert!(watcher
+            .subscriptions
+            .iter()
+            .any(|s| s.target_hash == transaction_hash_to_subscribe));
+
+        // Act
+        watcher.unsubscribe(transaction_hash_to_subscribe.clone());
+
+        // Assert that the deploy hash is unsubscribed after calling unsubscribe
+        assert!(!watcher
+            .subscriptions
+            .iter()
+            .any(|s| s.target_hash == transaction_hash_to_subscribe));
+    }
+
+    #[test]
+    #[allow(deprecated)]
+    fn test_sdk_watch_deploy_retunrs_instance() {
+        // Arrange
+        let sdk = SDK::new(None, None);
+        let (_, events_url, _, _) = get_network_constants();
+        let timeout_duration = 5000;
+
+        // Act
+        let watcher = sdk.watch_deploy(&events_url, Some(timeout_duration));
+
+        // Assert
+        assert_eq!(watcher.events_url, events_url);
+        assert_eq!(watcher.subscriptions.len(), 0);
+        assert!(*watcher.active.borrow());
+        assert_eq!(
+            watcher.timeout_duration,
+            Duration::try_milliseconds(timeout_duration.try_into().unwrap()).unwrap()
+        );
+    }
+
+    #[test]
+    fn test_sdk_watch_transaction_retunrs_instance() {
+        // Arrange
+        let sdk = SDK::new(None, None);
+        let (_, events_url, _, _) = get_network_constants();
+        let timeout_duration = 5000;
+
+        // Act
+        let watcher = sdk.watch_transaction(&events_url, Some(timeout_duration));
+
+        // Assert
+        assert_eq!(watcher.events_url, events_url);
+        assert_eq!(watcher.subscriptions.len(), 0);
+        assert!(*watcher.active.borrow());
+        assert_eq!(
+            watcher.timeout_duration,
+            Duration::try_milliseconds(timeout_duration.try_into().unwrap()).unwrap()
+        );
+    }
+
+    #[tokio::test]
+    #[allow(deprecated)]
+    async fn test_wait_deploy_timeout() {
+        // Arrange
+        let sdk = SDK::new(None, None);
+        let (_, events_url, _, _) = get_network_constants();
+        let deploy_hash = "19dbf9bdcd821e55392393c74c86deede02d9434d62d0bc72ab381ce7ea1c4f2";
+        let timeout_duration = Some(5000);
+
+        // Act
+        let result = sdk
+            .wait_deploy(&events_url, deploy_hash, timeout_duration)
+            .await;
+
+        // Assert
+        assert!(result.is_ok());
+        let event_parse_result = result.unwrap();
+        assert!(event_parse_result.err.is_some());
+        assert_eq!(event_parse_result.err, Some("Timeout expired".to_string()));
+    }
+
+    #[tokio::test]
+    async fn test_wait_transaction_timeout() {
+        // Arrange
+        let sdk = SDK::new(None, None);
+        let (_, events_url, _, _) = get_network_constants();
+        let transaction_hash = "8c6823d9480eee9fe0cfb5ed1fbf77f928cc6af21121298c05b4e3d87a328271";
+        let timeout_duration = Some(5000);
+
+        // Act
+        let result = sdk
+            .wait_transaction(&events_url, transaction_hash, timeout_duration)
+            .await;
+
+        // Assert
+        assert!(result.is_ok());
+        let event_parse_result = result.unwrap();
+        assert!(event_parse_result.err.is_some());
+        assert_eq!(event_parse_result.err, Some("Timeout expired".to_string()));
+    }
+}
+
\ No newline at end of file diff --git a/api-rust/src/casper_rust_wasm_sdk/types/addr/entity_addr.rs.html b/api-rust/src/casper_rust_wasm_sdk/types/addr/entity_addr.rs.html new file mode 100644 index 000000000..e9a813df6 --- /dev/null +++ b/api-rust/src/casper_rust_wasm_sdk/types/addr/entity_addr.rs.html @@ -0,0 +1,205 @@ +entity_addr.rs - source
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+
use crate::types::sdk_error::SdkError;
+use casper_types::{
+    bytesrepr::{self, FromBytes, ToBytes},
+    EntityAddr as _EntityAddr,
+};
+#[cfg(target_arch = "wasm32")]
+use gloo_utils::format::JsValueSerdeExt;
+use serde::{Deserialize, Serialize};
+use wasm_bindgen::prelude::*;
+
+#[derive(Debug, Deserialize, Clone, Serialize)]
+#[wasm_bindgen]
+pub struct EntityAddr(_EntityAddr);
+
+impl EntityAddr {
+    pub fn from_formatted_str(formatted_str: &str) -> Result<EntityAddr, SdkError> {
+        let entity_addr = _EntityAddr::from_formatted_str(formatted_str).map_err(|error| {
+            SdkError::FailedToParseEntity {
+                context: "EntityAddr::from_formatted_str",
+                error,
+            }
+        })?;
+        Ok(EntityAddr(entity_addr))
+    }
+}
+
+#[wasm_bindgen]
+impl EntityAddr {
+    // #[cfg(target_arch = "wasm32")]
+    // #[wasm_bindgen(constructor)]
+    // pub fn new(entity_addr_hex_str: &str) -> Result<EntityAddr, JsValue> {
+    //     let bytes = hex::decode(entity_addr_hex_str)
+    //         .map_err(|err| JsValue::from_str(&format!("Failed to decode hex string: {:?}", err)))?;
+    //     if bytes.len() != _EntityAddr::LENGTH {
+    //         return Err(JsValue::from_str("Invalid entity addr length"));
+    //     }
+    //     let mut array = [0u8; _EntityAddr::LENGTH];
+    //     array.copy_from_slice(&bytes);
+    //     let entity_addr = _EntityAddr(array);
+    //     Ok(entity_addr.into())
+    // }
+
+    #[cfg(target_arch = "wasm32")]
+    #[wasm_bindgen(js_name = "fromFormattedStr")]
+    pub fn from_formatted_str_js_alias(formatted_str: &str) -> Result<EntityAddr, JsValue> {
+        Self::from_formatted_str(formatted_str).map_err(|err| {
+            JsValue::from_str(&format!(
+                "Failed to parse Entity from formatted string: {:?}",
+                err
+            ))
+        })
+    }
+
+    #[wasm_bindgen(js_name = "toFormattedString")]
+    pub fn to_formatted_string(&self) -> String {
+        self.0.to_formatted_string()
+    }
+
+    #[wasm_bindgen(js_name = "toHexString")]
+    pub fn to_hex_string(&self) -> String {
+        self.0.to_string()
+    }
+
+    #[cfg(target_arch = "wasm32")]
+    #[wasm_bindgen(js_name = "toJson")]
+    pub fn to_json(&self) -> JsValue {
+        JsValue::from_serde(self).unwrap_or(JsValue::null())
+    }
+}
+
+impl From<EntityAddr> for _EntityAddr {
+    fn from(entity_addr: EntityAddr) -> Self {
+        entity_addr.0
+    }
+}
+
+impl From<_EntityAddr> for EntityAddr {
+    fn from(entity_addr: _EntityAddr) -> Self {
+        EntityAddr(entity_addr)
+    }
+}
+
+impl FromBytes for EntityAddr {
+    fn from_bytes(bytes: &[u8]) -> Result<(Self, &[u8]), bytesrepr::Error> {
+        let (entity_addr, remainder) = _EntityAddr::from_bytes(bytes)?;
+        Ok((EntityAddr(entity_addr), remainder))
+    }
+}
+
+impl ToBytes for EntityAddr {
+    fn to_bytes(&self) -> Result<Vec<u8>, bytesrepr::Error> {
+        self.0.to_bytes()
+    }
+
+    fn serialized_length(&self) -> usize {
+        self.0.serialized_length()
+    }
+
+    fn write_bytes(&self, bytes: &mut Vec<u8>) -> Result<(), bytesrepr::Error> {
+        self.0.write_bytes(bytes)
+    }
+}
+
\ No newline at end of file diff --git a/api-rust/src/casper_rust_wasm_sdk/types/addressable_entity_hash.rs.html b/api-rust/src/casper_rust_wasm_sdk/types/addressable_entity_hash.rs.html new file mode 100644 index 000000000..006a12ed7 --- /dev/null +++ b/api-rust/src/casper_rust_wasm_sdk/types/addressable_entity_hash.rs.html @@ -0,0 +1,183 @@ +addressable_entity_hash.rs - source
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+
use crate::debug::error;
+use casper_types::{
+    addressable_entity::{
+        AddressableEntityHash as _AddressableEntityHash, ADDRESSABLE_ENTITY_STRING_PREFIX,
+    },
+    bytesrepr::{self, FromBytes, ToBytes, U8_SERIALIZED_LENGTH},
+    HashAddr,
+};
+use serde::{Deserialize, Serialize};
+use wasm_bindgen::prelude::*;
+
+#[wasm_bindgen]
+#[derive(Debug, Deserialize, Clone, Serialize, Copy)]
+pub struct AddressableEntityHash(_AddressableEntityHash);
+
+#[wasm_bindgen]
+impl AddressableEntityHash {
+    #[wasm_bindgen(constructor)]
+    #[wasm_bindgen(js_name = "fromString")]
+    pub fn new(input: &str) -> Result<AddressableEntityHash, JsValue> {
+        let prefixed_input = format!("{}{}", ADDRESSABLE_ENTITY_STRING_PREFIX, input);
+        Self::from_formatted_str(&prefixed_input)
+    }
+
+    #[wasm_bindgen(js_name = "fromFormattedStr")]
+    pub fn from_formatted_str(input: &str) -> Result<AddressableEntityHash, JsValue> {
+        let addressable_entity_hash = _AddressableEntityHash::from_formatted_str(input)
+            .map_err(|err| {
+                error(&format!(
+                    "Failed to parse AddressableEntityHash from formatted string: {:?}",
+                    err
+                ))
+            })
+            .unwrap();
+        Ok(Self(addressable_entity_hash))
+    }
+
+    #[wasm_bindgen(js_name = "toFormattedString")]
+    pub fn to_formatted_string(&self) -> String {
+        self.0.to_formatted_string()
+    }
+
+    #[wasm_bindgen(js_name = "fromUint8Array")]
+    pub fn from_bytes(bytes: Vec<u8>) -> AddressableEntityHash {
+        let addressable_entity_hash = _AddressableEntityHash::try_from(&bytes)
+            .expect("Failed to convert bytes to AddressableEntityHash");
+        Self(addressable_entity_hash)
+    }
+}
+
+impl From<AddressableEntityHash> for _AddressableEntityHash {
+    fn from(addressable_entity_hash: AddressableEntityHash) -> Self {
+        addressable_entity_hash.0
+    }
+}
+
+impl From<_AddressableEntityHash> for AddressableEntityHash {
+    fn from(addressable_entity_hash: _AddressableEntityHash) -> Self {
+        Self(addressable_entity_hash)
+    }
+}
+
+impl FromBytes for AddressableEntityHash {
+    fn from_bytes(bytes: &[u8]) -> Result<(Self, &[u8]), bytesrepr::Error> {
+        let (addressable_entity_hash, remainder) = _AddressableEntityHash::from_bytes(bytes)?;
+        Ok((Self(addressable_entity_hash), remainder))
+    }
+}
+
+impl ToBytes for AddressableEntityHash {
+    fn to_bytes(&self) -> Result<Vec<u8>, bytesrepr::Error> {
+        self.0.to_bytes()
+    }
+
+    fn serialized_length(&self) -> usize {
+        U8_SERIALIZED_LENGTH + self.0.value().len() * U8_SERIALIZED_LENGTH
+    }
+
+    fn write_bytes(&self, bytes: &mut Vec<u8>) -> Result<(), bytesrepr::Error> {
+        self.0.write_bytes(bytes)
+    }
+}
+
+impl From<HashAddr> for AddressableEntityHash {
+    fn from(bytes: HashAddr) -> Self {
+        _AddressableEntityHash::from_bytes(&bytes)
+            .map(|(hash, _)| hash)
+            .expect("Failed to convert bytes to AddressableEntityHash")
+            .into()
+    }
+}
+
\ No newline at end of file diff --git a/api-rust/src/casper_rust_wasm_sdk/types/entity_identifier.rs.html b/api-rust/src/casper_rust_wasm_sdk/types/entity_identifier.rs.html new file mode 100644 index 000000000..7d0f89acc --- /dev/null +++ b/api-rust/src/casper_rust_wasm_sdk/types/entity_identifier.rs.html @@ -0,0 +1,279 @@ +entity_identifier.rs - source
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+
use super::{
+    account_hash::AccountHash, addr::entity_addr::EntityAddr, public_key::PublicKey,
+    sdk_error::SdkError,
+};
+use casper_client::rpcs::EntityIdentifier as _EntityIdentifier;
+use casper_types::{
+    account::ACCOUNT_HASH_FORMATTED_STRING_PREFIX, addressable_entity::ENTITY_PREFIX,
+};
+#[cfg(target_arch = "wasm32")]
+use gloo_utils::format::JsValueSerdeExt;
+use serde::{Deserialize, Serialize};
+use std::fmt;
+use wasm_bindgen::prelude::*;
+
+#[derive(Debug, Deserialize, Clone, Serialize)]
+#[wasm_bindgen]
+pub struct EntityIdentifier(_EntityIdentifier);
+
+impl EntityIdentifier {
+    pub fn new(formatted_str: &str) -> Result<Self, SdkError> {
+        Self::from_formatted_str(formatted_str)
+    }
+
+    pub fn from_formatted_str(formatted_str: &str) -> Result<Self, SdkError> {
+        if formatted_str.starts_with(ACCOUNT_HASH_FORMATTED_STRING_PREFIX) {
+            let account_hash = AccountHash::from_formatted_str(formatted_str)?;
+            Ok(Self::from_entity_under_account_hash(account_hash))
+        } else if formatted_str.starts_with(ENTITY_PREFIX) {
+            let entity_addr = EntityAddr::from_formatted_str(formatted_str)?;
+            Ok(Self::from_entity_under_entity_addr(entity_addr))
+        } else {
+            let public_key = PublicKey::new(formatted_str)?;
+            Ok(Self::from_entity_under_public_key(public_key))
+        }
+    }
+}
+
+#[wasm_bindgen]
+impl EntityIdentifier {
+    #[cfg(target_arch = "wasm32")]
+    #[wasm_bindgen(constructor)]
+    pub fn new_js_alias(formatted_str: &str) -> Result<EntityIdentifier, JsValue> {
+        Self::from_formatted_str(formatted_str).map_err(|err| JsValue::from_str(&err.to_string()))
+    }
+
+    #[cfg(target_arch = "wasm32")]
+    #[wasm_bindgen(js_name = "fromFormattedStr")]
+    pub fn from_formatted_str_js_alias(formatted_str: &str) -> Result<EntityIdentifier, JsValue> {
+        Self::from_formatted_str(formatted_str).map_err(|err| JsValue::from_str(&err.to_string()))
+    }
+
+    #[wasm_bindgen(js_name = "fromPublicKey")]
+    pub fn from_entity_under_public_key(key: PublicKey) -> Self {
+        Self(_EntityIdentifier::PublicKey(key.into()))
+    }
+
+    #[wasm_bindgen(js_name = "fromAccountHash")]
+    pub fn from_entity_under_account_hash(account_hash: AccountHash) -> Self {
+        Self(_EntityIdentifier::AccountHash(account_hash.into()))
+    }
+
+    #[wasm_bindgen(js_name = "fromEntityAddr")]
+    pub fn from_entity_under_entity_addr(entity_addr: EntityAddr) -> Self {
+        Self(_EntityIdentifier::EntityAddr(entity_addr.into()))
+    }
+
+    #[cfg(target_arch = "wasm32")]
+    #[wasm_bindgen(js_name = "toJson")]
+    pub fn to_json(&self) -> JsValue {
+        JsValue::from_serde(self).unwrap_or(JsValue::null())
+    }
+}
+
+impl fmt::Display for EntityIdentifier {
+    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
+        match &self.0 {
+            _EntityIdentifier::PublicKey(key) => write!(f, "{}", PublicKey::from(key.clone())),
+            _EntityIdentifier::AccountHash(hash) => write!(f, "{}", hash.to_formatted_string()),
+            _EntityIdentifier::EntityAddr(entity) => write!(f, "{}", entity.to_formatted_string()),
+        }
+    }
+}
+
+impl From<EntityIdentifier> for _EntityIdentifier {
+    fn from(account_identifier: EntityIdentifier) -> Self {
+        account_identifier.0
+    }
+}
+
+impl From<_EntityIdentifier> for EntityIdentifier {
+    fn from(account_identifier: _EntityIdentifier) -> Self {
+        Self(account_identifier)
+    }
+}
+
+impl From<EntityIdentifier> for PublicKey {
+    fn from(account_identifier: EntityIdentifier) -> Self {
+        match account_identifier {
+            EntityIdentifier(_EntityIdentifier::PublicKey(key)) => key.into(),
+            _ => unimplemented!("Conversion not implemented for EntityIdentifier to Key"),
+        }
+    }
+}
+
+impl From<EntityIdentifier> for AccountHash {
+    fn from(account_identifier: EntityIdentifier) -> Self {
+        match account_identifier {
+            EntityIdentifier(_EntityIdentifier::AccountHash(account_hash)) => account_hash.into(),
+            _ => unimplemented!("Conversion not implemented for EntityIdentifier to AccountHash"),
+        }
+    }
+}
+
+impl From<EntityIdentifier> for EntityAddr {
+    fn from(account_identifier: EntityIdentifier) -> Self {
+        match account_identifier {
+            EntityIdentifier(_EntityIdentifier::EntityAddr(entity_addr)) => entity_addr.into(),
+            _ => unimplemented!("Conversion not implemented for EntityIdentifier to EntityAddr"),
+        }
+    }
+}
+
+impl From<PublicKey> for EntityIdentifier {
+    fn from(key: PublicKey) -> Self {
+        Self(_EntityIdentifier::PublicKey(key.into()))
+    }
+}
+
+impl From<AccountHash> for EntityIdentifier {
+    fn from(account_hash: AccountHash) -> Self {
+        Self(_EntityIdentifier::AccountHash(account_hash.into()))
+    }
+}
+
+impl From<EntityAddr> for EntityIdentifier {
+    fn from(entity_addr: EntityAddr) -> Self {
+        Self(_EntityIdentifier::EntityAddr(entity_addr.into()))
+    }
+}
+
\ No newline at end of file diff --git a/api-rust/src/casper_rust_wasm_sdk/types/package_hash.rs.html b/api-rust/src/casper_rust_wasm_sdk/types/package_hash.rs.html new file mode 100644 index 000000000..970e96375 --- /dev/null +++ b/api-rust/src/casper_rust_wasm_sdk/types/package_hash.rs.html @@ -0,0 +1,177 @@ +package_hash.rs - source
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+
use crate::debug::error;
+use casper_types::{
+    bytesrepr::{self, FromBytes, ToBytes, U8_SERIALIZED_LENGTH},
+    PackageAddr, PackageHash as _PackageHash,
+};
+use serde::{Deserialize, Serialize};
+use wasm_bindgen::prelude::*;
+
+#[wasm_bindgen]
+#[derive(Debug, Deserialize, Clone, Serialize, Copy)]
+pub struct PackageHash(_PackageHash);
+
+#[wasm_bindgen]
+impl PackageHash {
+    #[wasm_bindgen(constructor)]
+    #[wasm_bindgen(js_name = "fromString")]
+    pub fn new(input: &str) -> Result<PackageHash, JsValue> {
+        let prefixed_input = format!("package-{}", input);
+        Self::from_formatted_str(&prefixed_input)
+    }
+
+    #[wasm_bindgen(js_name = "fromFormattedStr")]
+    pub fn from_formatted_str(input: &str) -> Result<PackageHash, JsValue> {
+        let _package_hash = _PackageHash::from_formatted_str(input)
+            .map_err(|err| {
+                error(&format!(
+                    "Failed to parse PackageHash from formatted string: {:?}",
+                    err
+                ))
+            })
+            .unwrap();
+        Ok(Self(_package_hash))
+    }
+
+    #[wasm_bindgen(js_name = "toFormattedString")]
+    pub fn to_formatted_string(&self) -> String {
+        self.0.to_formatted_string()
+    }
+
+    #[wasm_bindgen(js_name = "fromUint8Array")]
+    pub fn from_bytes(bytes: Vec<u8>) -> PackageHash {
+        let _package_hash =
+            _PackageHash::try_from(&bytes).expect("Failed to convert bytes to PackageHash");
+        Self(_package_hash)
+    }
+}
+
+impl From<PackageHash> for _PackageHash {
+    fn from(_package_hash: PackageHash) -> Self {
+        _package_hash.0
+    }
+}
+
+impl From<_PackageHash> for PackageHash {
+    fn from(_package_hash: _PackageHash) -> Self {
+        Self(_package_hash)
+    }
+}
+
+impl FromBytes for PackageHash {
+    fn from_bytes(bytes: &[u8]) -> Result<(Self, &[u8]), bytesrepr::Error> {
+        let (_package_hash, remainder) = _PackageHash::from_bytes(bytes)?;
+        Ok((Self(_package_hash), remainder))
+    }
+}
+
+impl ToBytes for PackageHash {
+    fn to_bytes(&self) -> Result<Vec<u8>, bytesrepr::Error> {
+        self.0.to_bytes()
+    }
+
+    fn serialized_length(&self) -> usize {
+        U8_SERIALIZED_LENGTH + self.0.value().len() * U8_SERIALIZED_LENGTH
+    }
+
+    fn write_bytes(&self, bytes: &mut Vec<u8>) -> Result<(), bytesrepr::Error> {
+        self.0.write_bytes(bytes)
+    }
+}
+
+impl From<PackageAddr> for PackageHash {
+    fn from(bytes: PackageAddr) -> Self {
+        _PackageHash::from_bytes(&bytes)
+            .map(|(hash, _)| hash)
+            .expect("Failed to convert bytes to PackageHash")
+            .into()
+    }
+}
+
\ No newline at end of file diff --git a/api-rust/src/casper_rust_wasm_sdk/types/transaction.rs.html b/api-rust/src/casper_rust_wasm_sdk/types/transaction.rs.html new file mode 100644 index 000000000..6a2a64e06 --- /dev/null +++ b/api-rust/src/casper_rust_wasm_sdk/types/transaction.rs.html @@ -0,0 +1,1627 @@ +transaction.rs - source
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
+339
+340
+341
+342
+343
+344
+345
+346
+347
+348
+349
+350
+351
+352
+353
+354
+355
+356
+357
+358
+359
+360
+361
+362
+363
+364
+365
+366
+367
+368
+369
+370
+371
+372
+373
+374
+375
+376
+377
+378
+379
+380
+381
+382
+383
+384
+385
+386
+387
+388
+389
+390
+391
+392
+393
+394
+395
+396
+397
+398
+399
+400
+401
+402
+403
+404
+405
+406
+407
+408
+409
+410
+411
+412
+413
+414
+415
+416
+417
+418
+419
+420
+421
+422
+423
+424
+425
+426
+427
+428
+429
+430
+431
+432
+433
+434
+435
+436
+437
+438
+439
+440
+441
+442
+443
+444
+445
+446
+447
+448
+449
+450
+451
+452
+453
+454
+455
+456
+457
+458
+459
+460
+461
+462
+463
+464
+465
+466
+467
+468
+469
+470
+471
+472
+473
+474
+475
+476
+477
+478
+479
+480
+481
+482
+483
+484
+485
+486
+487
+488
+489
+490
+491
+492
+493
+494
+495
+496
+497
+498
+499
+500
+501
+502
+503
+504
+505
+506
+507
+508
+509
+510
+511
+512
+513
+514
+515
+516
+517
+518
+519
+520
+521
+522
+523
+524
+525
+526
+527
+528
+529
+530
+531
+532
+533
+534
+535
+536
+537
+538
+539
+540
+541
+542
+543
+544
+545
+546
+547
+548
+549
+550
+551
+552
+553
+554
+555
+556
+557
+558
+559
+560
+561
+562
+563
+564
+565
+566
+567
+568
+569
+570
+571
+572
+573
+574
+575
+576
+577
+578
+579
+580
+581
+582
+583
+584
+585
+586
+587
+588
+589
+590
+591
+592
+593
+594
+595
+596
+597
+598
+599
+600
+601
+602
+603
+604
+605
+606
+607
+608
+609
+610
+611
+612
+613
+614
+615
+616
+617
+618
+619
+620
+621
+622
+623
+624
+625
+626
+627
+628
+629
+630
+631
+632
+633
+634
+635
+636
+637
+638
+639
+640
+641
+642
+643
+644
+645
+646
+647
+648
+649
+650
+651
+652
+653
+654
+655
+656
+657
+658
+659
+660
+661
+662
+663
+664
+665
+666
+667
+668
+669
+670
+671
+672
+673
+674
+675
+676
+677
+678
+679
+680
+681
+682
+683
+684
+685
+686
+687
+688
+689
+690
+691
+692
+693
+694
+695
+696
+697
+698
+699
+700
+701
+702
+703
+704
+705
+706
+707
+708
+709
+710
+711
+712
+713
+714
+715
+716
+717
+718
+719
+720
+721
+722
+723
+724
+725
+726
+727
+728
+729
+730
+731
+732
+733
+734
+735
+736
+737
+738
+739
+740
+741
+742
+743
+744
+745
+746
+747
+748
+749
+750
+751
+752
+753
+754
+755
+756
+757
+758
+759
+760
+761
+762
+763
+764
+765
+766
+767
+768
+769
+770
+771
+772
+773
+774
+775
+776
+777
+778
+779
+780
+781
+782
+783
+784
+785
+786
+787
+788
+789
+790
+791
+792
+793
+794
+795
+796
+797
+798
+799
+800
+801
+802
+803
+804
+805
+806
+807
+808
+809
+810
+811
+812
+813
+
use super::{
+    account_hash::AccountHash,
+    addressable_entity_hash::AddressableEntityHash,
+    cl::bytes::Bytes,
+    package_hash::PackageHash,
+    public_key::PublicKey,
+    transaction_params::{
+        transaction_builder_params::TransactionBuilderParams,
+        transaction_str_params::TransactionStrParams,
+    },
+    uref::URef,
+};
+#[cfg(target_arch = "wasm32")]
+use crate::helpers::insert_js_value_arg;
+use crate::{
+    debug::{error, log},
+    helpers::{
+        get_current_timestamp, get_ttl_or_default, insert_arg, parse_timestamp, parse_ttl,
+        secret_key_from_pem,
+    },
+    make_transaction,
+    make_transfer_transaction::make_transfer_transaction,
+    types::transaction_hash::TransactionHash,
+};
+use casper_types::{
+    bytesrepr::{self, Bytes as _Bytes},
+    transaction::Transaction as _Transaction,
+    Approval, ApprovalsHash, AsymmetricType, Deploy, InitiatorAddr, PricingMode, RuntimeArgs,
+    SecretKey, TimeDiff, Timestamp, TransactionHeader, TransactionV1, TransactionV1Body,
+    TransactionV1Builder,
+};
+use chrono::{DateTime, Utc};
+#[cfg(target_arch = "wasm32")]
+use gloo_utils::format::JsValueSerdeExt;
+use serde::{Deserialize, Serialize};
+use serde_json::{json, Value};
+use std::collections::BTreeSet;
+use wasm_bindgen::prelude::*;
+
+#[derive(Debug, Deserialize, Clone, Serialize)]
+#[wasm_bindgen]
+pub struct Transaction(_Transaction);
+
+#[derive(Default)]
+struct BuildParams {
+    chain_name: Option<String>,
+    timestamp: Option<Timestamp>,
+    ttl: Option<TimeDiff>,
+    body: Option<TransactionV1Body>,
+    pricing_mode: Option<PricingMode>,
+    initiator_addr: Option<InitiatorAddr>,
+    secret_key: Option<String>,
+}
+
+#[wasm_bindgen]
+impl Transaction {
+    #[cfg(target_arch = "wasm32")]
+    #[wasm_bindgen(constructor)]
+    pub fn new(transaction: JsValue) -> Self {
+        let transaction: _Transaction = transaction
+            .into_serde()
+            .map_err(|err| error(&format!("Failed to deserialize Transaction: {:?}", err)))
+            .unwrap();
+        transaction.into()
+    }
+
+    #[cfg(target_arch = "wasm32")]
+    #[wasm_bindgen(js_name = "toJson")]
+    pub fn to_json_js_alias(&self) -> JsValue {
+        match JsValue::from_serde(&self.0) {
+            Ok(json) => json,
+            Err(err) => {
+                error(&format!("Error serializing data to JSON: {:?}", err));
+                JsValue::null()
+            }
+        }
+    }
+
+    // static context
+    #[wasm_bindgen(js_name = "newSession")]
+    pub fn new_session(
+        builder_params: TransactionBuilderParams,
+        transaction_params: TransactionStrParams,
+    ) -> Result<Transaction, String> {
+        make_transaction(builder_params, transaction_params)
+            .map(Into::into)
+            .map_err(|err| {
+                let err_msg = format!("Error creating body transaction: {}", err);
+                err_msg
+            })
+    }
+
+    // static context
+    #[wasm_bindgen(js_name = "newTransfer")]
+    pub fn new_transfer(
+        maybe_source: Option<URef>,
+        target_account: &str,
+        amount: &str,
+        maybe_id: Option<String>,
+        transaction_params: TransactionStrParams,
+    ) -> Result<Transaction, String> {
+        make_transfer_transaction(
+            maybe_source,
+            target_account,
+            amount,
+            transaction_params,
+            maybe_id,
+        )
+        .map(Into::into)
+        .map_err(|err| format!("Error creating transfer transaction: {}", err))
+    }
+
+    #[wasm_bindgen(js_name = "withTTL")]
+    pub fn with_ttl(&self, ttl: &str, secret_key: Option<String>) -> Transaction {
+        let mut ttl = parse_ttl(ttl);
+        if let Err(err) = &ttl {
+            error(&format!("Error parsing TTL: {}", err));
+            ttl = parse_ttl(&get_ttl_or_default(None));
+        }
+        self.build(BuildParams {
+            secret_key,
+            ttl: Some(ttl.unwrap()),
+            ..Default::default()
+        })
+    }
+
+    #[wasm_bindgen(js_name = "withTimestamp")]
+    pub fn with_timestamp(&self, timestamp: &str, secret_key: Option<String>) -> Transaction {
+        let mut timestamp = parse_timestamp(timestamp);
+        if let Err(err) = &timestamp {
+            error(&format!("Error parsing Timestamp: {}", err));
+            timestamp = parse_timestamp(&get_current_timestamp(None));
+        }
+        self.build(BuildParams {
+            secret_key,
+            timestamp: Some(timestamp.unwrap()),
+            ..Default::default()
+        })
+    }
+
+    #[wasm_bindgen(js_name = "withChainName")]
+    pub fn with_chain_name(&self, chain_name: &str, secret_key: Option<String>) -> Transaction {
+        self.build(BuildParams {
+            secret_key,
+            chain_name: Some(chain_name.to_string()),
+            ..Default::default()
+        })
+    }
+
+    #[wasm_bindgen(js_name = "withPublicKey")]
+    pub fn with_public_key(
+        &self,
+        public_key: PublicKey,
+        secret_key: Option<String>,
+    ) -> Transaction {
+        self.build(BuildParams {
+            secret_key,
+            initiator_addr: Some(InitiatorAddr::PublicKey(public_key.into())),
+            ..Default::default()
+        })
+    }
+
+    #[wasm_bindgen(js_name = "withAccountHash")]
+    pub fn with_account_hash(
+        &self,
+        account_hash: AccountHash,
+        secret_key: Option<String>,
+    ) -> Transaction {
+        self.build(BuildParams {
+            secret_key,
+            initiator_addr: Some(InitiatorAddr::AccountHash(account_hash.into())),
+            ..Default::default()
+        })
+    }
+
+    #[wasm_bindgen(js_name = "withEntryPoint")]
+    pub fn with_entry_point(&self, entry_point: &str, secret_key: Option<String>) -> Transaction {
+        self.build(BuildParams {
+            secret_key,
+            body: Some(modify_body(
+                &self.body(),
+                NewBodyParams {
+                    new_entry_point: Some(entry_point.to_string()),
+                    ..Default::default()
+                },
+            )),
+            ..Default::default()
+        })
+    }
+
+    #[wasm_bindgen(js_name = "withHash")]
+    pub fn with_hash(
+        &self,
+        hash: AddressableEntityHash,
+        secret_key: Option<String>,
+    ) -> Transaction {
+        self.build(BuildParams {
+            secret_key,
+            body: Some(modify_body(
+                &self.body(),
+                NewBodyParams {
+                    new_hash: Some(hash),
+                    ..Default::default()
+                },
+            )),
+            ..Default::default()
+        })
+    }
+
+    #[wasm_bindgen(js_name = "withPackageHash")]
+    pub fn with_package_hash(
+        &self,
+        package_hash: PackageHash,
+        secret_key: Option<String>,
+    ) -> Transaction {
+        self.build(BuildParams {
+            secret_key,
+            body: Some(modify_body(
+                &self.body(),
+                NewBodyParams {
+                    new_package_hash: Some(package_hash),
+                    ..Default::default()
+                },
+            )),
+            ..Default::default()
+        })
+    }
+
+    #[wasm_bindgen(js_name = "withModuleBytes")]
+    pub fn with_module_bytes(
+        &self,
+        module_bytes: Bytes,
+        secret_key: Option<String>,
+    ) -> Transaction {
+        self.build(BuildParams {
+            secret_key,
+            body: Some(modify_body(
+                &self.body(),
+                NewBodyParams {
+                    new_module_bytes: Some(&module_bytes),
+                    ..Default::default()
+                },
+            )),
+            ..Default::default()
+        })
+    }
+
+    #[wasm_bindgen(js_name = "withSecretKey")]
+    pub fn with_secret_key(&self, secret_key: Option<String>) -> Transaction {
+        self.build(BuildParams {
+            secret_key,
+            ..Default::default()
+        })
+    }
+
+    // Load body from json
+    #[cfg(target_arch = "wasm32")]
+    #[wasm_bindgen(js_name = "withBody")]
+    pub fn with_body(&self, body: JsValue, secret_key: Option<String>) -> Transaction {
+        let body_item_result = body.into_serde();
+
+        match body_item_result {
+            Ok(body_item) => self.build(BuildParams {
+                secret_key,
+                body: Some(body_item),
+                ..Default::default()
+            }),
+            Err(err) => {
+                error(&format!("Error parsing body: {}", err));
+                self.0.clone().into()
+            }
+        }
+    }
+
+    #[wasm_bindgen(js_name = "verify")]
+    pub fn verify(&self) -> bool {
+        match self.0.clone().verify() {
+            Ok(()) => true,
+            Err(err) => {
+                log(&format!("Warning Transaction is not valid: {:?}", err));
+                false
+            }
+        }
+    }
+
+    #[wasm_bindgen(getter)]
+    pub fn hash(&self) -> TransactionHash {
+        // TODO check why fmt is giving a short version and not debug
+        // dbg!(format!("{:?}", (*transaction.hash().inner()).clone()));
+        let transaction_hash = self.0.clone().hash();
+
+        match TransactionHash::new(&transaction_hash.to_string()) {
+            Ok(transaction_hash) => transaction_hash,
+            Err(err) => {
+                error(&format!("Transaction has not a valid hash: {:?}", err));
+                TransactionHash::new("").unwrap()
+            }
+        }
+    }
+
+    #[wasm_bindgen(js_name = "expired")]
+    pub fn expired(&self) -> bool {
+        let now: DateTime<Utc> = Utc::now();
+        let now_millis = now.timestamp_millis() as u64;
+        let timestamp = Timestamp::from(now_millis);
+        match self.0.clone().expired(timestamp) {
+            false => false,
+            true => {
+                error("Transaction has expired");
+                true
+            }
+        }
+    }
+
+    #[cfg(target_arch = "wasm32")]
+    #[wasm_bindgen(js_name = "expires")]
+    pub fn expires_js_alias(&self) -> JsValue {
+        match JsValue::from_serde(&self.expires()) {
+            Ok(expires) => expires,
+            Err(err) => {
+                error(&format!("Error serializing expires to JSON: {:?}", err));
+                JsValue::null()
+            }
+        }
+    }
+
+    #[cfg(target_arch = "wasm32")]
+    #[wasm_bindgen(js_name = "signers")]
+    pub fn signers_js_alias(&self) -> JsValue {
+        match JsValue::from_serde(&self.signers()) {
+            Ok(signers) => signers,
+            Err(err) => {
+                error(&format!("Error serializing signers to JSON: {:?}", err));
+                JsValue::null()
+            }
+        }
+    }
+
+    #[cfg(target_arch = "wasm32")]
+    #[wasm_bindgen(js_name = "authorization_keys")]
+    pub fn authorization_keys_js_alias(&self) -> JsValue {
+        match JsValue::from_serde(&self.authorization_keys()) {
+            Ok(authorization_keys) => authorization_keys,
+            Err(err) => {
+                error(&format!(
+                    "Error serializing authorization_keys to JSON: {:?}",
+                    err
+                ));
+                JsValue::null()
+            }
+        }
+    }
+
+    #[wasm_bindgen(js_name = "sign")]
+    pub fn sign(&mut self, secret_key: &str) -> Transaction {
+        let mut transaction: _Transaction = self.0.clone();
+        let secret_key_from_pem = secret_key_from_pem(secret_key);
+        if let Err(err) = secret_key_from_pem {
+            error(&format!("Error loading secret key: {:?}", err));
+            return transaction.into();
+        }
+        transaction.sign(&secret_key_from_pem.unwrap());
+        if let Err(err) = transaction.verify() {
+            error(&format!("Transaction has not a valid: {:?}", err));
+        }
+        transaction.into()
+    }
+
+    #[cfg(target_arch = "wasm32")]
+    #[wasm_bindgen(js_name = "approvalsHash")]
+    pub fn compute_approvals_hash_js_alias(&self) -> JsValue {
+        match JsValue::from_serde(&self.compute_approvals_hash()) {
+            Ok(json) => json,
+            Err(err) => {
+                error(&format!(
+                    "Error serializing compute_approvals_hash to JSON: {:?}",
+                    err
+                ));
+                JsValue::null()
+            }
+        }
+    }
+
+    #[cfg(target_arch = "wasm32")]
+    #[wasm_bindgen(js_name = "approvals")]
+    pub fn approvals_js_alias(&self) -> JsValue {
+        match JsValue::from_serde(&self.approvals()) {
+            Ok(json) => json,
+            Err(err) => {
+                error(&format!("Error serializing approvals to JSON: {:?}", err));
+                JsValue::null()
+            }
+        }
+    }
+
+    #[cfg(target_arch = "wasm32")]
+    #[wasm_bindgen(js_name = "header")]
+    pub fn header_js_alias(&self) -> JsValue {
+        match JsValue::from_serde(&self.header()) {
+            Ok(json) => json,
+            Err(err) => {
+                error(&format!("Error serializing header to JSON: {:?}", err));
+                JsValue::null()
+            }
+        }
+    }
+
+    #[wasm_bindgen(js_name = "isNative")]
+    pub fn is_native(&self) -> bool {
+        self.0.clone().is_native()
+    }
+
+    #[wasm_bindgen(js_name = "isStandardPayment")]
+    pub fn is_standard_payment(&self) -> bool {
+        self.0.clone().is_standard_payment()
+    }
+
+    #[cfg(target_arch = "wasm32")]
+    #[wasm_bindgen(js_name = "session_args")]
+    pub fn session_args_js_alias(&self) -> JsValue {
+        match JsValue::from_serde(&self.session_args()) {
+            Ok(json) => json,
+            Err(err) => {
+                error(&format!(
+                    "Error serializing session_args to JSON: {:?}",
+                    err
+                ));
+                JsValue::null()
+            }
+        }
+    }
+
+    #[wasm_bindgen(js_name = "addSignature")]
+    pub fn add_signature(&self, public_key: &str, signature: &str) -> Transaction {
+        // Serialize the existing approvals to JSON
+        let casper_transaction: _Transaction = self.0.clone();
+        let existing_approvals_json = casper_transaction
+            .approvals()
+            .iter()
+            .map(|approval| {
+                json!({
+                    "signer": approval.signer().to_hex(),
+                    "signature": approval.signature().to_hex(),
+                })
+            })
+            .collect::<Vec<_>>();
+
+        // Create JSON object for the new approval
+        let new_approval_json = json!({
+            "signer": public_key,
+            "signature": signature,
+        });
+
+        // Append the new approval to existing approvals
+        let mut all_approvals_json = existing_approvals_json;
+        all_approvals_json.push(new_approval_json);
+
+        // Convert the approvals JSON back to string
+        let updated_approvals_str = serde_json::to_string(&all_approvals_json)
+            .expect("Failed to serialize updated approvals JSON");
+
+        // Replace the approvals field in the original transaction JSON string
+        let mut transaction_json: Value = serde_json::from_str(&self.to_json_string().unwrap())
+            .expect("Failed to deserialize transaction JSON");
+        transaction_json["approvals"] = serde_json::from_str(&updated_approvals_str)
+            .expect("Failed to deserialize updated approvals JSON");
+
+        // Convert the updated transaction JSON back to a Transaction struct
+        let updated_transaction: Transaction = serde_json::from_value(transaction_json)
+            .expect("Failed to deserialize updated transaction JSON");
+
+        updated_transaction
+    }
+
+    #[wasm_bindgen(js_name = "entryPoint")]
+    pub fn entry_point(&self) -> String {
+        self.0.clone().entry_point().to_string()
+    }
+
+    #[wasm_bindgen(js_name = "TTL")]
+    pub fn ttl(&self) -> String {
+        self.0.clone().ttl().to_string()
+    }
+
+    #[wasm_bindgen(js_name = "timestamp")]
+    pub fn timestamp(&self) -> String {
+        self.0.clone().timestamp().to_string()
+    }
+
+    #[wasm_bindgen(js_name = "size_estimate")]
+    pub fn size_estimate(&self) -> usize {
+        self.0.clone().size_estimate()
+    }
+
+    #[wasm_bindgen(js_name = "chain_name")]
+    pub fn chain_name(&self) -> String {
+        match &self.0.header() {
+            TransactionHeader::Deploy(header) => header.chain_name().to_string(),
+            TransactionHeader::V1(header) => header.chain_name().to_string(),
+        }
+    }
+
+    #[wasm_bindgen(js_name = "initiator_addr")]
+    pub fn initiator_addr(&self) -> String {
+        let initiator_addr: InitiatorAddr = self.0.clone().initiator_addr().clone();
+        match initiator_addr {
+            InitiatorAddr::PublicKey(public_key) => public_key.to_hex(),
+            InitiatorAddr::AccountHash(hash) => hash.to_formatted_string(),
+        }
+    }
+
+    #[wasm_bindgen(js_name = "account_hash")]
+    pub fn account_hash(&self) -> AccountHash {
+        let initiator_addr: InitiatorAddr = self.0.clone().initiator_addr().clone();
+        initiator_addr.account_hash().into()
+    }
+
+    #[cfg(target_arch = "wasm32")]
+    #[wasm_bindgen(js_name = "addArg")]
+    pub fn add_arg_js_alias(
+        &mut self,
+        js_value_arg: JsValue,
+        secret_key: Option<String>,
+    ) -> Transaction {
+        let mut args = self.0.clone().session_args().clone();
+        let new_args = insert_js_value_arg(&mut args, js_value_arg);
+        let new_body = modify_body(
+            &self.body(),
+            NewBodyParams {
+                new_args: Some(new_args),
+                ..Default::default()
+            },
+        );
+
+        self.build(BuildParams {
+            secret_key,
+            body: Some(new_body),
+            ..Default::default()
+        })
+    }
+}
+
+impl Transaction {
+    pub fn session_args(&self) -> RuntimeArgs {
+        self.0.clone().session_args().clone()
+    }
+
+    fn body(&self) -> TransactionV1Body {
+        let body = match self.0.clone() {
+            _Transaction::Deploy(_deploy) => todo!("deploy body in transaction"),
+            _Transaction::V1(ref transaction_v1) => transaction_v1.body().clone(),
+        };
+        body
+    }
+
+    pub fn add_arg(&mut self, new_value_arg: String, secret_key: Option<String>) -> Transaction {
+        let mut args = self.0.clone().session_args().clone();
+        let new_args = insert_arg(&mut args, new_value_arg);
+        let new_body = modify_body(
+            &self.body(),
+            NewBodyParams {
+                new_args: Some(new_args),
+                ..Default::default()
+            },
+        );
+
+        self.build(BuildParams {
+            secret_key,
+            body: Some(new_body),
+            ..Default::default()
+        })
+    }
+
+    pub fn to_json_string(&self) -> Result<String, String> {
+        let result = serde_json::to_string(&self.0);
+        match result {
+            Ok(json) => Ok(json),
+            Err(err) => {
+                let err_msg = format!("Error serializing data to JSON: {:?}", err);
+                error(&err_msg);
+                Err(err_msg)
+            }
+        }
+    }
+
+    pub fn compute_approvals_hash(&self) -> Result<ApprovalsHash, bytesrepr::Error> {
+        self.0.clone().compute_approvals_hash()
+    }
+
+    pub fn approvals(&self) -> BTreeSet<Approval> {
+        self.0.clone().approvals()
+    }
+
+    pub fn header(&self) -> TransactionHeader {
+        self.0.clone().header()
+    }
+
+    pub fn expires(&self) -> Timestamp {
+        self.0.clone().expires()
+    }
+
+    pub fn signers(&self) -> BTreeSet<AccountHash> {
+        self.0
+            .clone()
+            .signers()
+            .into_iter()
+            .map(Into::into)
+            .collect()
+    }
+
+    pub fn authorization_keys(&self) -> BTreeSet<AccountHash> {
+        self.0
+            .clone()
+            .authorization_keys()
+            .into_iter()
+            .map(Into::into)
+            .collect()
+    }
+
+    fn build(&self, transaction_params: BuildParams) -> Transaction {
+        let BuildParams {
+            chain_name,
+            ttl,
+            timestamp,
+            initiator_addr,
+            body,
+            pricing_mode,
+            secret_key,
+        } = transaction_params;
+        let transaction = self.0.clone();
+        let chain_name = if let Some(chain_name) = chain_name {
+            chain_name
+        } else {
+            self.chain_name()
+        };
+        let ttl = if let Some(ttl) = ttl {
+            ttl
+        } else {
+            transaction.ttl()
+        };
+        let timestamp = if let Some(timestamp) = timestamp {
+            timestamp
+        } else {
+            transaction.timestamp()
+        };
+
+        let initiator_addr = if let Some(initiator_addr) = initiator_addr {
+            initiator_addr
+        } else {
+            transaction.initiator_addr().clone()
+        };
+
+        let body = if let Some(body) = body {
+            body
+        } else {
+            match transaction {
+                _Transaction::Deploy(_deploy) => todo!("deploy body in transaction"),
+                _Transaction::V1(ref transaction_v1) => transaction_v1.body().clone(),
+            }
+        };
+
+        let pricing_mode = if let Some(pricing_mode) = pricing_mode {
+            pricing_mode
+        } else {
+            match transaction {
+                _Transaction::Deploy(_deploy) => todo!("deploy pricing_mode in transaction"),
+                _Transaction::V1(transaction_v1) => transaction_v1.pricing_mode().clone(),
+            }
+        };
+
+        let mut transaction_builder = TransactionV1Builder::new(body)
+            .with_chain_name(chain_name)
+            .with_pricing_mode(pricing_mode)
+            .with_initiator_addr(initiator_addr)
+            .with_ttl(ttl)
+            .with_timestamp(timestamp);
+
+        let secret_key_result = secret_key
+            .clone()
+            .map(|key| secret_key_from_pem(&key).unwrap())
+            .unwrap_or_else(|| {
+                if secret_key.is_some() {
+                    error("Error loading secret key");
+                }
+                // Default will never be used in next if secret_key.is_some()
+                SecretKey::generate_ed25519().unwrap()
+            });
+        if secret_key.is_some() {
+            transaction_builder = transaction_builder.with_secret_key(&secret_key_result);
+        }
+        let transaction = transaction_builder
+            .build()
+            .map_err(|err| error(&format!("Failed to build transaction: {:?}", err)))
+            .unwrap();
+
+        let transaction: Transaction = transaction.into();
+        // let _ = transaction.validate_transaction_size();
+        transaction
+    }
+}
+
+#[derive(Default)]
+struct NewBodyParams<'a> {
+    new_args: Option<&'a RuntimeArgs>,
+    new_hash: Option<AddressableEntityHash>,
+    new_package_hash: Option<PackageHash>,
+    new_entry_point: Option<String>,
+    new_alias: Option<String>,
+    new_version: Option<u32>,
+    new_module_bytes: Option<&'a Bytes>,
+}
+
+fn modify_body(
+    body: &TransactionV1Body,
+    NewBodyParams {
+        new_args,
+        new_hash,
+        new_package_hash,
+        new_entry_point,
+        new_alias,
+        new_version,
+        new_module_bytes,
+    }: NewBodyParams,
+) -> TransactionV1Body {
+    let runtime_args = new_args.cloned().unwrap_or_else(|| body.args().clone());
+    let entry_point = body.entry_point().to_string();
+    match body.target() {
+        casper_types::TransactionTarget::Native => {
+            unimplemented!("native transfer not implemented!")
+        }
+        casper_types::TransactionTarget::Stored { id, runtime: _ } => match id {
+            casper_types::TransactionInvocationTarget::ByHash(hash) => {
+                TransactionV1Builder::new_targeting_invocable_entity(
+                    new_hash.unwrap_or((*hash).into()).into(),
+                    new_entry_point.unwrap_or_else(|| entry_point.clone()),
+                )
+                .with_runtime_args(runtime_args)
+                .body
+            }
+            casper_types::TransactionInvocationTarget::ByName(alias) => {
+                TransactionV1Builder::new_targeting_invocable_entity_via_alias(
+                    new_alias.unwrap_or_else(|| alias.clone()),
+                    new_entry_point.unwrap_or_else(|| entry_point.clone()),
+                )
+                .with_runtime_args(runtime_args)
+                .body
+            }
+            casper_types::TransactionInvocationTarget::ByPackageHash { addr, version } => {
+                TransactionV1Builder::new_targeting_package(
+                    new_package_hash.unwrap_or((*addr).into()).into(),
+                    Some(new_version.unwrap_or(version.unwrap_or(1))),
+                    new_entry_point.unwrap_or_else(|| entry_point.clone()),
+                )
+                .with_runtime_args(runtime_args)
+                .body
+            }
+            casper_types::TransactionInvocationTarget::ByPackageName { name, version } => {
+                TransactionV1Builder::new_targeting_package_via_alias(
+                    new_alias.unwrap_or_else(|| name.clone()),
+                    Some(new_version.unwrap_or(version.unwrap_or(1))),
+                    new_entry_point.unwrap_or_else(|| entry_point.clone()),
+                )
+                .with_runtime_args(runtime_args)
+                .body
+            }
+        },
+        casper_types::TransactionTarget::Session {
+            kind,
+            module_bytes,
+            runtime: _,
+        } => {
+            let default: _Bytes = module_bytes.clone();
+            let new_bytes = new_module_bytes.unwrap();
+            let new: &Bytes = new_bytes;
+            let new_module_bytes: _Bytes = {
+                let new_bytes: _Bytes = _Bytes::from((*new).to_vec());
+                if new_bytes.len() > 0 {
+                    new_bytes
+                } else {
+                    default
+                }
+            };
+
+            TransactionV1Builder::new_session(*kind, new_module_bytes)
+                .with_runtime_args(runtime_args)
+                .body
+        }
+    }
+}
+
+impl From<Transaction> for _Transaction {
+    fn from(transaction: Transaction) -> Self {
+        transaction.0
+    }
+}
+
+impl From<_Transaction> for Transaction {
+    fn from(transaction: _Transaction) -> Self {
+        Transaction(transaction)
+    }
+}
+
+impl From<Deploy> for Transaction {
+    fn from(deploy: Deploy) -> Self {
+        _Transaction::Deploy(deploy).into()
+    }
+}
+
+impl From<TransactionV1> for Transaction {
+    fn from(transaction: TransactionV1) -> Self {
+        _Transaction::V1(transaction).into()
+    }
+}
+
\ No newline at end of file diff --git a/api-rust/src/casper_rust_wasm_sdk/types/transaction_hash.rs.html b/api-rust/src/casper_rust_wasm_sdk/types/transaction_hash.rs.html new file mode 100644 index 000000000..173b17f2a --- /dev/null +++ b/api-rust/src/casper_rust_wasm_sdk/types/transaction_hash.rs.html @@ -0,0 +1,159 @@ +transaction_hash.rs - source
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+
use super::digest::Digest;
+use crate::debug::error;
+use casper_types::bytesrepr::ToBytes;
+use casper_types::Digest as _Digest;
+use casper_types::TransactionHash as _TransactionHash;
+#[cfg(target_arch = "wasm32")]
+use gloo_utils::format::JsValueSerdeExt;
+use hex::decode;
+use serde::{Deserialize, Serialize};
+use std::fmt;
+use wasm_bindgen::prelude::*;
+
+#[derive(Debug, Deserialize, Clone, Serialize)]
+#[wasm_bindgen]
+pub struct TransactionHash(_TransactionHash);
+
+#[wasm_bindgen]
+impl TransactionHash {
+    #[wasm_bindgen(constructor)]
+    pub fn new(transaction_hash_hex_str: &str) -> Result<TransactionHash, JsValue> {
+        let bytes = decode(transaction_hash_hex_str)
+            .map_err(|err| error(&format!("{:?}", err)))
+            .unwrap();
+        let mut hash = [0u8; _Digest::LENGTH];
+        hash.copy_from_slice(&bytes);
+        Self::from_raw(&hash)
+    }
+
+    #[wasm_bindgen(js_name = "fromRaw")]
+    pub fn from_raw(bytes: &[u8]) -> Result<TransactionHash, JsValue> {
+        if bytes.len() != _Digest::LENGTH {
+            return Err(JsValue::from_str("Invalid digest length"));
+        }
+        let mut hash = [0u8; _Digest::LENGTH];
+        hash.copy_from_slice(bytes);
+        Ok(Self(_TransactionHash::from_raw(hash)))
+    }
+
+    #[wasm_bindgen(js_name = "fromDigest")]
+    pub fn from_digest(digest: Digest) -> Result<TransactionHash, JsValue> {
+        Self::from_raw(&digest.to_bytes().unwrap())
+    }
+
+    #[cfg(target_arch = "wasm32")]
+    #[wasm_bindgen(js_name = "digest")]
+    pub fn digest(&self) -> Result<Digest, JsValue> {
+        Ok(self.0.digest().into())
+    }
+
+    #[cfg(target_arch = "wasm32")]
+    #[wasm_bindgen(js_name = "toJson")]
+    pub fn to_json(&self) -> JsValue {
+        JsValue::from_serde(self).unwrap_or(JsValue::null())
+    }
+
+    #[cfg(target_arch = "wasm32")]
+    #[wasm_bindgen(js_name = "toString")]
+    pub fn to_string_js_alias(&self) -> String {
+        self.to_string()
+    }
+}
+
+impl fmt::Display for TransactionHash {
+    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
+        write!(f, "{}", hex::encode(self.0))
+    }
+}
+
+impl From<TransactionHash> for _TransactionHash {
+    fn from(transaction_hash: TransactionHash) -> Self {
+        transaction_hash.0
+    }
+}
+
+impl From<_TransactionHash> for TransactionHash {
+    fn from(transaction_hash: _TransactionHash) -> Self {
+        TransactionHash(transaction_hash)
+    }
+}
+
\ No newline at end of file diff --git a/api-rust/src/casper_rust_wasm_sdk/types/transaction_params/mod.rs.html b/api-rust/src/casper_rust_wasm_sdk/types/transaction_params/mod.rs.html new file mode 100644 index 000000000..569c9df5b --- /dev/null +++ b/api-rust/src/casper_rust_wasm_sdk/types/transaction_params/mod.rs.html @@ -0,0 +1,5 @@ +mod.rs - source
1
+2
+
pub mod transaction_builder_params;
+pub mod transaction_str_params;
+
\ No newline at end of file diff --git a/api-rust/src/casper_rust_wasm_sdk/types/transaction_params/transaction_builder_params.rs.html b/api-rust/src/casper_rust_wasm_sdk/types/transaction_params/transaction_builder_params.rs.html new file mode 100644 index 000000000..90d26db2b --- /dev/null +++ b/api-rust/src/casper_rust_wasm_sdk/types/transaction_params/transaction_builder_params.rs.html @@ -0,0 +1,1005 @@ +transaction_builder_params.rs - source
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
+339
+340
+341
+342
+343
+344
+345
+346
+347
+348
+349
+350
+351
+352
+353
+354
+355
+356
+357
+358
+359
+360
+361
+362
+363
+364
+365
+366
+367
+368
+369
+370
+371
+372
+373
+374
+375
+376
+377
+378
+379
+380
+381
+382
+383
+384
+385
+386
+387
+388
+389
+390
+391
+392
+393
+394
+395
+396
+397
+398
+399
+400
+401
+402
+403
+404
+405
+406
+407
+408
+409
+410
+411
+412
+413
+414
+415
+416
+417
+418
+419
+420
+421
+422
+423
+424
+425
+426
+427
+428
+429
+430
+431
+432
+433
+434
+435
+436
+437
+438
+439
+440
+441
+442
+443
+444
+445
+446
+447
+448
+449
+450
+451
+452
+453
+454
+455
+456
+457
+458
+459
+460
+461
+462
+463
+464
+465
+466
+467
+468
+469
+470
+471
+472
+473
+474
+475
+476
+477
+478
+479
+480
+481
+482
+483
+484
+485
+486
+487
+488
+489
+490
+491
+492
+493
+494
+495
+496
+497
+498
+499
+500
+501
+502
+
use crate::{
+    debug::error,
+    types::{
+        account_hash::AccountHash, addressable_entity_hash::AddressableEntityHash,
+        cl::bytes::Bytes, package_hash::PackageHash, public_key::PublicKey, uref::URef,
+    },
+};
+use casper_client::cli::TransactionBuilderParams as _TransactionBuilderParams;
+use casper_types::{transaction::TransferTarget as _TransferTarget, U512};
+use wasm_bindgen::prelude::*;
+
+#[wasm_bindgen]
+#[derive(Clone, Copy, Debug)]
+pub enum TransferTargetKind {
+    PublicKey,
+    AccountHash,
+    URef,
+}
+
+#[wasm_bindgen]
+#[derive(Clone, Debug)]
+pub struct TransferTarget {
+    kind: TransferTargetKind,
+    public_key: Option<PublicKey>,
+    account_hash: Option<AccountHash>,
+    uref: Option<URef>,
+}
+
+#[wasm_bindgen]
+#[derive(Clone, Debug, Default)]
+pub struct TransactionBuilderParams {
+    kind: TransactionKind,
+    transaction_bytes: Option<Bytes>,
+    maybe_source: Option<URef>,
+    target: Option<TransferTarget>,
+    amount: Option<U512>,
+    maybe_id: Option<u64>,
+    entity_hash: Option<AddressableEntityHash>,
+    entity_alias: Option<String>,
+    entry_point: Option<String>,
+    package_hash: Option<PackageHash>,
+    package_alias: Option<String>,
+    maybe_entity_version: Option<u32>,
+    public_key: Option<PublicKey>,
+    delegation_rate: Option<u8>,
+    delegator: Option<PublicKey>,
+    validator: Option<PublicKey>,
+    new_validator: Option<PublicKey>,
+}
+
+#[wasm_bindgen]
+#[derive(Clone, Copy, Debug, Default)]
+pub enum TransactionKind {
+    InvocableEntity,
+    InvocableEntityAlias,
+    Package,
+    PackageAlias,
+    #[default]
+    Session,
+    Transfer,
+    AddBid,
+    Delegate,
+    Undelegate,
+    Redelegate,
+    WithdrawBid,
+}
+
+#[wasm_bindgen]
+impl TransactionBuilderParams {
+    #[wasm_bindgen(js_name = "newSession")]
+    pub fn new_session(transaction_bytes: Option<Bytes>) -> TransactionBuilderParams {
+        TransactionBuilderParams {
+            kind: TransactionKind::Session,
+            transaction_bytes,
+            entry_point: None,
+            maybe_source: None,
+            target: None,
+            amount: None,
+            maybe_id: None,
+            entity_hash: None,
+            entity_alias: None,
+            package_hash: None,
+            package_alias: None,
+            maybe_entity_version: None,
+            public_key: None,
+            delegation_rate: None,
+            delegator: None,
+            validator: None,
+            new_validator: None,
+        }
+    }
+
+    #[wasm_bindgen(js_name = "newTransfer")]
+    pub fn new_transfer(
+        target: TransferTarget,
+        amount: &str,
+        maybe_source: Option<URef>,
+        maybe_id: Option<u64>,
+    ) -> TransactionBuilderParams {
+        let amount = convert_amount(amount);
+        TransactionBuilderParams {
+            kind: TransactionKind::Transfer,
+            transaction_bytes: None,
+            entry_point: None,
+            maybe_source,
+            target: Some(target),
+            amount,
+            maybe_id,
+            entity_hash: None,
+            entity_alias: None,
+            package_hash: None,
+            package_alias: None,
+            maybe_entity_version: None,
+            public_key: None,
+            delegation_rate: None,
+            delegator: None,
+            validator: None,
+            new_validator: None,
+        }
+    }
+
+    #[wasm_bindgen(js_name = "newInvocableEntity")]
+    pub fn new_invocable_entity(entity_hash: &str, entry_point: &str) -> TransactionBuilderParams {
+        let addressable_entity_hash = match AddressableEntityHash::from_formatted_str(entity_hash) {
+            Ok(hash) => Some(hash),
+            Err(_err) => {
+                // TODO Fix Jsvalue ret
+                //  error(&format!("Error parsing entity hash: {}", err.as_string()));
+                None
+            }
+        };
+        TransactionBuilderParams {
+            kind: TransactionKind::InvocableEntity,
+            transaction_bytes: None,
+            entry_point: Some(entry_point.to_string()),
+            maybe_source: None,
+            target: None,
+            amount: None,
+            maybe_id: None,
+            entity_hash: addressable_entity_hash,
+            entity_alias: None,
+            package_hash: None,
+            package_alias: None,
+            maybe_entity_version: None,
+            public_key: None,
+            delegation_rate: None,
+            delegator: None,
+            validator: None,
+            new_validator: None,
+        }
+    }
+
+    #[wasm_bindgen(js_name = "newInvocableEntityAlias")]
+    pub fn new_invocable_entity_alias(
+        entity_alias: &str,
+        entry_point: &str,
+    ) -> TransactionBuilderParams {
+        TransactionBuilderParams {
+            kind: TransactionKind::InvocableEntityAlias,
+            transaction_bytes: None,
+            entry_point: Some(entry_point.to_string()),
+            maybe_source: None,
+            target: None,
+            amount: None,
+            maybe_id: None,
+            entity_hash: None,
+            entity_alias: Some(entity_alias.to_string()),
+            package_hash: None,
+            package_alias: None,
+            maybe_entity_version: None,
+            public_key: None,
+            delegation_rate: None,
+            delegator: None,
+            validator: None,
+            new_validator: None,
+        }
+    }
+
+    #[wasm_bindgen(js_name = "newPackage")]
+    pub fn new_package(
+        package_hash: &str,
+        entry_point: &str,
+        maybe_entity_version: Option<String>,
+    ) -> TransactionBuilderParams {
+        let maybe_package_hash = match PackageHash::from_formatted_str(package_hash) {
+            Ok(hash) => Some(hash),
+            Err(_err) => {
+                // TODO Fix Jsvalue ret
+                //  error(&format!("Error parsing entity hash: {}", err.as_string()));
+                None
+            }
+        };
+
+        let maybe_entity_version_as_u32 = parse_maybe_entity_version(maybe_entity_version);
+
+        TransactionBuilderParams {
+            kind: TransactionKind::Package,
+            transaction_bytes: None,
+            entry_point: Some(entry_point.to_string()),
+            maybe_source: None,
+            target: None,
+            amount: None,
+            maybe_id: None,
+            entity_hash: None,
+            entity_alias: None,
+            package_hash: maybe_package_hash,
+            package_alias: None,
+            maybe_entity_version: maybe_entity_version_as_u32,
+            public_key: None,
+            delegation_rate: None,
+            delegator: None,
+            validator: None,
+            new_validator: None,
+        }
+    }
+
+    #[wasm_bindgen(js_name = "newPackageAlias")]
+    pub fn new_package_alias(
+        package_alias: &str,
+        entry_point: &str,
+        maybe_entity_version: Option<String>,
+    ) -> TransactionBuilderParams {
+        let maybe_entity_version_as_u32 = parse_maybe_entity_version(maybe_entity_version);
+        TransactionBuilderParams {
+            kind: TransactionKind::PackageAlias,
+            transaction_bytes: None,
+            entry_point: Some(entry_point.to_string()),
+            maybe_source: None,
+            target: None,
+            amount: None,
+            maybe_id: None,
+            entity_hash: None,
+            entity_alias: None,
+            package_hash: None,
+            package_alias: Some(package_alias.to_string()),
+            maybe_entity_version: maybe_entity_version_as_u32,
+            public_key: None,
+            delegation_rate: None,
+            delegator: None,
+            validator: None,
+            new_validator: None,
+        }
+    }
+
+    #[wasm_bindgen(js_name = "newAddBid")]
+    pub fn new_add_bid(
+        public_key: PublicKey,
+        delegation_rate: u8,
+        amount: &str,
+    ) -> TransactionBuilderParams {
+        let cloned_amount = amount.to_string();
+        let amount = U512::from_dec_str(&cloned_amount)
+            .map_err(|err| {
+                error(&format!("Error converting amount: {:?}", err));
+            })
+            .ok();
+        TransactionBuilderParams {
+            kind: TransactionKind::AddBid,
+            transaction_bytes: None,
+            entry_point: None,
+            maybe_source: None,
+            target: None,
+            amount,
+            maybe_id: None,
+            entity_hash: None,
+            entity_alias: None,
+            package_hash: None,
+            package_alias: None,
+            maybe_entity_version: None,
+            public_key: Some(public_key),
+            delegation_rate: Some(delegation_rate),
+            delegator: None,
+            validator: None,
+            new_validator: None,
+        }
+    }
+
+    #[wasm_bindgen(js_name = "newDelegate")]
+    pub fn new_delegate(
+        delegator: PublicKey,
+        validator: PublicKey,
+        amount: &str,
+    ) -> TransactionBuilderParams {
+        let amount = convert_amount(amount);
+        TransactionBuilderParams {
+            kind: TransactionKind::Delegate,
+            transaction_bytes: None,
+            entry_point: None,
+            maybe_source: None,
+            target: None,
+            amount,
+            maybe_id: None,
+            entity_hash: None,
+            entity_alias: None,
+            package_hash: None,
+            package_alias: None,
+            maybe_entity_version: None,
+            public_key: None,
+            delegation_rate: None,
+            delegator: Some(delegator),
+            validator: Some(validator),
+            new_validator: None,
+        }
+    }
+
+    #[wasm_bindgen(js_name = "newUndelegate")]
+    pub fn new_undelegate(
+        delegator: PublicKey,
+        validator: PublicKey,
+        amount: &str,
+    ) -> TransactionBuilderParams {
+        let amount = convert_amount(amount);
+        TransactionBuilderParams {
+            kind: TransactionKind::Undelegate,
+            transaction_bytes: None,
+            entry_point: None,
+            maybe_source: None,
+            target: None,
+            amount,
+            maybe_id: None,
+            entity_hash: None,
+            entity_alias: None,
+            package_hash: None,
+            package_alias: None,
+            maybe_entity_version: None,
+            public_key: None,
+            delegation_rate: None,
+            delegator: Some(delegator),
+            validator: Some(validator),
+            new_validator: None,
+        }
+    }
+
+    #[wasm_bindgen(js_name = "newRedelegate")]
+    pub fn new_redelegate(
+        delegator: PublicKey,
+        validator: PublicKey,
+        new_validator: PublicKey,
+        amount: &str,
+    ) -> TransactionBuilderParams {
+        let amount = convert_amount(amount);
+        TransactionBuilderParams {
+            kind: TransactionKind::Redelegate,
+            transaction_bytes: None,
+            entry_point: None,
+            maybe_source: None,
+            target: None,
+            amount,
+            maybe_id: None,
+            entity_hash: None,
+            entity_alias: None,
+            package_hash: None,
+            package_alias: None,
+            maybe_entity_version: None,
+            public_key: None,
+            delegation_rate: None,
+            delegator: Some(delegator),
+            validator: Some(validator),
+            new_validator: Some(new_validator),
+        }
+    }
+
+    #[wasm_bindgen(js_name = "newWithdrawBid")]
+    pub fn new_withdraw_bid(public_key: PublicKey, amount: &str) -> TransactionBuilderParams {
+        let amount = convert_amount(amount);
+        TransactionBuilderParams {
+            kind: TransactionKind::WithdrawBid,
+            transaction_bytes: None,
+            entry_point: None,
+            maybe_source: None,
+            target: None,
+            amount,
+            maybe_id: None,
+            entity_hash: None,
+            entity_alias: None,
+            package_hash: None,
+            package_alias: None,
+            maybe_entity_version: None,
+            public_key: Some(public_key),
+            delegation_rate: None,
+            delegator: None,
+            validator: None,
+            new_validator: None,
+        }
+    }
+}
+
+// Convert TransactionBuilderParams to casper_client::cli::TransactionBuilderParams
+pub fn transaction_builder_params_to_casper_client(
+    transaction_params: &TransactionBuilderParams,
+) -> _TransactionBuilderParams<'_> {
+    match transaction_params.kind {
+        TransactionKind::Session => _TransactionBuilderParams::Session {
+            transaction_bytes: transaction_params
+                .transaction_bytes
+                .clone()
+                .unwrap_or_default()
+                .into(),
+        },
+        TransactionKind::Transfer => _TransactionBuilderParams::Transfer {
+            maybe_source: transaction_params.maybe_source.clone().map(Into::into),
+            target: transaction_params
+                .target
+                .as_ref()
+                .map(|transaction| match transaction.kind {
+                    TransferTargetKind::PublicKey => {
+                        _TransferTarget::PublicKey(transaction.public_key.clone().unwrap().into())
+                    }
+                    TransferTargetKind::AccountHash => _TransferTarget::AccountHash(
+                        transaction.account_hash.clone().unwrap().into(),
+                    ),
+                    TransferTargetKind::URef => {
+                        _TransferTarget::URef(transaction.uref.clone().unwrap().into())
+                    }
+                })
+                .unwrap(),
+            amount: transaction_params.amount.unwrap_or_default(),
+            maybe_id: transaction_params.maybe_id,
+        },
+        TransactionKind::InvocableEntity => _TransactionBuilderParams::InvocableEntity {
+            entity_hash: transaction_params.entity_hash.unwrap().into(),
+            entry_point: transaction_params
+                .entry_point
+                .as_deref()
+                .unwrap_or_default(),
+        },
+        TransactionKind::InvocableEntityAlias => _TransactionBuilderParams::InvocableEntityAlias {
+            entity_alias: transaction_params
+                .entity_alias
+                .as_deref()
+                .unwrap_or_default(),
+            entry_point: transaction_params
+                .entry_point
+                .as_deref()
+                .unwrap_or_default(),
+        },
+        TransactionKind::Package => _TransactionBuilderParams::Package {
+            package_hash: transaction_params.package_hash.unwrap().into(),
+            maybe_entity_version: transaction_params.maybe_entity_version,
+            entry_point: transaction_params
+                .entry_point
+                .as_deref()
+                .unwrap_or_default(),
+        },
+        TransactionKind::PackageAlias => _TransactionBuilderParams::PackageAlias {
+            package_alias: transaction_params
+                .package_alias
+                .as_deref()
+                .unwrap_or_default(),
+            maybe_entity_version: transaction_params.maybe_entity_version,
+            entry_point: transaction_params
+                .entry_point
+                .as_deref()
+                .unwrap_or_default(),
+        },
+        TransactionKind::AddBid => _TransactionBuilderParams::AddBid {
+            public_key: transaction_params.public_key.clone().unwrap().into(),
+            delegation_rate: transaction_params.delegation_rate.unwrap(),
+            amount: transaction_params.amount.unwrap_or_default(),
+        },
+        TransactionKind::Delegate => _TransactionBuilderParams::Delegate {
+            delegator: transaction_params.delegator.clone().unwrap().into(),
+            validator: transaction_params.validator.clone().unwrap().into(),
+            amount: transaction_params.amount.unwrap_or_default(),
+        },
+        TransactionKind::Undelegate => _TransactionBuilderParams::Undelegate {
+            delegator: transaction_params.delegator.clone().unwrap().into(),
+            validator: transaction_params.validator.clone().unwrap().into(),
+            amount: transaction_params.amount.unwrap_or_default(),
+        },
+        TransactionKind::Redelegate => _TransactionBuilderParams::Redelegate {
+            delegator: transaction_params.delegator.clone().unwrap().into(),
+            validator: transaction_params.validator.clone().unwrap().into(),
+            amount: transaction_params.amount.unwrap_or_default(),
+            new_validator: transaction_params.new_validator.clone().unwrap().into(),
+        },
+        TransactionKind::WithdrawBid => _TransactionBuilderParams::WithdrawBid {
+            public_key: transaction_params.public_key.clone().unwrap().into(),
+            amount: transaction_params.amount.unwrap_or_default(),
+        },
+    }
+}
+
+fn parse_maybe_entity_version(maybe_entity_version: Option<String>) -> Option<u32> {
+    maybe_entity_version.and_then(|version| {
+        version
+            .parse::<u32>()
+            .map_err(|err| {
+                error(&format!("Error parsing version: {}", err));
+            })
+            .ok()
+    })
+}
+
+fn convert_amount(amount: &str) -> Option<U512> {
+    let cloned_amount = amount.to_string();
+    U512::from_dec_str(&cloned_amount)
+        .map_err(|err| {
+            error(&format!("Error converting amount: {:?}", err));
+        })
+        .ok()
+}
+
\ No newline at end of file diff --git a/api-rust/src/casper_rust_wasm_sdk/types/transaction_params/transaction_str_params.rs.html b/api-rust/src/casper_rust_wasm_sdk/types/transaction_params/transaction_str_params.rs.html new file mode 100644 index 000000000..5769c46d7 --- /dev/null +++ b/api-rust/src/casper_rust_wasm_sdk/types/transaction_params/transaction_str_params.rs.html @@ -0,0 +1,859 @@ +transaction_str_params.rs - source
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100
+101
+102
+103
+104
+105
+106
+107
+108
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+122
+123
+124
+125
+126
+127
+128
+129
+130
+131
+132
+133
+134
+135
+136
+137
+138
+139
+140
+141
+142
+143
+144
+145
+146
+147
+148
+149
+150
+151
+152
+153
+154
+155
+156
+157
+158
+159
+160
+161
+162
+163
+164
+165
+166
+167
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+182
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207
+208
+209
+210
+211
+212
+213
+214
+215
+216
+217
+218
+219
+220
+221
+222
+223
+224
+225
+226
+227
+228
+229
+230
+231
+232
+233
+234
+235
+236
+237
+238
+239
+240
+241
+242
+243
+244
+245
+246
+247
+248
+249
+250
+251
+252
+253
+254
+255
+256
+257
+258
+259
+260
+261
+262
+263
+264
+265
+266
+267
+268
+269
+270
+271
+272
+273
+274
+275
+276
+277
+278
+279
+280
+281
+282
+283
+284
+285
+286
+287
+288
+289
+290
+291
+292
+293
+294
+295
+296
+297
+298
+299
+300
+301
+302
+303
+304
+305
+306
+307
+308
+309
+310
+311
+312
+313
+314
+315
+316
+317
+318
+319
+320
+321
+322
+323
+324
+325
+326
+327
+328
+329
+330
+331
+332
+333
+334
+335
+336
+337
+338
+339
+340
+341
+342
+343
+344
+345
+346
+347
+348
+349
+350
+351
+352
+353
+354
+355
+356
+357
+358
+359
+360
+361
+362
+363
+364
+365
+366
+367
+368
+369
+370
+371
+372
+373
+374
+375
+376
+377
+378
+379
+380
+381
+382
+383
+384
+385
+386
+387
+388
+389
+390
+391
+392
+393
+394
+395
+396
+397
+398
+399
+400
+401
+402
+403
+404
+405
+406
+407
+408
+409
+410
+411
+412
+413
+414
+415
+416
+417
+418
+419
+420
+421
+422
+423
+424
+425
+426
+427
+428
+429
+
use crate::helpers::get_current_timestamp;
+use crate::helpers::get_str_or_default;
+use crate::helpers::get_ttl_or_default;
+use crate::types::deploy_params::args_simple::ArgsSimple;
+use casper_client::cli::TransactionStrParams as _TransactionStrParams;
+use casper_types::DeployBuilder;
+use once_cell::sync::OnceCell;
+use wasm_bindgen::prelude::*;
+
+#[wasm_bindgen]
+#[derive(Debug, Clone)]
+pub struct TransactionStrParams {
+    secret_key: OnceCell<String>,
+    timestamp: OnceCell<String>,
+    ttl: OnceCell<String>,
+    chain_name: OnceCell<String>,
+    initiator_addr: OnceCell<String>,
+    session_args_simple: OnceCell<ArgsSimple>,
+    session_args_json: OnceCell<String>,
+    pricing_mode: OnceCell<String>,
+    payment_amount: OnceCell<String>,
+    gas_price_tolerance: OnceCell<String>,
+    receipt: OnceCell<String>,
+    standard_payment: OnceCell<bool>,
+}
+
+const DEFAULT_PRICING_MODE: &str = "fixed";
+const DEFAULT_GAS_PRICE: u64 = DeployBuilder::DEFAULT_GAS_PRICE;
+const DEFAULT_STANDARD_PAYMENT: bool = false;
+
+impl Default for TransactionStrParams {
+    fn default() -> Self {
+        TransactionStrParams {
+            chain_name: OnceCell::new(),
+            initiator_addr: OnceCell::new(),
+            secret_key: OnceCell::new(),
+            timestamp: OnceCell::new(),
+            ttl: OnceCell::new(),
+            session_args_simple: OnceCell::new(),
+            session_args_json: OnceCell::new(),
+            pricing_mode: OnceCell::new(),
+            payment_amount: OnceCell::new(),
+            gas_price_tolerance: OnceCell::new(),
+            receipt: OnceCell::new(),
+            standard_payment: OnceCell::new(),
+        }
+    }
+}
+
+#[allow(clippy::too_many_arguments)]
+#[wasm_bindgen]
+impl TransactionStrParams {
+    #[wasm_bindgen(constructor)]
+    pub fn new(
+        chain_name: &str,
+        initiator_addr: Option<String>,
+        secret_key: Option<String>,
+        timestamp: Option<String>,
+        ttl: Option<String>,
+        session_args_simple: Option<Vec<String>>,
+        session_args_json: Option<String>,
+        pricing_mode: Option<String>,
+        payment_amount: Option<String>,
+        gas_price_tolerance: Option<String>,
+        receipt: Option<String>,
+        standard_payment: Option<bool>,
+    ) -> Self {
+        let mut transaction_params = TransactionStrParams::default();
+        if let Some(secret_key) = secret_key {
+            transaction_params.set_secret_key(&secret_key);
+        };
+        transaction_params.set_timestamp(timestamp);
+        transaction_params.set_ttl(ttl);
+        transaction_params.set_chain_name(chain_name);
+        if let Some(initiator_addr) = initiator_addr {
+            transaction_params.set_initiator_addr(&initiator_addr);
+        }
+        if let Some(session_args_simple) = session_args_simple {
+            transaction_params.set_session_args_simple(session_args_simple);
+        }
+        if let Some(session_args_json) = session_args_json {
+            transaction_params.set_session_args_json(&session_args_json);
+        }
+        if let Some(pricing_mode) = pricing_mode {
+            transaction_params.set_pricing_mode(&pricing_mode);
+        }
+        if let Some(payment_amount) = payment_amount {
+            transaction_params.set_payment_amount(&payment_amount);
+        }
+        if let Some(gas_price_tolerance) = gas_price_tolerance {
+            transaction_params.set_gas_price_tolerance(&gas_price_tolerance);
+        };
+        if let Some(receipt) = receipt {
+            transaction_params.set_receipt(&receipt);
+        }
+        if let Some(standard_payment) = standard_payment {
+            transaction_params.set_standard_payment(standard_payment);
+        }
+        transaction_params
+    }
+
+    // Getter and setter for secret_key field
+    #[wasm_bindgen(getter)]
+    pub fn secret_key(&self) -> Option<String> {
+        self.secret_key.get().cloned()
+    }
+
+    #[wasm_bindgen(setter)]
+    pub fn set_secret_key(&self, secret_key: &str) {
+        self.secret_key.set(secret_key.to_string()).unwrap();
+    }
+
+    // Getter and setter for timestamp field
+    #[wasm_bindgen(getter)]
+    pub fn timestamp(&self) -> Option<String> {
+        self.timestamp.get().cloned()
+    }
+
+    #[wasm_bindgen(setter)]
+    pub fn set_timestamp(&self, timestamp: Option<String>) {
+        if let Some(mut timestamp) = timestamp {
+            if timestamp.is_empty() {
+                timestamp = get_current_timestamp(None);
+            }
+            self.timestamp.set(timestamp.to_string()).unwrap();
+        } else {
+            let timestamp = get_current_timestamp(timestamp);
+            self.timestamp.set(timestamp).unwrap();
+        };
+    }
+
+    #[wasm_bindgen(js_name = "setDefaultTimestamp")]
+    pub fn set_default_timestamp(&self) {
+        let current_timestamp = get_current_timestamp(None);
+        self.timestamp.set(current_timestamp).unwrap();
+    }
+
+    // Getter and setter for ttl field
+    #[wasm_bindgen(getter)]
+    pub fn ttl(&self) -> Option<String> {
+        self.ttl.get().cloned()
+    }
+
+    #[wasm_bindgen(setter)]
+    pub fn set_ttl(&self, ttl: Option<String>) {
+        if let Some(mut ttl) = ttl {
+            if ttl.is_empty() {
+                ttl = get_ttl_or_default(None);
+            }
+            self.ttl.set(ttl.to_string()).unwrap();
+        } else {
+            let ttl = get_ttl_or_default(ttl.as_deref());
+            self.ttl.set(ttl).unwrap();
+        };
+    }
+
+    #[wasm_bindgen(js_name = "setDefaultTTL")]
+    pub fn set_default_ttl(&self) {
+        let ttl = get_ttl_or_default(None);
+        self.ttl.set(ttl).unwrap();
+    }
+
+    // Getter and setter for chain_name field
+    #[wasm_bindgen(getter)]
+    pub fn chain_name(&self) -> Option<String> {
+        self.chain_name.get().cloned()
+    }
+
+    #[wasm_bindgen(setter)]
+    pub fn set_chain_name(&self, chain_name: &str) {
+        self.chain_name.set(chain_name.to_string()).unwrap();
+    }
+
+    // Getter and setter for initiator_addr field
+    #[wasm_bindgen(getter)]
+    pub fn initiator_addr(&self) -> Option<String> {
+        self.initiator_addr.get().cloned()
+    }
+
+    #[wasm_bindgen(setter)]
+    pub fn set_initiator_addr(&self, initiator_addr: &str) {
+        self.initiator_addr.set(initiator_addr.to_string()).unwrap();
+    }
+
+    // Getter and setter for session_args_simple field
+    #[wasm_bindgen(getter)]
+    pub fn session_args_simple(&self) -> Option<ArgsSimple> {
+        self.session_args_simple.get().cloned()
+    }
+
+    #[wasm_bindgen(setter)]
+    pub fn set_session_args_simple(&mut self, session_args_simple: Vec<String>) {
+        let args_simple = ArgsSimple::from(session_args_simple);
+        self.session_args_simple.set(args_simple).unwrap();
+    }
+
+    #[wasm_bindgen(getter)]
+    pub fn session_args_json(&self) -> Option<String> {
+        self.session_args_json.get().cloned()
+    }
+
+    #[wasm_bindgen(setter)]
+    pub fn set_session_args_json(&self, session_args_json: &str) {
+        self.session_args_json
+            .set(session_args_json.to_string())
+            .unwrap();
+    }
+
+    #[wasm_bindgen(getter)]
+    pub fn pricing_mode(&self) -> Option<String> {
+        self.pricing_mode.get().cloned()
+    }
+
+    #[wasm_bindgen(setter)]
+    pub fn set_pricing_mode(&self, pricing_mode: &str) {
+        self.pricing_mode.set(pricing_mode.to_string()).unwrap();
+    }
+
+    #[wasm_bindgen(getter)]
+    pub fn payment_amount(&self) -> Option<String> {
+        self.payment_amount.get().cloned()
+    }
+
+    #[wasm_bindgen(setter)]
+    pub fn set_payment_amount(&self, payment_amount: &str) {
+        self.payment_amount.set(payment_amount.to_string()).unwrap();
+    }
+
+    // Getter and setter for gas_price_tolerance field
+    #[wasm_bindgen(getter)]
+    pub fn gas_price_tolerance(&self) -> Option<String> {
+        self.gas_price_tolerance.get().cloned()
+    }
+
+    #[wasm_bindgen(setter)]
+    pub fn set_gas_price_tolerance(&self, gas_price_tolerance: &str) {
+        self.gas_price_tolerance
+            .set(gas_price_tolerance.to_string())
+            .unwrap();
+    }
+
+    #[wasm_bindgen(getter)]
+    pub fn receipt(&self) -> Option<String> {
+        self.receipt.get().cloned()
+    }
+
+    #[wasm_bindgen(setter)]
+    pub fn set_receipt(&self, receipt: &str) {
+        self.receipt.set(receipt.to_string()).unwrap();
+    }
+
+    #[wasm_bindgen(getter)]
+    pub fn standard_payment(&self) -> Option<bool> {
+        self.standard_payment.get().cloned()
+    }
+
+    #[wasm_bindgen(setter)]
+    pub fn set_standard_payment(&self, standard_payment: bool) {
+        self.standard_payment.set(standard_payment).unwrap();
+    }
+}
+
+// Convert TransactionStrParams to casper_client::cli::TransactionStrParams
+pub fn transaction_str_params_to_casper_client(
+    transaction_params: &TransactionStrParams,
+) -> _TransactionStrParams<'_> {
+    let session_args_simple: Vec<&str> = transaction_params
+        .session_args_simple
+        .get()
+        .map_or_else(Vec::new, |args_simple| {
+            args_simple.args().iter().map(String::as_str).collect()
+        });
+
+    if transaction_params.timestamp.get().is_none() {
+        transaction_params.set_default_timestamp();
+    }
+    if transaction_params.ttl.get().is_none() {
+        transaction_params.set_default_ttl();
+    }
+    if transaction_params.pricing_mode.get().is_none() {
+        transaction_params.set_pricing_mode(DEFAULT_PRICING_MODE);
+    }
+    if transaction_params.gas_price_tolerance.get().is_none() {
+        transaction_params.set_gas_price_tolerance(&DEFAULT_GAS_PRICE.to_string());
+    }
+    if transaction_params.standard_payment.get().is_none() {
+        transaction_params.set_standard_payment(DEFAULT_STANDARD_PAYMENT);
+    }
+
+    let standard_payment_str = match transaction_params.standard_payment.get() {
+        Some(true) => "true",
+        _ => "false",
+    };
+
+    _TransactionStrParams {
+        chain_name: get_str_or_default(transaction_params.chain_name.get()),
+        initiator_addr: get_str_or_default(transaction_params.initiator_addr.get()).to_string(),
+        secret_key: get_str_or_default(transaction_params.secret_key.get()),
+        timestamp: get_str_or_default(transaction_params.timestamp.get()),
+        ttl: get_str_or_default(transaction_params.ttl.get()),
+        session_args_simple,
+        session_args_json: get_str_or_default(transaction_params.session_args_json.get()),
+        pricing_mode: get_str_or_default(transaction_params.pricing_mode.get()),
+        payment_amount: get_str_or_default(transaction_params.payment_amount.get()),
+        gas_price_tolerance: get_str_or_default(transaction_params.gas_price_tolerance.get()),
+        receipt: get_str_or_default(transaction_params.receipt.get()),
+        standard_payment: standard_payment_str,
+        output_path: "",
+    }
+}
+
+#[cfg(test)]
+mod tests {
+    use casper_types::Timestamp;
+
+    use super::*;
+
+    #[test]
+    fn test_transaction_str_params_to_casper_client() {
+        let secret_key = OnceCell::new();
+        secret_key.set("secret_key".to_string()).unwrap();
+
+        let timestamp = OnceCell::new();
+        timestamp.set("1234567890".to_string()).unwrap();
+
+        let ttl = OnceCell::new();
+        ttl.set("30m".to_string()).unwrap();
+
+        let chain_name = OnceCell::new();
+        chain_name.set("test_chain".to_string()).unwrap();
+
+        let initiator_addr = OnceCell::new();
+        initiator_addr.set("account_id".to_string()).unwrap();
+
+        let session_args_simple = OnceCell::new();
+        let args = ArgsSimple::from(vec!["simple".to_string()]);
+        session_args_simple.set(args).unwrap();
+
+        let session_args_json = OnceCell::new();
+        session_args_json.set("json".to_string()).unwrap();
+
+        let pricing_mode = OnceCell::new();
+        pricing_mode.set("mode".to_string()).unwrap();
+
+        let payment_amount = OnceCell::new();
+        payment_amount.set("amount".to_string()).unwrap();
+
+        let gas_price_tolerance = OnceCell::new();
+        gas_price_tolerance.set("1".to_string()).unwrap();
+
+        let receipt = OnceCell::new();
+        receipt.set("receipt".to_string()).unwrap();
+
+        let standard_payment = OnceCell::new();
+        standard_payment.set(true).unwrap();
+
+        let transaction_params = TransactionStrParams {
+            secret_key,
+            timestamp,
+            ttl,
+            chain_name,
+            initiator_addr,
+            session_args_simple,
+            session_args_json,
+            pricing_mode,
+            payment_amount,
+            gas_price_tolerance,
+            receipt,
+            standard_payment,
+        };
+
+        let result = transaction_str_params_to_casper_client(&transaction_params);
+
+        assert_eq!(result.secret_key, "secret_key");
+        assert_eq!(result.timestamp, "1234567890");
+        assert_eq!(result.ttl, "30m");
+        assert_eq!(result.chain_name, "test_chain");
+        assert_eq!(result.initiator_addr, "account_id");
+        assert_eq!(result.session_args_simple, ["simple"]);
+        assert_eq!(result.session_args_json, "json");
+        assert_eq!(result.pricing_mode, "mode");
+        assert_eq!(result.payment_amount, "amount");
+        assert_eq!(result.gas_price_tolerance, "1");
+        assert_eq!(result.receipt, "receipt");
+        assert_eq!(result.standard_payment, "true");
+    }
+
+    #[test]
+    fn test_transaction_str_params_default_to_casper_client() {
+        let mut transaction_params = TransactionStrParams::default();
+        let timestamp = Timestamp::now().to_string();
+        transaction_params.set_secret_key("secret_key");
+        transaction_params.set_timestamp(Some(timestamp.clone()));
+
+        transaction_params.set_ttl(Some("30m".to_string()));
+
+        transaction_params.set_chain_name("test_chain");
+
+        transaction_params.set_initiator_addr("account_id");
+
+        let args = vec!["simple".to_string()];
+        transaction_params.set_session_args_simple(args);
+
+        transaction_params.set_session_args_json("json");
+        transaction_params.set_gas_price_tolerance("1");
+        transaction_params.set_pricing_mode("mode");
+
+        transaction_params.set_payment_amount("amount");
+
+        transaction_params.set_receipt("receipt");
+
+        transaction_params.set_standard_payment(true);
+
+        let result = transaction_str_params_to_casper_client(&transaction_params);
+
+        assert_eq!(result.secret_key, "secret_key");
+        assert_eq!(result.timestamp, &timestamp);
+        assert_eq!(result.ttl, "30m");
+        assert_eq!(result.chain_name, "test_chain");
+        assert_eq!(result.initiator_addr, "account_id");
+        assert_eq!(result.session_args_simple, ["simple"]);
+        assert_eq!(result.session_args_json, "json");
+        assert_eq!(result.pricing_mode, "mode");
+        assert_eq!(result.payment_amount, "amount");
+        assert_eq!(result.gas_price_tolerance, "1");
+        assert_eq!(result.receipt, "receipt");
+        assert_eq!(result.standard_payment, "true");
+    }
+}
+
\ No newline at end of file diff --git a/api-rust/static.files/main-20a3ad099b048cf2.js b/api-rust/static.files/main-20a3ad099b048cf2.js new file mode 100644 index 000000000..133116e4d --- /dev/null +++ b/api-rust/static.files/main-20a3ad099b048cf2.js @@ -0,0 +1,11 @@ +"use strict";window.RUSTDOC_TOOLTIP_HOVER_MS=300;window.RUSTDOC_TOOLTIP_HOVER_EXIT_MS=450;function resourcePath(basename,extension){return getVar("root-path")+basename+getVar("resource-suffix")+extension}function hideMain(){addClass(document.getElementById(MAIN_ID),"hidden")}function showMain(){removeClass(document.getElementById(MAIN_ID),"hidden")}function blurHandler(event,parentElem,hideCallback){if(!parentElem.contains(document.activeElement)&&!parentElem.contains(event.relatedTarget)){hideCallback()}}window.rootPath=getVar("root-path");window.currentCrate=getVar("current-crate");function setMobileTopbar(){const mobileTopbar=document.querySelector(".mobile-topbar");const locationTitle=document.querySelector(".sidebar h2.location");if(mobileTopbar){const mobileTitle=document.createElement("h2");mobileTitle.className="location";if(hasClass(document.querySelector(".rustdoc"),"crate")){mobileTitle.innerHTML=`Crate ${window.currentCrate}`}else if(locationTitle){mobileTitle.innerHTML=locationTitle.innerHTML}mobileTopbar.appendChild(mobileTitle)}}function getVirtualKey(ev){if("key"in ev&&typeof ev.key!=="undefined"){return ev.key}const c=ev.charCode||ev.keyCode;if(c===27){return"Escape"}return String.fromCharCode(c)}const MAIN_ID="main-content";const SETTINGS_BUTTON_ID="settings-menu";const ALTERNATIVE_DISPLAY_ID="alternative-display";const NOT_DISPLAYED_ID="not-displayed";const HELP_BUTTON_ID="help-button";function getSettingsButton(){return document.getElementById(SETTINGS_BUTTON_ID)}function getHelpButton(){return document.getElementById(HELP_BUTTON_ID)}function getNakedUrl(){return window.location.href.split("?")[0].split("#")[0]}function insertAfter(newNode,referenceNode){referenceNode.parentNode.insertBefore(newNode,referenceNode.nextSibling)}function getOrCreateSection(id,classes){let el=document.getElementById(id);if(!el){el=document.createElement("section");el.id=id;el.className=classes;insertAfter(el,document.getElementById(MAIN_ID))}return el}function getAlternativeDisplayElem(){return getOrCreateSection(ALTERNATIVE_DISPLAY_ID,"content hidden")}function getNotDisplayedElem(){return getOrCreateSection(NOT_DISPLAYED_ID,"hidden")}function switchDisplayedElement(elemToDisplay){const el=getAlternativeDisplayElem();if(el.children.length>0){getNotDisplayedElem().appendChild(el.firstElementChild)}if(elemToDisplay===null){addClass(el,"hidden");showMain();return}el.appendChild(elemToDisplay);hideMain();removeClass(el,"hidden")}function browserSupportsHistoryApi(){return window.history&&typeof window.history.pushState==="function"}function preLoadCss(cssUrl){const link=document.createElement("link");link.href=cssUrl;link.rel="preload";link.as="style";document.getElementsByTagName("head")[0].appendChild(link)}(function(){const isHelpPage=window.location.pathname.endsWith("/help.html");function loadScript(url,errorCallback){const script=document.createElement("script");script.src=url;if(errorCallback!==undefined){script.onerror=errorCallback}document.head.append(script)}getSettingsButton().onclick=event=>{if(event.ctrlKey||event.altKey||event.metaKey){return}window.hideAllModals(false);addClass(getSettingsButton(),"rotate");event.preventDefault();loadScript(getVar("static-root-path")+getVar("settings-js"));setTimeout(()=>{const themes=getVar("themes").split(",");for(const theme of themes){if(theme!==""){preLoadCss(getVar("root-path")+theme+".css")}}},0)};window.searchState={loadingText:"Loading search results...",input:document.getElementsByClassName("search-input")[0],outputElement:()=>{let el=document.getElementById("search");if(!el){el=document.createElement("section");el.id="search";getNotDisplayedElem().appendChild(el)}return el},title:document.title,titleBeforeSearch:document.title,timeout:null,currentTab:0,focusedByTab:[null,null,null],clearInputTimeout:()=>{if(searchState.timeout!==null){clearTimeout(searchState.timeout);searchState.timeout=null}},isDisplayed:()=>searchState.outputElement().parentElement.id===ALTERNATIVE_DISPLAY_ID,focus:()=>{searchState.input.focus()},defocus:()=>{searchState.input.blur()},showResults:search=>{if(search===null||typeof search==="undefined"){search=searchState.outputElement()}switchDisplayedElement(search);searchState.mouseMovedAfterSearch=false;document.title=searchState.title},removeQueryParameters:()=>{document.title=searchState.titleBeforeSearch;if(browserSupportsHistoryApi()){history.replaceState(null,"",getNakedUrl()+window.location.hash)}},hideResults:()=>{switchDisplayedElement(null);searchState.removeQueryParameters()},getQueryStringParams:()=>{const params={};window.location.search.substring(1).split("&").map(s=>{const pair=s.split("=").map(x=>x.replace(/\+/g," "));params[decodeURIComponent(pair[0])]=typeof pair[1]==="undefined"?null:decodeURIComponent(pair[1])});return params},setup:()=>{const search_input=searchState.input;if(!searchState.input){return}let searchLoaded=false;function sendSearchForm(){document.getElementsByClassName("search-form")[0].submit()}function loadSearch(){if(!searchLoaded){searchLoaded=true;loadScript(getVar("static-root-path")+getVar("search-js"),sendSearchForm);loadScript(resourcePath("search-index",".js"),sendSearchForm)}}search_input.addEventListener("focus",()=>{search_input.origPlaceholder=search_input.placeholder;search_input.placeholder="Type your search here.";loadSearch()});if(search_input.value!==""){loadSearch()}const params=searchState.getQueryStringParams();if(params.search!==undefined){searchState.setLoadingSearch();loadSearch()}},setLoadingSearch:()=>{const search=searchState.outputElement();search.innerHTML="

"+searchState.loadingText+"

";searchState.showResults(search)},descShards:new Map(),loadDesc:async function({descShard,descIndex}){if(descShard.promise===null){descShard.promise=new Promise((resolve,reject)=>{descShard.resolve=resolve;const ds=descShard;const fname=`${ds.crate}-desc-${ds.shard}-`;const url=resourcePath(`search.desc/${descShard.crate}/${fname}`,".js",);loadScript(url,reject)})}const list=await descShard.promise;return list[descIndex]},loadedDescShard:function(crate,shard,data){this.descShards.get(crate)[shard].resolve(data.split("\n"))},};const toggleAllDocsId="toggle-all-docs";let savedHash="";function handleHashes(ev){if(ev!==null&&searchState.isDisplayed()&&ev.newURL){switchDisplayedElement(null);const hash=ev.newURL.slice(ev.newURL.indexOf("#")+1);if(browserSupportsHistoryApi()){history.replaceState(null,"",getNakedUrl()+window.location.search+"#"+hash)}const elem=document.getElementById(hash);if(elem){elem.scrollIntoView()}}const pageId=window.location.hash.replace(/^#/,"");if(savedHash!==pageId){savedHash=pageId;if(pageId!==""){expandSection(pageId)}}if(savedHash.startsWith("impl-")){const splitAt=savedHash.indexOf("/");if(splitAt!==-1){const implId=savedHash.slice(0,splitAt);const assocId=savedHash.slice(splitAt+1);const implElem=document.getElementById(implId);if(implElem&&implElem.parentElement.tagName==="SUMMARY"&&implElem.parentElement.parentElement.tagName==="DETAILS"){onEachLazy(implElem.parentElement.parentElement.querySelectorAll(`[id^="${assocId}"]`),item=>{const numbered=/([^-]+)-([0-9]+)/.exec(item.id);if(item.id===assocId||(numbered&&numbered[1]===assocId)){openParentDetails(item);item.scrollIntoView();setTimeout(()=>{window.location.replace("#"+item.id)},0)}},)}}}}function onHashChange(ev){hideSidebar();handleHashes(ev)}function openParentDetails(elem){while(elem){if(elem.tagName==="DETAILS"){elem.open=true}elem=elem.parentNode}}function expandSection(id){openParentDetails(document.getElementById(id))}function handleEscape(ev){searchState.clearInputTimeout();searchState.hideResults();ev.preventDefault();searchState.defocus();window.hideAllModals(true)}function handleShortcut(ev){const disableShortcuts=getSettingValue("disable-shortcuts")==="true";if(ev.ctrlKey||ev.altKey||ev.metaKey||disableShortcuts){return}if(document.activeElement.tagName==="INPUT"&&document.activeElement.type!=="checkbox"&&document.activeElement.type!=="radio"){switch(getVirtualKey(ev)){case"Escape":handleEscape(ev);break}}else{switch(getVirtualKey(ev)){case"Escape":handleEscape(ev);break;case"s":case"S":case"/":ev.preventDefault();searchState.focus();break;case"+":ev.preventDefault();expandAllDocs();break;case"-":ev.preventDefault();collapseAllDocs();break;case"?":showHelp();break;default:break}}}document.addEventListener("keypress",handleShortcut);document.addEventListener("keydown",handleShortcut);function addSidebarItems(){if(!window.SIDEBAR_ITEMS){return}const sidebar=document.getElementsByClassName("sidebar-elems")[0];function block(shortty,id,longty){const filtered=window.SIDEBAR_ITEMS[shortty];if(!filtered){return}const modpath=hasClass(document.querySelector(".rustdoc"),"mod")?"../":"";const h3=document.createElement("h3");h3.innerHTML=`${longty}`;const ul=document.createElement("ul");ul.className="block "+shortty;for(const name of filtered){let path;if(shortty==="mod"){path=`${modpath}${name}/index.html`}else{path=`${modpath}${shortty}.${name}.html`}let current_page=document.location.href.toString();if(current_page.endsWith("/")){current_page+="index.html"}const link=document.createElement("a");link.href=path;if(path===current_page){link.className="current"}link.textContent=name;const li=document.createElement("li");li.appendChild(link);ul.appendChild(li)}sidebar.appendChild(h3);sidebar.appendChild(ul)}if(sidebar){block("primitive","primitives","Primitive Types");block("mod","modules","Modules");block("macro","macros","Macros");block("struct","structs","Structs");block("enum","enums","Enums");block("constant","constants","Constants");block("static","static","Statics");block("trait","traits","Traits");block("fn","functions","Functions");block("type","types","Type Aliases");block("union","unions","Unions");block("foreigntype","foreign-types","Foreign Types");block("keyword","keywords","Keywords");block("opaque","opaque-types","Opaque Types");block("attr","attributes","Attribute Macros");block("derive","derives","Derive Macros");block("traitalias","trait-aliases","Trait Aliases")}}window.register_implementors=imp=>{const implementors=document.getElementById("implementors-list");const synthetic_implementors=document.getElementById("synthetic-implementors-list");const inlined_types=new Set();const TEXT_IDX=0;const SYNTHETIC_IDX=1;const TYPES_IDX=2;if(synthetic_implementors){onEachLazy(synthetic_implementors.getElementsByClassName("impl"),el=>{const aliases=el.getAttribute("data-aliases");if(!aliases){return}aliases.split(",").forEach(alias=>{inlined_types.add(alias)})})}let currentNbImpls=implementors.getElementsByClassName("impl").length;const traitName=document.querySelector(".main-heading h1 > .trait").textContent;const baseIdName="impl-"+traitName+"-";const libs=Object.getOwnPropertyNames(imp);const script=document.querySelector("script[data-ignore-extern-crates]");const ignoreExternCrates=new Set((script?script.getAttribute("data-ignore-extern-crates"):"").split(","),);for(const lib of libs){if(lib===window.currentCrate||ignoreExternCrates.has(lib)){continue}const structs=imp[lib];struct_loop:for(const struct of structs){const list=struct[SYNTHETIC_IDX]?synthetic_implementors:implementors;if(struct[SYNTHETIC_IDX]){for(const struct_type of struct[TYPES_IDX]){if(inlined_types.has(struct_type)){continue struct_loop}inlined_types.add(struct_type)}}const code=document.createElement("h3");code.innerHTML=struct[TEXT_IDX];addClass(code,"code-header");onEachLazy(code.getElementsByTagName("a"),elem=>{const href=elem.getAttribute("href");if(href&&!href.startsWith("#")&&!/^(?:[a-z+]+:)?\/\//.test(href)){elem.setAttribute("href",window.rootPath+href)}});const currentId=baseIdName+currentNbImpls;const anchor=document.createElement("a");anchor.href="#"+currentId;addClass(anchor,"anchor");const display=document.createElement("div");display.id=currentId;addClass(display,"impl");display.appendChild(anchor);display.appendChild(code);list.appendChild(display);currentNbImpls+=1}}};if(window.pending_implementors){window.register_implementors(window.pending_implementors)}window.register_type_impls=imp=>{if(!imp||!imp[window.currentCrate]){return}window.pending_type_impls=null;const idMap=new Map();let implementations=document.getElementById("implementations-list");let trait_implementations=document.getElementById("trait-implementations-list");let trait_implementations_header=document.getElementById("trait-implementations");const script=document.querySelector("script[data-self-path]");const selfPath=script?script.getAttribute("data-self-path"):null;const mainContent=document.querySelector("#main-content");const sidebarSection=document.querySelector(".sidebar section");let methods=document.querySelector(".sidebar .block.method");let associatedTypes=document.querySelector(".sidebar .block.associatedtype");let associatedConstants=document.querySelector(".sidebar .block.associatedconstant");let sidebarTraitList=document.querySelector(".sidebar .block.trait-implementation");for(const impList of imp[window.currentCrate]){const types=impList.slice(2);const text=impList[0];const isTrait=impList[1]!==0;const traitName=impList[1];if(types.indexOf(selfPath)===-1){continue}let outputList=isTrait?trait_implementations:implementations;if(outputList===null){const outputListName=isTrait?"Trait Implementations":"Implementations";const outputListId=isTrait?"trait-implementations-list":"implementations-list";const outputListHeaderId=isTrait?"trait-implementations":"implementations";const outputListHeader=document.createElement("h2");outputListHeader.id=outputListHeaderId;outputListHeader.innerText=outputListName;outputList=document.createElement("div");outputList.id=outputListId;if(isTrait){const link=document.createElement("a");link.href=`#${outputListHeaderId}`;link.innerText="Trait Implementations";const h=document.createElement("h3");h.appendChild(link);trait_implementations=outputList;trait_implementations_header=outputListHeader;sidebarSection.appendChild(h);sidebarTraitList=document.createElement("ul");sidebarTraitList.className="block trait-implementation";sidebarSection.appendChild(sidebarTraitList);mainContent.appendChild(outputListHeader);mainContent.appendChild(outputList)}else{implementations=outputList;if(trait_implementations){mainContent.insertBefore(outputListHeader,trait_implementations_header);mainContent.insertBefore(outputList,trait_implementations_header)}else{const mainContent=document.querySelector("#main-content");mainContent.appendChild(outputListHeader);mainContent.appendChild(outputList)}}}const template=document.createElement("template");template.innerHTML=text;onEachLazy(template.content.querySelectorAll("a"),elem=>{const href=elem.getAttribute("href");if(href&&!href.startsWith("#")&&!/^(?:[a-z+]+:)?\/\//.test(href)){elem.setAttribute("href",window.rootPath+href)}});onEachLazy(template.content.querySelectorAll("[id]"),el=>{let i=0;if(idMap.has(el.id)){i=idMap.get(el.id)}else if(document.getElementById(el.id)){i=1;while(document.getElementById(`${el.id}-${2 * i}`)){i=2*i}while(document.getElementById(`${el.id}-${i}`)){i+=1}}if(i!==0){const oldHref=`#${el.id}`;const newHref=`#${el.id}-${i}`;el.id=`${el.id}-${i}`;onEachLazy(template.content.querySelectorAll("a[href]"),link=>{if(link.getAttribute("href")===oldHref){link.href=newHref}})}idMap.set(el.id,i+1)});const templateAssocItems=template.content.querySelectorAll("section.tymethod, "+"section.method, section.associatedtype, section.associatedconstant");if(isTrait){const li=document.createElement("li");const a=document.createElement("a");a.href=`#${template.content.querySelector(".impl").id}`;a.textContent=traitName;li.appendChild(a);sidebarTraitList.append(li)}else{onEachLazy(templateAssocItems,item=>{let block=hasClass(item,"associatedtype")?associatedTypes:(hasClass(item,"associatedconstant")?associatedConstants:(methods));if(!block){const blockTitle=hasClass(item,"associatedtype")?"Associated Types":(hasClass(item,"associatedconstant")?"Associated Constants":("Methods"));const blockClass=hasClass(item,"associatedtype")?"associatedtype":(hasClass(item,"associatedconstant")?"associatedconstant":("method"));const blockHeader=document.createElement("h3");const blockLink=document.createElement("a");blockLink.href="#implementations";blockLink.innerText=blockTitle;blockHeader.appendChild(blockLink);block=document.createElement("ul");block.className=`block ${blockClass}`;const insertionReference=methods||sidebarTraitList;if(insertionReference){const insertionReferenceH=insertionReference.previousElementSibling;sidebarSection.insertBefore(blockHeader,insertionReferenceH);sidebarSection.insertBefore(block,insertionReferenceH)}else{sidebarSection.appendChild(blockHeader);sidebarSection.appendChild(block)}if(hasClass(item,"associatedtype")){associatedTypes=block}else if(hasClass(item,"associatedconstant")){associatedConstants=block}else{methods=block}}const li=document.createElement("li");const a=document.createElement("a");a.innerText=item.id.split("-")[0].split(".")[1];a.href=`#${item.id}`;li.appendChild(a);block.appendChild(li)})}outputList.appendChild(template.content)}for(const list of[methods,associatedTypes,associatedConstants,sidebarTraitList]){if(!list){continue}const newChildren=Array.prototype.slice.call(list.children);newChildren.sort((a,b)=>{const aI=a.innerText;const bI=b.innerText;return aIbI?1:0});list.replaceChildren(...newChildren)}};if(window.pending_type_impls){window.register_type_impls(window.pending_type_impls)}function addSidebarCrates(){if(!window.ALL_CRATES){return}const sidebarElems=document.getElementsByClassName("sidebar-elems")[0];if(!sidebarElems){return}const h3=document.createElement("h3");h3.innerHTML="Crates";const ul=document.createElement("ul");ul.className="block crate";for(const crate of window.ALL_CRATES){const link=document.createElement("a");link.href=window.rootPath+crate+"/index.html";link.textContent=crate;const li=document.createElement("li");if(window.rootPath!=="./"&&crate===window.currentCrate){li.className="current"}li.appendChild(link);ul.appendChild(li)}sidebarElems.appendChild(h3);sidebarElems.appendChild(ul)}function expandAllDocs(){const innerToggle=document.getElementById(toggleAllDocsId);removeClass(innerToggle,"will-expand");onEachLazy(document.getElementsByClassName("toggle"),e=>{if(!hasClass(e,"type-contents-toggle")&&!hasClass(e,"more-examples-toggle")){e.open=true}});innerToggle.title="collapse all docs";innerToggle.children[0].innerText="\u2212"}function collapseAllDocs(){const innerToggle=document.getElementById(toggleAllDocsId);addClass(innerToggle,"will-expand");onEachLazy(document.getElementsByClassName("toggle"),e=>{if(e.parentNode.id!=="implementations-list"||(!hasClass(e,"implementors-toggle")&&!hasClass(e,"type-contents-toggle"))){e.open=false}});innerToggle.title="expand all docs";innerToggle.children[0].innerText="+"}function toggleAllDocs(){const innerToggle=document.getElementById(toggleAllDocsId);if(!innerToggle){return}if(hasClass(innerToggle,"will-expand")){expandAllDocs()}else{collapseAllDocs()}}(function(){const toggles=document.getElementById(toggleAllDocsId);if(toggles){toggles.onclick=toggleAllDocs}const hideMethodDocs=getSettingValue("auto-hide-method-docs")==="true";const hideImplementations=getSettingValue("auto-hide-trait-implementations")==="true";const hideLargeItemContents=getSettingValue("auto-hide-large-items")!=="false";function setImplementorsTogglesOpen(id,open){const list=document.getElementById(id);if(list!==null){onEachLazy(list.getElementsByClassName("implementors-toggle"),e=>{e.open=open})}}if(hideImplementations){setImplementorsTogglesOpen("trait-implementations-list",false);setImplementorsTogglesOpen("blanket-implementations-list",false)}onEachLazy(document.getElementsByClassName("toggle"),e=>{if(!hideLargeItemContents&&hasClass(e,"type-contents-toggle")){e.open=true}if(hideMethodDocs&&hasClass(e,"method-toggle")){e.open=false}})}());window.rustdoc_add_line_numbers_to_examples=()=>{onEachLazy(document.getElementsByClassName("rust-example-rendered"),x=>{const parent=x.parentNode;const line_numbers=parent.querySelectorAll(".example-line-numbers");if(line_numbers.length>0){return}const count=x.textContent.split("\n").length;const elems=[];for(let i=0;i{onEachLazy(document.getElementsByClassName("rust-example-rendered"),x=>{const parent=x.parentNode;const line_numbers=parent.querySelectorAll(".example-line-numbers");for(const node of line_numbers){parent.removeChild(node)}})};if(getSettingValue("line-numbers")==="true"){window.rustdoc_add_line_numbers_to_examples()}function showSidebar(){window.hideAllModals(false);const sidebar=document.getElementsByClassName("sidebar")[0];addClass(sidebar,"shown")}function hideSidebar(){const sidebar=document.getElementsByClassName("sidebar")[0];removeClass(sidebar,"shown")}window.addEventListener("resize",()=>{if(window.CURRENT_TOOLTIP_ELEMENT){const base=window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE;const force_visible=base.TOOLTIP_FORCE_VISIBLE;hideTooltip(false);if(force_visible){showTooltip(base);base.TOOLTIP_FORCE_VISIBLE=true}}});const mainElem=document.getElementById(MAIN_ID);if(mainElem){mainElem.addEventListener("click",hideSidebar)}onEachLazy(document.querySelectorAll("a[href^='#']"),el=>{el.addEventListener("click",()=>{expandSection(el.hash.slice(1));hideSidebar()})});onEachLazy(document.querySelectorAll(".toggle > summary:not(.hideme)"),el=>{el.addEventListener("click",e=>{if(e.target.tagName!=="SUMMARY"&&e.target.tagName!=="A"){e.preventDefault()}})});function showTooltip(e){const notable_ty=e.getAttribute("data-notable-ty");if(!window.NOTABLE_TRAITS&¬able_ty){const data=document.getElementById("notable-traits-data");if(data){window.NOTABLE_TRAITS=JSON.parse(data.innerText)}else{throw new Error("showTooltip() called with notable without any notable traits!")}}if(window.CURRENT_TOOLTIP_ELEMENT&&window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE===e){clearTooltipHoverTimeout(window.CURRENT_TOOLTIP_ELEMENT);return}window.hideAllModals(false);const wrapper=document.createElement("div");if(notable_ty){wrapper.innerHTML="
"+window.NOTABLE_TRAITS[notable_ty]+"
"}else{if(e.getAttribute("title")!==null){e.setAttribute("data-title",e.getAttribute("title"));e.removeAttribute("title")}if(e.getAttribute("data-title")!==null){const titleContent=document.createElement("div");titleContent.className="content";titleContent.appendChild(document.createTextNode(e.getAttribute("data-title")));wrapper.appendChild(titleContent)}}wrapper.className="tooltip popover";const focusCatcher=document.createElement("div");focusCatcher.setAttribute("tabindex","0");focusCatcher.onfocus=hideTooltip;wrapper.appendChild(focusCatcher);const pos=e.getBoundingClientRect();wrapper.style.top=(pos.top+window.scrollY+pos.height)+"px";wrapper.style.left=0;wrapper.style.right="auto";wrapper.style.visibility="hidden";const body=document.getElementsByTagName("body")[0];body.appendChild(wrapper);const wrapperPos=wrapper.getBoundingClientRect();const finalPos=pos.left+window.scrollX-wrapperPos.width+24;if(finalPos>0){wrapper.style.left=finalPos+"px"}else{wrapper.style.setProperty("--popover-arrow-offset",(wrapperPos.right-pos.right+4)+"px",)}wrapper.style.visibility="";window.CURRENT_TOOLTIP_ELEMENT=wrapper;window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE=e;clearTooltipHoverTimeout(window.CURRENT_TOOLTIP_ELEMENT);wrapper.onpointerenter=ev=>{if(ev.pointerType!=="mouse"){return}clearTooltipHoverTimeout(e)};wrapper.onpointerleave=ev=>{if(ev.pointerType!=="mouse"){return}if(!e.TOOLTIP_FORCE_VISIBLE&&!e.contains(ev.relatedTarget)){setTooltipHoverTimeout(e,false);addClass(wrapper,"fade-out")}}}function setTooltipHoverTimeout(element,show){clearTooltipHoverTimeout(element);if(!show&&!window.CURRENT_TOOLTIP_ELEMENT){return}if(show&&window.CURRENT_TOOLTIP_ELEMENT){return}if(window.CURRENT_TOOLTIP_ELEMENT&&window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE!==element){return}element.TOOLTIP_HOVER_TIMEOUT=setTimeout(()=>{if(show){showTooltip(element)}else if(!element.TOOLTIP_FORCE_VISIBLE){hideTooltip(false)}},show?window.RUSTDOC_TOOLTIP_HOVER_MS:window.RUSTDOC_TOOLTIP_HOVER_EXIT_MS)}function clearTooltipHoverTimeout(element){if(element.TOOLTIP_HOVER_TIMEOUT!==undefined){removeClass(window.CURRENT_TOOLTIP_ELEMENT,"fade-out");clearTimeout(element.TOOLTIP_HOVER_TIMEOUT);delete element.TOOLTIP_HOVER_TIMEOUT}}function tooltipBlurHandler(event){if(window.CURRENT_TOOLTIP_ELEMENT&&!window.CURRENT_TOOLTIP_ELEMENT.contains(document.activeElement)&&!window.CURRENT_TOOLTIP_ELEMENT.contains(event.relatedTarget)&&!window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE.contains(document.activeElement)&&!window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE.contains(event.relatedTarget)){setTimeout(()=>hideTooltip(false),0)}}function hideTooltip(focus){if(window.CURRENT_TOOLTIP_ELEMENT){if(window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE.TOOLTIP_FORCE_VISIBLE){if(focus){window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE.focus()}window.CURRENT_TOOLTIP_ELEMENT.TOOLTIP_BASE.TOOLTIP_FORCE_VISIBLE=false}const body=document.getElementsByTagName("body")[0];body.removeChild(window.CURRENT_TOOLTIP_ELEMENT);clearTooltipHoverTimeout(window.CURRENT_TOOLTIP_ELEMENT);window.CURRENT_TOOLTIP_ELEMENT=null}}onEachLazy(document.getElementsByClassName("tooltip"),e=>{e.onclick=()=>{e.TOOLTIP_FORCE_VISIBLE=e.TOOLTIP_FORCE_VISIBLE?false:true;if(window.CURRENT_TOOLTIP_ELEMENT&&!e.TOOLTIP_FORCE_VISIBLE){hideTooltip(true)}else{showTooltip(e);window.CURRENT_TOOLTIP_ELEMENT.setAttribute("tabindex","0");window.CURRENT_TOOLTIP_ELEMENT.focus();window.CURRENT_TOOLTIP_ELEMENT.onblur=tooltipBlurHandler}return false};e.onpointerenter=ev=>{if(ev.pointerType!=="mouse"){return}setTooltipHoverTimeout(e,true)};e.onpointermove=ev=>{if(ev.pointerType!=="mouse"){return}setTooltipHoverTimeout(e,true)};e.onpointerleave=ev=>{if(ev.pointerType!=="mouse"){return}if(!e.TOOLTIP_FORCE_VISIBLE&&window.CURRENT_TOOLTIP_ELEMENT&&!window.CURRENT_TOOLTIP_ELEMENT.contains(ev.relatedTarget)){setTooltipHoverTimeout(e,false);addClass(window.CURRENT_TOOLTIP_ELEMENT,"fade-out")}}});const sidebar_menu_toggle=document.getElementsByClassName("sidebar-menu-toggle")[0];if(sidebar_menu_toggle){sidebar_menu_toggle.addEventListener("click",()=>{const sidebar=document.getElementsByClassName("sidebar")[0];if(!hasClass(sidebar,"shown")){showSidebar()}else{hideSidebar()}})}function helpBlurHandler(event){blurHandler(event,getHelpButton(),window.hidePopoverMenus)}function buildHelpMenu(){const book_info=document.createElement("span");const channel=getVar("channel");book_info.className="top";book_info.innerHTML=`You can find more information in \ +the rustdoc book.`;const shortcuts=[["?","Show this help dialog"],["S / /","Focus the search field"],["↑","Move up in search results"],["↓","Move down in search results"],["← / →","Switch result tab (when results focused)"],["⏎","Go to active search result"],["+","Expand all sections"],["-","Collapse all sections"],].map(x=>"
"+x[0].split(" ").map((y,index)=>((index&1)===0?""+y+"":" "+y+" ")).join("")+"
"+x[1]+"
").join("");const div_shortcuts=document.createElement("div");addClass(div_shortcuts,"shortcuts");div_shortcuts.innerHTML="

Keyboard Shortcuts

"+shortcuts+"
";const infos=[`For a full list of all search features, take a look here.`,"Prefix searches with a type followed by a colon (e.g., fn:) to \ + restrict the search to a given item kind.","Accepted kinds are: fn, mod, struct, \ + enum, trait, type, macro, \ + and const.","Search functions by type signature (e.g., vec -> usize or \ + -> vec or String, enum:Cow -> bool)","You can look for items with an exact name by putting double quotes around \ + your request: \"string\"","Look for functions that accept or return \ + slices and \ + arrays by writing \ + square brackets (e.g., -> [u8] or [] -> Option)","Look for items inside another one by searching for a path: vec::Vec",].map(x=>"

"+x+"

").join("");const div_infos=document.createElement("div");addClass(div_infos,"infos");div_infos.innerHTML="

Search Tricks

"+infos;const rustdoc_version=document.createElement("span");rustdoc_version.className="bottom";const rustdoc_version_code=document.createElement("code");rustdoc_version_code.innerText="rustdoc "+getVar("rustdoc-version");rustdoc_version.appendChild(rustdoc_version_code);const container=document.createElement("div");if(!isHelpPage){container.className="popover"}container.id="help";container.style.display="none";const side_by_side=document.createElement("div");side_by_side.className="side-by-side";side_by_side.appendChild(div_shortcuts);side_by_side.appendChild(div_infos);container.appendChild(book_info);container.appendChild(side_by_side);container.appendChild(rustdoc_version);if(isHelpPage){const help_section=document.createElement("section");help_section.appendChild(container);document.getElementById("main-content").appendChild(help_section);container.style.display="block"}else{const help_button=getHelpButton();help_button.appendChild(container);container.onblur=helpBlurHandler;help_button.onblur=helpBlurHandler;help_button.children[0].onblur=helpBlurHandler}return container}window.hideAllModals=switchFocus=>{hideSidebar();window.hidePopoverMenus();hideTooltip(switchFocus)};window.hidePopoverMenus=()=>{onEachLazy(document.querySelectorAll(".search-form .popover"),elem=>{elem.style.display="none"})};function getHelpMenu(buildNeeded){let menu=getHelpButton().querySelector(".popover");if(!menu&&buildNeeded){menu=buildHelpMenu()}return menu}function showHelp(){getHelpButton().querySelector("a").focus();const menu=getHelpMenu(true);if(menu.style.display==="none"){window.hideAllModals();menu.style.display=""}}if(isHelpPage){showHelp();document.querySelector(`#${HELP_BUTTON_ID} > a`).addEventListener("click",event=>{const target=event.target;if(target.tagName!=="A"||target.parentElement.id!==HELP_BUTTON_ID||event.ctrlKey||event.altKey||event.metaKey){return}event.preventDefault()})}else{document.querySelector(`#${HELP_BUTTON_ID} > a`).addEventListener("click",event=>{const target=event.target;if(target.tagName!=="A"||target.parentElement.id!==HELP_BUTTON_ID||event.ctrlKey||event.altKey||event.metaKey){return}event.preventDefault();const menu=getHelpMenu(true);const shouldShowHelp=menu.style.display==="none";if(shouldShowHelp){showHelp()}else{window.hidePopoverMenus()}})}setMobileTopbar();addSidebarItems();addSidebarCrates();onHashChange(null);window.addEventListener("hashchange",onHashChange);searchState.setup()}());(function(){const SIDEBAR_MIN=100;const SIDEBAR_MAX=500;const RUSTDOC_MOBILE_BREAKPOINT=700;const BODY_MIN=400;const SIDEBAR_VANISH_THRESHOLD=SIDEBAR_MIN/2;const sidebarButton=document.getElementById("sidebar-button");if(sidebarButton){sidebarButton.addEventListener("click",e=>{removeClass(document.documentElement,"hide-sidebar");updateLocalStorage("hide-sidebar","false");if(document.querySelector(".rustdoc.src")){window.rustdocToggleSrcSidebar()}e.preventDefault()})}let currentPointerId=null;let desiredSidebarSize=null;let pendingSidebarResizingFrame=false;const resizer=document.querySelector(".sidebar-resizer");const sidebar=document.querySelector(".sidebar");if(!resizer||!sidebar){return}const isSrcPage=hasClass(document.body,"src");function hideSidebar(){if(isSrcPage){window.rustdocCloseSourceSidebar();updateLocalStorage("src-sidebar-width",null);document.documentElement.style.removeProperty("--src-sidebar-width");sidebar.style.removeProperty("--src-sidebar-width");resizer.style.removeProperty("--src-sidebar-width")}else{addClass(document.documentElement,"hide-sidebar");updateLocalStorage("hide-sidebar","true");updateLocalStorage("desktop-sidebar-width",null);document.documentElement.style.removeProperty("--desktop-sidebar-width");sidebar.style.removeProperty("--desktop-sidebar-width");resizer.style.removeProperty("--desktop-sidebar-width")}}function showSidebar(){if(isSrcPage){window.rustdocShowSourceSidebar()}else{removeClass(document.documentElement,"hide-sidebar");updateLocalStorage("hide-sidebar","false")}}function changeSidebarSize(size){if(isSrcPage){updateLocalStorage("src-sidebar-width",size);sidebar.style.setProperty("--src-sidebar-width",size+"px");resizer.style.setProperty("--src-sidebar-width",size+"px")}else{updateLocalStorage("desktop-sidebar-width",size);sidebar.style.setProperty("--desktop-sidebar-width",size+"px");resizer.style.setProperty("--desktop-sidebar-width",size+"px")}}function isSidebarHidden(){return isSrcPage?!hasClass(document.documentElement,"src-sidebar-expanded"):hasClass(document.documentElement,"hide-sidebar")}function resize(e){if(currentPointerId===null||currentPointerId!==e.pointerId){return}e.preventDefault();const pos=e.clientX-3;if(pos=SIDEBAR_MIN){if(isSidebarHidden()){showSidebar()}const constrainedPos=Math.min(pos,window.innerWidth-BODY_MIN,SIDEBAR_MAX);changeSidebarSize(constrainedPos);desiredSidebarSize=constrainedPos;if(pendingSidebarResizingFrame!==false){clearTimeout(pendingSidebarResizingFrame)}pendingSidebarResizingFrame=setTimeout(()=>{if(currentPointerId===null||pendingSidebarResizingFrame===false){return}pendingSidebarResizingFrame=false;document.documentElement.style.setProperty("--resizing-sidebar-width",desiredSidebarSize+"px",)},100)}}window.addEventListener("resize",()=>{if(window.innerWidth=(window.innerWidth-BODY_MIN)){changeSidebarSize(window.innerWidth-BODY_MIN)}else if(desiredSidebarSize!==null&&desiredSidebarSize>SIDEBAR_MIN){changeSidebarSize(desiredSidebarSize)}});function stopResize(e){if(currentPointerId===null){return}if(e){e.preventDefault()}desiredSidebarSize=sidebar.getBoundingClientRect().width;removeClass(resizer,"active");window.removeEventListener("pointermove",resize,false);window.removeEventListener("pointerup",stopResize,false);removeClass(document.documentElement,"sidebar-resizing");document.documentElement.style.removeProperty("--resizing-sidebar-width");if(resizer.releasePointerCapture){resizer.releasePointerCapture(currentPointerId);currentPointerId=null}}function initResize(e){if(currentPointerId!==null||e.altKey||e.ctrlKey||e.metaKey||e.button!==0){return}if(resizer.setPointerCapture){resizer.setPointerCapture(e.pointerId);if(!resizer.hasPointerCapture(e.pointerId)){resizer.releasePointerCapture(e.pointerId);return}currentPointerId=e.pointerId}window.hideAllModals(false);e.preventDefault();window.addEventListener("pointermove",resize,false);window.addEventListener("pointercancel",stopResize,false);window.addEventListener("pointerup",stopResize,false);addClass(resizer,"active");addClass(document.documentElement,"sidebar-resizing");const pos=e.clientX-sidebar.offsetLeft-3;document.documentElement.style.setProperty("--resizing-sidebar-width",pos+"px");desiredSidebarSize=null}resizer.addEventListener("pointerdown",initResize,false)}());(function(){let reset_button_timeout=null;const but=document.getElementById("copy-path");if(!but){return}but.onclick=()=>{const parent=but.parentElement;const path=[];onEach(parent.childNodes,child=>{if(child.tagName==="A"){path.push(child.textContent)}});const el=document.createElement("textarea");el.value=path.join("::");el.setAttribute("readonly","");el.style.position="absolute";el.style.left="-9999px";document.body.appendChild(el);el.select();document.execCommand("copy");document.body.removeChild(el);but.classList.add("clicked");if(reset_button_timeout!==null){window.clearTimeout(reset_button_timeout)}function reset_button(){reset_button_timeout=null;but.classList.remove("clicked")}reset_button_timeout=window.setTimeout(reset_button,1000)}}()) \ No newline at end of file diff --git a/api-rust/static.files/noscript-df360f571f6edeae.css b/api-rust/static.files/noscript-df360f571f6edeae.css new file mode 100644 index 000000000..4c310ae52 --- /dev/null +++ b/api-rust/static.files/noscript-df360f571f6edeae.css @@ -0,0 +1 @@ + #main-content .attributes{margin-left:0 !important;}#copy-path,#sidebar-button,.sidebar-resizer{display:none !important;}nav.sub{display:none;}.src .sidebar{display:none;}.notable-traits{display:none;}:root,:root:not([data-theme]){--main-background-color:white;--main-color:black;--settings-input-color:#2196f3;--settings-input-border-color:#717171;--settings-button-color:#000;--settings-button-border-focus:#717171;--sidebar-background-color:#f5f5f5;--sidebar-background-color-hover:#e0e0e0;--code-block-background-color:#f5f5f5;--scrollbar-track-background-color:#dcdcdc;--scrollbar-thumb-background-color:rgba(36,37,39,0.6);--scrollbar-color:rgba(36,37,39,0.6) #d9d9d9;--headings-border-bottom-color:#ddd;--border-color:#e0e0e0;--button-background-color:#fff;--right-side-color:grey;--code-attribute-color:#999;--toggles-color:#999;--toggle-filter:none;--mobile-sidebar-menu-filter:none;--search-input-focused-border-color:#66afe9;--copy-path-button-color:#999;--copy-path-img-filter:invert(50%);--copy-path-img-hover-filter:invert(35%);--codeblock-error-hover-color:rgb(255,0,0);--codeblock-error-color:rgba(255,0,0,.5);--codeblock-ignore-hover-color:rgb(255,142,0);--codeblock-ignore-color:rgba(255,142,0,.6);--warning-border-color:#ff8e00;--type-link-color:#ad378a;--trait-link-color:#6e4fc9;--assoc-item-link-color:#3873ad;--function-link-color:#ad7c37;--macro-link-color:#068000;--keyword-link-color:#3873ad;--mod-link-color:#3873ad;--link-color:#3873ad;--sidebar-link-color:#356da4;--sidebar-current-link-background-color:#fff;--search-result-link-focus-background-color:#ccc;--search-result-border-color:#aaa3;--search-color:#000;--search-error-code-background-color:#d0cccc;--search-results-alias-color:#000;--search-results-grey-color:#999;--search-tab-title-count-color:#888;--search-tab-button-not-selected-border-top-color:#e6e6e6;--search-tab-button-not-selected-background:#e6e6e6;--search-tab-button-selected-border-top-color:#0089ff;--search-tab-button-selected-background:#fff;--settings-menu-filter:none;--stab-background-color:#fff5d6;--stab-code-color:#000;--code-highlight-kw-color:#8959a8;--code-highlight-kw-2-color:#4271ae;--code-highlight-lifetime-color:#b76514;--code-highlight-prelude-color:#4271ae;--code-highlight-prelude-val-color:#c82829;--code-highlight-number-color:#718c00;--code-highlight-string-color:#718c00;--code-highlight-literal-color:#c82829;--code-highlight-attribute-color:#c82829;--code-highlight-self-color:#c82829;--code-highlight-macro-color:#3e999f;--code-highlight-question-mark-color:#ff9011;--code-highlight-comment-color:#8e908c;--code-highlight-doc-comment-color:#4d4d4c;--src-line-numbers-span-color:#c67e2d;--src-line-number-highlighted-background-color:#fdffd3;--test-arrow-color:#f5f5f5;--test-arrow-background-color:rgba(78,139,202,0.2);--test-arrow-hover-color:#f5f5f5;--test-arrow-hover-background-color:rgb(78,139,202);--target-background-color:#fdffd3;--target-border-color:#ad7c37;--kbd-color:#000;--kbd-background:#fafbfc;--kbd-box-shadow-color:#c6cbd1;--rust-logo-filter:initial;--crate-search-div-filter:invert(100%) sepia(0%) saturate(4223%) hue-rotate(289deg) brightness(114%) contrast(76%);--crate-search-div-hover-filter:invert(44%) sepia(18%) saturate(23%) hue-rotate(317deg) brightness(96%) contrast(93%);--crate-search-hover-border:#717171;--src-sidebar-background-selected:#fff;--src-sidebar-background-hover:#e0e0e0;--table-alt-row-background-color:#f5f5f5;--codeblock-link-background:#eee;--scrape-example-toggle-line-background:#ccc;--scrape-example-toggle-line-hover-background:#999;--scrape-example-code-line-highlight:#fcffd6;--scrape-example-code-line-highlight-focus:#f6fdb0;--scrape-example-help-border-color:#555;--scrape-example-help-color:#333;--scrape-example-help-hover-border-color:#000;--scrape-example-help-hover-color:#000;--scrape-example-code-wrapper-background-start:rgba(255,255,255,1);--scrape-example-code-wrapper-background-end:rgba(255,255,255,0);--sidebar-resizer-hover:hsl(207,90%,66%);--sidebar-resizer-active:hsl(207,90%,54%);}@media (prefers-color-scheme:dark){:root,:root:not([data-theme]){--main-background-color:#353535;--main-color:#ddd;--settings-input-color:#2196f3;--settings-input-border-color:#999;--settings-button-color:#000;--settings-button-border-focus:#ffb900;--sidebar-background-color:#505050;--sidebar-background-color-hover:#676767;--code-block-background-color:#2A2A2A;--scrollbar-track-background-color:#717171;--scrollbar-thumb-background-color:rgba(32,34,37,.6);--scrollbar-color:rgba(32,34,37,.6) #5a5a5a;--headings-border-bottom-color:#d2d2d2;--border-color:#e0e0e0;--button-background-color:#f0f0f0;--right-side-color:grey;--code-attribute-color:#999;--toggles-color:#999;--toggle-filter:invert(100%);--mobile-sidebar-menu-filter:invert(100%);--search-input-focused-border-color:#008dfd;--copy-path-button-color:#999;--copy-path-img-filter:invert(50%);--copy-path-img-hover-filter:invert(65%);--codeblock-error-hover-color:rgb(255,0,0);--codeblock-error-color:rgba(255,0,0,.5);--codeblock-ignore-hover-color:rgb(255,142,0);--codeblock-ignore-color:rgba(255,142,0,.6);--warning-border-color:#ff8e00;--type-link-color:#2dbfb8;--trait-link-color:#b78cf2;--assoc-item-link-color:#d2991d;--function-link-color:#2bab63;--macro-link-color:#09bd00;--keyword-link-color:#d2991d;--mod-link-color:#d2991d;--link-color:#d2991d;--sidebar-link-color:#fdbf35;--sidebar-current-link-background-color:#444;--search-result-link-focus-background-color:#616161;--search-result-border-color:#aaa3;--search-color:#111;--search-error-code-background-color:#484848;--search-results-alias-color:#fff;--search-results-grey-color:#ccc;--search-tab-title-count-color:#888;--search-tab-button-not-selected-border-top-color:#252525;--search-tab-button-not-selected-background:#252525;--search-tab-button-selected-border-top-color:#0089ff;--search-tab-button-selected-background:#353535;--stab-background-color:#314559;--stab-code-color:#e6e1cf;--code-highlight-kw-color:#ab8ac1;--code-highlight-kw-2-color:#769acb;--code-highlight-lifetime-color:#d97f26;--code-highlight-prelude-color:#769acb;--code-highlight-prelude-val-color:#ee6868;--code-highlight-number-color:#83a300;--code-highlight-string-color:#83a300;--code-highlight-literal-color:#ee6868;--code-highlight-attribute-color:#ee6868;--code-highlight-self-color:#ee6868;--code-highlight-macro-color:#3e999f;--code-highlight-question-mark-color:#ff9011;--code-highlight-comment-color:#8d8d8b;--code-highlight-doc-comment-color:#8ca375;--src-line-numbers-span-color:#3b91e2;--src-line-number-highlighted-background-color:#0a042f;--test-arrow-color:#dedede;--test-arrow-background-color:rgba(78,139,202,0.2);--test-arrow-hover-color:#dedede;--test-arrow-hover-background-color:#4e8bca;--target-background-color:#494a3d;--target-border-color:#bb7410;--kbd-color:#000;--kbd-background:#fafbfc;--kbd-box-shadow-color:#c6cbd1;--rust-logo-filter:drop-shadow(1px 0 0px #fff) drop-shadow(0 1px 0 #fff) drop-shadow(-1px 0 0 #fff) drop-shadow(0 -1px 0 #fff);--crate-search-div-filter:invert(94%) sepia(0%) saturate(721%) hue-rotate(255deg) brightness(90%) contrast(90%);--crate-search-div-hover-filter:invert(69%) sepia(60%) saturate(6613%) hue-rotate(184deg) brightness(100%) contrast(91%);--crate-search-hover-border:#2196f3;--src-sidebar-background-selected:#333;--src-sidebar-background-hover:#444;--table-alt-row-background-color:#2a2a2a;--codeblock-link-background:#333;--scrape-example-toggle-line-background:#999;--scrape-example-toggle-line-hover-background:#c5c5c5;--scrape-example-code-line-highlight:#5b3b01;--scrape-example-code-line-highlight-focus:#7c4b0f;--scrape-example-help-border-color:#aaa;--scrape-example-help-color:#eee;--scrape-example-help-hover-border-color:#fff;--scrape-example-help-hover-color:#fff;--scrape-example-code-wrapper-background-start:rgba(53,53,53,1);--scrape-example-code-wrapper-background-end:rgba(53,53,53,0);--sidebar-resizer-hover:hsl(207,30%,54%);--sidebar-resizer-active:hsl(207,90%,54%);}} \ No newline at end of file diff --git a/api-rust/static.files/rustdoc-dd39b87e5fcfba68.css b/api-rust/static.files/rustdoc-dd39b87e5fcfba68.css new file mode 100644 index 000000000..77f898322 --- /dev/null +++ b/api-rust/static.files/rustdoc-dd39b87e5fcfba68.css @@ -0,0 +1,46 @@ + :root{--nav-sub-mobile-padding:8px;--search-typename-width:6.75rem;--desktop-sidebar-width:200px;--src-sidebar-width:300px;--desktop-sidebar-z-index:100;}@font-face {font-family:'Fira Sans';font-style:normal;font-weight:400;src:local('Fira Sans'),url("FiraSans-Regular-018c141bf0843ffd.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Fira Sans';font-style:normal;font-weight:500;src:local('Fira Sans Medium'),url("FiraSans-Medium-8f9a781e4970d388.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Source Serif 4';font-style:normal;font-weight:400;src:local('Source Serif 4'),url("SourceSerif4-Regular-46f98efaafac5295.ttf.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Source Serif 4';font-style:italic;font-weight:400;src:local('Source Serif 4 Italic'),url("SourceSerif4-It-acdfaf1a8af734b1.ttf.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Source Serif 4';font-style:normal;font-weight:700;src:local('Source Serif 4 Bold'),url("SourceSerif4-Bold-a2c9cd1067f8b328.ttf.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Source Code Pro';font-style:normal;font-weight:400;src:url("SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Source Code Pro';font-style:italic;font-weight:400;src:url("SourceCodePro-It-1cc31594bf4f1f79.ttf.woff2") format("woff2");font-display:swap;}@font-face {font-family:'Source Code Pro';font-style:normal;font-weight:600;src:url("SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2") format("woff2");font-display:swap;}@font-face {font-family:'NanumBarunGothic';src:url("NanumBarunGothic-0f09457c7a19b7c6.ttf.woff2") format("woff2");font-display:swap;unicode-range:U+AC00-D7AF,U+1100-11FF,U+3130-318F,U+A960-A97F,U+D7B0-D7FF;}*{box-sizing:border-box;}body{font:1rem/1.5 "Source Serif 4",NanumBarunGothic,serif;margin:0;position:relative;overflow-wrap:break-word;overflow-wrap:anywhere;font-feature-settings:"kern","liga";background-color:var(--main-background-color);color:var(--main-color);}h1{font-size:1.5rem;}h2{font-size:1.375rem;}h3{font-size:1.25rem;}h1,h2,h3,h4,h5,h6{font-weight:500;}h1,h2,h3,h4{margin:25px 0 15px 0;padding-bottom:6px;}.docblock h3,.docblock h4,h5,h6{margin:15px 0 5px 0;}.docblock>h2:first-child,.docblock>h3:first-child,.docblock>h4:first-child,.docblock>h5:first-child,.docblock>h6:first-child{margin-top:0;}.main-heading h1{margin:0;padding:0;flex-grow:1;overflow-wrap:break-word;overflow-wrap:anywhere;}.main-heading{display:flex;flex-wrap:wrap;padding-bottom:6px;margin-bottom:15px;}.content h2,.top-doc .docblock>h3,.top-doc .docblock>h4{border-bottom:1px solid var(--headings-border-bottom-color);}h1,h2{line-height:1.25;padding-top:3px;padding-bottom:9px;}h3.code-header{font-size:1.125rem;}h4.code-header{font-size:1rem;}.code-header{font-weight:600;margin:0;padding:0;white-space:pre-wrap;}#crate-search,h1,h2,h3,h4,h5,h6,.sidebar,.mobile-topbar,.search-input,.search-results .result-name,.item-name>a,.out-of-band,span.since,a.src,#help-button>a,summary.hideme,.scraped-example-list,ul.all-items{font-family:"Fira Sans",Arial,NanumBarunGothic,sans-serif;}#toggle-all-docs,a.anchor,.section-header a,#src-sidebar a,.rust a,.sidebar h2 a,.sidebar h3 a,.mobile-topbar h2 a,h1 a,.search-results a,.stab,.result-name i{color:var(--main-color);}span.enum,a.enum,span.struct,a.struct,span.union,a.union,span.primitive,a.primitive,span.type,a.type,span.foreigntype,a.foreigntype{color:var(--type-link-color);}span.trait,a.trait,span.traitalias,a.traitalias{color:var(--trait-link-color);}span.associatedtype,a.associatedtype,span.constant,a.constant,span.static,a.static{color:var(--assoc-item-link-color);}span.fn,a.fn,span.method,a.method,span.tymethod,a.tymethod{color:var(--function-link-color);}span.attr,a.attr,span.derive,a.derive,span.macro,a.macro{color:var(--macro-link-color);}span.mod,a.mod{color:var(--mod-link-color);}span.keyword,a.keyword{color:var(--keyword-link-color);}a{color:var(--link-color);text-decoration:none;}ol,ul{padding-left:24px;}ul ul,ol ul,ul ol,ol ol{margin-bottom:.625em;}p,.docblock>.warning{margin:0 0 .75em 0;}p:last-child,.docblock>.warning:last-child{margin:0;}button{padding:1px 6px;cursor:pointer;}button#toggle-all-docs{padding:0;background:none;border:none;-webkit-appearance:none;opacity:1;}.rustdoc{display:flex;flex-direction:row;flex-wrap:nowrap;}main{position:relative;flex-grow:1;padding:10px 15px 40px 45px;min-width:0;}.src main{padding:15px;}.width-limiter{max-width:960px;margin-right:auto;}details:not(.toggle) summary{margin-bottom:.6em;}code,pre,a.test-arrow,.code-header{font-family:"Source Code Pro",monospace;}.docblock code,.docblock-short code{border-radius:3px;padding:0 0.125em;}.docblock pre code,.docblock-short pre code{padding:0;}pre{padding:14px;line-height:1.5;}pre.item-decl{overflow-x:auto;}.item-decl .type-contents-toggle{contain:initial;}.src .content pre{padding:20px;}.rustdoc.src .example-wrap pre.src-line-numbers{padding:20px 0 20px 4px;}img{max-width:100%;}.logo-container{line-height:0;display:block;}.rust-logo{filter:var(--rust-logo-filter);}.sidebar{font-size:0.875rem;flex:0 0 var(--desktop-sidebar-width);width:var(--desktop-sidebar-width);overflow-y:scroll;overscroll-behavior:contain;position:sticky;height:100vh;top:0;left:0;z-index:var(--desktop-sidebar-z-index);}.rustdoc.src .sidebar{flex-basis:50px;width:50px;border-right:1px solid;overflow-x:hidden;overflow-y:hidden;}.hide-sidebar .sidebar,.hide-sidebar .sidebar-resizer{display:none;}.sidebar-resizer{touch-action:none;width:9px;cursor:col-resize;z-index:calc(var(--desktop-sidebar-z-index) + 1);position:fixed;height:100%;left:calc(var(--desktop-sidebar-width) + 1px);}.rustdoc.src .sidebar-resizer{left:49px;}.src-sidebar-expanded .src .sidebar-resizer{left:var(--src-sidebar-width);}.sidebar-resizing{-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none;}.sidebar-resizing*{cursor:col-resize !important;}.sidebar-resizing .sidebar{position:fixed;}.sidebar-resizing>body{padding-left:var(--resizing-sidebar-width);}.sidebar-resizer:hover,.sidebar-resizer:active,.sidebar-resizer:focus,.sidebar-resizer.active{width:10px;margin:0;left:var(--desktop-sidebar-width);border-left:solid 1px var(--sidebar-resizer-hover);}.src-sidebar-expanded .rustdoc.src .sidebar-resizer:hover,.src-sidebar-expanded .rustdoc.src .sidebar-resizer:active,.src-sidebar-expanded .rustdoc.src .sidebar-resizer:focus,.src-sidebar-expanded .rustdoc.src .sidebar-resizer.active{left:calc(var(--src-sidebar-width) - 1px);}@media (pointer:coarse){.sidebar-resizer{display:none !important;}}.sidebar-resizer.active{padding:0 140px;width:2px;margin-left:-140px;border-left:none;}.sidebar-resizer.active:before{border-left:solid 2px var(--sidebar-resizer-active);display:block;height:100%;content:"";}.sidebar,.mobile-topbar,.sidebar-menu-toggle,#src-sidebar{background-color:var(--sidebar-background-color);}.src .sidebar>*{visibility:hidden;}.src-sidebar-expanded .src .sidebar{overflow-y:auto;flex-basis:var(--src-sidebar-width);width:var(--src-sidebar-width);}.src-sidebar-expanded .src .sidebar>*{visibility:visible;}#all-types{margin-top:1em;}*{scrollbar-width:initial;scrollbar-color:var(--scrollbar-color);}.sidebar{scrollbar-width:thin;scrollbar-color:var(--scrollbar-color);}::-webkit-scrollbar{width:12px;}.sidebar::-webkit-scrollbar{width:8px;}::-webkit-scrollbar-track{-webkit-box-shadow:inset 0;background-color:var(--scrollbar-track-background-color);}.sidebar::-webkit-scrollbar-track{background-color:var(--scrollbar-track-background-color);}::-webkit-scrollbar-thumb,.sidebar::-webkit-scrollbar-thumb{background-color:var(--scrollbar-thumb-background-color);}.hidden{display:none !important;}.logo-container>img{height:48px;width:48px;}ul.block,.block li{padding:0;margin:0;list-style:none;}.sidebar-elems a,.sidebar>h2 a{display:block;padding:0.25rem;margin-left:-0.25rem;margin-right:0.25rem;}.sidebar h2{overflow-wrap:anywhere;padding:0;margin:0.7rem 0;}.sidebar h3{font-size:1.125rem;padding:0;margin:0;}.sidebar-elems,.sidebar>.version,.sidebar>h2{padding-left:24px;}.sidebar a{color:var(--sidebar-link-color);}.sidebar .current,.sidebar .current a,.sidebar-crate a.logo-container:hover+h2 a,.sidebar a:hover:not(.logo-container){background-color:var(--sidebar-current-link-background-color);}.sidebar-elems .block{margin-bottom:2em;}.sidebar-elems .block li a{white-space:nowrap;text-overflow:ellipsis;overflow:hidden;}.sidebar-crate{display:flex;align-items:center;justify-content:center;margin:14px 32px 1rem;row-gap:10px;column-gap:32px;flex-wrap:wrap;}.sidebar-crate h2{flex-grow:1;margin:0 -8px;align-self:start;}.sidebar-crate .logo-container{margin:0 -16px 0 -16px;text-align:center;}.sidebar-crate h2 a{display:block;margin:0 calc(-24px + 0.25rem) 0 -0.2rem;padding:calc((16px - 0.57rem ) / 2 ) 0.25rem;padding-left:0.2rem;}.sidebar-crate h2 .version{display:block;font-weight:normal;font-size:1rem;overflow-wrap:break-word;}.sidebar-crate+.version{margin-top:-1rem;margin-bottom:1rem;}.mobile-topbar{display:none;}.rustdoc .example-wrap{display:flex;position:relative;margin-bottom:10px;}.rustdoc .example-wrap:last-child{margin-bottom:0px;}.rustdoc .example-wrap pre{margin:0;flex-grow:1;}.rustdoc:not(.src) .example-wrap pre{overflow:auto hidden;}.rustdoc .example-wrap pre.example-line-numbers,.rustdoc .example-wrap pre.src-line-numbers{flex-grow:0;min-width:fit-content;overflow:initial;text-align:right;-webkit-user-select:none;user-select:none;padding:14px 8px;color:var(--src-line-numbers-span-color);}.rustdoc .example-wrap pre.src-line-numbers{padding:14px 0;}.src-line-numbers a,.src-line-numbers span{color:var(--src-line-numbers-span-color);padding:0 8px;}.src-line-numbers :target{background-color:transparent;border-right:none;padding:0 8px;}.src-line-numbers .line-highlighted{background-color:var(--src-line-number-highlighted-background-color);}.search-loading{text-align:center;}.docblock-short{overflow-wrap:break-word;overflow-wrap:anywhere;}.docblock :not(pre)>code,.docblock-short code{white-space:pre-wrap;}.top-doc .docblock h2{font-size:1.375rem;}.top-doc .docblock h3{font-size:1.25rem;}.top-doc .docblock h4,.top-doc .docblock h5{font-size:1.125rem;}.top-doc .docblock h6{font-size:1rem;}.docblock h5{font-size:1rem;}.docblock h6{font-size:0.875rem;}.docblock{margin-left:24px;position:relative;}.docblock>:not(.more-examples-toggle):not(.example-wrap){max-width:100%;overflow-x:auto;}.out-of-band{flex-grow:0;font-size:1.125rem;}.docblock code,.docblock-short code,pre,.rustdoc.src .example-wrap{background-color:var(--code-block-background-color);}#main-content{position:relative;}.docblock table{margin:.5em 0;border-collapse:collapse;}.docblock table td,.docblock table th{padding:.5em;border:1px solid var(--border-color);}.docblock table tbody tr:nth-child(2n){background:var(--table-alt-row-background-color);}div.where{white-space:pre-wrap;font-size:0.875rem;}.item-info{display:block;margin-left:24px;}.item-info code{font-size:0.875rem;}#main-content>.item-info{margin-left:0;}nav.sub{flex-grow:1;flex-flow:row nowrap;margin:4px 0 25px 0;display:flex;align-items:center;}.search-form{position:relative;display:flex;height:34px;flex-grow:1;}.src nav.sub{margin:0 0 15px 0;}.section-header{display:block;position:relative;}.section-header:hover>.anchor,.impl:hover>.anchor,.trait-impl:hover>.anchor,.variant:hover>.anchor{display:initial;}.anchor{display:none;position:absolute;left:-0.5em;background:none !important;}.anchor.field{left:-5px;}.section-header>.anchor{left:-15px;padding-right:8px;}h2.section-header>.anchor{padding-right:6px;}a.doc-anchor{color:var(--main-color);display:none;position:absolute;left:-17px;padding-right:5px;padding-left:3px;}*:hover>.doc-anchor{display:block;}.top-doc>.docblock>*:first-child>.doc-anchor{display:none !important;}.main-heading a:hover,.example-wrap .rust a:hover,.all-items a:hover,.docblock a:not(.test-arrow):not(.scrape-help):not(.tooltip):hover:not(.doc-anchor),.docblock-short a:not(.test-arrow):not(.scrape-help):not(.tooltip):hover,.item-info a{text-decoration:underline;}.crate.block li.current a{font-weight:500;}table,.item-table{overflow-wrap:break-word;}.item-table{display:table;padding:0;margin:0;}.item-table>li{display:table-row;}.item-table>li>div{display:table-cell;}.item-table>li>.item-name{padding-right:1.25rem;}.search-results-title{margin-top:0;white-space:nowrap;display:flex;align-items:baseline;}#crate-search-div{position:relative;min-width:5em;}#crate-search{min-width:115px;padding:0 23px 0 4px;max-width:100%;text-overflow:ellipsis;border:1px solid var(--border-color);border-radius:4px;outline:none;cursor:pointer;-moz-appearance:none;-webkit-appearance:none;text-indent:0.01px;background-color:var(--main-background-color);color:inherit;line-height:1.5;font-weight:500;}#crate-search:hover,#crate-search:focus{border-color:var(--crate-search-hover-border);}#crate-search-div::after{pointer-events:none;width:100%;height:100%;position:absolute;top:0;left:0;content:"";background-repeat:no-repeat;background-size:20px;background-position:calc(100% - 2px) 56%;background-image:url('data:image/svg+xml, \ + ');filter:var(--crate-search-div-filter);}#crate-search-div:hover::after,#crate-search-div:focus-within::after{filter:var(--crate-search-div-hover-filter);}#crate-search>option{font-size:1rem;}.search-input{-webkit-appearance:none;outline:none;border:1px solid var(--border-color);border-radius:2px;padding:8px;font-size:1rem;flex-grow:1;background-color:var(--button-background-color);color:var(--search-color);}.search-input:focus{border-color:var(--search-input-focused-border-color);}.search-results{display:none;}.search-results.active{display:block;}.search-results>a{display:flex;margin-left:2px;margin-right:2px;border-bottom:1px solid var(--search-result-border-color);gap:1em;}.search-results>a>div.desc{white-space:nowrap;text-overflow:ellipsis;overflow:hidden;flex:2;}.search-results a:hover,.search-results a:focus{background-color:var(--search-result-link-focus-background-color);}.search-results .result-name{display:flex;align-items:center;justify-content:start;flex:3;}.search-results .result-name .alias{color:var(--search-results-alias-color);}.search-results .result-name .grey{color:var(--search-results-grey-color);}.search-results .result-name .typename{color:var(--search-results-grey-color);font-size:0.875rem;width:var(--search-typename-width);}.search-results .result-name .path{word-break:break-all;max-width:calc(100% - var(--search-typename-width));display:inline-block;}.search-results .result-name .path>*{display:inline;}.popover{position:absolute;top:100%;right:0;z-index:calc(var(--desktop-sidebar-z-index) + 1);margin-top:7px;border-radius:3px;border:1px solid var(--border-color);background-color:var(--main-background-color);color:var(--main-color);--popover-arrow-offset:11px;}.popover::before{content:'';position:absolute;right:var(--popover-arrow-offset);border:solid var(--border-color);border-width:1px 1px 0 0;background-color:var(--main-background-color);padding:4px;transform:rotate(-45deg);top:-5px;}.setting-line{margin:1.2em 0.6em;}.setting-radio input,.setting-check input{margin-right:0.3em;height:1.2rem;width:1.2rem;border:2px solid var(--settings-input-border-color);outline:none;-webkit-appearance:none;cursor:pointer;}.setting-radio input{border-radius:50%;}.setting-radio span,.setting-check span{padding-bottom:1px;}.setting-radio{margin-top:0.1em;margin-bottom:0.1em;min-width:3.8em;padding:0.3em;display:inline-flex;align-items:center;cursor:pointer;}.setting-radio+.setting-radio{margin-left:0.5em;}.setting-check{margin-right:20px;display:flex;align-items:center;cursor:pointer;}.setting-radio input:checked{box-shadow:inset 0 0 0 3px var(--main-background-color);background-color:var(--settings-input-color);}.setting-check input:checked{background-color:var(--settings-input-color);border-width:1px;content:url('data:image/svg+xml,\ + \ + ');}.setting-radio input:focus,.setting-check input:focus{box-shadow:0 0 1px 1px var(--settings-input-color);}.setting-radio input:checked:focus{box-shadow:inset 0 0 0 3px var(--main-background-color),0 0 2px 2px var(--settings-input-color);}.setting-radio input:hover,.setting-check input:hover{border-color:var(--settings-input-color) !important;}#help.popover{max-width:600px;--popover-arrow-offset:48px;}#help dt{float:left;clear:left;margin-right:0.5rem;}#help span.top,#help span.bottom{text-align:center;display:block;font-size:1.125rem;}#help span.top{margin:10px 0;border-bottom:1px solid var(--border-color);padding-bottom:4px;margin-bottom:6px;}#help span.bottom{clear:both;border-top:1px solid var(--border-color);}.side-by-side>div{width:50%;float:left;padding:0 20px 20px 17px;}.item-info .stab{display:block;padding:3px;margin-bottom:5px;}.item-name .stab{margin-left:0.3125em;}.stab{padding:0 2px;font-size:0.875rem;font-weight:normal;color:var(--main-color);background-color:var(--stab-background-color);width:fit-content;white-space:pre-wrap;border-radius:3px;display:inline;vertical-align:baseline;}.stab.portability>code{background:none;color:var(--stab-code-color);}.stab .emoji,.item-info .stab::before{font-size:1.25rem;}.stab .emoji{margin-right:0.3rem;}.item-info .stab::before{content:"\0";width:0;display:inline-block;color:transparent;}.emoji{text-shadow:1px 0 0 black,-1px 0 0 black,0 1px 0 black,0 -1px 0 black;}.since{font-weight:normal;font-size:initial;}.rightside{padding-left:12px;float:right;}.rightside:not(a),.out-of-band{color:var(--right-side-color);}pre.rust{tab-size:4;-moz-tab-size:4;}pre.rust .kw{color:var(--code-highlight-kw-color);}pre.rust .kw-2{color:var(--code-highlight-kw-2-color);}pre.rust .lifetime{color:var(--code-highlight-lifetime-color);}pre.rust .prelude-ty{color:var(--code-highlight-prelude-color);}pre.rust .prelude-val{color:var(--code-highlight-prelude-val-color);}pre.rust .string{color:var(--code-highlight-string-color);}pre.rust .number{color:var(--code-highlight-number-color);}pre.rust .bool-val{color:var(--code-highlight-literal-color);}pre.rust .self{color:var(--code-highlight-self-color);}pre.rust .attr{color:var(--code-highlight-attribute-color);}pre.rust .macro,pre.rust .macro-nonterminal{color:var(--code-highlight-macro-color);}pre.rust .question-mark{font-weight:bold;color:var(--code-highlight-question-mark-color);}pre.rust .comment{color:var(--code-highlight-comment-color);}pre.rust .doccomment{color:var(--code-highlight-doc-comment-color);}.rustdoc.src .example-wrap pre.rust a{background:var(--codeblock-link-background);}.example-wrap.compile_fail,.example-wrap.should_panic{border-left:2px solid var(--codeblock-error-color);}.ignore.example-wrap{border-left:2px solid var(--codeblock-ignore-color);}.example-wrap.compile_fail:hover,.example-wrap.should_panic:hover{border-left:2px solid var(--codeblock-error-hover-color);}.example-wrap.ignore:hover{border-left:2px solid var(--codeblock-ignore-hover-color);}.example-wrap.compile_fail .tooltip,.example-wrap.should_panic .tooltip{color:var(--codeblock-error-color);}.example-wrap.ignore .tooltip{color:var(--codeblock-ignore-color);}.example-wrap.compile_fail:hover .tooltip,.example-wrap.should_panic:hover .tooltip{color:var(--codeblock-error-hover-color);}.example-wrap.ignore:hover .tooltip{color:var(--codeblock-ignore-hover-color);}.example-wrap .tooltip{position:absolute;display:block;left:-25px;top:5px;margin:0;line-height:1;}.example-wrap.compile_fail .tooltip,.example-wrap.should_panic .tooltip,.example-wrap.ignore .tooltip{font-weight:bold;font-size:1.25rem;}.content .docblock .warning{border-left:2px solid var(--warning-border-color);padding:14px;position:relative;overflow-x:visible !important;}.content .docblock .warning::before{color:var(--warning-border-color);content:"ⓘ";position:absolute;left:-25px;top:5px;font-weight:bold;font-size:1.25rem;}.top-doc>.docblock>.warning:first-child::before{top:20px;}a.test-arrow{visibility:hidden;position:absolute;padding:5px 10px 5px 10px;border-radius:5px;font-size:1.375rem;top:5px;right:5px;z-index:1;color:var(--test-arrow-color);background-color:var(--test-arrow-background-color);}a.test-arrow:hover{color:var(--test-arrow-hover-color);background-color:var(--test-arrow-hover-background-color);}.example-wrap:hover .test-arrow{visibility:visible;}.code-attribute{font-weight:300;color:var(--code-attribute-color);}.item-spacer{width:100%;height:12px;display:block;}.out-of-band>span.since{font-size:1.25rem;}.sub-variant h4{font-size:1rem;font-weight:400;margin-top:0;margin-bottom:0;}.sub-variant{margin-left:24px;margin-bottom:40px;}.sub-variant>.sub-variant-field{margin-left:24px;}:target{padding-right:3px;background-color:var(--target-background-color);border-right:3px solid var(--target-border-color);}.code-header a.tooltip{color:inherit;margin-right:15px;position:relative;}.code-header a.tooltip:hover{color:var(--link-color);}a.tooltip:hover::after{position:absolute;top:calc(100% - 10px);left:-15px;right:-15px;height:20px;content:"\00a0";}.fade-out{opacity:0;transition:opacity 0.45s cubic-bezier(0,0,0.1,1.0);}.popover.tooltip .content{margin:0.25em 0.5em;}.popover.tooltip .content pre,.popover.tooltip .content code{background:transparent;margin:0;padding:0;font-size:1.25rem;white-space:pre-wrap;}.popover.tooltip .content>h3:first-child{margin:0 0 5px 0;}.search-failed{text-align:center;margin-top:20px;display:none;}.search-failed.active{display:block;}.search-failed>ul{text-align:left;max-width:570px;margin-left:auto;margin-right:auto;}#search-tabs{display:flex;flex-direction:row;gap:1px;margin-bottom:4px;}#search-tabs button{text-align:center;font-size:1.125rem;border:0;border-top:2px solid;flex:1;line-height:1.5;color:inherit;}#search-tabs button:not(.selected){background-color:var(--search-tab-button-not-selected-background);border-top-color:var(--search-tab-button-not-selected-border-top-color);}#search-tabs button:hover,#search-tabs button.selected{background-color:var(--search-tab-button-selected-background);border-top-color:var(--search-tab-button-selected-border-top-color);}#search-tabs .count{font-size:1rem;font-variant-numeric:tabular-nums;color:var(--search-tab-title-count-color);}#search .error code{border-radius:3px;background-color:var(--search-error-code-background-color);}.search-corrections{font-weight:normal;}#src-sidebar{width:100%;overflow:auto;}#src-sidebar div.files>a:hover,details.dir-entry summary:hover,#src-sidebar div.files>a:focus,details.dir-entry summary:focus{background-color:var(--src-sidebar-background-hover);}#src-sidebar div.files>a.selected{background-color:var(--src-sidebar-background-selected);}.src-sidebar-title{position:sticky;top:0;display:flex;padding:8px 8px 0 48px;margin-bottom:7px;background:var(--sidebar-background-color);border-bottom:1px solid var(--border-color);}#settings-menu,#help-button{margin-left:4px;display:flex;}#sidebar-button{display:none;line-height:0;}.hide-sidebar #sidebar-button,.src #sidebar-button{display:flex;margin-right:4px;position:fixed;left:6px;height:34px;width:34px;background-color:var(--main-background-color);z-index:1;}.src #sidebar-button{left:8px;z-index:calc(var(--desktop-sidebar-z-index) + 1);}.hide-sidebar .src #sidebar-button{position:static;}#settings-menu>a,#help-button>a,#sidebar-button>a{display:flex;align-items:center;justify-content:center;background-color:var(--button-background-color);border:1px solid var(--border-color);border-radius:2px;color:var(--settings-button-color);font-size:20px;width:33px;}#settings-menu>a:hover,#settings-menu>a:focus,#help-button>a:hover,#help-button>a:focus,#sidebar-button>a:hover,#sidebar-button>a:focus{border-color:var(--settings-button-border-focus);}#settings-menu>a{line-height:0;font-size:0;}#settings-menu>a:before{content:url('data:image/svg+xml,\ + ');width:22px;height:22px;filter:var(--settings-menu-filter);}#sidebar-button>a:before{content:url('data:image/svg+xml,\ + \ + \ + ');width:22px;height:22px;}#copy-path{color:var(--copy-path-button-color);background:var(--main-background-color);height:34px;width:33px;margin-left:10px;padding:0;padding-left:2px;border:0;font-size:0;}#copy-path::before{filter:var(--copy-path-img-filter);content:url('data:image/svg+xml,\ +\ +\ +');width:19px;height:18px;}#copy-path:hover::before{filter:var(--copy-path-img-hover-filter);}#copy-path.clicked::before{content:url('data:image/svg+xml,\ + \ + ');}@keyframes rotating{from{transform:rotate(0deg);}to{transform:rotate(360deg);}}#settings-menu.rotate>a img{animation:rotating 2s linear infinite;}kbd{display:inline-block;padding:3px 5px;font:15px monospace;line-height:10px;vertical-align:middle;border:solid 1px var(--border-color);border-radius:3px;color:var(--kbd-color);background-color:var(--kbd-background);box-shadow:inset 0 -1px 0 var(--kbd-box-shadow-color);}ul.all-items>li{list-style:none;}details.dir-entry{padding-left:4px;}details.dir-entry>summary{margin:0 0 0 -4px;padding:0 0 0 4px;cursor:pointer;}details.dir-entry div.folders,details.dir-entry div.files{padding-left:23px;}details.dir-entry a{display:block;}details.toggle{contain:layout;position:relative;}details.toggle>summary.hideme{cursor:pointer;font-size:1rem;}details.toggle>summary{list-style:none;outline:none;}details.toggle>summary::-webkit-details-marker,details.toggle>summary::marker{display:none;}details.toggle>summary.hideme>span{margin-left:9px;}details.toggle>summary::before{background:url('data:image/svg+xml,') no-repeat top left;content:"";cursor:pointer;width:16px;height:16px;display:inline-block;vertical-align:middle;opacity:.5;filter:var(--toggle-filter);}details.toggle>summary.hideme>span,.more-examples-toggle summary,.more-examples-toggle .hide-more{color:var(--toggles-color);}details.toggle>summary::after{content:"Expand";overflow:hidden;width:0;height:0;position:absolute;}details.toggle>summary.hideme::after{content:"";}details.toggle>summary:focus::before,details.toggle>summary:hover::before{opacity:1;}details.toggle>summary:focus-visible::before{outline:1px dotted #000;outline-offset:1px;}details.non-exhaustive{margin-bottom:8px;}details.toggle>summary.hideme::before{position:relative;}details.toggle>summary:not(.hideme)::before{position:absolute;left:-24px;top:4px;}.impl-items>details.toggle>summary:not(.hideme)::before{position:absolute;left:-24px;}details.toggle[open] >summary.hideme{position:absolute;}details.toggle[open] >summary.hideme>span{display:none;}details.toggle[open] >summary::before{background:url('data:image/svg+xml,') no-repeat top left;}details.toggle[open] >summary::after{content:"Collapse";}.docblock summary>*{display:inline-block;}.docblock>.example-wrap:first-child .tooltip{margin-top:16px;}.src #sidebar-button>a:before,.sidebar-menu-toggle:before{content:url('data:image/svg+xml,\ + ');opacity:0.75;}.sidebar-menu-toggle:hover:before,.sidebar-menu-toggle:active:before,.sidebar-menu-toggle:focus:before{opacity:1;}.src #sidebar-button>a:before{content:url('data:image/svg+xml,\ + \ + \ + ');opacity:0.75;}@media (max-width:850px){#search-tabs .count{display:block;}}@media (max-width:700px){*[id]{scroll-margin-top:45px;}.rustdoc{display:block;}main{padding-left:15px;padding-top:0px;}.main-heading{flex-direction:column;}.out-of-band{text-align:left;margin-left:initial;padding:initial;}.out-of-band .since::before{content:"Since ";}.sidebar .logo-container,.sidebar .location,.sidebar-resizer{display:none;}.sidebar{position:fixed;top:45px;left:-1000px;z-index:11;height:calc(100vh - 45px);width:200px;}.src main,.rustdoc.src .sidebar{top:0;padding:0;height:100vh;border:0;}.src .search-form{margin-left:40px;}.hide-sidebar .search-form{margin-left:32px;}.hide-sidebar .src .search-form{margin-left:0;}.sidebar.shown,.src-sidebar-expanded .src .sidebar,.rustdoc:not(.src) .sidebar:focus-within{left:0;}.mobile-topbar h2{padding-bottom:0;margin:auto 0.5em auto auto;overflow:hidden;font-size:24px;white-space:nowrap;text-overflow:ellipsis;}.mobile-topbar .logo-container>img{max-width:35px;max-height:35px;margin:5px 0 5px 20px;}.mobile-topbar{display:flex;flex-direction:row;position:sticky;z-index:10;font-size:2rem;height:45px;width:100%;left:0;top:0;}.hide-sidebar .mobile-topbar{display:none;}.sidebar-menu-toggle{width:45px;border:none;line-height:0;}.hide-sidebar .sidebar-menu-toggle{display:none;}.sidebar-elems{margin-top:1em;}.anchor{display:none !important;}#main-content>details.toggle>summary::before,#main-content>div>details.toggle>summary::before{left:-11px;}#copy-path,#help-button{display:none;}#sidebar-button>a:before{content:url('data:image/svg+xml,\ + \ + \ + ');width:22px;height:22px;}.sidebar-menu-toggle:before{filter:var(--mobile-sidebar-menu-filter);}.sidebar-menu-toggle:hover{background:var(--main-background-color);}.item-table,.item-row,.item-table>li,.item-table>li>div,.search-results>a,.search-results>a>div{display:block;}.search-results>a{padding:5px 0px;}.search-results>a>div.desc,.item-table>li>div.desc{padding-left:2em;}.search-results .result-name{display:block;}.search-results .result-name .typename{width:initial;margin-right:0;}.search-results .result-name .typename,.search-results .result-name .path{display:inline;}.src-sidebar-expanded .src .sidebar{position:fixed;max-width:100vw;width:100vw;}.src .src-sidebar-title{padding-top:0;}details.toggle:not(.top-doc)>summary{margin-left:10px;}.impl-items>details.toggle>summary:not(.hideme)::before,#main-content>details.toggle:not(.top-doc)>summary::before,#main-content>div>details.toggle>summary::before{left:-11px;}.impl-items>.item-info{margin-left:34px;}.src nav.sub{margin:0;padding:var(--nav-sub-mobile-padding);}}@media (min-width:701px){.scraped-example-title{position:absolute;z-index:10;background:var(--main-background-color);bottom:8px;right:5px;padding:2px 4px;box-shadow:0 0 4px var(--main-background-color);}}@media print{nav.sidebar,nav.sub,.out-of-band,a.src,#copy-path,details.toggle[open] >summary::before,details.toggle>summary::before,details.toggle.top-doc>summary{display:none;}.docblock{margin-left:0;}main{padding:10px;}}@media (max-width:464px){.docblock{margin-left:12px;}.docblock code{overflow-wrap:break-word;overflow-wrap:anywhere;}nav.sub{flex-direction:column;}.search-form{align-self:stretch;}}.variant,.implementors-toggle>summary,.impl,#implementors-list>.docblock,.impl-items>section,.impl-items>.toggle>summary,.methods>section,.methods>.toggle>summary{margin-bottom:0.75em;}.variants>.docblock,.implementors-toggle>.docblock,.impl-items>.toggle[open]:not(:last-child),.methods>.toggle[open]:not(:last-child),.implementors-toggle[open]:not(:last-child){margin-bottom:2em;}#trait-implementations-list .impl-items>.toggle:not(:last-child),#synthetic-implementations-list .impl-items>.toggle:not(:last-child),#blanket-implementations-list .impl-items>.toggle:not(:last-child){margin-bottom:1em;}.scraped-example-list .scrape-help{margin-left:10px;padding:0 4px;font-weight:normal;font-size:12px;position:relative;bottom:1px;border:1px solid var(--scrape-example-help-border-color);border-radius:50px;color:var(--scrape-example-help-color);}.scraped-example-list .scrape-help:hover{border-color:var(--scrape-example-help-hover-border-color);color:var(--scrape-example-help-hover-color);}.scraped-example{position:relative;}.scraped-example .code-wrapper{position:relative;display:flex;flex-direction:row;flex-wrap:wrap;width:100%;}.scraped-example:not(.expanded) .code-wrapper{max-height:calc(1.5em * 5 + 10px);}.scraped-example:not(.expanded) .code-wrapper pre{overflow-y:hidden;padding-bottom:0;max-height:calc(1.5em * 5 + 10px);}.more-scraped-examples .scraped-example:not(.expanded) .code-wrapper,.more-scraped-examples .scraped-example:not(.expanded) .code-wrapper pre{max-height:calc(1.5em * 10 + 10px);}.scraped-example .code-wrapper .next,.scraped-example .code-wrapper .prev,.scraped-example .code-wrapper .expand{color:var(--main-color);position:absolute;top:0.25em;z-index:1;padding:0;background:none;border:none;-webkit-appearance:none;opacity:1;}.scraped-example .code-wrapper .prev{right:2.25em;}.scraped-example .code-wrapper .next{right:1.25em;}.scraped-example .code-wrapper .expand{right:0.25em;}.scraped-example:not(.expanded) .code-wrapper::before,.scraped-example:not(.expanded) .code-wrapper::after{content:" ";width:100%;height:5px;position:absolute;z-index:1;}.scraped-example:not(.expanded) .code-wrapper::before{top:0;background:linear-gradient(to bottom,var(--scrape-example-code-wrapper-background-start),var(--scrape-example-code-wrapper-background-end));}.scraped-example:not(.expanded) .code-wrapper::after{bottom:0;background:linear-gradient(to top,var(--scrape-example-code-wrapper-background-start),var(--scrape-example-code-wrapper-background-end));}.scraped-example .code-wrapper .example-wrap{width:100%;overflow-y:hidden;margin-bottom:0;}.scraped-example:not(.expanded) .code-wrapper .example-wrap{overflow-x:hidden;}.scraped-example .example-wrap .rust span.highlight{background:var(--scrape-example-code-line-highlight);}.scraped-example .example-wrap .rust span.highlight.focus{background:var(--scrape-example-code-line-highlight-focus);}.more-examples-toggle{max-width:calc(100% + 25px);margin-top:10px;margin-left:-25px;}.more-examples-toggle .hide-more{margin-left:25px;cursor:pointer;}.more-scraped-examples{margin-left:25px;position:relative;}.toggle-line{position:absolute;top:5px;bottom:0;right:calc(100% + 10px);padding:0 4px;cursor:pointer;}.toggle-line-inner{min-width:2px;height:100%;background:var(--scrape-example-toggle-line-background);}.toggle-line:hover .toggle-line-inner{background:var(--scrape-example-toggle-line-hover-background);}.more-scraped-examples .scraped-example,.example-links{margin-top:20px;}.more-scraped-examples .scraped-example:first-child{margin-top:5px;}.example-links ul{margin-bottom:0;}:root[data-theme="light"],:root:not([data-theme]){--main-background-color:white;--main-color:black;--settings-input-color:#2196f3;--settings-input-border-color:#717171;--settings-button-color:#000;--settings-button-border-focus:#717171;--sidebar-background-color:#f5f5f5;--sidebar-background-color-hover:#e0e0e0;--code-block-background-color:#f5f5f5;--scrollbar-track-background-color:#dcdcdc;--scrollbar-thumb-background-color:rgba(36,37,39,0.6);--scrollbar-color:rgba(36,37,39,0.6) #d9d9d9;--headings-border-bottom-color:#ddd;--border-color:#e0e0e0;--button-background-color:#fff;--right-side-color:grey;--code-attribute-color:#999;--toggles-color:#999;--toggle-filter:none;--mobile-sidebar-menu-filter:none;--search-input-focused-border-color:#66afe9;--copy-path-button-color:#999;--copy-path-img-filter:invert(50%);--copy-path-img-hover-filter:invert(35%);--codeblock-error-hover-color:rgb(255,0,0);--codeblock-error-color:rgba(255,0,0,.5);--codeblock-ignore-hover-color:rgb(255,142,0);--codeblock-ignore-color:rgba(255,142,0,.6);--warning-border-color:#ff8e00;--type-link-color:#ad378a;--trait-link-color:#6e4fc9;--assoc-item-link-color:#3873ad;--function-link-color:#ad7c37;--macro-link-color:#068000;--keyword-link-color:#3873ad;--mod-link-color:#3873ad;--link-color:#3873ad;--sidebar-link-color:#356da4;--sidebar-current-link-background-color:#fff;--search-result-link-focus-background-color:#ccc;--search-result-border-color:#aaa3;--search-color:#000;--search-error-code-background-color:#d0cccc;--search-results-alias-color:#000;--search-results-grey-color:#999;--search-tab-title-count-color:#888;--search-tab-button-not-selected-border-top-color:#e6e6e6;--search-tab-button-not-selected-background:#e6e6e6;--search-tab-button-selected-border-top-color:#0089ff;--search-tab-button-selected-background:#fff;--settings-menu-filter:none;--stab-background-color:#fff5d6;--stab-code-color:#000;--code-highlight-kw-color:#8959a8;--code-highlight-kw-2-color:#4271ae;--code-highlight-lifetime-color:#b76514;--code-highlight-prelude-color:#4271ae;--code-highlight-prelude-val-color:#c82829;--code-highlight-number-color:#718c00;--code-highlight-string-color:#718c00;--code-highlight-literal-color:#c82829;--code-highlight-attribute-color:#c82829;--code-highlight-self-color:#c82829;--code-highlight-macro-color:#3e999f;--code-highlight-question-mark-color:#ff9011;--code-highlight-comment-color:#8e908c;--code-highlight-doc-comment-color:#4d4d4c;--src-line-numbers-span-color:#c67e2d;--src-line-number-highlighted-background-color:#fdffd3;--test-arrow-color:#f5f5f5;--test-arrow-background-color:rgba(78,139,202,0.2);--test-arrow-hover-color:#f5f5f5;--test-arrow-hover-background-color:rgb(78,139,202);--target-background-color:#fdffd3;--target-border-color:#ad7c37;--kbd-color:#000;--kbd-background:#fafbfc;--kbd-box-shadow-color:#c6cbd1;--rust-logo-filter:initial;--crate-search-div-filter:invert(100%) sepia(0%) saturate(4223%) hue-rotate(289deg) brightness(114%) contrast(76%);--crate-search-div-hover-filter:invert(44%) sepia(18%) saturate(23%) hue-rotate(317deg) brightness(96%) contrast(93%);--crate-search-hover-border:#717171;--src-sidebar-background-selected:#fff;--src-sidebar-background-hover:#e0e0e0;--table-alt-row-background-color:#f5f5f5;--codeblock-link-background:#eee;--scrape-example-toggle-line-background:#ccc;--scrape-example-toggle-line-hover-background:#999;--scrape-example-code-line-highlight:#fcffd6;--scrape-example-code-line-highlight-focus:#f6fdb0;--scrape-example-help-border-color:#555;--scrape-example-help-color:#333;--scrape-example-help-hover-border-color:#000;--scrape-example-help-hover-color:#000;--scrape-example-code-wrapper-background-start:rgba(255,255,255,1);--scrape-example-code-wrapper-background-end:rgba(255,255,255,0);--sidebar-resizer-hover:hsl(207,90%,66%);--sidebar-resizer-active:hsl(207,90%,54%);}:root[data-theme="dark"]{--main-background-color:#353535;--main-color:#ddd;--settings-input-color:#2196f3;--settings-input-border-color:#999;--settings-button-color:#000;--settings-button-border-focus:#ffb900;--sidebar-background-color:#505050;--sidebar-background-color-hover:#676767;--code-block-background-color:#2A2A2A;--scrollbar-track-background-color:#717171;--scrollbar-thumb-background-color:rgba(32,34,37,.6);--scrollbar-color:rgba(32,34,37,.6) #5a5a5a;--headings-border-bottom-color:#d2d2d2;--border-color:#e0e0e0;--button-background-color:#f0f0f0;--right-side-color:grey;--code-attribute-color:#999;--toggles-color:#999;--toggle-filter:invert(100%);--mobile-sidebar-menu-filter:invert(100%);--search-input-focused-border-color:#008dfd;--copy-path-button-color:#999;--copy-path-img-filter:invert(50%);--copy-path-img-hover-filter:invert(65%);--codeblock-error-hover-color:rgb(255,0,0);--codeblock-error-color:rgba(255,0,0,.5);--codeblock-ignore-hover-color:rgb(255,142,0);--codeblock-ignore-color:rgba(255,142,0,.6);--warning-border-color:#ff8e00;--type-link-color:#2dbfb8;--trait-link-color:#b78cf2;--assoc-item-link-color:#d2991d;--function-link-color:#2bab63;--macro-link-color:#09bd00;--keyword-link-color:#d2991d;--mod-link-color:#d2991d;--link-color:#d2991d;--sidebar-link-color:#fdbf35;--sidebar-current-link-background-color:#444;--search-result-link-focus-background-color:#616161;--search-result-border-color:#aaa3;--search-color:#111;--search-error-code-background-color:#484848;--search-results-alias-color:#fff;--search-results-grey-color:#ccc;--search-tab-title-count-color:#888;--search-tab-button-not-selected-border-top-color:#252525;--search-tab-button-not-selected-background:#252525;--search-tab-button-selected-border-top-color:#0089ff;--search-tab-button-selected-background:#353535;--settings-menu-filter:none;--stab-background-color:#314559;--stab-code-color:#e6e1cf;--code-highlight-kw-color:#ab8ac1;--code-highlight-kw-2-color:#769acb;--code-highlight-lifetime-color:#d97f26;--code-highlight-prelude-color:#769acb;--code-highlight-prelude-val-color:#ee6868;--code-highlight-number-color:#83a300;--code-highlight-string-color:#83a300;--code-highlight-literal-color:#ee6868;--code-highlight-attribute-color:#ee6868;--code-highlight-self-color:#ee6868;--code-highlight-macro-color:#3e999f;--code-highlight-question-mark-color:#ff9011;--code-highlight-comment-color:#8d8d8b;--code-highlight-doc-comment-color:#8ca375;--src-line-numbers-span-color:#3b91e2;--src-line-number-highlighted-background-color:#0a042f;--test-arrow-color:#dedede;--test-arrow-background-color:rgba(78,139,202,0.2);--test-arrow-hover-color:#dedede;--test-arrow-hover-background-color:#4e8bca;--target-background-color:#494a3d;--target-border-color:#bb7410;--kbd-color:#000;--kbd-background:#fafbfc;--kbd-box-shadow-color:#c6cbd1;--rust-logo-filter:drop-shadow(1px 0 0px #fff) drop-shadow(0 1px 0 #fff) drop-shadow(-1px 0 0 #fff) drop-shadow(0 -1px 0 #fff);--crate-search-div-filter:invert(94%) sepia(0%) saturate(721%) hue-rotate(255deg) brightness(90%) contrast(90%);--crate-search-div-hover-filter:invert(69%) sepia(60%) saturate(6613%) hue-rotate(184deg) brightness(100%) contrast(91%);--crate-search-hover-border:#2196f3;--src-sidebar-background-selected:#333;--src-sidebar-background-hover:#444;--table-alt-row-background-color:#2a2a2a;--codeblock-link-background:#333;--scrape-example-toggle-line-background:#999;--scrape-example-toggle-line-hover-background:#c5c5c5;--scrape-example-code-line-highlight:#5b3b01;--scrape-example-code-line-highlight-focus:#7c4b0f;--scrape-example-help-border-color:#aaa;--scrape-example-help-color:#eee;--scrape-example-help-hover-border-color:#fff;--scrape-example-help-hover-color:#fff;--scrape-example-code-wrapper-background-start:rgba(53,53,53,1);--scrape-example-code-wrapper-background-end:rgba(53,53,53,0);--sidebar-resizer-hover:hsl(207,30%,54%);--sidebar-resizer-active:hsl(207,90%,54%);}:root[data-theme="ayu"]{--main-background-color:#0f1419;--main-color:#c5c5c5;--settings-input-color:#ffb454;--settings-input-border-color:#999;--settings-button-color:#fff;--settings-button-border-focus:#e0e0e0;--sidebar-background-color:#14191f;--sidebar-background-color-hover:rgba(70,70,70,0.33);--code-block-background-color:#191f26;--scrollbar-track-background-color:transparent;--scrollbar-thumb-background-color:#5c6773;--scrollbar-color:#5c6773 #24292f;--headings-border-bottom-color:#5c6773;--border-color:#5c6773;--button-background-color:#141920;--right-side-color:grey;--code-attribute-color:#999;--toggles-color:#999;--toggle-filter:invert(100%);--mobile-sidebar-menu-filter:invert(100%);--search-input-focused-border-color:#5c6773;--copy-path-button-color:#fff;--copy-path-img-filter:invert(70%);--copy-path-img-hover-filter:invert(100%);--codeblock-error-hover-color:rgb(255,0,0);--codeblock-error-color:rgba(255,0,0,.5);--codeblock-ignore-hover-color:rgb(255,142,0);--codeblock-ignore-color:rgba(255,142,0,.6);--warning-border-color:#ff8e00;--type-link-color:#ffa0a5;--trait-link-color:#39afd7;--assoc-item-link-color:#39afd7;--function-link-color:#fdd687;--macro-link-color:#a37acc;--keyword-link-color:#39afd7;--mod-link-color:#39afd7;--link-color:#39afd7;--sidebar-link-color:#53b1db;--sidebar-current-link-background-color:transparent;--search-result-link-focus-background-color:#3c3c3c;--search-result-border-color:#aaa3;--search-color:#fff;--search-error-code-background-color:#4f4c4c;--search-results-alias-color:#c5c5c5;--search-results-grey-color:#999;--search-tab-title-count-color:#888;--search-tab-button-not-selected-border-top-color:none;--search-tab-button-not-selected-background:transparent !important;--search-tab-button-selected-border-top-color:none;--search-tab-button-selected-background:#141920 !important;--settings-menu-filter:invert(100%);--stab-background-color:#314559;--stab-code-color:#e6e1cf;--code-highlight-kw-color:#ff7733;--code-highlight-kw-2-color:#ff7733;--code-highlight-lifetime-color:#ff7733;--code-highlight-prelude-color:#69f2df;--code-highlight-prelude-val-color:#ff7733;--code-highlight-number-color:#b8cc52;--code-highlight-string-color:#b8cc52;--code-highlight-literal-color:#ff7733;--code-highlight-attribute-color:#e6e1cf;--code-highlight-self-color:#36a3d9;--code-highlight-macro-color:#a37acc;--code-highlight-question-mark-color:#ff9011;--code-highlight-comment-color:#788797;--code-highlight-doc-comment-color:#a1ac88;--src-line-numbers-span-color:#5c6773;--src-line-number-highlighted-background-color:rgba(255,236,164,0.06);--test-arrow-color:#788797;--test-arrow-background-color:rgba(57,175,215,0.09);--test-arrow-hover-color:#c5c5c5;--test-arrow-hover-background-color:rgba(57,175,215,0.368);--target-background-color:rgba(255,236,164,0.06);--target-border-color:rgba(255,180,76,0.85);--kbd-color:#c5c5c5;--kbd-background:#314559;--kbd-box-shadow-color:#5c6773;--rust-logo-filter:drop-shadow(1px 0 0px #fff) drop-shadow(0 1px 0 #fff) drop-shadow(-1px 0 0 #fff) drop-shadow(0 -1px 0 #fff);--crate-search-div-filter:invert(41%) sepia(12%) saturate(487%) hue-rotate(171deg) brightness(94%) contrast(94%);--crate-search-div-hover-filter:invert(98%) sepia(12%) saturate(81%) hue-rotate(343deg) brightness(113%) contrast(76%);--crate-search-hover-border:#e0e0e0;--src-sidebar-background-selected:#14191f;--src-sidebar-background-hover:#14191f;--table-alt-row-background-color:#191f26;--codeblock-link-background:#333;--scrape-example-toggle-line-background:#999;--scrape-example-toggle-line-hover-background:#c5c5c5;--scrape-example-code-line-highlight:#5b3b01;--scrape-example-code-line-highlight-focus:#7c4b0f;--scrape-example-help-border-color:#aaa;--scrape-example-help-color:#eee;--scrape-example-help-hover-border-color:#fff;--scrape-example-help-hover-color:#fff;--scrape-example-code-wrapper-background-start:rgba(15,20,25,1);--scrape-example-code-wrapper-background-end:rgba(15,20,25,0);--sidebar-resizer-hover:hsl(34,50%,33%);--sidebar-resizer-active:hsl(34,100%,66%);}:root[data-theme="ayu"] h1,:root[data-theme="ayu"] h2,:root[data-theme="ayu"] h3,:root[data-theme="ayu"] h4,:where(:root[data-theme="ayu"]) h1 a,:root[data-theme="ayu"] .sidebar h2 a,:root[data-theme="ayu"] .sidebar h3 a{color:#fff;}:root[data-theme="ayu"] .docblock code{color:#ffb454;}:root[data-theme="ayu"] .docblock a>code{color:#39AFD7 !important;}:root[data-theme="ayu"] .code-header,:root[data-theme="ayu"] .docblock pre>code,:root[data-theme="ayu"] pre,:root[data-theme="ayu"] pre>code,:root[data-theme="ayu"] .item-info code,:root[data-theme="ayu"] .rustdoc.source .example-wrap{color:#e6e1cf;}:root[data-theme="ayu"] .sidebar .current,:root[data-theme="ayu"] .sidebar .current a,:root[data-theme="ayu"] .sidebar a:hover,:root[data-theme="ayu"] #src-sidebar div.files>a:hover,:root[data-theme="ayu"] details.dir-entry summary:hover,:root[data-theme="ayu"] #src-sidebar div.files>a:focus,:root[data-theme="ayu"] details.dir-entry summary:focus,:root[data-theme="ayu"] #src-sidebar div.files>a.selected{color:#ffb44c;}:root[data-theme="ayu"] .sidebar-elems .location{color:#ff7733;}:root[data-theme="ayu"] .src-line-numbers .line-highlighted{color:#708090;padding-right:7px;border-right:1px solid #ffb44c;}:root[data-theme="ayu"] .search-results a:hover,:root[data-theme="ayu"] .search-results a:focus{color:#fff !important;background-color:#3c3c3c;}:root[data-theme="ayu"] .search-results a{color:#0096cf;}:root[data-theme="ayu"] .search-results a div.desc{color:#c5c5c5;}:root[data-theme="ayu"] .result-name .primitive>i,:root[data-theme="ayu"] .result-name .keyword>i{color:#788797;}:root[data-theme="ayu"] #search-tabs>button.selected{border-bottom:1px solid #ffb44c !important;border-top:none;}:root[data-theme="ayu"] #search-tabs>button:not(.selected){border:none;background-color:transparent !important;}:root[data-theme="ayu"] #search-tabs>button:hover{border-bottom:1px solid rgba(242,151,24,0.3);}:root[data-theme="ayu"] #settings-menu>a img,:root[data-theme="ayu"] #sidebar-button>a:before{filter:invert(100);} \ No newline at end of file diff --git a/api-rust/static.files/search-d52510db62a78183.js b/api-rust/static.files/search-d52510db62a78183.js new file mode 100644 index 000000000..a2824f297 --- /dev/null +++ b/api-rust/static.files/search-d52510db62a78183.js @@ -0,0 +1,5 @@ +"use strict";if(!Array.prototype.toSpliced){Array.prototype.toSpliced=function(){const me=this.slice();Array.prototype.splice.apply(me,arguments);return me}}(function(){const itemTypes=["keyword","primitive","mod","externcrate","import","struct","enum","fn","type","static","trait","impl","tymethod","method","structfield","variant","macro","associatedtype","constant","associatedconstant","union","foreigntype","existential","attr","derive","traitalias","generic",];const longItemTypes=["keyword","primitive type","module","extern crate","re-export","struct","enum","function","type alias","static","trait","","trait method","method","struct field","enum variant","macro","assoc type","constant","assoc const","union","foreign type","existential type","attribute macro","derive macro","trait alias",];const TY_GENERIC=itemTypes.indexOf("generic");const TY_IMPORT=itemTypes.indexOf("import");const ROOT_PATH=typeof window!=="undefined"?window.rootPath:"../";const UNBOXING_LIMIT=5;function printTab(nb){let iter=0;let foundCurrentTab=false;let foundCurrentResultSet=false;onEachLazy(document.getElementById("search-tabs").childNodes,elem=>{if(nb===iter){addClass(elem,"selected");foundCurrentTab=true}else{removeClass(elem,"selected")}iter+=1});const isTypeSearch=(nb>0||iter===1);iter=0;onEachLazy(document.getElementById("results").childNodes,elem=>{if(nb===iter){addClass(elem,"active");foundCurrentResultSet=true}else{removeClass(elem,"active")}iter+=1});if(foundCurrentTab&&foundCurrentResultSet){searchState.currentTab=nb;const correctionsElem=document.getElementsByClassName("search-corrections");if(isTypeSearch){removeClass(correctionsElem[0],"hidden")}else{addClass(correctionsElem[0],"hidden")}}else if(nb!==0){printTab(0)}}const editDistanceState={current:[],prev:[],prevPrev:[],calculate:function calculate(a,b,limit){if(a.lengthlimit){return limit+1}while(b.length>0&&b[0]===a[0]){a=a.substring(1);b=b.substring(1)}while(b.length>0&&b[b.length-1]===a[a.length-1]){a=a.substring(0,a.length-1);b=b.substring(0,b.length-1)}if(b.length===0){return minDist}const aLength=a.length;const bLength=b.length;for(let i=0;i<=bLength;++i){this.current[i]=0;this.prev[i]=i;this.prevPrev[i]=Number.MAX_VALUE}for(let i=1;i<=aLength;++i){this.current[0]=i;const aIdx=i-1;for(let j=1;j<=bLength;++j){const bIdx=j-1;const substitutionCost=a[aIdx]===b[bIdx]?0:1;this.current[j]=Math.min(this.prev[j]+1,this.current[j-1]+1,this.prev[j-1]+substitutionCost,);if((i>1)&&(j>1)&&(a[aIdx]===b[bIdx-1])&&(a[aIdx-1]===b[bIdx])){this.current[j]=Math.min(this.current[j],this.prevPrev[j-2]+1,)}}const prevPrevTmp=this.prevPrev;this.prevPrev=this.prev;this.prev=this.current;this.current=prevPrevTmp}const distance=this.prev[bLength];return distance<=limit?distance:(limit+1)},};function editDistance(a,b,limit){return editDistanceState.calculate(a,b,limit)}function initSearch(rawSearchIndex){const MAX_RESULTS=200;const NO_TYPE_FILTER=-1;let searchIndex;let searchIndexDeprecated;let searchIndexEmptyDesc;let functionTypeFingerprint;let currentResults;const typeNameIdMap=new Map();const ALIASES=new Map();const typeNameIdOfArray=buildTypeMapIndex("array");const typeNameIdOfSlice=buildTypeMapIndex("slice");const typeNameIdOfArrayOrSlice=buildTypeMapIndex("[]");const typeNameIdOfTuple=buildTypeMapIndex("tuple");const typeNameIdOfUnit=buildTypeMapIndex("unit");const typeNameIdOfTupleOrUnit=buildTypeMapIndex("()");const typeNameIdOfFn=buildTypeMapIndex("fn");const typeNameIdOfFnMut=buildTypeMapIndex("fnmut");const typeNameIdOfFnOnce=buildTypeMapIndex("fnonce");const typeNameIdOfHof=buildTypeMapIndex("->");function buildTypeMapIndex(name,isAssocType){if(name===""||name===null){return null}if(typeNameIdMap.has(name)){const obj=typeNameIdMap.get(name);obj.assocOnly=isAssocType&&obj.assocOnly;return obj.id}else{const id=typeNameIdMap.size;typeNameIdMap.set(name,{id,assocOnly:isAssocType});return id}}function isSpecialStartCharacter(c){return"<\"".indexOf(c)!==-1}function isEndCharacter(c){return"=,>-])".indexOf(c)!==-1}function itemTypeFromName(typename){const index=itemTypes.findIndex(i=>i===typename);if(index<0){throw["Unknown type filter ",typename]}return index}function getStringElem(query,parserState,isInGenerics){if(isInGenerics){throw["Unexpected ","\""," in generics"]}else if(query.literalSearch){throw["Cannot have more than one literal search element"]}else if(parserState.totalElems-parserState.genericsElems>0){throw["Cannot use literal search when there is more than one element"]}parserState.pos+=1;const start=parserState.pos;const end=getIdentEndPosition(parserState);if(parserState.pos>=parserState.length){throw["Unclosed ","\""]}else if(parserState.userQuery[end]!=="\""){throw["Unexpected ",parserState.userQuery[end]," in a string element"]}else if(start===end){throw["Cannot have empty string element"]}parserState.pos+=1;query.literalSearch=true}function isPathStart(parserState){return parserState.userQuery.slice(parserState.pos,parserState.pos+2)==="::"}function isReturnArrow(parserState){return parserState.userQuery.slice(parserState.pos,parserState.pos+2)==="->"}function isIdentCharacter(c){return(c==="_"||(c>="0"&&c<="9")||(c>="a"&&c<="z")||(c>="A"&&c<="Z"))}function isSeparatorCharacter(c){return c===","||c==="="}function isPathSeparator(c){return c===":"||c===" "}function prevIs(parserState,lookingFor){let pos=parserState.pos;while(pos>0){const c=parserState.userQuery[pos-1];if(c===lookingFor){return true}else if(c!==" "){break}pos-=1}return false}function isLastElemGeneric(elems,parserState){return(elems.length>0&&elems[elems.length-1].generics.length>0)||prevIs(parserState,">")}function skipWhitespace(parserState){while(parserState.pos0){throw["Cannot have more than one element if you use quotes"]}const typeFilter=parserState.typeFilter;parserState.typeFilter=null;if(name==="!"){if(typeFilter!==null&&typeFilter!=="primitive"){throw["Invalid search type: primitive never type ","!"," and ",typeFilter," both specified",]}if(generics.length!==0){throw["Never type ","!"," does not accept generic parameters",]}const bindingName=parserState.isInBinding;parserState.isInBinding=null;return makePrimitiveElement("never",{bindingName})}const quadcolon=/::\s*::/.exec(path);if(path.startsWith("::")){throw["Paths cannot start with ","::"]}else if(path.endsWith("::")){throw["Paths cannot end with ","::"]}else if(quadcolon!==null){throw["Unexpected ",quadcolon[0]]}const pathSegments=path.split(/(?:::\s*)|(?:\s+(?:::\s*)?)/);if(pathSegments.length===0||(pathSegments.length===1&&pathSegments[0]==="")){if(generics.length>0||prevIs(parserState,">")){throw["Found generics without a path"]}else{throw["Unexpected ",parserState.userQuery[parserState.pos]]}}for(const[i,pathSegment]of pathSegments.entries()){if(pathSegment==="!"){if(i!==0){throw["Never type ","!"," is not associated item"]}pathSegments[i]="never"}}parserState.totalElems+=1;if(isInGenerics){parserState.genericsElems+=1}const bindingName=parserState.isInBinding;parserState.isInBinding=null;const bindings=new Map();const pathLast=pathSegments[pathSegments.length-1];return{name:name.trim(),id:null,fullPath:pathSegments,pathWithoutLast:pathSegments.slice(0,pathSegments.length-1),pathLast,normalizedPathLast:pathLast.replace(/_/g,""),generics:generics.filter(gen=>{if(gen.bindingName!==null){if(gen.name!==null){gen.bindingName.generics.unshift(gen)}bindings.set(gen.bindingName.name,gen.bindingName.generics);return false}return true}),bindings,typeFilter,bindingName,}}function getIdentEndPosition(parserState){const start=parserState.pos;let end=parserState.pos;let foundExclamation=-1;while(parserState.pos0){throw["Unexpected ",c," after ",parserState.userQuery[parserState.pos-1]]}else{throw["Unexpected ",c]}}parserState.pos+=1;end=parserState.pos}if(foundExclamation!==-1&&foundExclamation!==start&&isIdentCharacter(parserState.userQuery[foundExclamation-1])){if(parserState.typeFilter===null){parserState.typeFilter="macro"}else if(parserState.typeFilter!=="macro"){throw["Invalid search type: macro ","!"," and ",parserState.typeFilter," both specified",]}end=foundExclamation}return end}function getFilteredNextElem(query,parserState,elems,isInGenerics){const start=parserState.pos;if(parserState.userQuery[parserState.pos]===":"&&!isPathStart(parserState)){throw["Expected type filter before ",":"]}getNextElem(query,parserState,elems,isInGenerics);if(parserState.userQuery[parserState.pos]===":"&&!isPathStart(parserState)){if(parserState.typeFilter!==null){throw["Unexpected ",":"," (expected path after type filter ",parserState.typeFilter+":",")",]}if(elems.length===0){throw["Expected type filter before ",":"]}else if(query.literalSearch){throw["Cannot use quotes on type filter"]}const typeFilterElem=elems.pop();checkExtraTypeFilterCharacters(start,parserState);parserState.typeFilter=typeFilterElem.name;parserState.pos+=1;parserState.totalElems-=1;query.literalSearch=false;getNextElem(query,parserState,elems,isInGenerics)}}function getNextElem(query,parserState,elems,isInGenerics){const generics=[];skipWhitespace(parserState);let start=parserState.pos;let end;if("[(".indexOf(parserState.userQuery[parserState.pos])!==-1){let endChar=")";let name="()";let friendlyName="tuple";if(parserState.userQuery[parserState.pos]==="["){endChar="]";name="[]";friendlyName="slice"}parserState.pos+=1;const{foundSeparator}=getItemsBefore(query,parserState,generics,endChar);const typeFilter=parserState.typeFilter;const bindingName=parserState.isInBinding;parserState.typeFilter=null;parserState.isInBinding=null;for(const gen of generics){if(gen.bindingName!==null){throw["Type parameter ","=",` cannot be within ${friendlyName} `,name]}}if(name==="()"&&!foundSeparator&&generics.length===1&&typeFilter===null){elems.push(generics[0])}else if(name==="()"&&generics.length===1&&generics[0].name==="->"){generics[0].typeFilter=typeFilter;elems.push(generics[0])}else{if(typeFilter!==null&&typeFilter!=="primitive"){throw["Invalid search type: primitive ",name," and ",typeFilter," both specified",]}parserState.totalElems+=1;if(isInGenerics){parserState.genericsElems+=1}elems.push(makePrimitiveElement(name,{bindingName,generics}))}}else if(parserState.userQuery[parserState.pos]==="&"){if(parserState.typeFilter!==null&&parserState.typeFilter!=="primitive"){throw["Invalid search type: primitive ","&"," and ",parserState.typeFilter," both specified",]}parserState.typeFilter=null;parserState.pos+=1;let c=parserState.userQuery[parserState.pos];while(c===" "&&parserState.pos=end){throw["Found generics without a path"]}parserState.pos+=1;getItemsBefore(query,parserState,generics,">")}else if(parserState.pos=end){throw["Found generics without a path"]}if(parserState.isInBinding){throw["Unexpected ","("," after ","="]}parserState.pos+=1;const typeFilter=parserState.typeFilter;parserState.typeFilter=null;getItemsBefore(query,parserState,generics,")");skipWhitespace(parserState);if(isReturnArrow(parserState)){parserState.pos+=2;skipWhitespace(parserState);getFilteredNextElem(query,parserState,generics,isInGenerics);generics[generics.length-1].bindingName=makePrimitiveElement("output")}else{generics.push(makePrimitiveElement(null,{bindingName:makePrimitiveElement("output"),typeFilter:null,}))}parserState.typeFilter=typeFilter}if(isStringElem){skipWhitespace(parserState)}if(start>=end&&generics.length===0){return}if(parserState.userQuery[parserState.pos]==="="){if(parserState.isInBinding){throw["Cannot write ","="," twice in a binding"]}if(!isInGenerics){throw["Type parameter ","="," must be within generics list"]}const name=parserState.userQuery.slice(start,end).trim();if(name==="!"){throw["Type parameter ","="," key cannot be ","!"," never type"]}if(name.includes("!")){throw["Type parameter ","="," key cannot be ","!"," macro"]}if(name.includes("::")){throw["Type parameter ","="," key cannot contain ","::"," path"]}if(name.includes(":")){throw["Type parameter ","="," key cannot contain ",":"," type"]}parserState.isInBinding={name,generics}}else{elems.push(createQueryElement(query,parserState,parserState.userQuery.slice(start,end),generics,isInGenerics,),)}}}function getItemsBefore(query,parserState,elems,endChar){let foundStopChar=true;let foundSeparator=false;const oldTypeFilter=parserState.typeFilter;parserState.typeFilter=null;const oldIsInBinding=parserState.isInBinding;parserState.isInBinding=null;let hofParameters=null;let extra="";if(endChar===">"){extra="<"}else if(endChar==="]"){extra="["}else if(endChar===")"){extra="("}else if(endChar===""){extra="->"}else{extra=endChar}while(parserState.pos"," after ","="]}hofParameters=[...elems];elems.length=0;parserState.pos+=2;foundStopChar=true;foundSeparator=false;continue}else if(c===" "){parserState.pos+=1;continue}else if(isSeparatorCharacter(c)){parserState.pos+=1;foundStopChar=true;foundSeparator=true;continue}else if(c===":"&&isPathStart(parserState)){throw["Unexpected ","::",": paths cannot start with ","::"]}else if(isEndCharacter(c)){throw["Unexpected ",c," after ",extra]}if(!foundStopChar){let extra=[];if(isLastElemGeneric(query.elems,parserState)){extra=[" after ",">"]}else if(prevIs(parserState,"\"")){throw["Cannot have more than one element if you use quotes"]}if(endChar!==""){throw["Expected ",",",", ","=",", or ",endChar,...extra,", found ",c,]}throw["Expected ",","," or ","=",...extra,", found ",c,]}const posBefore=parserState.pos;getFilteredNextElem(query,parserState,elems,endChar!=="");if(endChar!==""&&parserState.pos>=parserState.length){throw["Unclosed ",extra]}if(posBefore===parserState.pos){parserState.pos+=1}foundStopChar=false}if(parserState.pos>=parserState.length&&endChar!==""){throw["Unclosed ",extra]}parserState.pos+=1;if(hofParameters){foundSeparator=false;if([...elems,...hofParameters].some(x=>x.bindingName)||parserState.isInBinding){throw["Unexpected ","="," within ","->"]}const hofElem=makePrimitiveElement("->",{generics:hofParameters,bindings:new Map([["output",[...elems]]]),typeFilter:null,});elems.length=0;elems[0]=hofElem}parserState.typeFilter=oldTypeFilter;parserState.isInBinding=oldIsInBinding;return{foundSeparator}}function checkExtraTypeFilterCharacters(start,parserState){const query=parserState.userQuery.slice(start,parserState.pos).trim();for(const c in query){if(!isIdentCharacter(query[c])){throw["Unexpected ",query[c]," in type filter (before ",":",")",]}}}function parseInput(query,parserState){let foundStopChar=true;while(parserState.pos"){if(isReturnArrow(parserState)){break}throw["Unexpected ",c," (did you mean ","->","?)"]}else if(parserState.pos>0){throw["Unexpected ",c," after ",parserState.userQuery[parserState.pos-1]]}throw["Unexpected ",c]}else if(c===" "){skipWhitespace(parserState);continue}if(!foundStopChar){let extra="";if(isLastElemGeneric(query.elems,parserState)){extra=[" after ",">"]}else if(prevIs(parserState,"\"")){throw["Cannot have more than one element if you use quotes"]}if(parserState.typeFilter!==null){throw["Expected ",","," or ","->",...extra,", found ",c,]}throw["Expected ",",",", ",":"," or ","->",...extra,", found ",c,]}const before=query.elems.length;getFilteredNextElem(query,parserState,query.elems,false);if(query.elems.length===before){parserState.pos+=1}foundStopChar=false}if(parserState.typeFilter!==null){throw["Unexpected ",":"," (expected path after type filter ",parserState.typeFilter+":",")",]}while(parserState.pos"]}break}else{parserState.pos+=1}}}function newParsedQuery(userQuery){return{original:userQuery,userQuery:userQuery.toLowerCase(),elems:[],returned:[],foundElems:0,totalElems:0,literalSearch:false,error:null,correction:null,proposeCorrectionFrom:null,proposeCorrectionTo:null,typeFingerprint:new Uint32Array(4),}}function buildUrl(search,filterCrates){let extra="?search="+encodeURIComponent(search);if(filterCrates!==null){extra+="&filter-crate="+encodeURIComponent(filterCrates)}return getNakedUrl()+extra+window.location.hash}function getFilterCrates(){const elem=document.getElementById("crate-search");if(elem&&elem.value!=="all crates"&&rawSearchIndex.has(elem.value)){return elem.value}return null}function parseQuery(userQuery){function convertTypeFilterOnElem(elem){if(elem.typeFilter!==null){let typeFilter=elem.typeFilter;if(typeFilter==="const"){typeFilter="constant"}elem.typeFilter=itemTypeFromName(typeFilter)}else{elem.typeFilter=NO_TYPE_FILTER}for(const elem2 of elem.generics){convertTypeFilterOnElem(elem2)}for(const constraints of elem.bindings.values()){for(const constraint of constraints){convertTypeFilterOnElem(constraint)}}}userQuery=userQuery.trim().replace(/\r|\n|\t/g," ");const parserState={length:userQuery.length,pos:0,totalElems:0,genericsElems:0,typeFilter:null,isInBinding:null,userQuery:userQuery.toLowerCase(),};let query=newParsedQuery(userQuery);try{parseInput(query,parserState);for(const elem of query.elems){convertTypeFilterOnElem(elem)}for(const elem of query.returned){convertTypeFilterOnElem(elem)}}catch(err){query=newParsedQuery(userQuery);query.error=err;return query}if(!query.literalSearch){query.literalSearch=parserState.totalElems>1}query.foundElems=query.elems.length+query.returned.length;query.totalElems=parserState.totalElems;return query}function createQueryResults(results_in_args,results_returned,results_others,parsedQuery){return{"in_args":results_in_args,"returned":results_returned,"others":results_others,"query":parsedQuery,}}async function execQuery(parsedQuery,filterCrates,currentCrate){const results_others=new Map(),results_in_args=new Map(),results_returned=new Map();function transformResults(results){const duplicates=new Set();const out=[];for(const result of results){if(result.id!==-1){const obj=searchIndex[result.id];obj.dist=result.dist;const res=buildHrefAndPath(obj);obj.displayPath=pathSplitter(res[0]);obj.fullPath=res[2]+"|"+obj.ty;if(duplicates.has(obj.fullPath)){continue}if(obj.ty===TY_IMPORT&&duplicates.has(res[2])){continue}if(duplicates.has(res[2]+"|"+TY_IMPORT)){continue}duplicates.add(obj.fullPath);duplicates.add(res[2]);obj.href=res[1];out.push(obj);if(out.length>=MAX_RESULTS){break}}}return out}async function sortResults(results,isType,preferredCrate){const userQuery=parsedQuery.userQuery;const result_list=[];for(const result of results.values()){result.item=searchIndex[result.id];result.word=searchIndex[result.id].word;result_list.push(result)}result_list.sort((aaa,bbb)=>{let a,b;a=(aaa.word!==userQuery);b=(bbb.word!==userQuery);if(a!==b){return a-b}a=(aaa.index<0);b=(bbb.index<0);if(a!==b){return a-b}a=aaa.path_dist;b=bbb.path_dist;if(a!==b){return a-b}a=aaa.index;b=bbb.index;if(a!==b){return a-b}a=(aaa.dist);b=(bbb.dist);if(a!==b){return a-b}a=searchIndexDeprecated.get(aaa.item.crate).contains(aaa.item.bitIndex);b=searchIndexDeprecated.get(bbb.item.crate).contains(bbb.item.bitIndex);if(a!==b){return a-b}a=(aaa.item.crate!==preferredCrate);b=(bbb.item.crate!==preferredCrate);if(a!==b){return a-b}a=aaa.word.length;b=bbb.word.length;if(a!==b){return a-b}a=aaa.word;b=bbb.word;if(a!==b){return(a>b?+1:-1)}a=searchIndexEmptyDesc.get(aaa.item.crate).contains(aaa.item.bitIndex);b=searchIndexEmptyDesc.get(bbb.item.crate).contains(bbb.item.bitIndex);if(a!==b){return a-b}a=aaa.item.ty;b=bbb.item.ty;if(a!==b){return a-b}a=aaa.item.path;b=bbb.item.path;if(a!==b){return(a>b?+1:-1)}return 0});return transformResults(result_list)}function unifyFunctionTypes(fnTypesIn,queryElems,whereClause,mgensIn,solutionCb,unboxingDepth,){if(unboxingDepth>=UNBOXING_LIMIT){return false}const mgens=mgensIn===null?null:new Map(mgensIn);if(queryElems.length===0){return!solutionCb||solutionCb(mgens)}if(!fnTypesIn||fnTypesIn.length===0){return false}const ql=queryElems.length;const fl=fnTypesIn.length;if(ql===1&&queryElems[0].generics.length===0&&queryElems[0].bindings.size===0){const queryElem=queryElems[0];for(const fnType of fnTypesIn){if(!unifyFunctionTypeIsMatchCandidate(fnType,queryElem,mgens)){continue}if(fnType.id<0&&queryElem.id<0){if(mgens&&mgens.has(fnType.id)&&mgens.get(fnType.id)!==queryElem.id){continue}const mgensScratch=new Map(mgens);mgensScratch.set(fnType.id,queryElem.id);if(!solutionCb||solutionCb(mgensScratch)){return true}}else if(!solutionCb||solutionCb(mgens?new Map(mgens):null)){return true}}for(const fnType of fnTypesIn){if(!unifyFunctionTypeIsUnboxCandidate(fnType,queryElem,whereClause,mgens,unboxingDepth+1,)){continue}if(fnType.id<0){if(mgens&&mgens.has(fnType.id)&&mgens.get(fnType.id)!==0){continue}const mgensScratch=new Map(mgens);mgensScratch.set(fnType.id,0);if(unifyFunctionTypes(whereClause[(-fnType.id)-1],queryElems,whereClause,mgensScratch,solutionCb,unboxingDepth+1,)){return true}}else if(unifyFunctionTypes([...fnType.generics,...Array.from(fnType.bindings.values()).flat()],queryElems,whereClause,mgens?new Map(mgens):null,solutionCb,unboxingDepth+1,)){return true}}return false}const fnTypes=fnTypesIn.slice();const flast=fl-1;const qlast=ql-1;const queryElem=queryElems[qlast];let queryElemsTmp=null;for(let i=flast;i>=0;i-=1){const fnType=fnTypes[i];if(!unifyFunctionTypeIsMatchCandidate(fnType,queryElem,mgens)){continue}let mgensScratch;if(fnType.id<0){mgensScratch=new Map(mgens);if(mgensScratch.has(fnType.id)&&mgensScratch.get(fnType.id)!==queryElem.id){continue}mgensScratch.set(fnType.id,queryElem.id)}else{mgensScratch=mgens}fnTypes[i]=fnTypes[flast];fnTypes.length=flast;if(!queryElemsTmp){queryElemsTmp=queryElems.slice(0,qlast)}const passesUnification=unifyFunctionTypes(fnTypes,queryElemsTmp,whereClause,mgensScratch,mgensScratch=>{if(fnType.generics.length===0&&queryElem.generics.length===0&&fnType.bindings.size===0&&queryElem.bindings.size===0){return!solutionCb||solutionCb(mgensScratch)}const solution=unifyFunctionTypeCheckBindings(fnType,queryElem,whereClause,mgensScratch,unboxingDepth,);if(!solution){return false}const simplifiedGenerics=solution.simplifiedGenerics;for(const simplifiedMgens of solution.mgens){const passesUnification=unifyFunctionTypes(simplifiedGenerics,queryElem.generics,whereClause,simplifiedMgens,solutionCb,unboxingDepth,);if(passesUnification){return true}}return false},unboxingDepth,);if(passesUnification){return true}fnTypes[flast]=fnTypes[i];fnTypes[i]=fnType;fnTypes.length=fl}for(let i=flast;i>=0;i-=1){const fnType=fnTypes[i];if(!unifyFunctionTypeIsUnboxCandidate(fnType,queryElem,whereClause,mgens,unboxingDepth+1,)){continue}let mgensScratch;if(fnType.id<0){mgensScratch=new Map(mgens);if(mgensScratch.has(fnType.id)&&mgensScratch.get(fnType.id)!==0){continue}mgensScratch.set(fnType.id,0)}else{mgensScratch=mgens}const generics=fnType.id<0?whereClause[(-fnType.id)-1]:fnType.generics;const bindings=fnType.bindings?Array.from(fnType.bindings.values()).flat():[];const passesUnification=unifyFunctionTypes(fnTypes.toSpliced(i,1,...generics,...bindings),queryElems,whereClause,mgensScratch,solutionCb,unboxingDepth+1,);if(passesUnification){return true}}return false}function unifyFunctionTypeIsMatchCandidate(fnType,queryElem,mgensIn){if(!typePassesFilter(queryElem.typeFilter,fnType.ty)){return false}if(fnType.id<0&&queryElem.id<0){if(mgensIn){if(mgensIn.has(fnType.id)&&mgensIn.get(fnType.id)!==queryElem.id){return false}for(const[fid,qid]of mgensIn.entries()){if(fnType.id!==fid&&queryElem.id===qid){return false}if(fnType.id===fid&&queryElem.id!==qid){return false}}}return true}else{if(queryElem.id===typeNameIdOfArrayOrSlice&&(fnType.id===typeNameIdOfSlice||fnType.id===typeNameIdOfArray)){}else if(queryElem.id===typeNameIdOfTupleOrUnit&&(fnType.id===typeNameIdOfTuple||fnType.id===typeNameIdOfUnit)){}else if(queryElem.id===typeNameIdOfHof&&(fnType.id===typeNameIdOfFn||fnType.id===typeNameIdOfFnMut||fnType.id===typeNameIdOfFnOnce)){}else if(fnType.id!==queryElem.id||queryElem.id===null){return false}if((fnType.generics.length+fnType.bindings.size)===0&&queryElem.generics.length!==0){return false}if(fnType.bindings.size0){const fnTypePath=fnType.path!==undefined&&fnType.path!==null?fnType.path.split("::"):[];if(queryElemPathLength>fnTypePath.length){return false}let i=0;for(const path of fnTypePath){if(path===queryElem.pathWithoutLast[i]){i+=1;if(i>=queryElemPathLength){break}}}if(i0){let mgensSolutionSet=[mgensIn];for(const[name,constraints]of queryElem.bindings.entries()){if(mgensSolutionSet.length===0){return false}if(!fnType.bindings.has(name)){return false}const fnTypeBindings=fnType.bindings.get(name);mgensSolutionSet=mgensSolutionSet.flatMap(mgens=>{const newSolutions=[];unifyFunctionTypes(fnTypeBindings,constraints,whereClause,mgens,newMgens=>{newSolutions.push(newMgens);return false},unboxingDepth,);return newSolutions})}if(mgensSolutionSet.length===0){return false}const binds=Array.from(fnType.bindings.entries()).flatMap(entry=>{const[name,constraints]=entry;if(queryElem.bindings.has(name)){return[]}else{return constraints}});if(simplifiedGenerics.length>0){simplifiedGenerics=[...simplifiedGenerics,...binds]}else{simplifiedGenerics=binds}return{simplifiedGenerics,mgens:mgensSolutionSet}}return{simplifiedGenerics,mgens:[mgensIn]}}function unifyFunctionTypeIsUnboxCandidate(fnType,queryElem,whereClause,mgens,unboxingDepth,){if(unboxingDepth>=UNBOXING_LIMIT){return false}if(fnType.id<0&&queryElem.id>=0){if(!whereClause){return false}if(mgens&&mgens.has(fnType.id)&&mgens.get(fnType.id)!==0){return false}const mgensTmp=new Map(mgens);mgensTmp.set(fnType.id,null);return checkIfInList(whereClause[(-fnType.id)-1],queryElem,whereClause,mgensTmp,unboxingDepth,)}else if(fnType.generics.length>0||fnType.bindings.size>0){const simplifiedGenerics=[...fnType.generics,...Array.from(fnType.bindings.values()).flat(),];return checkIfInList(simplifiedGenerics,queryElem,whereClause,mgens,unboxingDepth,)}return false}function checkIfInList(list,elem,whereClause,mgens,unboxingDepth){for(const entry of list){if(checkType(entry,elem,whereClause,mgens,unboxingDepth)){return true}}return false}function checkType(row,elem,whereClause,mgens,unboxingDepth){if(unboxingDepth>=UNBOXING_LIMIT){return false}if(row.bindings.size===0&&elem.bindings.size===0){if(elem.id<0&&mgens===null){return row.id<0||checkIfInList(row.generics,elem,whereClause,mgens,unboxingDepth+1,)}if(row.id>0&&elem.id>0&&elem.pathWithoutLast.length===0&&typePassesFilter(elem.typeFilter,row.ty)&&elem.generics.length===0&&elem.id!==typeNameIdOfArrayOrSlice&&elem.id!==typeNameIdOfTupleOrUnit&&elem.id!==typeNameIdOfHof){return row.id===elem.id||checkIfInList(row.generics,elem,whereClause,mgens,unboxingDepth,)}}return unifyFunctionTypes([row],[elem],whereClause,mgens,null,unboxingDepth)}function checkPath(contains,ty){if(contains.length===0){return 0}const maxPathEditDistance=Math.floor(contains.reduce((acc,next)=>acc+next.length,0)/3,);let ret_dist=maxPathEditDistance+1;const path=ty.path.split("::");if(ty.parent&&ty.parent.name){path.push(ty.parent.name.toLowerCase())}const length=path.length;const clength=contains.length;pathiter:for(let i=length-clength;i>=0;i-=1){let dist_total=0;for(let x=0;xmaxPathEditDistance){continue pathiter}dist_total+=dist}}ret_dist=Math.min(ret_dist,Math.round(dist_total/clength))}return ret_dist>maxPathEditDistance?null:ret_dist}function typePassesFilter(filter,type){if(filter<=NO_TYPE_FILTER||filter===type)return true;const name=itemTypes[type];switch(itemTypes[filter]){case"constant":return name==="associatedconstant";case"fn":return name==="method"||name==="tymethod";case"type":return name==="primitive"||name==="associatedtype";case"trait":return name==="traitalias"}return false}function createAliasFromItem(item){return{crate:item.crate,name:item.name,path:item.path,descShard:item.descShard,descIndex:item.descIndex,exactPath:item.exactPath,ty:item.ty,parent:item.parent,type:item.type,is_alias:true,bitIndex:item.bitIndex,implDisambiguator:item.implDisambiguator,}}function handleAliases(ret,query,filterCrates,currentCrate){const lowerQuery=query.toLowerCase();const aliases=[];const crateAliases=[];if(filterCrates!==null){if(ALIASES.has(filterCrates)&&ALIASES.get(filterCrates).has(lowerQuery)){const query_aliases=ALIASES.get(filterCrates).get(lowerQuery);for(const alias of query_aliases){aliases.push(createAliasFromItem(searchIndex[alias]))}}}else{for(const[crate,crateAliasesIndex]of ALIASES){if(crateAliasesIndex.has(lowerQuery)){const pushTo=crate===currentCrate?crateAliases:aliases;const query_aliases=crateAliasesIndex.get(lowerQuery);for(const alias of query_aliases){pushTo.push(createAliasFromItem(searchIndex[alias]))}}}}const sortFunc=(aaa,bbb)=>{if(aaa.path{alias.alias=query;const res=buildHrefAndPath(alias);alias.displayPath=pathSplitter(res[0]);alias.fullPath=alias.displayPath+alias.name;alias.href=res[1];ret.others.unshift(alias);if(ret.others.length>MAX_RESULTS){ret.others.pop()}};aliases.forEach(pushFunc);crateAliases.forEach(pushFunc)}function addIntoResults(results,fullId,id,index,dist,path_dist,maxEditDistance){if(dist<=maxEditDistance||index!==-1){if(results.has(fullId)){const result=results.get(fullId);if(result.dontValidate||result.dist<=dist){return}}results.set(fullId,{id:id,index:index,dontValidate:parsedQuery.literalSearch,dist:dist,path_dist:path_dist,})}}function handleSingleArg(row,pos,elem,results_others,results_in_args,results_returned,maxEditDistance,){if(!row||(filterCrates!==null&&row.crate!==filterCrates)){return}let path_dist=0;const fullId=row.id;const tfpDist=compareTypeFingerprints(fullId,parsedQuery.typeFingerprint,);if(tfpDist!==null){const in_args=row.type&&row.type.inputs&&checkIfInList(row.type.inputs,elem,row.type.where_clause,null,0);const returned=row.type&&row.type.output&&checkIfInList(row.type.output,elem,row.type.where_clause,null,0);if(in_args){results_in_args.max_dist=Math.max(results_in_args.max_dist||0,tfpDist);const maxDist=results_in_args.sizenormalizedIndex&&normalizedIndex!==-1)){index=normalizedIndex}if(elem.fullPath.length>1){path_dist=checkPath(elem.pathWithoutLast,row);if(path_dist===null){return}}if(parsedQuery.literalSearch){if(row.word===elem.pathLast){addIntoResults(results_others,fullId,pos,index,0,path_dist)}return}const dist=editDistance(row.normalizedName,elem.normalizedPathLast,maxEditDistance);if(index===-1&&dist>maxEditDistance){return}addIntoResults(results_others,fullId,pos,index,dist,path_dist,maxEditDistance)}function handleArgs(row,pos,results){if(!row||(filterCrates!==null&&row.crate!==filterCrates)||!row.type){return}const tfpDist=compareTypeFingerprints(row.id,parsedQuery.typeFingerprint,);if(tfpDist===null){return}if(results.size>=MAX_RESULTS&&tfpDist>results.max_dist){return}if(!unifyFunctionTypes(row.type.inputs,parsedQuery.elems,row.type.where_clause,null,mgens=>{return unifyFunctionTypes(row.type.output,parsedQuery.returned,row.type.where_clause,mgens,null,0,)},0,)){return}results.max_dist=Math.max(results.max_dist||0,tfpDist);addIntoResults(results,row.id,pos,0,tfpDist,0,Number.MAX_VALUE)}function innerRunQuery(){const queryLen=parsedQuery.elems.reduce((acc,next)=>acc+next.pathLast.length,0)+parsedQuery.returned.reduce((acc,next)=>acc+next.pathLast.length,0);const maxEditDistance=Math.floor(queryLen/3);const genericSymbols=new Map();function convertNameToId(elem,isAssocType){if(typeNameIdMap.has(elem.normalizedPathLast)&&(isAssocType||!typeNameIdMap.get(elem.normalizedPathLast).assocOnly)){elem.id=typeNameIdMap.get(elem.normalizedPathLast).id}else if(!parsedQuery.literalSearch){let match=null;let matchDist=maxEditDistance+1;let matchName="";for(const[name,{id,assocOnly}]of typeNameIdMap){const dist=editDistance(name,elem.normalizedPathLast,maxEditDistance);if(dist<=matchDist&&dist<=maxEditDistance&&(isAssocType||!assocOnly)){if(dist===matchDist&&matchName>name){continue}match=id;matchDist=dist;matchName=name}}if(match!==null){parsedQuery.correction=matchName}elem.id=match}if((elem.id===null&&parsedQuery.totalElems>1&&elem.typeFilter===-1&&elem.generics.length===0&&elem.bindings.size===0)||elem.typeFilter===TY_GENERIC){if(genericSymbols.has(elem.name)){elem.id=genericSymbols.get(elem.name)}else{elem.id=-(genericSymbols.size+1);genericSymbols.set(elem.name,elem.id)}if(elem.typeFilter===-1&&elem.name.length>=3){const maxPartDistance=Math.floor(elem.name.length/3);let matchDist=maxPartDistance+1;let matchName="";for(const name of typeNameIdMap.keys()){const dist=editDistance(name,elem.name,maxPartDistance);if(dist<=matchDist&&dist<=maxPartDistance){if(dist===matchDist&&matchName>name){continue}matchDist=dist;matchName=name}}if(matchName!==""){parsedQuery.proposeCorrectionFrom=elem.name;parsedQuery.proposeCorrectionTo=matchName}}elem.typeFilter=TY_GENERIC}if(elem.generics.length>0&&elem.typeFilter===TY_GENERIC){parsedQuery.error=["Generic type parameter ",elem.name," does not accept generic parameters",]}for(const elem2 of elem.generics){convertNameToId(elem2)}elem.bindings=new Map(Array.from(elem.bindings.entries()).map(entry=>{const[name,constraints]=entry;if(!typeNameIdMap.has(name)){parsedQuery.error=["Type parameter ",name," does not exist",];return[null,[]]}for(const elem2 of constraints){convertNameToId(elem2)}return[typeNameIdMap.get(name).id,constraints]}),)}const fps=new Set();for(const elem of parsedQuery.elems){convertNameToId(elem);buildFunctionTypeFingerprint(elem,parsedQuery.typeFingerprint,fps)}for(const elem of parsedQuery.returned){convertNameToId(elem);buildFunctionTypeFingerprint(elem,parsedQuery.typeFingerprint,fps)}if(parsedQuery.foundElems===1&&parsedQuery.returned.length===0){if(parsedQuery.elems.length===1){const elem=parsedQuery.elems[0];for(let i=0,nSearchIndex=searchIndex.length;i0){const sortQ=(a,b)=>{const ag=a.generics.length===0&&a.bindings.size===0;const bg=b.generics.length===0&&b.bindings.size===0;if(ag!==bg){return ag-bg}const ai=a.id>0;const bi=b.id>0;return ai-bi};parsedQuery.elems.sort(sortQ);parsedQuery.returned.sort(sortQ);for(let i=0,nSearchIndex=searchIndex.length;i{const descs=await Promise.all(list.map(result=>{return searchIndexEmptyDesc.get(result.crate).contains(result.bitIndex)?"":searchState.loadDesc(result)}));for(const[i,result]of list.entries()){result.desc=descs[i]}}));if(parsedQuery.error!==null&&ret.others.length!==0){ret.query.error=null}return ret}function nextTab(direction){const next=(searchState.currentTab+direction+3)%searchState.focusedByTab.length;searchState.focusedByTab[searchState.currentTab]=document.activeElement;printTab(next);focusSearchResult()}function focusSearchResult(){const target=searchState.focusedByTab[searchState.currentTab]||document.querySelectorAll(".search-results.active a").item(0)||document.querySelectorAll("#search-tabs button").item(searchState.currentTab);searchState.focusedByTab[searchState.currentTab]=null;if(target){target.focus()}}function buildHrefAndPath(item){let displayPath;let href;const type=itemTypes[item.ty];const name=item.name;let path=item.path;let exactPath=item.exactPath;if(type==="mod"){displayPath=path+"::";href=ROOT_PATH+path.replace(/::/g,"/")+"/"+name+"/index.html"}else if(type==="import"){displayPath=item.path+"::";href=ROOT_PATH+item.path.replace(/::/g,"/")+"/index.html#reexport."+name}else if(type==="primitive"||type==="keyword"){displayPath="";href=ROOT_PATH+path.replace(/::/g,"/")+"/"+type+"."+name+".html"}else if(type==="externcrate"){displayPath="";href=ROOT_PATH+name+"/index.html"}else if(item.parent!==undefined){const myparent=item.parent;let anchor=type+"."+name;const parentType=itemTypes[myparent.ty];let pageType=parentType;let pageName=myparent.name;exactPath=`${myparent.exactPath}::${myparent.name}`;if(parentType==="primitive"){displayPath=myparent.name+"::"}else if(type==="structfield"&&parentType==="variant"){const enumNameIdx=item.path.lastIndexOf("::");const enumName=item.path.substr(enumNameIdx+2);path=item.path.substr(0,enumNameIdx);displayPath=path+"::"+enumName+"::"+myparent.name+"::";anchor="variant."+myparent.name+".field."+name;pageType="enum";pageName=enumName}else{displayPath=path+"::"+myparent.name+"::"}if(item.implDisambiguator!==null){anchor=item.implDisambiguator+"/"+anchor}href=ROOT_PATH+path.replace(/::/g,"/")+"/"+pageType+"."+pageName+".html#"+anchor}else{displayPath=item.path+"::";href=ROOT_PATH+item.path.replace(/::/g,"/")+"/"+type+"."+name+".html"}return[displayPath,href,`${exactPath}::${name}`]}function pathSplitter(path){const tmp=""+path.replace(/::/g,"::");if(tmp.endsWith("")){return tmp.slice(0,tmp.length-6)}return tmp}async function addTab(array,query,display){const extraClass=display?" active":"";const output=document.createElement("div");if(array.length>0){output.className="search-results "+extraClass;for(const item of array){const name=item.name;const type=itemTypes[item.ty];const longType=longItemTypes[item.ty];const typeName=longType.length!==0?`${longType}`:"?";const link=document.createElement("a");link.className="result-"+type;link.href=item.href;const resultName=document.createElement("div");resultName.className="result-name";resultName.insertAdjacentHTML("beforeend",`${typeName}`);link.appendChild(resultName);let alias=" ";if(item.is_alias){alias=`
\ +${item.alias} - see \ +
`}resultName.insertAdjacentHTML("beforeend",`
${alias}\ +${item.displayPath}${name}\ +
`);const description=document.createElement("div");description.className="desc";description.insertAdjacentHTML("beforeend",item.desc);link.appendChild(description);output.appendChild(link)}}else if(query.error===null){output.className="search-failed"+extraClass;output.innerHTML="No results :(
"+"Try on DuckDuckGo?

"+"Or try looking in one of these:"}return[output,array.length]}function makeTabHeader(tabNb,text,nbElems){const fmtNbElems=nbElems<10?`\u{2007}(${nbElems})\u{2007}\u{2007}`:nbElems<100?`\u{2007}(${nbElems})\u{2007}`:`\u{2007}(${nbElems})`;if(searchState.currentTab===tabNb){return""}return""}async function showResults(results,go_to_first,filterCrates){const search=searchState.outputElement();if(go_to_first||(results.others.length===1&&getSettingValue("go-to-only-result")==="true")){window.onunload=()=>{};searchState.removeQueryParameters();const elem=document.createElement("a");elem.href=results.others[0].href;removeClass(elem,"active");document.body.appendChild(elem);elem.click();return}if(results.query===undefined){results.query=parseQuery(searchState.input.value)}currentResults=results.query.userQuery;const[ret_others,ret_in_args,ret_returned]=await Promise.all([addTab(results.others,results.query,true),addTab(results.in_args,results.query,false),addTab(results.returned,results.query,false),]);let currentTab=searchState.currentTab;if((currentTab===0&&ret_others[1]===0)||(currentTab===1&&ret_in_args[1]===0)||(currentTab===2&&ret_returned[1]===0)){if(ret_others[1]!==0){currentTab=0}else if(ret_in_args[1]!==0){currentTab=1}else if(ret_returned[1]!==0){currentTab=2}}let crates="";if(rawSearchIndex.size>1){crates=" in 
"}let output=`

Results${crates}

`;if(results.query.error!==null){const error=results.query.error;error.forEach((value,index)=>{value=value.split("<").join("<").split(">").join(">");if(index%2!==0){error[index]=`${value.replaceAll(" ", " ")}`}else{error[index]=value}});output+=`

Query parser error: "${error.join("")}".

`;output+="
"+makeTabHeader(0,"In Names",ret_others[1])+"
";currentTab=0}else if(results.query.foundElems<=1&&results.query.returned.length===0){output+="
"+makeTabHeader(0,"In Names",ret_others[1])+makeTabHeader(1,"In Parameters",ret_in_args[1])+makeTabHeader(2,"In Return Types",ret_returned[1])+"
"}else{const signatureTabTitle=results.query.elems.length===0?"In Function Return Types":results.query.returned.length===0?"In Function Parameters":"In Function Signatures";output+="
"+makeTabHeader(0,signatureTabTitle,ret_others[1])+"
";currentTab=0}if(results.query.correction!==null){const orig=results.query.returned.length>0?results.query.returned[0].name:results.query.elems[0].name;output+="

"+`Type "${orig}" not found. `+"Showing results for closest type name "+`"${results.query.correction}" instead.

`}if(results.query.proposeCorrectionFrom!==null){const orig=results.query.proposeCorrectionFrom;const targ=results.query.proposeCorrectionTo;output+="

"+`Type "${orig}" not found and used as generic parameter. `+`Consider searching for "${targ}" instead.

`}const resultsElem=document.createElement("div");resultsElem.id="results";resultsElem.appendChild(ret_others[0]);resultsElem.appendChild(ret_in_args[0]);resultsElem.appendChild(ret_returned[0]);search.innerHTML=output;const crateSearch=document.getElementById("crate-search");if(crateSearch){crateSearch.addEventListener("input",updateCrate)}search.appendChild(resultsElem);searchState.showResults(search);const elems=document.getElementById("search-tabs").childNodes;searchState.focusedByTab=[];let i=0;for(const elem of elems){const j=i;elem.onclick=()=>printTab(j);searchState.focusedByTab.push(null);i+=1}printTab(currentTab)}function updateSearchHistory(url){if(!browserSupportsHistoryApi()){return}const params=searchState.getQueryStringParams();if(!history.state&&!params.search){history.pushState(null,"",url)}else{history.replaceState(null,"",url)}}async function search(forced){const query=parseQuery(searchState.input.value.trim());let filterCrates=getFilterCrates();if(!forced&&query.userQuery===currentResults){if(query.userQuery.length>0){putBackSearch()}return}searchState.setLoadingSearch();const params=searchState.getQueryStringParams();if(filterCrates===null&¶ms["filter-crate"]!==undefined){filterCrates=params["filter-crate"]}searchState.title="Results for "+query.original+" - Rust";updateSearchHistory(buildUrl(query.original,filterCrates));await showResults(await execQuery(query,filterCrates,window.currentCrate),params.go_to_first,filterCrates)}function buildItemSearchTypeAll(types,lowercasePaths){return types.length>0?types.map(type=>buildItemSearchType(type,lowercasePaths)):EMPTY_GENERICS_ARRAY}const EMPTY_BINDINGS_MAP=new Map();const EMPTY_GENERICS_ARRAY=[];let TYPES_POOL=new Map();function buildItemSearchType(type,lowercasePaths,isAssocType){const PATH_INDEX_DATA=0;const GENERICS_DATA=1;const BINDINGS_DATA=2;let pathIndex,generics,bindings;if(typeof type==="number"){pathIndex=type;generics=EMPTY_GENERICS_ARRAY;bindings=EMPTY_BINDINGS_MAP}else{pathIndex=type[PATH_INDEX_DATA];generics=buildItemSearchTypeAll(type[GENERICS_DATA],lowercasePaths,);if(type.length>BINDINGS_DATA&&type[BINDINGS_DATA].length>0){bindings=new Map(type[BINDINGS_DATA].map(binding=>{const[assocType,constraints]=binding;return[buildItemSearchType(assocType,lowercasePaths,true).id,buildItemSearchTypeAll(constraints,lowercasePaths),]}))}else{bindings=EMPTY_BINDINGS_MAP}}let result;if(pathIndex<0){result={id:pathIndex,ty:TY_GENERIC,path:null,exactPath:null,generics,bindings,}}else if(pathIndex===0){result={id:null,ty:null,path:null,exactPath:null,generics,bindings,}}else{const item=lowercasePaths[pathIndex-1];result={id:buildTypeMapIndex(item.name,isAssocType),ty:item.ty,path:item.path,exactPath:item.exactPath,generics,bindings,}}const cr=TYPES_POOL.get(result.id);if(cr){if(cr.generics.length===result.generics.length&&cr.generics!==result.generics&&cr.generics.every((x,i)=>result.generics[i]===x)){result.generics=cr.generics}if(cr.bindings.size===result.bindings.size&&cr.bindings!==result.bindings){let ok=true;for(const[k,v]of cr.bindings.entries()){const v2=result.bindings.get(v);if(!v2){ok=false;break}if(v!==v2&&v.length===v2.length&&v.every((x,i)=>v2[i]===x)){result.bindings.set(k,v)}else if(v!==v2){ok=false;break}}if(ok){result.bindings=cr.bindings}}if(cr.ty===result.ty&&cr.path===result.path&&cr.bindings===result.bindings&&cr.generics===result.generics&&cr.ty===result.ty){return cr}}TYPES_POOL.set(result.id,result);return result}function buildFunctionSearchTypeCallback(lowercasePaths){return functionSearchType=>{if(functionSearchType===0){return null}const INPUTS_DATA=0;const OUTPUT_DATA=1;let inputs,output;if(typeof functionSearchType[INPUTS_DATA]==="number"){inputs=[buildItemSearchType(functionSearchType[INPUTS_DATA],lowercasePaths)]}else{inputs=buildItemSearchTypeAll(functionSearchType[INPUTS_DATA],lowercasePaths,)}if(functionSearchType.length>1){if(typeof functionSearchType[OUTPUT_DATA]==="number"){output=[buildItemSearchType(functionSearchType[OUTPUT_DATA],lowercasePaths)]}else{output=buildItemSearchTypeAll(functionSearchType[OUTPUT_DATA],lowercasePaths,)}}else{output=[]}const where_clause=[];const l=functionSearchType.length;for(let i=2;i{k=(~~k+0x7ed55d16)+(k<<12);k=(k ^ 0xc761c23c)^(k>>>19);k=(~~k+0x165667b1)+(k<<5);k=(~~k+0xd3a2646c)^(k<<9);k=(~~k+0xfd7046c5)+(k<<3);return(k ^ 0xb55a4f09)^(k>>>16)};const hashint2=k=>{k=~k+(k<<15);k ^=k>>>12;k+=k<<2;k ^=k>>>4;k=Math.imul(k,2057);return k ^(k>>16)};if(input!==null){const h0a=hashint1(input);const h0b=hashint2(input);const h1a=~~(h0a+Math.imul(h0b,2));const h1b=~~(h0a+Math.imul(h0b,3));const h2a=~~(h0a+Math.imul(h0b,4));const h2b=~~(h0a+Math.imul(h0b,5));output[0]|=(1<<(h0a%32))|(1<<(h1b%32));output[1]|=(1<<(h1a%32))|(1<<(h2b%32));output[2]|=(1<<(h2a%32))|(1<<(h0b%32));fps.add(input)}for(const g of type.generics){buildFunctionTypeFingerprint(g,output,fps)}const fb={id:null,ty:0,generics:EMPTY_GENERICS_ARRAY,bindings:EMPTY_BINDINGS_MAP,};for(const[k,v]of type.bindings.entries()){fb.id=k;fb.generics=v;buildFunctionTypeFingerprint(fb,output,fps)}output[3]=fps.size}function compareTypeFingerprints(fullId,queryFingerprint){const fh0=functionTypeFingerprint[fullId*4];const fh1=functionTypeFingerprint[(fullId*4)+1];const fh2=functionTypeFingerprint[(fullId*4)+2];const[qh0,qh1,qh2]=queryFingerprint;const[in0,in1,in2]=[fh0&qh0,fh1&qh1,fh2&qh2];if((in0 ^ qh0)||(in1 ^ qh1)||(in2 ^ qh2)){return null}return functionTypeFingerprint[(fullId*4)+3]}class VlqHexDecoder{constructor(string,cons){this.string=string;this.cons=cons;this.offset=0;this.backrefQueue=[]}decodeList(){const cb="}".charCodeAt(0);let c=this.string.charCodeAt(this.offset);const ret=[];while(c!==cb){ret.push(this.decode());c=this.string.charCodeAt(this.offset)}this.offset+=1;return ret}decode(){const[ob,la]=["{","`"].map(c=>c.charCodeAt(0));let n=0;let c=this.string.charCodeAt(this.offset);if(c===ob){this.offset+=1;return this.decodeList()}while(c>1];this.offset+=1;return sign?-value:value}next(){const c=this.string.charCodeAt(this.offset);const[zero,ua,la]=["0","@","`"].map(c=>c.charCodeAt(0));if(c>=zero&&c16){this.backrefQueue.pop()}return result}}class RoaringBitmap{constructor(str){const strdecoded=atob(str);const u8array=new Uint8Array(strdecoded.length);for(let j=0;j=4){offsets=[];for(let j=0;j>3]&(1<<(j&0x7))){const runcount=(u8array[i]|(u8array[i+1]<<8));i+=2;this.containers.push(new RoaringBitmapRun(runcount,u8array.slice(i,i+(runcount*4)),));i+=runcount*4}else if(this.cardinalities[j]>=4096){this.containers.push(new RoaringBitmapBits(u8array.slice(i,i+8192)));i+=8192}else{const end=this.cardinalities[j]*2;this.containers.push(new RoaringBitmapArray(this.cardinalities[j],u8array.slice(i,i+end),));i+=end}}}contains(keyvalue){const key=keyvalue>>16;const value=keyvalue&0xFFFF;for(let i=0;i=start&&value<=(start+lenm1)){return true}}return false}}class RoaringBitmapArray{constructor(cardinality,array){this.cardinality=cardinality;this.array=array}contains(value){const l=this.cardinality*2;for(let i=0;i>3]&(1<<(value&7)))}}function buildIndex(rawSearchIndex){searchIndex=[];searchIndexDeprecated=new Map();searchIndexEmptyDesc=new Map();const charA="A".charCodeAt(0);let currentIndex=0;let id=0;for(const crate of rawSearchIndex.values()){id+=crate.t.length+1}functionTypeFingerprint=new Uint32Array((id+1)*4);id=0;for(const[crate,crateCorpus]of rawSearchIndex){const itemDescShardDecoder=new VlqHexDecoder(crateCorpus.D,noop=>noop);let descShard={crate,shard:0,start:0,len:itemDescShardDecoder.next(),promise:null,resolve:null,};const descShardList=[descShard];searchIndexDeprecated.set(crate,new RoaringBitmap(crateCorpus.c));searchIndexEmptyDesc.set(crate,new RoaringBitmap(crateCorpus.e));let descIndex=0;const crateRow={crate,ty:3,name:crate,path:"",descShard,descIndex,exactPath:"",desc:crateCorpus.doc,parent:undefined,type:null,id,word:crate,normalizedName:crate.indexOf("_")===-1?crate:crate.replace(/_/g,""),bitIndex:0,implDisambiguator:null,};id+=1;searchIndex.push(crateRow);currentIndex+=1;if(!searchIndexEmptyDesc.get(crate).contains(0)){descIndex+=1}const itemTypes=crateCorpus.t;const itemNames=crateCorpus.n;const itemPaths=new Map(crateCorpus.q);const itemReexports=new Map(crateCorpus.r);const itemParentIdxs=crateCorpus.i;const implDisambiguator=new Map(crateCorpus.b);const paths=crateCorpus.p;const aliases=crateCorpus.a;const lowercasePaths=[];const itemFunctionDecoder=new VlqHexDecoder(crateCorpus.f,buildFunctionSearchTypeCallback(lowercasePaths),);let len=paths.length;let lastPath=itemPaths.get(0);for(let i=0;i2){path=itemPaths.has(elem[2])?itemPaths.get(elem[2]):lastPath;lastPath=path}const exactPath=elem.length>3?itemPaths.get(elem[3]):path;lowercasePaths.push({ty,name:name.toLowerCase(),path,exactPath});paths[i]={ty,name,path,exactPath}}lastPath="";len=itemTypes.length;for(let i=0;i=descShard.len&&!searchIndexEmptyDesc.get(crate).contains(bitIndex)){descShard={crate,shard:descShard.shard+1,start:descShard.start+descShard.len,len:itemDescShardDecoder.next(),promise:null,resolve:null,};descIndex=0;descShardList.push(descShard)}let word="";if(typeof itemNames[i]==="string"){word=itemNames[i].toLowerCase()}const path=itemPaths.has(i)?itemPaths.get(i):lastPath;const type=itemFunctionDecoder.next();if(type!==null){if(type){const fp=functionTypeFingerprint.subarray(id*4,(id+1)*4);const fps=new Set();for(const t of type.inputs){buildFunctionTypeFingerprint(t,fp,fps)}for(const t of type.output){buildFunctionTypeFingerprint(t,fp,fps)}for(const w of type.where_clause){for(const t of w){buildFunctionTypeFingerprint(t,fp,fps)}}}}const row={crate,ty:itemTypes.charCodeAt(i)-charA,name:itemNames[i],path,descShard,descIndex,exactPath:itemReexports.has(i)?itemPaths.get(itemReexports.get(i)):path,parent:itemParentIdxs[i]>0?paths[itemParentIdxs[i]-1]:undefined,type,id,word,normalizedName:word.indexOf("_")===-1?word:word.replace(/_/g,""),bitIndex,implDisambiguator:implDisambiguator.has(i)?implDisambiguator.get(i):null,};id+=1;searchIndex.push(row);lastPath=row.path;if(!searchIndexEmptyDesc.get(crate).contains(bitIndex)){descIndex+=1}}if(aliases){const currentCrateAliases=new Map();ALIASES.set(crate,currentCrateAliases);for(const alias_name in aliases){if(!Object.prototype.hasOwnProperty.call(aliases,alias_name)){continue}let currentNameAliases;if(currentCrateAliases.has(alias_name)){currentNameAliases=currentCrateAliases.get(alias_name)}else{currentNameAliases=[];currentCrateAliases.set(alias_name,currentNameAliases)}for(const local_alias of aliases[alias_name]){currentNameAliases.push(local_alias+currentIndex)}}}currentIndex+=itemTypes.length;searchState.descShards.set(crate,descShardList)}TYPES_POOL=new Map()}function onSearchSubmit(e){e.preventDefault();searchState.clearInputTimeout();search()}function putBackSearch(){const search_input=searchState.input;if(!searchState.input){return}if(search_input.value!==""&&!searchState.isDisplayed()){searchState.showResults();if(browserSupportsHistoryApi()){history.replaceState(null,"",buildUrl(search_input.value,getFilterCrates()))}document.title=searchState.title}}function registerSearchEvents(){const params=searchState.getQueryStringParams();if(searchState.input.value===""){searchState.input.value=params.search||""}const searchAfter500ms=()=>{searchState.clearInputTimeout();if(searchState.input.value.length===0){searchState.hideResults()}else{searchState.timeout=setTimeout(search,500)}};searchState.input.onkeyup=searchAfter500ms;searchState.input.oninput=searchAfter500ms;document.getElementsByClassName("search-form")[0].onsubmit=onSearchSubmit;searchState.input.onchange=e=>{if(e.target!==document.activeElement){return}searchState.clearInputTimeout();setTimeout(search,0)};searchState.input.onpaste=searchState.input.onchange;searchState.outputElement().addEventListener("keydown",e=>{if(e.altKey||e.ctrlKey||e.shiftKey||e.metaKey){return}if(e.which===38){const previous=document.activeElement.previousElementSibling;if(previous){previous.focus()}else{searchState.focus()}e.preventDefault()}else if(e.which===40){const next=document.activeElement.nextElementSibling;if(next){next.focus()}const rect=document.activeElement.getBoundingClientRect();if(window.innerHeight-rect.bottom{if(e.which===40){focusSearchResult();e.preventDefault()}});searchState.input.addEventListener("focus",()=>{putBackSearch()});searchState.input.addEventListener("blur",()=>{searchState.input.placeholder=searchState.input.origPlaceholder});if(browserSupportsHistoryApi()){const previousTitle=document.title;window.addEventListener("popstate",e=>{const params=searchState.getQueryStringParams();document.title=previousTitle;currentResults=null;if(params.search&¶ms.search.length>0){searchState.input.value=params.search;e.preventDefault();search()}else{searchState.input.value="";searchState.hideResults()}})}window.onpageshow=()=>{const qSearch=searchState.getQueryStringParams().search;if(searchState.input.value===""&&qSearch){searchState.input.value=qSearch}search()}}function updateCrate(ev){if(ev.target.value==="all crates"){const query=searchState.input.value.trim();updateSearchHistory(buildUrl(query,null))}currentResults=null;search(true)}buildIndex(rawSearchIndex);if(typeof window!=="undefined"){registerSearchEvents();if(window.searchState.getQueryStringParams().search){search()}}if(typeof exports!=="undefined"){exports.initSearch=initSearch;exports.execQuery=execQuery;exports.parseQuery=parseQuery}}if(typeof window!=="undefined"){window.initSearch=initSearch;if(window.searchIndex!==undefined){initSearch(window.searchIndex)}}else{initSearch(new Map())}})() \ No newline at end of file diff --git a/api-rust/static.files/storage-118b08c4c78b968e.js b/api-rust/static.files/storage-118b08c4c78b968e.js new file mode 100644 index 000000000..981894677 --- /dev/null +++ b/api-rust/static.files/storage-118b08c4c78b968e.js @@ -0,0 +1,24 @@ +"use strict";const builtinThemes=["light","dark","ayu"];const darkThemes=["dark","ayu"];window.currentTheme=document.getElementById("themeStyle");const settingsDataset=(function(){const settingsElement=document.getElementById("default-settings");return settingsElement&&settingsElement.dataset?settingsElement.dataset:null})();function getSettingValue(settingName){const current=getCurrentValue(settingName);if(current===null&&settingsDataset!==null){const def=settingsDataset[settingName.replace(/-/g,"_")];if(def!==undefined){return def}}return current}const localStoredTheme=getSettingValue("theme");function hasClass(elem,className){return elem&&elem.classList&&elem.classList.contains(className)}function addClass(elem,className){if(elem&&elem.classList){elem.classList.add(className)}}function removeClass(elem,className){if(elem&&elem.classList){elem.classList.remove(className)}}function onEach(arr,func){for(const elem of arr){if(func(elem)){return true}}return false}function onEachLazy(lazyArray,func){return onEach(Array.prototype.slice.call(lazyArray),func)}function updateLocalStorage(name,value){try{window.localStorage.setItem("rustdoc-"+name,value)}catch(e){}}function getCurrentValue(name){try{return window.localStorage.getItem("rustdoc-"+name)}catch(e){return null}}const getVar=(function getVar(name){const el=document.querySelector("head > meta[name='rustdoc-vars']");return el?el.attributes["data-"+name].value:null});function switchTheme(newThemeName,saveTheme){const themeNames=getVar("themes").split(",").filter(t=>t);themeNames.push(...builtinThemes);if(themeNames.indexOf(newThemeName)===-1){return}if(saveTheme){updateLocalStorage("theme",newThemeName)}document.documentElement.setAttribute("data-theme",newThemeName);if(builtinThemes.indexOf(newThemeName)!==-1){if(window.currentTheme){window.currentTheme.parentNode.removeChild(window.currentTheme);window.currentTheme=null}}else{const newHref=getVar("root-path")+encodeURIComponent(newThemeName)+getVar("resource-suffix")+".css";if(!window.currentTheme){if(document.readyState==="loading"){document.write(``);window.currentTheme=document.getElementById("themeStyle")}else{window.currentTheme=document.createElement("link");window.currentTheme.rel="stylesheet";window.currentTheme.id="themeStyle";window.currentTheme.href=newHref;document.documentElement.appendChild(window.currentTheme)}}else if(newHref!==window.currentTheme.href){window.currentTheme.href=newHref}}}const updateTheme=(function(){const mql=window.matchMedia("(prefers-color-scheme: dark)");function updateTheme(){if(getSettingValue("use-system-theme")!=="false"){const lightTheme=getSettingValue("preferred-light-theme")||"light";const darkTheme=getSettingValue("preferred-dark-theme")||"dark";updateLocalStorage("use-system-theme","true");switchTheme(mql.matches?darkTheme:lightTheme,true)}else{switchTheme(getSettingValue("theme"),false)}}mql.addEventListener("change",updateTheme);return updateTheme})();if(getSettingValue("use-system-theme")!=="false"&&window.matchMedia){if(getSettingValue("use-system-theme")===null&&getSettingValue("preferred-dark-theme")===null&&darkThemes.indexOf(localStoredTheme)>=0){updateLocalStorage("preferred-dark-theme",localStoredTheme)}}updateTheme();if(getSettingValue("source-sidebar-show")==="true"){addClass(document.documentElement,"src-sidebar-expanded")}if(getSettingValue("hide-sidebar")==="true"){addClass(document.documentElement,"hide-sidebar")}function updateSidebarWidth(){const desktopSidebarWidth=getSettingValue("desktop-sidebar-width");if(desktopSidebarWidth&&desktopSidebarWidth!=="null"){document.documentElement.style.setProperty("--desktop-sidebar-width",desktopSidebarWidth+"px",)}const srcSidebarWidth=getSettingValue("src-sidebar-width");if(srcSidebarWidth&&srcSidebarWidth!=="null"){document.documentElement.style.setProperty("--src-sidebar-width",srcSidebarWidth+"px",)}}updateSidebarWidth();window.addEventListener("pageshow",ev=>{if(ev.persisted){setTimeout(updateTheme,0);setTimeout(updateSidebarWidth,0)}});class RustdocSearchElement extends HTMLElement{constructor(){super()}connectedCallback(){const rootPath=getVar("root-path");const currentCrate=getVar("current-crate");this.innerHTML=``}}window.customElements.define("rustdoc-search",RustdocSearchElement) \ No newline at end of file diff --git a/api-wasm/classes/AccessRights.html b/api-wasm/classes/AccessRights.html index c2cddcdac..683b12909 100644 --- a/api-wasm/classes/AccessRights.html +++ b/api-wasm/classes/AccessRights.html @@ -1,4 +1,4 @@ -AccessRights | api-wasm

Class AccessRights

Constructors

constructor +AccessRights | api-wasm

Class AccessRights

Constructors

Methods

Constructors

Methods

\ No newline at end of file +

Constructors

Methods

\ No newline at end of file diff --git a/api-wasm/classes/AccountHash.html b/api-wasm/classes/AccountHash.html index 88d04d703..23ac7a606 100644 --- a/api-wasm/classes/AccountHash.html +++ b/api-wasm/classes/AccountHash.html @@ -1,4 +1,4 @@ -AccountHash | api-wasm

Class AccountHash

Constructors

constructor +AccountHash | api-wasm

Class AccountHash

Constructors

Methods

\ No newline at end of file +

Constructors

Methods

\ No newline at end of file diff --git a/api-wasm/classes/AccountIdentifier.html b/api-wasm/classes/AccountIdentifier.html index a7f16c5af..977f2a6cb 100644 --- a/api-wasm/classes/AccountIdentifier.html +++ b/api-wasm/classes/AccountIdentifier.html @@ -1,7 +1,7 @@ -AccountIdentifier | api-wasm

Class AccountIdentifier

Constructors

constructor +AccountIdentifier | api-wasm

Class AccountIdentifier

Constructors

Methods

\ No newline at end of file +

Constructors

Methods

\ No newline at end of file diff --git a/api-wasm/classes/ArgsSimple.html b/api-wasm/classes/ArgsSimple.html index 45abccc7f..2b579d4c8 100644 --- a/api-wasm/classes/ArgsSimple.html +++ b/api-wasm/classes/ArgsSimple.html @@ -1,3 +1,3 @@ -ArgsSimple | api-wasm

Class ArgsSimple

Constructors

constructor +ArgsSimple | api-wasm

Class ArgsSimple

Constructors

Methods

Constructors

Methods

\ No newline at end of file +

Constructors

Methods

\ No newline at end of file diff --git a/api-wasm/classes/BlockHash.html b/api-wasm/classes/BlockHash.html index 26b91e351..7b68d87c1 100644 --- a/api-wasm/classes/BlockHash.html +++ b/api-wasm/classes/BlockHash.html @@ -1,6 +1,6 @@ -BlockHash | api-wasm

Class BlockHash

Constructors

constructor +BlockHash | api-wasm

Class BlockHash

Constructors

Methods

\ No newline at end of file +

Constructors

Methods

\ No newline at end of file diff --git a/api-wasm/classes/BlockIdentifier.html b/api-wasm/classes/BlockIdentifier.html index 63d27c3d9..d1c2b166c 100644 --- a/api-wasm/classes/BlockIdentifier.html +++ b/api-wasm/classes/BlockIdentifier.html @@ -1,6 +1,6 @@ -BlockIdentifier | api-wasm

Class BlockIdentifier

Constructors

constructor +BlockIdentifier | api-wasm

Class BlockIdentifier

Constructors

Methods

\ No newline at end of file +

Constructors

Methods

\ No newline at end of file diff --git a/api-wasm/classes/Body.html b/api-wasm/classes/Body.html index eb82303da..f7cd181a0 100644 --- a/api-wasm/classes/Body.html +++ b/api-wasm/classes/Body.html @@ -1,5 +1,5 @@ Body | api-wasm

Class Body

Represents the body of an event, containing processed deploy information.

-

Constructors

Constructors

Properties

Methods

Constructors

Properties

DeployProcessed?: DeployProcessed

Methods

\ No newline at end of file +

Constructors

Properties

DeployProcessed?: DeployProcessed

Methods

\ No newline at end of file diff --git a/api-wasm/classes/Bytes.html b/api-wasm/classes/Bytes.html index b6921f220..e117c2c6a 100644 --- a/api-wasm/classes/Bytes.html +++ b/api-wasm/classes/Bytes.html @@ -1,4 +1,4 @@ -Bytes | api-wasm

Class Bytes

Constructors

constructor +Bytes | api-wasm

Class Bytes

Constructors

Methods

Constructors

Methods

\ No newline at end of file +

Constructors

Methods

\ No newline at end of file diff --git a/api-wasm/classes/CLType.html b/api-wasm/classes/CLType.html index 80886a84c..16c808cae 100644 --- a/api-wasm/classes/CLType.html +++ b/api-wasm/classes/CLType.html @@ -1,4 +1,4 @@ -CLType | api-wasm

Class CLType

Constructors

constructor +CLType | api-wasm

Class CLType

Constructors

Methods

free toString Any @@ -24,4 +24,4 @@ U8 URef Unit -

Constructors

Methods

\ No newline at end of file +

Constructors

Methods

\ No newline at end of file diff --git a/api-wasm/classes/ContractHash.html b/api-wasm/classes/ContractHash.html index 6e2c8e411..1c250bec7 100644 --- a/api-wasm/classes/ContractHash.html +++ b/api-wasm/classes/ContractHash.html @@ -1,6 +1,6 @@ -ContractHash | api-wasm

Class ContractHash

Constructors

constructor +ContractHash | api-wasm

Class ContractHash

Constructors

Methods

\ No newline at end of file +

Constructors

Methods

\ No newline at end of file diff --git a/api-wasm/classes/ContractPackageHash.html b/api-wasm/classes/ContractPackageHash.html index fc56aa11b..30c98589b 100644 --- a/api-wasm/classes/ContractPackageHash.html +++ b/api-wasm/classes/ContractPackageHash.html @@ -1,6 +1,6 @@ -ContractPackageHash | api-wasm

Class ContractPackageHash

Constructors

constructor +ContractPackageHash | api-wasm

Class ContractPackageHash

Constructors

Methods

\ No newline at end of file +

Constructors

Methods

\ No newline at end of file diff --git a/api-wasm/classes/Deploy.html b/api-wasm/classes/Deploy.html index 40eab25c7..402c9aa3f 100644 --- a/api-wasm/classes/Deploy.html +++ b/api-wasm/classes/Deploy.html @@ -1,4 +1,4 @@ -Deploy | api-wasm

Class Deploy

Constructors

constructor +Deploy | api-wasm

Class Deploy

Constructors

Properties

Methods

Constructors

Properties

Methods

\ No newline at end of file +

Constructors

Properties

Methods

\ No newline at end of file diff --git a/api-wasm/classes/DeployHash.html b/api-wasm/classes/DeployHash.html index b1bc20f5a..1cd7cabf6 100644 --- a/api-wasm/classes/DeployHash.html +++ b/api-wasm/classes/DeployHash.html @@ -1,6 +1,6 @@ -DeployHash | api-wasm

Class DeployHash

Constructors

constructor +DeployHash | api-wasm

Class DeployHash

Constructors

Methods

\ No newline at end of file +

Constructors

Methods

\ No newline at end of file diff --git a/api-wasm/classes/DeployProcessed.html b/api-wasm/classes/DeployProcessed.html index fb10b30f2..daaf8b086 100644 --- a/api-wasm/classes/DeployProcessed.html +++ b/api-wasm/classes/DeployProcessed.html @@ -1,5 +1,5 @@ DeployProcessed | api-wasm

Class DeployProcessed

Represents processed deploy information.

-

Constructors

Constructors

Properties

Methods

Constructors

Properties

account: string
block_hash: string
dependencies: string[]
deploy_hash: string
execution_result: ExecutionResult

Result of the execution, either Success or Failure.

-
timestamp: string
ttl: string

Methods

\ No newline at end of file +

Constructors

Properties

account: string
block_hash: string
dependencies: string[]
deploy_hash: string
execution_result: ExecutionResult

Result of the execution, either Success or Failure.

+
timestamp: string
ttl: string

Methods

\ No newline at end of file diff --git a/api-wasm/classes/DeployStrParams.html b/api-wasm/classes/DeployStrParams.html index 4312f949e..f478e1a70 100644 --- a/api-wasm/classes/DeployStrParams.html +++ b/api-wasm/classes/DeployStrParams.html @@ -1,4 +1,4 @@ -DeployStrParams | api-wasm

Class DeployStrParams

Constructors

constructor +DeployStrParams | api-wasm

Class DeployStrParams

Constructors

Properties

chain_name: string
secret_key: string
session_account: string
timestamp?: string
ttl?: string

Methods

\ No newline at end of file +

Constructors

Properties

chain_name: string
secret_key: string
session_account: string
timestamp?: string
ttl?: string

Methods

\ No newline at end of file diff --git a/api-wasm/classes/DeploySubscription.html b/api-wasm/classes/DeploySubscription.html index a97f9f11d..2e492b2dc 100644 --- a/api-wasm/classes/DeploySubscription.html +++ b/api-wasm/classes/DeploySubscription.html @@ -1,5 +1,5 @@ DeploySubscription | api-wasm

Class DeploySubscription

Represents a subscription to deploy events for wasm32 target architecture.

-

Constructors

Constructors

Properties

Methods

free @@ -8,6 +8,6 @@
  • deploy_hash - Deploy hash to identify the subscription.
  • event_handler_fn - Handler function for deploy events.
  • -

    Parameters

    • deploy_hash: string
    • event_handler_fn: Function

    Returns DeploySubscription

    Properties

    deployHash: string

    Deploy hash to identify the subscription.

    -
    eventHandlerFn: Function

    Handler function for deploy events.

    -

    Methods

    \ No newline at end of file +

    Parameters

    • deploy_hash: string
    • event_handler_fn: Function

    Returns DeploySubscription

    Properties

    deployHash: string

    Deploy hash to identify the subscription.

    +
    eventHandlerFn: Function

    Handler function for deploy events.

    +

    Methods

    \ No newline at end of file diff --git a/api-wasm/classes/DeployWatcher.html b/api-wasm/classes/DeployWatcher.html index 382f53fbe..6775d0104 100644 --- a/api-wasm/classes/DeployWatcher.html +++ b/api-wasm/classes/DeployWatcher.html @@ -7,7 +7,7 @@
  • active - Reference-counted cell indicating whether the deploy watcher is active.
  • timeout_duration - Duration representing the optional timeout for watching events.
  • -

    Constructors

    Constructors

    Methods

    free start stop @@ -20,18 +20,18 @@ a default timeout of 60,000 milliseconds (1 minute) is used.

    Returns

    A new DeployWatcher instance.

    -

    Parameters

    • events_url: string
    • Optional timeout_duration: bigint

    Returns DeployWatcher

    Methods

    Methods

    • Starts watching for deploy events (JavaScript-friendly).

      Returns

      Result containing the serialized deploy events data or an error message.

      -

      Returns Promise<any>

    • Stops watching for deploy events.

      This method sets the deploy watcher as inactive and stops the event listener if it exists.

      -

      Returns void

    • Unsubscribes from deploy events based on the provided deploy hash.

      Arguments

      • deploy_hash - The deploy hash to unsubscribe.

      This method removes the deploy subscription associated with the provided deploy hash.

      -

      Parameters

      • deploy_hash: string

      Returns void

    \ No newline at end of file +

    Parameters

    • deploy_hash: string

    Returns void

    \ No newline at end of file diff --git a/api-wasm/classes/DictionaryAddr.html b/api-wasm/classes/DictionaryAddr.html index e793dfc4f..ac3469843 100644 --- a/api-wasm/classes/DictionaryAddr.html +++ b/api-wasm/classes/DictionaryAddr.html @@ -1,3 +1,3 @@ -DictionaryAddr | api-wasm

    Class DictionaryAddr

    Constructors

    constructor +DictionaryAddr | api-wasm

    Class DictionaryAddr

    Constructors

    Methods

    Constructors

    Methods

    \ No newline at end of file +

    Constructors

    Methods

    \ No newline at end of file diff --git a/api-wasm/classes/DictionaryItemIdentifier.html b/api-wasm/classes/DictionaryItemIdentifier.html index 9dbb31962..fd2c2e7cd 100644 --- a/api-wasm/classes/DictionaryItemIdentifier.html +++ b/api-wasm/classes/DictionaryItemIdentifier.html @@ -1,8 +1,8 @@ -DictionaryItemIdentifier | api-wasm

    Class DictionaryItemIdentifier

    Constructors

    constructor +DictionaryItemIdentifier | api-wasm

    Class DictionaryItemIdentifier

    Constructors

    Methods

    \ No newline at end of file +

    Constructors

    Methods

    \ No newline at end of file diff --git a/api-wasm/classes/DictionaryItemStrParams.html b/api-wasm/classes/DictionaryItemStrParams.html index 73dfc829c..bbad426c0 100644 --- a/api-wasm/classes/DictionaryItemStrParams.html +++ b/api-wasm/classes/DictionaryItemStrParams.html @@ -1,8 +1,8 @@ -DictionaryItemStrParams | api-wasm

    Class DictionaryItemStrParams

    Constructors

    constructor +DictionaryItemStrParams | api-wasm

    Class DictionaryItemStrParams

    Constructors

    Methods

    • Parameters

      • key: string
      • dictionary_name: string
      • dictionary_item_key: string

      Returns void

    • Parameters

      • key: string
      • dictionary_name: string
      • dictionary_item_key: string

      Returns void

    • Parameters

      • seed_uref: string
      • dictionary_item_key: string

      Returns void

    \ No newline at end of file +

    Constructors

    Methods

    • Parameters

      • key: string
      • dictionary_name: string
      • dictionary_item_key: string

      Returns void

    • Parameters

      • key: string
      • dictionary_name: string
      • dictionary_item_key: string

      Returns void

    • Parameters

      • seed_uref: string
      • dictionary_item_key: string

      Returns void

    \ No newline at end of file diff --git a/api-wasm/classes/Digest.html b/api-wasm/classes/Digest.html index 0406450f9..e757eabfe 100644 --- a/api-wasm/classes/Digest.html +++ b/api-wasm/classes/Digest.html @@ -1,7 +1,7 @@ -Digest | api-wasm

    Class Digest

    Constructors

    constructor +Digest | api-wasm

    Class Digest

    Constructors

    Methods

    \ No newline at end of file +

    Constructors

    Methods

    \ No newline at end of file diff --git a/api-wasm/classes/EraId.html b/api-wasm/classes/EraId.html index 766bb8224..3aa275292 100644 --- a/api-wasm/classes/EraId.html +++ b/api-wasm/classes/EraId.html @@ -1,4 +1,4 @@ -EraId | api-wasm

    Class EraId

    Constructors

    constructor +EraId | api-wasm

    Class EraId

    Constructors

    Methods

    Constructors

    Methods

    \ No newline at end of file +

    Constructors

    Methods

    \ No newline at end of file diff --git a/api-wasm/classes/EventParseResult.html b/api-wasm/classes/EventParseResult.html index 7bd7fa9e5..7b194f963 100644 --- a/api-wasm/classes/EventParseResult.html +++ b/api-wasm/classes/EventParseResult.html @@ -1,6 +1,6 @@ EventParseResult | api-wasm

    Class EventParseResult

    Represents the result of parsing an event, containing error information and the event body.

    -

    Constructors

    Constructors

    Properties

    Methods

    Constructors

    Properties

    body?: Body
    err?: string

    Methods

    \ No newline at end of file +

    Constructors

    Properties

    body?: Body
    err?: string

    Methods

    \ No newline at end of file diff --git a/api-wasm/classes/ExecutionResult.html b/api-wasm/classes/ExecutionResult.html index c30c74a8b..bd6c2dfdb 100644 --- a/api-wasm/classes/ExecutionResult.html +++ b/api-wasm/classes/ExecutionResult.html @@ -1,8 +1,8 @@ ExecutionResult | api-wasm

    Class ExecutionResult

    Represents the result of an execution, either Success or Failure.

    -

    Constructors

    Constructors

    Properties

    Methods

    Constructors

    Properties

    Failure?: Failure

    Optional Failure information.

    -
    Success?: Success

    Optional Success information.

    -

    Methods

    \ No newline at end of file +
    Success?: Success

    Optional Success information.

    +

    Methods

    \ No newline at end of file diff --git a/api-wasm/classes/Failure.html b/api-wasm/classes/Failure.html index 768726e46..303ada395 100644 --- a/api-wasm/classes/Failure.html +++ b/api-wasm/classes/Failure.html @@ -1,5 +1,5 @@ Failure | api-wasm

    Class Failure

    Represents a failure response containing an error message.

    -

    Constructors

    Constructors

    Properties

    Methods

    Constructors

    Properties

    error_message: string

    Methods

    \ No newline at end of file +

    Constructors

    Properties

    error_message: string

    Methods

    \ No newline at end of file diff --git a/api-wasm/classes/GetAccountResult.html b/api-wasm/classes/GetAccountResult.html index 4b2e5fbaf..d22d0f701 100644 --- a/api-wasm/classes/GetAccountResult.html +++ b/api-wasm/classes/GetAccountResult.html @@ -1,7 +1,7 @@ -GetAccountResult | api-wasm

    Class GetAccountResult

    Constructors

    constructor +GetAccountResult | api-wasm

    Class GetAccountResult

    Constructors

    Properties

    Methods

    Constructors

    Properties

    account: any
    api_version: any
    merkle_proof: string

    Methods

    \ No newline at end of file +

    Constructors

    Properties

    account: any
    api_version: any
    merkle_proof: string

    Methods

    \ No newline at end of file diff --git a/api-wasm/classes/GetAuctionInfoResult.html b/api-wasm/classes/GetAuctionInfoResult.html index d4c6cd4d8..aed17e6fd 100644 --- a/api-wasm/classes/GetAuctionInfoResult.html +++ b/api-wasm/classes/GetAuctionInfoResult.html @@ -1,9 +1,9 @@ -GetAuctionInfoResult | api-wasm

    Class GetAuctionInfoResult

    Constructors

    constructor +GetAuctionInfoResult | api-wasm

    Class GetAuctionInfoResult

    Constructors

    Properties

    Methods

    Constructors

    Properties

    api_version: any

    Gets the API version as a JsValue.

    -
    auction_state: any

    Gets the auction state as a JsValue.

    -

    Methods

    \ No newline at end of file +
    auction_state: any

    Gets the auction state as a JsValue.

    +

    Methods

    \ No newline at end of file diff --git a/api-wasm/classes/GetBalanceResult.html b/api-wasm/classes/GetBalanceResult.html index 36b7ce318..1b3a9c660 100644 --- a/api-wasm/classes/GetBalanceResult.html +++ b/api-wasm/classes/GetBalanceResult.html @@ -1,11 +1,11 @@ -GetBalanceResult | api-wasm

    Class GetBalanceResult

    Constructors

    constructor +GetBalanceResult | api-wasm

    Class GetBalanceResult

    Constructors

    Properties

    api_version: any

    Gets the API version as a JsValue.

    -
    balance_value: any

    Gets the balance value as a JsValue.

    -
    merkle_proof: string

    Gets the Merkle proof as a string.

    -

    Methods

    \ No newline at end of file +
    balance_value: any

    Gets the balance value as a JsValue.

    +
    merkle_proof: string

    Gets the Merkle proof as a string.

    +

    Methods

    \ No newline at end of file diff --git a/api-wasm/classes/GetBlockResult.html b/api-wasm/classes/GetBlockResult.html index 9d52a30a0..4ebcbeaf9 100644 --- a/api-wasm/classes/GetBlockResult.html +++ b/api-wasm/classes/GetBlockResult.html @@ -1,9 +1,9 @@ -GetBlockResult | api-wasm

    Class GetBlockResult

    Constructors

    constructor +GetBlockResult | api-wasm

    Class GetBlockResult

    Constructors

    Properties

    Methods

    Constructors

    Properties

    api_version: any

    Gets the API version as a JsValue.

    -
    block: any

    Gets the block information as a JsValue.

    -

    Methods

    \ No newline at end of file +
    block: any

    Gets the block information as a JsValue.

    +

    Methods

    \ No newline at end of file diff --git a/api-wasm/classes/GetBlockTransfersResult.html b/api-wasm/classes/GetBlockTransfersResult.html index dd2253f0b..ccdc79c06 100644 --- a/api-wasm/classes/GetBlockTransfersResult.html +++ b/api-wasm/classes/GetBlockTransfersResult.html @@ -1,11 +1,11 @@ -GetBlockTransfersResult | api-wasm

    Class GetBlockTransfersResult

    Constructors

    constructor +GetBlockTransfersResult | api-wasm

    Class GetBlockTransfersResult

    Constructors

    Properties

    Methods

    Constructors

    Properties

    api_version: any

    Gets the API version as a JsValue.

    -
    block_hash: BlockHash

    Gets the block hash as an Option.

    -
    transfers: any

    Gets the transfers as a JsValue.

    -

    Methods

    \ No newline at end of file +
    block_hash: BlockHash

    Gets the block hash as an Option.

    +
    transfers: any

    Gets the transfers as a JsValue.

    +

    Methods

    \ No newline at end of file diff --git a/api-wasm/classes/GetChainspecResult.html b/api-wasm/classes/GetChainspecResult.html index 970275e8b..2f095aa2a 100644 --- a/api-wasm/classes/GetChainspecResult.html +++ b/api-wasm/classes/GetChainspecResult.html @@ -1,10 +1,10 @@ GetChainspecResult | api-wasm

    Class GetChainspecResult

    A struct representing the result of the get_chainspec function.

    -

    Constructors

    Constructors

    Properties

    Methods

    Constructors

    Properties

    api_version: any

    Gets the API version as a JsValue.

    -
    chainspec_bytes: any

    Gets the chainspec bytes as a JsValue.

    -

    Methods

    \ No newline at end of file +
    chainspec_bytes: any

    Gets the chainspec bytes as a JsValue.

    +

    Methods

    \ No newline at end of file diff --git a/api-wasm/classes/GetDeployResult.html b/api-wasm/classes/GetDeployResult.html index 40f6c6cc5..7ac1b0099 100644 --- a/api-wasm/classes/GetDeployResult.html +++ b/api-wasm/classes/GetDeployResult.html @@ -1,9 +1,9 @@ -GetDeployResult | api-wasm

    Class GetDeployResult

    Constructors

    constructor +GetDeployResult | api-wasm

    Class GetDeployResult

    Constructors

    Properties

    Methods

    Constructors

    Properties

    api_version: any

    Gets the API version as a JavaScript value.

    -
    deploy: Deploy

    Gets the deploy information.

    -

    Methods

    \ No newline at end of file +
    deploy: Deploy

    Gets the deploy information.

    +

    Methods

    \ No newline at end of file diff --git a/api-wasm/classes/GetDictionaryItemResult.html b/api-wasm/classes/GetDictionaryItemResult.html index 181c285d4..e5edfae5e 100644 --- a/api-wasm/classes/GetDictionaryItemResult.html +++ b/api-wasm/classes/GetDictionaryItemResult.html @@ -1,4 +1,4 @@ -GetDictionaryItemResult | api-wasm

    Class GetDictionaryItemResult

    Constructors

    constructor +GetDictionaryItemResult | api-wasm

    Class GetDictionaryItemResult

    Constructors

    Properties

    Methods

    Constructors

    Properties

    api_version: any

    Gets the API version as a JsValue.

    -
    dictionary_key: string

    Gets the dictionary key as a String.

    -
    merkle_proof: string

    Gets the merkle proof as a String.

    -
    stored_value: any

    Gets the stored value as a JsValue.

    -

    Methods

    \ No newline at end of file +
    dictionary_key: string

    Gets the dictionary key as a String.

    +
    merkle_proof: string

    Gets the merkle proof as a String.

    +
    stored_value: any

    Gets the stored value as a JsValue.

    +

    Methods

    \ No newline at end of file diff --git a/api-wasm/classes/GetEraInfoResult.html b/api-wasm/classes/GetEraInfoResult.html index 6fc5433ef..89f510c59 100644 --- a/api-wasm/classes/GetEraInfoResult.html +++ b/api-wasm/classes/GetEraInfoResult.html @@ -1,6 +1,6 @@ -GetEraInfoResult | api-wasm

    Class GetEraInfoResult

    Constructors

    constructor +GetEraInfoResult | api-wasm

    Class GetEraInfoResult

    Constructors

    Properties

    Methods

    Constructors

    Properties

    api_version: any
    era_summary: any

    Methods

    \ No newline at end of file +

    Constructors

    Properties

    api_version: any
    era_summary: any

    Methods

    \ No newline at end of file diff --git a/api-wasm/classes/GetEraSummaryResult.html b/api-wasm/classes/GetEraSummaryResult.html index 52d7965cc..769ed1da7 100644 --- a/api-wasm/classes/GetEraSummaryResult.html +++ b/api-wasm/classes/GetEraSummaryResult.html @@ -1,10 +1,10 @@ GetEraSummaryResult | api-wasm

    Class GetEraSummaryResult

    Wrapper struct for the GetEraSummaryResult from casper_client.

    -

    Constructors

    Constructors

    Properties

    Methods

    Constructors

    Properties

    api_version: any

    Gets the API version as a JsValue.

    -
    era_summary: any

    Gets the era summary as a JsValue.

    -

    Methods

    \ No newline at end of file +
    era_summary: any

    Gets the era summary as a JsValue.

    +

    Methods

    \ No newline at end of file diff --git a/api-wasm/classes/GetNodeStatusResult.html b/api-wasm/classes/GetNodeStatusResult.html index a2963dd60..e713ab4c6 100644 --- a/api-wasm/classes/GetNodeStatusResult.html +++ b/api-wasm/classes/GetNodeStatusResult.html @@ -1,5 +1,5 @@ GetNodeStatusResult | api-wasm

    Class GetNodeStatusResult

    Wrapper struct for the GetNodeStatusResult from casper_client.

    -

    Constructors

    Constructors

    Properties

    Methods

    Constructors

    Properties

    api_version: any

    Gets the API version as a JsValue.

    -
    available_block_range: any

    Gets the available block range as a JsValue.

    -
    block_sync: any

    Gets the block sync information as a JsValue.

    -
    build_version: string

    Gets the build version as a String.

    -
    chainspec_name: string

    Gets the chainspec name as a String.

    -
    last_added_block_info: any

    Gets information about the last added block as a JsValue.

    -
    last_progress: any

    Gets the last progress information as a JsValue.

    -
    next_upgrade: any

    Gets information about the next upgrade as a JsValue.

    -
    our_public_signing_key: PublicKey

    Gets the public signing key as an Option.

    -
    peers: any

    Gets the list of peers as a JsValue.

    -
    reactor_state: any

    Gets the reactor state information as a JsValue.

    -
    round_length: any

    Gets the round length as a JsValue.

    -
    starting_state_root_hash: Digest

    Gets the starting state root hash as a Digest.

    -
    uptime: any

    Gets the uptime information as a JsValue.

    -

    Methods

    \ No newline at end of file +
    available_block_range: any

    Gets the available block range as a JsValue.

    +
    block_sync: any

    Gets the block sync information as a JsValue.

    +
    build_version: string

    Gets the build version as a String.

    +
    chainspec_name: string

    Gets the chainspec name as a String.

    +
    last_added_block_info: any

    Gets information about the last added block as a JsValue.

    +
    last_progress: any

    Gets the last progress information as a JsValue.

    +
    next_upgrade: any

    Gets information about the next upgrade as a JsValue.

    +
    our_public_signing_key: PublicKey

    Gets the public signing key as an Option.

    +
    peers: any

    Gets the list of peers as a JsValue.

    +
    reactor_state: any

    Gets the reactor state information as a JsValue.

    +
    round_length: any

    Gets the round length as a JsValue.

    +
    starting_state_root_hash: Digest

    Gets the starting state root hash as a Digest.

    +
    uptime: any

    Gets the uptime information as a JsValue.

    +

    Methods

    \ No newline at end of file diff --git a/api-wasm/classes/GetPeersResult.html b/api-wasm/classes/GetPeersResult.html index 48d3ebc6d..c55734845 100644 --- a/api-wasm/classes/GetPeersResult.html +++ b/api-wasm/classes/GetPeersResult.html @@ -1,10 +1,10 @@ GetPeersResult | api-wasm

    Class GetPeersResult

    A wrapper for the GetPeersResult type from the Casper client.

    -

    Constructors

    Constructors

    Properties

    Methods

    Constructors

    Properties

    api_version: any

    Gets the API version as a JSON value.

    -
    peers: any

    Gets the peers as a JSON value.

    -

    Methods

    \ No newline at end of file +
    peers: any

    Gets the peers as a JSON value.

    +

    Methods

    \ No newline at end of file diff --git a/api-wasm/classes/GetStateRootHashResult.html b/api-wasm/classes/GetStateRootHashResult.html index 381a141a0..112d0c17e 100644 --- a/api-wasm/classes/GetStateRootHashResult.html +++ b/api-wasm/classes/GetStateRootHashResult.html @@ -1,5 +1,5 @@ GetStateRootHashResult | api-wasm

    Class GetStateRootHashResult

    Wrapper struct for the GetStateRootHashResult from casper_client.

    -

    Constructors

    Constructors

    Properties

    api_version: any

    Gets the API version as a JsValue.

    -
    state_root_hash: Digest

    Gets the state root hash as an Option.

    -
    state_root_hash_as_string: string

    Gets the state root hash as a String.

    -

    Methods

    \ No newline at end of file +
    state_root_hash: Digest

    Gets the state root hash as an Option.

    +
    state_root_hash_as_string: string

    Gets the state root hash as a String.

    +

    Methods

    \ No newline at end of file diff --git a/api-wasm/classes/GetValidatorChangesResult.html b/api-wasm/classes/GetValidatorChangesResult.html index 3d2ed4855..0e40597ab 100644 --- a/api-wasm/classes/GetValidatorChangesResult.html +++ b/api-wasm/classes/GetValidatorChangesResult.html @@ -1,10 +1,10 @@ GetValidatorChangesResult | api-wasm

    Class GetValidatorChangesResult

    Wrapper struct for the GetValidatorChangesResult from casper_client.

    -

    Constructors

    Constructors

    Properties

    Methods

    Constructors

    Properties

    api_version: any

    Gets the API version as a JsValue.

    -
    changes: any

    Gets the validator changes as a JsValue.

    -

    Methods

    \ No newline at end of file +
    changes: any

    Gets the validator changes as a JsValue.

    +

    Methods

    \ No newline at end of file diff --git a/api-wasm/classes/GlobalStateIdentifier.html b/api-wasm/classes/GlobalStateIdentifier.html index 01fd0e7a2..425891db5 100644 --- a/api-wasm/classes/GlobalStateIdentifier.html +++ b/api-wasm/classes/GlobalStateIdentifier.html @@ -1,7 +1,7 @@ -GlobalStateIdentifier | api-wasm

    Class GlobalStateIdentifier

    Constructors

    constructor +GlobalStateIdentifier | api-wasm

    Class GlobalStateIdentifier

    Constructors

    Methods

    \ No newline at end of file +

    Constructors

    Methods

    \ No newline at end of file diff --git a/api-wasm/classes/HashAddr.html b/api-wasm/classes/HashAddr.html index 4958c79a1..aec7d7708 100644 --- a/api-wasm/classes/HashAddr.html +++ b/api-wasm/classes/HashAddr.html @@ -1,3 +1,3 @@ -HashAddr | api-wasm

    Class HashAddr

    Constructors

    constructor +HashAddr | api-wasm

    Class HashAddr

    Constructors

    Methods

    Constructors

    Methods

    \ No newline at end of file +

    Constructors

    Methods

    \ No newline at end of file diff --git a/api-wasm/classes/IntoUnderlyingByteSource.html b/api-wasm/classes/IntoUnderlyingByteSource.html index be00ebe19..96937c7be 100644 --- a/api-wasm/classes/IntoUnderlyingByteSource.html +++ b/api-wasm/classes/IntoUnderlyingByteSource.html @@ -1,8 +1,8 @@ -IntoUnderlyingByteSource | api-wasm

    Class IntoUnderlyingByteSource

    Constructors

    constructor +IntoUnderlyingByteSource | api-wasm

    Class IntoUnderlyingByteSource

    Constructors

    Properties

    Methods

    Constructors

    Properties

    autoAllocateChunkSize: number
    type: string

    Methods

    \ No newline at end of file +

    Constructors

    Properties

    autoAllocateChunkSize: number
    type: string

    Methods

    \ No newline at end of file diff --git a/api-wasm/classes/IntoUnderlyingSink.html b/api-wasm/classes/IntoUnderlyingSink.html index ef1afea65..2dce661b9 100644 --- a/api-wasm/classes/IntoUnderlyingSink.html +++ b/api-wasm/classes/IntoUnderlyingSink.html @@ -1,6 +1,6 @@ -IntoUnderlyingSink | api-wasm

    Class IntoUnderlyingSink

    Constructors

    constructor +IntoUnderlyingSink | api-wasm

    Class IntoUnderlyingSink

    Constructors

    Methods

    Constructors

    Methods

    \ No newline at end of file +

    Constructors

    Methods

    \ No newline at end of file diff --git a/api-wasm/classes/IntoUnderlyingSource.html b/api-wasm/classes/IntoUnderlyingSource.html index 56e74551b..adc008caa 100644 --- a/api-wasm/classes/IntoUnderlyingSource.html +++ b/api-wasm/classes/IntoUnderlyingSource.html @@ -1,5 +1,5 @@ -IntoUnderlyingSource | api-wasm

    Class IntoUnderlyingSource

    Constructors

    constructor +IntoUnderlyingSource | api-wasm

    Class IntoUnderlyingSource

    Constructors

    Methods

    Constructors

    Methods

    \ No newline at end of file +

    Constructors

    Methods

    \ No newline at end of file diff --git a/api-wasm/classes/Key.html b/api-wasm/classes/Key.html index b648e623d..1c89224e9 100644 --- a/api-wasm/classes/Key.html +++ b/api-wasm/classes/Key.html @@ -1,4 +1,4 @@ -Key | api-wasm

    Class Key

    Constructors

    constructor +Key | api-wasm

    Class Key

    Constructors

    Methods

    \ No newline at end of file +

    Constructors

    Methods

    \ No newline at end of file diff --git a/api-wasm/classes/ListRpcsResult.html b/api-wasm/classes/ListRpcsResult.html index 79c82dc19..88fa69fb4 100644 --- a/api-wasm/classes/ListRpcsResult.html +++ b/api-wasm/classes/ListRpcsResult.html @@ -1,12 +1,12 @@ ListRpcsResult | api-wasm

    Class ListRpcsResult

    Wrapper struct for the ListRpcsResult from casper_client.

    -

    Constructors

    Constructors

    Properties

    Methods

    Constructors

    Properties

    api_version: any

    Gets the API version as a JsValue.

    -
    name: string

    Gets the name of the RPC.

    -
    schema: any

    Gets the schema of the RPC as a JsValue.

    -

    Methods

    \ No newline at end of file +
    name: string

    Gets the name of the RPC.

    +
    schema: any

    Gets the schema of the RPC as a JsValue.

    +

    Methods

    \ No newline at end of file diff --git a/api-wasm/classes/Path.html b/api-wasm/classes/Path.html index 024052c76..2fc2825b6 100644 --- a/api-wasm/classes/Path.html +++ b/api-wasm/classes/Path.html @@ -1,7 +1,7 @@ -Path | api-wasm

    Class Path

    Constructors

    constructor +Path | api-wasm

    Class Path

    Constructors

    Methods

    \ No newline at end of file +

    Constructors

    Methods

    \ No newline at end of file diff --git a/api-wasm/classes/PaymentStrParams.html b/api-wasm/classes/PaymentStrParams.html index 8407ff30c..ae1683c62 100644 --- a/api-wasm/classes/PaymentStrParams.html +++ b/api-wasm/classes/PaymentStrParams.html @@ -1,4 +1,4 @@ -PaymentStrParams | api-wasm

    Class PaymentStrParams

    Constructors

    constructor +PaymentStrParams | api-wasm

    Class PaymentStrParams

    Constructors

    • Parameters

      • Optional payment_amount: string
      • Optional payment_hash: string
      • Optional payment_name: string
      • Optional payment_package_hash: string
      • Optional payment_package_name: string
      • Optional payment_path: string
      • Optional payment_args_simple: any[]
      • Optional payment_args_json: string
      • Optional payment_args_complex: string
      • Optional payment_version: string
      • Optional payment_entry_point: string

      Returns PaymentStrParams

    Properties

    payment_amount: string
    payment_args_complex: string
    payment_args_json: string
    payment_args_simple: any[]
    payment_entry_point: string
    payment_hash: string
    payment_name: string
    payment_package_hash: string
    payment_package_name: string
    payment_path: string
    payment_version: string

    Methods

    \ No newline at end of file +

    Constructors

    • Parameters

      • Optional payment_amount: string
      • Optional payment_hash: string
      • Optional payment_name: string
      • Optional payment_package_hash: string
      • Optional payment_package_name: string
      • Optional payment_path: string
      • Optional payment_args_simple: any[]
      • Optional payment_args_json: string
      • Optional payment_args_complex: string
      • Optional payment_version: string
      • Optional payment_entry_point: string

      Returns PaymentStrParams

    Properties

    payment_amount: string
    payment_args_complex: string
    payment_args_json: string
    payment_args_simple: any[]
    payment_entry_point: string
    payment_hash: string
    payment_name: string
    payment_package_hash: string
    payment_package_name: string
    payment_path: string
    payment_version: string

    Methods

    \ No newline at end of file diff --git a/api-wasm/classes/PeerEntry.html b/api-wasm/classes/PeerEntry.html index 1a45baf47..a73793b2b 100644 --- a/api-wasm/classes/PeerEntry.html +++ b/api-wasm/classes/PeerEntry.html @@ -1,5 +1,5 @@ -PeerEntry | api-wasm

    Class PeerEntry

    Constructors

    constructor +PeerEntry | api-wasm

    Class PeerEntry

    Constructors

    Properties

    Methods

    Constructors

    Properties

    address: string
    node_id: string

    Methods

    \ No newline at end of file +

    Constructors

    Properties

    address: string
    node_id: string

    Methods

    \ No newline at end of file diff --git a/api-wasm/classes/PublicKey.html b/api-wasm/classes/PublicKey.html index 31389b619..75086f858 100644 --- a/api-wasm/classes/PublicKey.html +++ b/api-wasm/classes/PublicKey.html @@ -1,7 +1,7 @@ -PublicKey | api-wasm

    Class PublicKey

    Constructors

    constructor +PublicKey | api-wasm

    Class PublicKey

    Constructors

    Methods

    \ No newline at end of file +

    Constructors

    Methods

    \ No newline at end of file diff --git a/api-wasm/classes/PurseIdentifier.html b/api-wasm/classes/PurseIdentifier.html index 0c95f62e5..0bc7a3290 100644 --- a/api-wasm/classes/PurseIdentifier.html +++ b/api-wasm/classes/PurseIdentifier.html @@ -1,6 +1,6 @@ -PurseIdentifier | api-wasm

    Class PurseIdentifier

    Constructors

    constructor +PurseIdentifier | api-wasm

    Class PurseIdentifier

    Constructors

    Methods

    \ No newline at end of file +

    Constructors

    Methods

    \ No newline at end of file diff --git a/api-wasm/classes/PutDeployResult.html b/api-wasm/classes/PutDeployResult.html index 60870d8ad..d8705e0c0 100644 --- a/api-wasm/classes/PutDeployResult.html +++ b/api-wasm/classes/PutDeployResult.html @@ -1,9 +1,9 @@ -PutDeployResult | api-wasm

    Class PutDeployResult

    Constructors

    constructor +PutDeployResult | api-wasm

    Class PutDeployResult

    Constructors

    Properties

    Methods

    Constructors

    Properties

    api_version: any

    Gets the API version as a JavaScript value.

    -
    deploy_hash: DeployHash

    Gets the deploy hash associated with this result.

    -

    Methods

    \ No newline at end of file +
    deploy_hash: DeployHash

    Gets the deploy hash associated with this result.

    +

    Methods

    \ No newline at end of file diff --git a/api-wasm/classes/QueryBalanceResult.html b/api-wasm/classes/QueryBalanceResult.html index bd0218301..0e3962bcc 100644 --- a/api-wasm/classes/QueryBalanceResult.html +++ b/api-wasm/classes/QueryBalanceResult.html @@ -1,9 +1,9 @@ -QueryBalanceResult | api-wasm

    Class QueryBalanceResult

    Constructors

    constructor +QueryBalanceResult | api-wasm

    Class QueryBalanceResult

    Constructors

    Properties

    Methods

    Constructors

    Properties

    api_version: any

    Gets the API version as a JsValue.

    -
    balance: any

    Gets the balance as a JsValue.

    -

    Methods

    \ No newline at end of file +
    balance: any

    Gets the balance as a JsValue.

    +

    Methods

    \ No newline at end of file diff --git a/api-wasm/classes/QueryGlobalStateResult.html b/api-wasm/classes/QueryGlobalStateResult.html index afe407978..4e591d829 100644 --- a/api-wasm/classes/QueryGlobalStateResult.html +++ b/api-wasm/classes/QueryGlobalStateResult.html @@ -1,4 +1,4 @@ -QueryGlobalStateResult | api-wasm

    Class QueryGlobalStateResult

    Constructors

    constructor +QueryGlobalStateResult | api-wasm

    Class QueryGlobalStateResult

    Constructors

    Properties

    Methods

    Constructors

    Properties

    api_version: any

    Gets the API version as a JsValue.

    -
    block_header: any

    Gets the block header as a JsValue.

    -
    merkle_proof: string

    Gets the Merkle proof as a string.

    -
    stored_value: any

    Gets the stored value as a JsValue.

    -

    Methods

    \ No newline at end of file +
    block_header: any

    Gets the block header as a JsValue.

    +
    merkle_proof: string

    Gets the Merkle proof as a string.

    +
    stored_value: any

    Gets the stored value as a JsValue.

    +

    Methods

    \ No newline at end of file diff --git a/api-wasm/classes/SDK.html b/api-wasm/classes/SDK.html index c7c90b194..a8e1f537e 100644 --- a/api-wasm/classes/SDK.html +++ b/api-wasm/classes/SDK.html @@ -1,4 +1,4 @@ -SDK | api-wasm

    Class SDK

    Constructors

    constructor +SDK | api-wasm

    Class SDK

    Constructors

    Methods

    • JS Alias for put_deploy_js_alias.

      +

    Constructors

    Methods

    • 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.
      • @@ -69,19 +69,19 @@

      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.

      -

      Parameters

      Returns Promise<PutDeployResult>

    • Retrieves node status information using the provided options.

      Arguments

      • verbosity - An optional Verbosity level for controlling the output verbosity.
      • node_address - An optional string specifying the node 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.

      -

      Parameters

      • Optional verbosity: Verbosity
      • Optional node_address: string

      Returns Promise<GetNodeStatusResult>

    • Retrieves validator changes using the provided options.

      Arguments

      • verbosity - An optional Verbosity level for controlling the output verbosity.
      • node_address - An optional string specifying the node 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.

      -

      Parameters

      • Optional verbosity: Verbosity
      • Optional node_address: string

      Returns Promise<GetValidatorChangesResult>

    • Installs a smart contract with the specified parameters and returns the result.

      Arguments

      • deploy_params - The deploy parameters.
      • session_params - The session parameters.
      • @@ -213,21 +213,21 @@

      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.

      -

      Parameters

      Returns Promise<PutDeployResult>

    • Lists available RPCs using the provided options.

      Arguments

      • verbosity - An optional Verbosity level for controlling the output verbosity.
      • node_address - An optional string specifying the node 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.

      -

      Parameters

      • Optional verbosity: Verbosity
      • Optional node_address: string

      Returns Promise<ListRpcsResult>

    • JS Alias for make_transfer.

      Arguments

      • amount - The transfer amount.
      • target_account - The target account.
      • @@ -236,7 +236,7 @@
      • payment_params - The payment parameters.

      Returns

      A Result containing the created Deploy or a JsError in case of an error.

      -

      Parameters

      Returns Deploy

    • Puts a deploy using the provided options.

      Arguments

      • deploy - The Deploy object to be sent.
      • verbosity - An optional Verbosity level for controlling the output verbosity.
      • @@ -244,39 +244,39 @@

      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.

      -

      Parameters

      Returns Promise<PutDeployResult>

    • This function allows executing a deploy speculatively.

      +

      Parameters

      • deploy: Deploy
      • secret_key: string

      Returns Deploy

    • This function allows executing a deploy speculatively.

      Arguments

      • deploy_params - Deployment parameters for the deploy.
      • session_params - Session parameters for the deploy.
      • @@ -287,13 +287,13 @@
      • node_address - Optional node address.

      Returns

      A Result containing either a SpeculativeExecResult or a JsError in case of an error.

      -

      Parameters

      Returns Promise<SpeculativeExecResult>

    • JS Alias for speculative transfer.

      Arguments

      • amount - The amount to transfer.
      • target_account - The target account.
      • @@ -306,13 +306,13 @@
      • node_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.

      -

      Parameters

      Returns Promise<SpeculativeExecResult>

    • JS Alias for transferring funds.

      Arguments

      • amount - The amount to transfer.
      • target_account - The target account.
      • @@ -323,17 +323,17 @@
      • node_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.

      -

      Parameters

      Returns Promise<PutDeployResult>

    • Waits for a deploy event to be processed asynchronously (JavaScript-friendly).

      Arguments

      • events_url - The URL to monitor for deploy 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.

      -

      Parameters

      • events_url: string
      • deploy_hash: string
      • Optional timeout_duration: number

      Returns Promise<Promise<any>>

    • Creates a new DeployWatcher instance to watch deploys (JavaScript-friendly).

      +

      Parameters

      • events_url: string
      • deploy_hash: string
      • Optional timeout_duration: number

      Returns Promise<Promise<any>>

    • Creates a new DeployWatcher instance to watch deploys (JavaScript-friendly).

      Arguments

      • events_url - The URL to monitor for deploy events.
      • timeout_duration - An optional timeout duration in seconds.

      Returns

      A DeployWatcher instance.

      -

      Parameters

      • events_url: string
      • Optional timeout_duration: number

      Returns DeployWatcher

    \ No newline at end of file +

    Parameters

    • events_url: string
    • Optional timeout_duration: number

    Returns DeployWatcher

    \ No newline at end of file diff --git a/api-wasm/classes/SessionStrParams.html b/api-wasm/classes/SessionStrParams.html index c83fc5f72..40e6f2966 100644 --- a/api-wasm/classes/SessionStrParams.html +++ b/api-wasm/classes/SessionStrParams.html @@ -1,4 +1,4 @@ -SessionStrParams | api-wasm

    Class SessionStrParams

    Constructors

    constructor +SessionStrParams | api-wasm

    Class SessionStrParams

    Constructors

    • Parameters

      • Optional session_hash: string
      • Optional session_name: string
      • Optional session_package_hash: string
      • Optional session_package_name: string
      • Optional session_path: string
      • Optional session_bytes: Bytes
      • Optional session_args_simple: any[]
      • Optional session_args_json: string
      • Optional session_args_complex: string
      • Optional session_version: string
      • Optional session_entry_point: string
      • Optional is_session_transfer: boolean

      Returns SessionStrParams

    Properties

    is_session_transfer: boolean
    session_args_complex: string
    session_args_json: string
    session_args_simple: any[]
    session_bytes: Bytes
    session_entry_point: string
    session_hash: string
    session_name: string
    session_package_hash: string
    session_package_name: string
    session_path: string
    session_version: string

    Methods

    \ No newline at end of file +

    Constructors

    • Parameters

      • Optional session_hash: string
      • Optional session_name: string
      • Optional session_package_hash: string
      • Optional session_package_name: string
      • Optional session_path: string
      • Optional session_bytes: Bytes
      • Optional session_args_simple: any[]
      • Optional session_args_json: string
      • Optional session_args_complex: string
      • Optional session_version: string
      • Optional session_entry_point: string
      • Optional is_session_transfer: boolean

      Returns SessionStrParams

    Properties

    is_session_transfer: boolean
    session_args_complex: string
    session_args_json: string
    session_args_simple: any[]
    session_bytes: Bytes
    session_entry_point: string
    session_hash: string
    session_name: string
    session_package_hash: string
    session_package_name: string
    session_path: string
    session_version: string

    Methods

    \ No newline at end of file diff --git a/api-wasm/classes/SpeculativeExecResult.html b/api-wasm/classes/SpeculativeExecResult.html index c6d01da05..4a1169ecc 100644 --- a/api-wasm/classes/SpeculativeExecResult.html +++ b/api-wasm/classes/SpeculativeExecResult.html @@ -1,11 +1,11 @@ -SpeculativeExecResult | api-wasm

    Class SpeculativeExecResult

    Constructors

    constructor +SpeculativeExecResult | api-wasm

    Class SpeculativeExecResult

    Constructors

    Properties

    api_version: any

    Get the API version of the result.

    -
    block_hash: BlockHash

    Get the block hash.

    -
    execution_result: any

    Get the execution result.

    -

    Methods

    \ No newline at end of file +
    block_hash: BlockHash

    Get the block hash.

    +
    execution_result: any

    Get the execution result.

    +

    Methods

    \ No newline at end of file diff --git a/api-wasm/classes/Success.html b/api-wasm/classes/Success.html index 8a1e953a1..767104819 100644 --- a/api-wasm/classes/Success.html +++ b/api-wasm/classes/Success.html @@ -1,5 +1,5 @@ Success | api-wasm

    Class Success

    Represents a success response containing a cost value.

    -

    Constructors

    Constructors

    Properties

    Methods

    Constructors

    Properties

    cost: string

    Methods

    \ No newline at end of file +

    Constructors

    Properties

    cost: string

    Methods

    \ No newline at end of file diff --git a/api-wasm/classes/TransferAddr.html b/api-wasm/classes/TransferAddr.html index 9b6b75da3..7141005c9 100644 --- a/api-wasm/classes/TransferAddr.html +++ b/api-wasm/classes/TransferAddr.html @@ -1,4 +1,4 @@ -TransferAddr | api-wasm

    Class TransferAddr

    Constructors

    constructor +TransferAddr | api-wasm

    Class TransferAddr

    Constructors

    Methods

    Constructors

    Methods

    \ No newline at end of file +

    Constructors

    Methods

    \ No newline at end of file diff --git a/api-wasm/classes/URef.html b/api-wasm/classes/URef.html index c435f3522..b82d571ab 100644 --- a/api-wasm/classes/URef.html +++ b/api-wasm/classes/URef.html @@ -1,6 +1,6 @@ -URef | api-wasm

    Class URef

    Constructors

    constructor +URef | api-wasm

    Class URef

    Constructors

    Methods

    \ No newline at end of file +

    Constructors

    Methods

    \ No newline at end of file diff --git a/api-wasm/classes/URefAddr.html b/api-wasm/classes/URefAddr.html index 73bc9aff4..1e6cb990a 100644 --- a/api-wasm/classes/URefAddr.html +++ b/api-wasm/classes/URefAddr.html @@ -1,3 +1,3 @@ -URefAddr | api-wasm

    Class URefAddr

    Constructors

    constructor +URefAddr | api-wasm

    Class URefAddr

    Constructors

    Methods

    Constructors

    Methods

    \ No newline at end of file +

    Constructors

    Methods

    \ No newline at end of file diff --git a/api-wasm/classes/getAccountOptions.html b/api-wasm/classes/getAccountOptions.html index 16d94f8ff..95dd1b229 100644 --- a/api-wasm/classes/getAccountOptions.html +++ b/api-wasm/classes/getAccountOptions.html @@ -1,4 +1,4 @@ -getAccountOptions | api-wasm

    Class getAccountOptions

    Constructors

    constructor +getAccountOptions | api-wasm

    Class getAccountOptions

    Constructors

    Properties

    account_identifier?: AccountIdentifier
    account_identifier_as_string?: string
    maybe_block_id_as_string?: string
    maybe_block_identifier?: BlockIdentifier
    node_address?: string
    verbosity?: Verbosity

    Methods

    \ No newline at end of file +

    Constructors

    Properties

    account_identifier?: AccountIdentifier
    account_identifier_as_string?: string
    maybe_block_id_as_string?: string
    maybe_block_identifier?: BlockIdentifier
    node_address?: string
    verbosity?: Verbosity

    Methods

    \ No newline at end of file diff --git a/api-wasm/classes/getAuctionInfoOptions.html b/api-wasm/classes/getAuctionInfoOptions.html index 9ebd0dccb..ddeccd6ba 100644 --- a/api-wasm/classes/getAuctionInfoOptions.html +++ b/api-wasm/classes/getAuctionInfoOptions.html @@ -1,8 +1,8 @@ getAuctionInfoOptions | api-wasm

    Class getAuctionInfoOptions

    Options for the get_auction_info method.

    -

    Constructors

    Constructors

    Properties

    maybe_block_id_as_string?: string
    maybe_block_identifier?: BlockIdentifier
    node_address?: string
    verbosity?: Verbosity

    Methods

    \ No newline at end of file +

    Constructors

    Properties

    maybe_block_id_as_string?: string
    maybe_block_identifier?: BlockIdentifier
    node_address?: string
    verbosity?: Verbosity

    Methods

    \ No newline at end of file diff --git a/api-wasm/classes/getBalanceOptions.html b/api-wasm/classes/getBalanceOptions.html index 1ddf0f45a..29f30a014 100644 --- a/api-wasm/classes/getBalanceOptions.html +++ b/api-wasm/classes/getBalanceOptions.html @@ -1,5 +1,5 @@ getBalanceOptions | api-wasm

    Class getBalanceOptions

    Options for the get_balance method.

    -

    Constructors

    Constructors

    Properties

    node_address?: string
    purse_uref?: URef
    purse_uref_as_string?: string
    state_root_hash?: Digest
    state_root_hash_as_string?: string
    verbosity?: Verbosity

    Methods

    \ No newline at end of file +

    Constructors

    Properties

    node_address?: string
    purse_uref?: URef
    purse_uref_as_string?: string
    state_root_hash?: Digest
    state_root_hash_as_string?: string
    verbosity?: Verbosity

    Methods

    \ No newline at end of file diff --git a/api-wasm/classes/getBlockOptions.html b/api-wasm/classes/getBlockOptions.html index 5250018dc..cd379ad29 100644 --- a/api-wasm/classes/getBlockOptions.html +++ b/api-wasm/classes/getBlockOptions.html @@ -1,8 +1,8 @@ getBlockOptions | api-wasm

    Class getBlockOptions

    Options for the get_block method.

    -

    Constructors

    Constructors

    Properties

    maybe_block_id_as_string?: string
    maybe_block_identifier?: BlockIdentifier
    node_address?: string
    verbosity?: Verbosity

    Methods

    \ No newline at end of file +

    Constructors

    Properties

    maybe_block_id_as_string?: string
    maybe_block_identifier?: BlockIdentifier
    node_address?: string
    verbosity?: Verbosity

    Methods

    \ No newline at end of file diff --git a/api-wasm/classes/getBlockTransfersOptions.html b/api-wasm/classes/getBlockTransfersOptions.html index 4ed259988..915fd92c7 100644 --- a/api-wasm/classes/getBlockTransfersOptions.html +++ b/api-wasm/classes/getBlockTransfersOptions.html @@ -1,8 +1,8 @@ getBlockTransfersOptions | api-wasm

    Class getBlockTransfersOptions

    Options for the get_block_transfers method.

    -

    Constructors

    Constructors

    Properties

    maybe_block_id_as_string?: string
    maybe_block_identifier?: BlockIdentifier
    node_address?: string
    verbosity?: Verbosity

    Methods

    \ No newline at end of file +

    Constructors

    Properties

    maybe_block_id_as_string?: string
    maybe_block_identifier?: BlockIdentifier
    node_address?: string
    verbosity?: Verbosity

    Methods

    \ No newline at end of file diff --git a/api-wasm/classes/getDeployOptions.html b/api-wasm/classes/getDeployOptions.html index 6f758cf79..bb4282a08 100644 --- a/api-wasm/classes/getDeployOptions.html +++ b/api-wasm/classes/getDeployOptions.html @@ -1,9 +1,9 @@ getDeployOptions | api-wasm

    Class getDeployOptions

    Options for the get_deploy method.

    -

    Constructors

    Constructors

    Properties

    deploy_hash?: DeployHash
    deploy_hash_as_string?: string
    finalized_approvals?: boolean
    node_address?: string
    verbosity?: Verbosity

    Methods

    \ No newline at end of file +

    Constructors

    Properties

    deploy_hash?: DeployHash
    deploy_hash_as_string?: string
    finalized_approvals?: boolean
    node_address?: string
    verbosity?: Verbosity

    Methods

    \ No newline at end of file diff --git a/api-wasm/classes/getDictionaryItemOptions.html b/api-wasm/classes/getDictionaryItemOptions.html index d67a731da..04c0853df 100644 --- a/api-wasm/classes/getDictionaryItemOptions.html +++ b/api-wasm/classes/getDictionaryItemOptions.html @@ -1,5 +1,5 @@ getDictionaryItemOptions | api-wasm

    Class getDictionaryItemOptions

    Options for the get_dictionary_item method.

    -

    Constructors

    Constructors

    Properties

    dictionary_item_identifier?: DictionaryItemIdentifier
    dictionary_item_params?: DictionaryItemStrParams
    node_address?: string
    state_root_hash?: Digest
    state_root_hash_as_string?: string
    verbosity?: Verbosity

    Methods

    \ No newline at end of file +

    Constructors

    Properties

    dictionary_item_identifier?: DictionaryItemIdentifier
    dictionary_item_params?: DictionaryItemStrParams
    node_address?: string
    state_root_hash?: Digest
    state_root_hash_as_string?: string
    verbosity?: Verbosity

    Methods

    \ No newline at end of file diff --git a/api-wasm/classes/getEraInfoOptions.html b/api-wasm/classes/getEraInfoOptions.html index a7cad3556..e76e34b4b 100644 --- a/api-wasm/classes/getEraInfoOptions.html +++ b/api-wasm/classes/getEraInfoOptions.html @@ -1,7 +1,7 @@ -getEraInfoOptions | api-wasm

    Class getEraInfoOptions

    Constructors

    constructor +getEraInfoOptions | api-wasm

    Class getEraInfoOptions

    Constructors

    Properties

    maybe_block_id_as_string?: string
    maybe_block_identifier?: BlockIdentifier
    node_address?: string
    verbosity?: Verbosity

    Methods

    \ No newline at end of file +

    Constructors

    Properties

    maybe_block_id_as_string?: string
    maybe_block_identifier?: BlockIdentifier
    node_address?: string
    verbosity?: Verbosity

    Methods

    \ No newline at end of file diff --git a/api-wasm/classes/getEraSummaryOptions.html b/api-wasm/classes/getEraSummaryOptions.html index e35697fe3..b6d8c7784 100644 --- a/api-wasm/classes/getEraSummaryOptions.html +++ b/api-wasm/classes/getEraSummaryOptions.html @@ -1,8 +1,8 @@ getEraSummaryOptions | api-wasm

    Class getEraSummaryOptions

    Options for the get_era_summary method.

    -

    Constructors

    Constructors

    Properties

    maybe_block_id_as_string?: string
    maybe_block_identifier?: BlockIdentifier
    node_address?: string
    verbosity?: Verbosity

    Methods

    \ No newline at end of file +

    Constructors

    Properties

    maybe_block_id_as_string?: string
    maybe_block_identifier?: BlockIdentifier
    node_address?: string
    verbosity?: Verbosity

    Methods

    \ No newline at end of file diff --git a/api-wasm/classes/getSpeculativeExecOptions.html b/api-wasm/classes/getSpeculativeExecOptions.html index 32d57fcde..48135f0d7 100644 --- a/api-wasm/classes/getSpeculativeExecOptions.html +++ b/api-wasm/classes/getSpeculativeExecOptions.html @@ -1,5 +1,5 @@ getSpeculativeExecOptions | api-wasm

    Class getSpeculativeExecOptions

    Options for speculative execution.

    -

    Constructors

    Constructors

    Properties

    Methods

    Constructors

    Properties

    deploy?: Deploy

    The deploy to execute.

    -
    deploy_as_string?: string

    The deploy as a JSON string.

    -
    maybe_block_id_as_string?: string

    The block identifier as a string.

    -
    maybe_block_identifier?: BlockIdentifier

    The block identifier.

    -
    node_address?: string

    The node address.

    -
    verbosity?: Verbosity

    The verbosity level for logging.

    -

    Methods

    \ No newline at end of file +
    deploy_as_string?: string

    The deploy as a JSON string.

    +
    maybe_block_id_as_string?: string

    The block identifier as a string.

    +
    maybe_block_identifier?: BlockIdentifier

    The block identifier.

    +
    node_address?: string

    The node address.

    +
    verbosity?: Verbosity

    The verbosity level for logging.

    +

    Methods

    \ No newline at end of file diff --git a/api-wasm/classes/getStateRootHashOptions.html b/api-wasm/classes/getStateRootHashOptions.html index 86e4c3680..9edb1f127 100644 --- a/api-wasm/classes/getStateRootHashOptions.html +++ b/api-wasm/classes/getStateRootHashOptions.html @@ -1,8 +1,8 @@ getStateRootHashOptions | api-wasm

    Class getStateRootHashOptions

    Options for the get_state_root_hash method.

    -

    Constructors

    Constructors

    Properties

    maybe_block_id_as_string?: string
    maybe_block_identifier?: BlockIdentifier
    node_address?: string
    verbosity?: Verbosity

    Methods

    \ No newline at end of file +

    Constructors

    Properties

    maybe_block_id_as_string?: string
    maybe_block_identifier?: BlockIdentifier
    node_address?: string
    verbosity?: Verbosity

    Methods

    \ No newline at end of file diff --git a/api-wasm/classes/queryBalanceOptions.html b/api-wasm/classes/queryBalanceOptions.html index e92664cb2..7c51ea2b3 100644 --- a/api-wasm/classes/queryBalanceOptions.html +++ b/api-wasm/classes/queryBalanceOptions.html @@ -1,5 +1,5 @@ queryBalanceOptions | api-wasm

    Class queryBalanceOptions

    Options for the query_balance method.

    -

    Constructors

    Constructors

    Properties

    global_state_identifier?: GlobalStateIdentifier
    maybe_block_id_as_string?: string
    node_address?: string
    purse_identifier?: PurseIdentifier
    purse_identifier_as_string?: string
    state_root_hash?: Digest
    state_root_hash_as_string?: string
    verbosity?: Verbosity

    Methods

    \ No newline at end of file +

    Constructors

    Properties

    global_state_identifier?: GlobalStateIdentifier
    maybe_block_id_as_string?: string
    node_address?: string
    purse_identifier?: PurseIdentifier
    purse_identifier_as_string?: string
    state_root_hash?: Digest
    state_root_hash_as_string?: string
    verbosity?: Verbosity

    Methods

    \ No newline at end of file diff --git a/api-wasm/classes/queryContractDictOptions.html b/api-wasm/classes/queryContractDictOptions.html index 4d90e090f..4fd98c85f 100644 --- a/api-wasm/classes/queryContractDictOptions.html +++ b/api-wasm/classes/queryContractDictOptions.html @@ -1,4 +1,4 @@ -queryContractDictOptions | api-wasm

    Class queryContractDictOptions

    Constructors

    constructor +queryContractDictOptions | api-wasm

    Class queryContractDictOptions

    Constructors

    Properties

    dictionary_item_identifier?: DictionaryItemIdentifier
    dictionary_item_params?: DictionaryItemStrParams
    node_address?: string
    state_root_hash?: Digest
    state_root_hash_as_string?: string
    verbosity?: Verbosity

    Methods

    \ No newline at end of file +

    Constructors

    Properties

    dictionary_item_identifier?: DictionaryItemIdentifier
    dictionary_item_params?: DictionaryItemStrParams
    node_address?: string
    state_root_hash?: Digest
    state_root_hash_as_string?: string
    verbosity?: Verbosity

    Methods

    \ No newline at end of file diff --git a/api-wasm/classes/queryContractKeyOptions.html b/api-wasm/classes/queryContractKeyOptions.html index aade08656..2d737545f 100644 --- a/api-wasm/classes/queryContractKeyOptions.html +++ b/api-wasm/classes/queryContractKeyOptions.html @@ -1,4 +1,4 @@ -queryContractKeyOptions | api-wasm

    Class queryContractKeyOptions

    Constructors

    constructor +queryContractKeyOptions | api-wasm

    Class queryContractKeyOptions

    Constructors

    Properties

    contract_key?: Key
    contract_key_as_string?: string
    global_state_identifier?: GlobalStateIdentifier
    maybe_block_id_as_string?: string
    node_address?: string
    path?: Path
    path_as_string?: string
    state_root_hash?: Digest
    state_root_hash_as_string?: string
    verbosity?: Verbosity

    Methods

    \ No newline at end of file +

    Constructors

    Properties

    contract_key?: Key
    contract_key_as_string?: string
    global_state_identifier?: GlobalStateIdentifier
    maybe_block_id_as_string?: string
    node_address?: string
    path?: Path
    path_as_string?: string
    state_root_hash?: Digest
    state_root_hash_as_string?: string
    verbosity?: Verbosity

    Methods

    \ No newline at end of file diff --git a/api-wasm/classes/queryGlobalStateOptions.html b/api-wasm/classes/queryGlobalStateOptions.html index 84c136142..a1d5c0ff9 100644 --- a/api-wasm/classes/queryGlobalStateOptions.html +++ b/api-wasm/classes/queryGlobalStateOptions.html @@ -1,5 +1,5 @@ queryGlobalStateOptions | api-wasm

    Class queryGlobalStateOptions

    Options for the query_global_state method.

    -

    Constructors

    Constructors

    Properties

    global_state_identifier?: GlobalStateIdentifier
    key?: Key
    key_as_string?: string
    maybe_block_id_as_string?: string
    node_address?: string
    path?: Path
    path_as_string?: string
    state_root_hash?: Digest
    state_root_hash_as_string?: string
    verbosity?: Verbosity

    Methods

    \ No newline at end of file +

    Constructors

    Properties

    global_state_identifier?: GlobalStateIdentifier
    key?: Key
    key_as_string?: string
    maybe_block_id_as_string?: string
    node_address?: string
    path?: Path
    path_as_string?: string
    state_root_hash?: Digest
    state_root_hash_as_string?: string
    verbosity?: Verbosity

    Methods

    \ No newline at end of file diff --git a/api-wasm/enums/CLTypeEnum.html b/api-wasm/enums/CLTypeEnum.html index 819c803bc..6ef0c54ba 100644 --- a/api-wasm/enums/CLTypeEnum.html +++ b/api-wasm/enums/CLTypeEnum.html @@ -1,4 +1,4 @@ -CLTypeEnum | api-wasm

    Enumeration CLTypeEnum

    Enumeration Members

    Any +CLTypeEnum | api-wasm

    Enumeration CLTypeEnum

    Enumeration Members

    Any Bool ByteArray I32 @@ -21,4 +21,4 @@ U8 URef Unit -

    Enumeration Members

    Any: 22
    Bool: 0
    ByteArray: 16
    I32: 1
    I64: 2
    Key: 11
    List: 15
    Map: 18
    Option: 14
    PublicKey: 13
    Result: 17
    String: 10
    Tuple1: 19
    Tuple2: 20
    Tuple3: 21
    U128: 6
    U256: 7
    U32: 4
    U512: 8
    U64: 5
    U8: 3
    URef: 12
    Unit: 9
    \ No newline at end of file +

    Enumeration Members

    Any: 22
    Bool: 0
    ByteArray: 16
    I32: 1
    I64: 2
    Key: 11
    List: 15
    Map: 18
    Option: 14
    PublicKey: 13
    Result: 17
    String: 10
    Tuple1: 19
    Tuple2: 20
    Tuple3: 21
    U128: 6
    U256: 7
    U32: 4
    U512: 8
    U64: 5
    U8: 3
    URef: 12
    Unit: 9
    \ No newline at end of file diff --git a/api-wasm/enums/Verbosity.html b/api-wasm/enums/Verbosity.html index 20ad54c46..8cd2cc9f2 100644 --- a/api-wasm/enums/Verbosity.html +++ b/api-wasm/enums/Verbosity.html @@ -1,4 +1,4 @@ -Verbosity | api-wasm

    Enumeration Verbosity

    Enumeration Members

    High +Verbosity | api-wasm

    Enumeration Verbosity

    Enumeration Members

    Enumeration Members

    High: 2
    Low: 0
    Medium: 1
    \ No newline at end of file +

    Enumeration Members

    High: 2
    Low: 0
    Medium: 1
    \ No newline at end of file diff --git a/api-wasm/functions/accountHashToBase64.html b/api-wasm/functions/accountHashToBase64.html index 3d401eb2b..914ad57a5 100644 --- a/api-wasm/functions/accountHashToBase64.html +++ b/api-wasm/functions/accountHashToBase64.html @@ -5,4 +5,4 @@

    Returns

    Returns the base64-encoded string. Example: "ALSFwHTO98yszQMClJ0gQ6txM6vbFM+ofoOSlFwL2Apf"

    -

    Parameters

    • formatted_account_hash: string

    Returns string

    \ No newline at end of file +

    Parameters

    • formatted_account_hash: string

    Returns string

    \ No newline at end of file diff --git a/api-wasm/functions/default.html b/api-wasm/functions/default.html index 88ec57553..1efa7df85 100644 --- a/api-wasm/functions/default.html +++ b/api-wasm/functions/default.html @@ -1,3 +1,3 @@ default | api-wasm

    Function default

    \ No newline at end of file +

    Parameters

    Returns Promise<InitOutput>

    \ No newline at end of file diff --git a/api-wasm/functions/encodeLowerBlake2b.html b/api-wasm/functions/encodeLowerBlake2b.html index d10d5e822..056afc64a 100644 --- a/api-wasm/functions/encodeLowerBlake2b.html +++ b/api-wasm/functions/encodeLowerBlake2b.html @@ -3,4 +3,4 @@
  • meta_data - A string containing the metadata to be hashed.
  • Returns

    A JsValue containing the hash generated using the Blake2b algorithm.

    -

    Parameters

    • meta_data: string

    Returns any

    \ No newline at end of file +

    Parameters

    • meta_data: string

    Returns any

    \ No newline at end of file diff --git a/api-wasm/functions/fromTransfer.html b/api-wasm/functions/fromTransfer.html index e6cb6caca..afee3ae00 100644 --- a/api-wasm/functions/fromTransfer.html +++ b/api-wasm/functions/fromTransfer.html @@ -1 +1 @@ -fromTransfer | api-wasm

    Function fromTransfer

    \ No newline at end of file +fromTransfer | api-wasm

    Function fromTransfer

    \ No newline at end of file diff --git a/api-wasm/functions/generatePrivateKey.html b/api-wasm/functions/generatePrivateKey.html index ed62a9bcd..776ea1417 100644 --- a/api-wasm/functions/generatePrivateKey.html +++ b/api-wasm/functions/generatePrivateKey.html @@ -1,4 +1,4 @@ generatePrivateKey | api-wasm

    Function generatePrivateKey

    • Generates a secret key using the Ed25519 algorithm and returns it as a PEM-encoded string.

      Returns

      A JsValue containing the PEM-encoded secret key or a JavaScript error if an error occurs.

      Errors

      Returns an error if the secret key generation or serialization fails.

      -

      Returns any

    \ No newline at end of file +

    Returns any

    \ No newline at end of file diff --git a/api-wasm/functions/generatePrivateKey_secp256k1.html b/api-wasm/functions/generatePrivateKey_secp256k1.html index fa47463cd..8194f4751 100644 --- a/api-wasm/functions/generatePrivateKey_secp256k1.html +++ b/api-wasm/functions/generatePrivateKey_secp256k1.html @@ -1,4 +1,4 @@ generatePrivateKey_secp256k1 | api-wasm

    Function generatePrivateKey_secp256k1

    • Generates a secret key using the secp256k1 algorithm and returns it as a PEM-encoded string.

      Returns

      A JsValue containing the PEM-encoded secret key or a JavaScript error if an error occurs.

      Errors

      Returns an error if the secret key generation or serialization fails.

      -

      Returns any

    \ No newline at end of file +

    Returns any

    \ No newline at end of file diff --git a/api-wasm/functions/getTimestamp.html b/api-wasm/functions/getTimestamp.html index fa824f4d0..f82b520a5 100644 --- a/api-wasm/functions/getTimestamp.html +++ b/api-wasm/functions/getTimestamp.html @@ -1,3 +1,3 @@ getTimestamp | api-wasm

    Function getTimestamp

    \ No newline at end of file +

    Returns any

    \ No newline at end of file diff --git a/api-wasm/functions/hexToString.html b/api-wasm/functions/hexToString.html index a5dadd557..32c8fd42e 100644 --- a/api-wasm/functions/hexToString.html +++ b/api-wasm/functions/hexToString.html @@ -3,4 +3,4 @@
  • hex_string - The hexadecimal string to convert.
  • Returns

    A regular string containing the converted value.

    -

    Parameters

    • hex_string: string

    Returns string

    \ No newline at end of file +

    Parameters

    • hex_string: string

    Returns string

    \ No newline at end of file diff --git a/api-wasm/functions/hexToUint8Array.html b/api-wasm/functions/hexToUint8Array.html index 79817df59..f664497e7 100644 --- a/api-wasm/functions/hexToUint8Array.html +++ b/api-wasm/functions/hexToUint8Array.html @@ -3,4 +3,4 @@
  • hex_string - The hexadecimal string to convert.
  • Returns

    A Uint8Array containing the converted value.

    -

    Parameters

    • hex_string: string

    Returns Uint8Array

    \ No newline at end of file +

    Parameters

    • hex_string: string

    Returns Uint8Array

    \ No newline at end of file diff --git a/api-wasm/functions/initSync.html b/api-wasm/functions/initSync.html index 53367c4d9..0ca137d2a 100644 --- a/api-wasm/functions/initSync.html +++ b/api-wasm/functions/initSync.html @@ -1,3 +1,3 @@ initSync | api-wasm

    Function initSync

    \ No newline at end of file +

    Parameters

    Returns InitOutput

    \ No newline at end of file diff --git a/api-wasm/functions/jsonPrettyPrint.html b/api-wasm/functions/jsonPrettyPrint.html index ae0bbe038..2531a4ceb 100644 --- a/api-wasm/functions/jsonPrettyPrint.html +++ b/api-wasm/functions/jsonPrettyPrint.html @@ -4,4 +4,4 @@
  • verbosity - An optional verbosity level for pretty printing.
  • Returns

    A pretty printed JSON value as a JsValue.

    -

    Parameters

    Returns any

    \ No newline at end of file +

    Parameters

    Returns any

    \ No newline at end of file diff --git a/api-wasm/functions/makeDictionaryItemKey.html b/api-wasm/functions/makeDictionaryItemKey.html index c75b2b4f6..2d28aa9c7 100644 --- a/api-wasm/functions/makeDictionaryItemKey.html +++ b/api-wasm/functions/makeDictionaryItemKey.html @@ -4,4 +4,4 @@
  • value - A string representation of the value, for now restricted to parse as U256 or Key
  • Returns

    A string representing the formatted dictionary item key.

    -

    Parameters

    • key: Key
    • value: string

    Returns string

    \ No newline at end of file +

    Parameters

    • key: Key
    • value: string

    Returns string

    \ No newline at end of file diff --git a/api-wasm/functions/motesToCSPR.html b/api-wasm/functions/motesToCSPR.html index 643c66c5a..070aba56e 100644 --- a/api-wasm/functions/motesToCSPR.html +++ b/api-wasm/functions/motesToCSPR.html @@ -3,4 +3,4 @@
  • motes - The motes value to convert.
  • Returns

    A string representing the CSPR amount.

    -

    Parameters

    • motes: string

    Returns string

    \ No newline at end of file +

    Parameters

    • motes: string

    Returns string

    \ No newline at end of file diff --git a/api-wasm/functions/privateToPublicKey.html b/api-wasm/functions/privateToPublicKey.html index 7a71f5d1b..a2cb75a36 100644 --- a/api-wasm/functions/privateToPublicKey.html +++ b/api-wasm/functions/privateToPublicKey.html @@ -4,4 +4,4 @@

    Returns

    A JsValue containing the corresponding public key. If an error occurs during the conversion, JavaScript error is returned.

    -

    Parameters

    • secret_key: string

    Returns any

    \ No newline at end of file +

    Parameters

    • secret_key: string

    Returns any

    \ No newline at end of file diff --git a/api-wasm/functions/uint8ArrayToBytes.html b/api-wasm/functions/uint8ArrayToBytes.html index 6b5e397b8..54169d786 100644 --- a/api-wasm/functions/uint8ArrayToBytes.html +++ b/api-wasm/functions/uint8ArrayToBytes.html @@ -3,4 +3,4 @@
  • uint8_array - The Uint8Array to convert.
  • Returns

    A Bytes object containing the converted value.

    -

    Parameters

    • uint8_array: Uint8Array

    Returns Bytes

    \ No newline at end of file +

    Parameters

    • uint8_array: Uint8Array

    Returns Bytes

    \ No newline at end of file diff --git a/api-wasm/interfaces/InitOutput.html b/api-wasm/interfaces/InitOutput.html index 470bf5d92..8328edd15 100644 --- a/api-wasm/interfaces/InitOutput.html +++ b/api-wasm/interfaces/InitOutput.html @@ -1,4 +1,4 @@ -InitOutput | api-wasm

    Interface InitOutput

    interface InitOutput {
        __wbg_accessrights_free: ((a) => void);
        __wbg_accounthash_free: ((a) => void);
        __wbg_accountidentifier_free: ((a) => void);
        __wbg_argssimple_free: ((a) => void);
        __wbg_blockhash_free: ((a) => void);
        __wbg_blockidentifier_free: ((a) => void);
        __wbg_body_free: ((a) => void);
        __wbg_bytes_free: ((a) => void);
        __wbg_cltype_free: ((a) => void);
        __wbg_contracthash_free: ((a) => void);
        __wbg_contractpackagehash_free: ((a) => void);
        __wbg_deploy_free: ((a) => void);
        __wbg_deployhash_free: ((a) => void);
        __wbg_deployprocessed_free: ((a) => void);
        __wbg_deploystrparams_free: ((a) => void);
        __wbg_deploysubscription_free: ((a) => void);
        __wbg_deploywatcher_free: ((a) => void);
        __wbg_dictionaryaddr_free: ((a) => void);
        __wbg_dictionaryitemidentifier_free: ((a) => void);
        __wbg_dictionaryitemstrparams_free: ((a) => void);
        __wbg_digest_free: ((a) => void);
        __wbg_eraid_free: ((a) => void);
        __wbg_eventparseresult_free: ((a) => void);
        __wbg_executionresult_free: ((a) => void);
        __wbg_failure_free: ((a) => void);
        __wbg_get_body_DeployProcessed: ((a) => number);
        __wbg_get_deployprocessed_account: ((a, b) => void);
        __wbg_get_deployprocessed_block_hash: ((a, b) => void);
        __wbg_get_deployprocessed_dependencies: ((a, b) => void);
        __wbg_get_deployprocessed_deploy_hash: ((a, b) => void);
        __wbg_get_deployprocessed_execution_result: ((a) => number);
        __wbg_get_deployprocessed_timestamp: ((a, b) => void);
        __wbg_get_deployprocessed_ttl: ((a, b) => void);
        __wbg_get_deploysubscription_deployHash: ((a, b) => void);
        __wbg_get_deploysubscription_eventHandlerFn: ((a) => number);
        __wbg_get_eventparseresult_body: ((a) => number);
        __wbg_get_eventparseresult_err: ((a, b) => void);
        __wbg_get_executionresult_Failure: ((a) => number);
        __wbg_get_executionresult_Success: ((a) => number);
        __wbg_get_failure_error_message: ((a, b) => void);
        __wbg_get_getaccountoptions_account_identifier: ((a) => number);
        __wbg_get_getaccountoptions_account_identifier_as_string: ((a, b) => void);
        __wbg_get_getaccountoptions_maybe_block_id_as_string: ((a, b) => void);
        __wbg_get_getaccountoptions_maybe_block_identifier: ((a) => number);
        __wbg_get_getaccountoptions_node_address: ((a, b) => void);
        __wbg_get_getaccountoptions_verbosity: ((a) => number);
        __wbg_get_getauctioninfooptions_maybe_block_id_as_string: ((a, b) => void);
        __wbg_get_getauctioninfooptions_maybe_block_identifier: ((a) => number);
        __wbg_get_getauctioninfooptions_node_address: ((a, b) => void);
        __wbg_get_getauctioninfooptions_verbosity: ((a) => number);
        __wbg_get_getbalanceoptions_node_address: ((a, b) => void);
        __wbg_get_getbalanceoptions_purse_uref: ((a) => number);
        __wbg_get_getbalanceoptions_purse_uref_as_string: ((a, b) => void);
        __wbg_get_getbalanceoptions_state_root_hash: ((a) => number);
        __wbg_get_getbalanceoptions_state_root_hash_as_string: ((a, b) => void);
        __wbg_get_getbalanceoptions_verbosity: ((a) => number);
        __wbg_get_getblockoptions_maybe_block_id_as_string: ((a, b) => void);
        __wbg_get_getblockoptions_maybe_block_identifier: ((a) => number);
        __wbg_get_getblockoptions_node_address: ((a, b) => void);
        __wbg_get_getblockoptions_verbosity: ((a) => number);
        __wbg_get_getblocktransfersoptions_maybe_block_id_as_string: ((a, b) => void);
        __wbg_get_getblocktransfersoptions_maybe_block_identifier: ((a) => number);
        __wbg_get_getblocktransfersoptions_node_address: ((a, b) => void);
        __wbg_get_getblocktransfersoptions_verbosity: ((a) => number);
        __wbg_get_getdeployoptions_deploy_hash: ((a) => number);
        __wbg_get_getdeployoptions_deploy_hash_as_string: ((a, b) => void);
        __wbg_get_getdeployoptions_finalized_approvals: ((a) => number);
        __wbg_get_getdeployoptions_node_address: ((a, b) => void);
        __wbg_get_getdeployoptions_verbosity: ((a) => number);
        __wbg_get_getdictionaryitemoptions_dictionary_item_identifier: ((a) => number);
        __wbg_get_getdictionaryitemoptions_dictionary_item_params: ((a) => number);
        __wbg_get_getdictionaryitemoptions_node_address: ((a, b) => void);
        __wbg_get_getdictionaryitemoptions_state_root_hash: ((a) => number);
        __wbg_get_getdictionaryitemoptions_state_root_hash_as_string: ((a, b) => void);
        __wbg_get_getdictionaryitemoptions_verbosity: ((a) => number);
        __wbg_get_geterainfooptions_maybe_block_id_as_string: ((a, b) => void);
        __wbg_get_geterainfooptions_maybe_block_identifier: ((a) => number);
        __wbg_get_geterainfooptions_node_address: ((a, b) => void);
        __wbg_get_geterainfooptions_verbosity: ((a) => number);
        __wbg_get_geterasummaryoptions_maybe_block_id_as_string: ((a, b) => void);
        __wbg_get_geterasummaryoptions_maybe_block_identifier: ((a) => number);
        __wbg_get_geterasummaryoptions_node_address: ((a, b) => void);
        __wbg_get_geterasummaryoptions_verbosity: ((a) => number);
        __wbg_get_getspeculativeexecoptions_deploy: ((a) => number);
        __wbg_get_getspeculativeexecoptions_deploy_as_string: ((a, b) => void);
        __wbg_get_getspeculativeexecoptions_maybe_block_id_as_string: ((a, b) => void);
        __wbg_get_getspeculativeexecoptions_maybe_block_identifier: ((a) => number);
        __wbg_get_getspeculativeexecoptions_node_address: ((a, b) => void);
        __wbg_get_getspeculativeexecoptions_verbosity: ((a) => number);
        __wbg_get_getstateroothashoptions_maybe_block_id_as_string: ((a, b) => void);
        __wbg_get_getstateroothashoptions_maybe_block_identifier: ((a) => number);
        __wbg_get_getstateroothashoptions_node_address: ((a, b) => void);
        __wbg_get_getstateroothashoptions_verbosity: ((a) => number);
        __wbg_get_querybalanceoptions_global_state_identifier: ((a) => number);
        __wbg_get_querybalanceoptions_maybe_block_id_as_string: ((a, b) => void);
        __wbg_get_querybalanceoptions_node_address: ((a, b) => void);
        __wbg_get_querybalanceoptions_purse_identifier: ((a) => number);
        __wbg_get_querybalanceoptions_purse_identifier_as_string: ((a, b) => void);
        __wbg_get_querybalanceoptions_state_root_hash: ((a) => number);
        __wbg_get_querybalanceoptions_state_root_hash_as_string: ((a, b) => void);
        __wbg_get_querybalanceoptions_verbosity: ((a) => number);
        __wbg_get_querycontractdictoptions_dictionary_item_identifier: ((a) => number);
        __wbg_get_querycontractdictoptions_dictionary_item_params: ((a) => number);
        __wbg_get_querycontractdictoptions_node_address: ((a, b) => void);
        __wbg_get_querycontractdictoptions_state_root_hash: ((a) => number);
        __wbg_get_querycontractdictoptions_state_root_hash_as_string: ((a, b) => void);
        __wbg_get_querycontractdictoptions_verbosity: ((a) => number);
        __wbg_get_querycontractkeyoptions_contract_key: ((a) => number);
        __wbg_get_querycontractkeyoptions_contract_key_as_string: ((a, b) => void);
        __wbg_get_querycontractkeyoptions_global_state_identifier: ((a) => number);
        __wbg_get_querycontractkeyoptions_maybe_block_id_as_string: ((a, b) => void);
        __wbg_get_querycontractkeyoptions_node_address: ((a, b) => void);
        __wbg_get_querycontractkeyoptions_path: ((a) => number);
        __wbg_get_querycontractkeyoptions_path_as_string: ((a, b) => void);
        __wbg_get_querycontractkeyoptions_state_root_hash: ((a) => number);
        __wbg_get_querycontractkeyoptions_state_root_hash_as_string: ((a, b) => void);
        __wbg_get_querycontractkeyoptions_verbosity: ((a) => number);
        __wbg_get_queryglobalstateoptions_global_state_identifier: ((a) => number);
        __wbg_get_queryglobalstateoptions_key: ((a) => number);
        __wbg_get_queryglobalstateoptions_key_as_string: ((a, b) => void);
        __wbg_get_queryglobalstateoptions_maybe_block_id_as_string: ((a, b) => void);
        __wbg_get_queryglobalstateoptions_node_address: ((a, b) => void);
        __wbg_get_queryglobalstateoptions_path: ((a) => number);
        __wbg_get_queryglobalstateoptions_path_as_string: ((a, b) => void);
        __wbg_get_queryglobalstateoptions_state_root_hash: ((a) => number);
        __wbg_get_queryglobalstateoptions_state_root_hash_as_string: ((a, b) => void);
        __wbg_get_queryglobalstateoptions_verbosity: ((a) => number);
        __wbg_get_success_cost: ((a, b) => void);
        __wbg_getaccountoptions_free: ((a) => void);
        __wbg_getaccountresult_free: ((a) => void);
        __wbg_getauctioninfooptions_free: ((a) => void);
        __wbg_getauctioninforesult_free: ((a) => void);
        __wbg_getbalanceoptions_free: ((a) => void);
        __wbg_getbalanceresult_free: ((a) => void);
        __wbg_getblockoptions_free: ((a) => void);
        __wbg_getblockresult_free: ((a) => void);
        __wbg_getblocktransfersoptions_free: ((a) => void);
        __wbg_getblocktransfersresult_free: ((a) => void);
        __wbg_getchainspecresult_free: ((a) => void);
        __wbg_getdeployoptions_free: ((a) => void);
        __wbg_getdeployresult_free: ((a) => void);
        __wbg_getdictionaryitemoptions_free: ((a) => void);
        __wbg_getdictionaryitemresult_free: ((a) => void);
        __wbg_geterainfooptions_free: ((a) => void);
        __wbg_geterainforesult_free: ((a) => void);
        __wbg_geterasummaryoptions_free: ((a) => void);
        __wbg_geterasummaryresult_free: ((a) => void);
        __wbg_getnodestatusresult_free: ((a) => void);
        __wbg_getpeersresult_free: ((a) => void);
        __wbg_getspeculativeexecoptions_free: ((a) => void);
        __wbg_getstateroothashoptions_free: ((a) => void);
        __wbg_getstateroothashresult_free: ((a) => void);
        __wbg_getvalidatorchangesresult_free: ((a) => void);
        __wbg_globalstateidentifier_free: ((a) => void);
        __wbg_hashaddr_free: ((a) => void);
        __wbg_intounderlyingbytesource_free: ((a) => void);
        __wbg_intounderlyingsink_free: ((a) => void);
        __wbg_intounderlyingsource_free: ((a) => void);
        __wbg_key_free: ((a) => void);
        __wbg_listrpcsresult_free: ((a) => void);
        __wbg_path_free: ((a) => void);
        __wbg_paymentstrparams_free: ((a) => void);
        __wbg_peerentry_free: ((a) => void);
        __wbg_publickey_free: ((a) => void);
        __wbg_purseidentifier_free: ((a) => void);
        __wbg_putdeployresult_free: ((a) => void);
        __wbg_querybalanceoptions_free: ((a) => void);
        __wbg_querybalanceresult_free: ((a) => void);
        __wbg_querycontractdictoptions_free: ((a) => void);
        __wbg_querycontractkeyoptions_free: ((a) => void);
        __wbg_queryglobalstateoptions_free: ((a) => void);
        __wbg_queryglobalstateresult_free: ((a) => void);
        __wbg_sdk_free: ((a) => void);
        __wbg_sessionstrparams_free: ((a) => void);
        __wbg_set_body_DeployProcessed: ((a, b) => void);
        __wbg_set_deployprocessed_account: ((a, b, c) => void);
        __wbg_set_deployprocessed_block_hash: ((a, b, c) => void);
        __wbg_set_deployprocessed_dependencies: ((a, b, c) => void);
        __wbg_set_deployprocessed_deploy_hash: ((a, b, c) => void);
        __wbg_set_deployprocessed_execution_result: ((a, b) => void);
        __wbg_set_deployprocessed_timestamp: ((a, b, c) => void);
        __wbg_set_deployprocessed_ttl: ((a, b, c) => void);
        __wbg_set_deploysubscription_deployHash: ((a, b, c) => void);
        __wbg_set_deploysubscription_eventHandlerFn: ((a, b) => void);
        __wbg_set_eventparseresult_body: ((a, b) => void);
        __wbg_set_eventparseresult_err: ((a, b, c) => void);
        __wbg_set_executionresult_Failure: ((a, b) => void);
        __wbg_set_executionresult_Success: ((a, b) => void);
        __wbg_set_failure_error_message: ((a, b, c) => void);
        __wbg_set_getaccountoptions_account_identifier: ((a, b) => void);
        __wbg_set_getaccountoptions_account_identifier_as_string: ((a, b, c) => void);
        __wbg_set_getaccountoptions_maybe_block_id_as_string: ((a, b, c) => void);
        __wbg_set_getaccountoptions_maybe_block_identifier: ((a, b) => void);
        __wbg_set_getaccountoptions_node_address: ((a, b, c) => void);
        __wbg_set_getaccountoptions_verbosity: ((a, b) => void);
        __wbg_set_getauctioninfooptions_maybe_block_id_as_string: ((a, b, c) => void);
        __wbg_set_getauctioninfooptions_maybe_block_identifier: ((a, b) => void);
        __wbg_set_getauctioninfooptions_node_address: ((a, b, c) => void);
        __wbg_set_getauctioninfooptions_verbosity: ((a, b) => void);
        __wbg_set_getbalanceoptions_node_address: ((a, b, c) => void);
        __wbg_set_getbalanceoptions_purse_uref: ((a, b) => void);
        __wbg_set_getbalanceoptions_purse_uref_as_string: ((a, b, c) => void);
        __wbg_set_getbalanceoptions_state_root_hash: ((a, b) => void);
        __wbg_set_getbalanceoptions_state_root_hash_as_string: ((a, b, c) => void);
        __wbg_set_getbalanceoptions_verbosity: ((a, b) => void);
        __wbg_set_getblockoptions_maybe_block_id_as_string: ((a, b, c) => void);
        __wbg_set_getblockoptions_maybe_block_identifier: ((a, b) => void);
        __wbg_set_getblockoptions_node_address: ((a, b, c) => void);
        __wbg_set_getblockoptions_verbosity: ((a, b) => void);
        __wbg_set_getblocktransfersoptions_maybe_block_id_as_string: ((a, b, c) => void);
        __wbg_set_getblocktransfersoptions_maybe_block_identifier: ((a, b) => void);
        __wbg_set_getblocktransfersoptions_node_address: ((a, b, c) => void);
        __wbg_set_getblocktransfersoptions_verbosity: ((a, b) => void);
        __wbg_set_getdeployoptions_deploy_hash: ((a, b) => void);
        __wbg_set_getdeployoptions_deploy_hash_as_string: ((a, b, c) => void);
        __wbg_set_getdeployoptions_finalized_approvals: ((a, b) => void);
        __wbg_set_getdeployoptions_node_address: ((a, b, c) => void);
        __wbg_set_getdeployoptions_verbosity: ((a, b) => void);
        __wbg_set_getdictionaryitemoptions_dictionary_item_identifier: ((a, b) => void);
        __wbg_set_getdictionaryitemoptions_dictionary_item_params: ((a, b) => void);
        __wbg_set_getdictionaryitemoptions_node_address: ((a, b, c) => void);
        __wbg_set_getdictionaryitemoptions_state_root_hash: ((a, b) => void);
        __wbg_set_getdictionaryitemoptions_state_root_hash_as_string: ((a, b, c) => void);
        __wbg_set_getdictionaryitemoptions_verbosity: ((a, b) => void);
        __wbg_set_geterainfooptions_maybe_block_id_as_string: ((a, b, c) => void);
        __wbg_set_geterainfooptions_maybe_block_identifier: ((a, b) => void);
        __wbg_set_geterainfooptions_node_address: ((a, b, c) => void);
        __wbg_set_geterainfooptions_verbosity: ((a, b) => void);
        __wbg_set_geterasummaryoptions_maybe_block_id_as_string: ((a, b, c) => void);
        __wbg_set_geterasummaryoptions_maybe_block_identifier: ((a, b) => void);
        __wbg_set_geterasummaryoptions_node_address: ((a, b, c) => void);
        __wbg_set_geterasummaryoptions_verbosity: ((a, b) => void);
        __wbg_set_getspeculativeexecoptions_deploy: ((a, b) => void);
        __wbg_set_getspeculativeexecoptions_deploy_as_string: ((a, b, c) => void);
        __wbg_set_getspeculativeexecoptions_maybe_block_id_as_string: ((a, b, c) => void);
        __wbg_set_getspeculativeexecoptions_maybe_block_identifier: ((a, b) => void);
        __wbg_set_getspeculativeexecoptions_node_address: ((a, b, c) => void);
        __wbg_set_getspeculativeexecoptions_verbosity: ((a, b) => void);
        __wbg_set_getstateroothashoptions_maybe_block_id_as_string: ((a, b, c) => void);
        __wbg_set_getstateroothashoptions_maybe_block_identifier: ((a, b) => void);
        __wbg_set_getstateroothashoptions_node_address: ((a, b, c) => void);
        __wbg_set_getstateroothashoptions_verbosity: ((a, b) => void);
        __wbg_set_querybalanceoptions_global_state_identifier: ((a, b) => void);
        __wbg_set_querybalanceoptions_maybe_block_id_as_string: ((a, b, c) => void);
        __wbg_set_querybalanceoptions_node_address: ((a, b, c) => void);
        __wbg_set_querybalanceoptions_purse_identifier: ((a, b) => void);
        __wbg_set_querybalanceoptions_purse_identifier_as_string: ((a, b, c) => void);
        __wbg_set_querybalanceoptions_state_root_hash: ((a, b) => void);
        __wbg_set_querybalanceoptions_state_root_hash_as_string: ((a, b, c) => void);
        __wbg_set_querybalanceoptions_verbosity: ((a, b) => void);
        __wbg_set_querycontractdictoptions_dictionary_item_identifier: ((a, b) => void);
        __wbg_set_querycontractdictoptions_dictionary_item_params: ((a, b) => void);
        __wbg_set_querycontractdictoptions_node_address: ((a, b, c) => void);
        __wbg_set_querycontractdictoptions_state_root_hash: ((a, b) => void);
        __wbg_set_querycontractdictoptions_state_root_hash_as_string: ((a, b, c) => void);
        __wbg_set_querycontractdictoptions_verbosity: ((a, b) => void);
        __wbg_set_querycontractkeyoptions_contract_key: ((a, b) => void);
        __wbg_set_querycontractkeyoptions_contract_key_as_string: ((a, b, c) => void);
        __wbg_set_querycontractkeyoptions_global_state_identifier: ((a, b) => void);
        __wbg_set_querycontractkeyoptions_maybe_block_id_as_string: ((a, b, c) => void);
        __wbg_set_querycontractkeyoptions_node_address: ((a, b, c) => void);
        __wbg_set_querycontractkeyoptions_path: ((a, b) => void);
        __wbg_set_querycontractkeyoptions_path_as_string: ((a, b, c) => void);
        __wbg_set_querycontractkeyoptions_state_root_hash: ((a, b) => void);
        __wbg_set_querycontractkeyoptions_state_root_hash_as_string: ((a, b, c) => void);
        __wbg_set_querycontractkeyoptions_verbosity: ((a, b) => void);
        __wbg_set_queryglobalstateoptions_global_state_identifier: ((a, b) => void);
        __wbg_set_queryglobalstateoptions_key: ((a, b) => void);
        __wbg_set_queryglobalstateoptions_key_as_string: ((a, b, c) => void);
        __wbg_set_queryglobalstateoptions_maybe_block_id_as_string: ((a, b, c) => void);
        __wbg_set_queryglobalstateoptions_node_address: ((a, b, c) => void);
        __wbg_set_queryglobalstateoptions_path: ((a, b) => void);
        __wbg_set_queryglobalstateoptions_path_as_string: ((a, b, c) => void);
        __wbg_set_queryglobalstateoptions_state_root_hash: ((a, b) => void);
        __wbg_set_queryglobalstateoptions_state_root_hash_as_string: ((a, b, c) => void);
        __wbg_set_queryglobalstateoptions_verbosity: ((a, b) => void);
        __wbg_set_success_cost: ((a, b, c) => void);
        __wbg_speculativeexecresult_free: ((a) => void);
        __wbg_success_free: ((a) => void);
        __wbg_transferaddr_free: ((a) => void);
        __wbg_uref_free: ((a) => void);
        __wbg_urefaddr_free: ((a) => void);
        __wbindgen_add_to_stack_pointer: ((a) => number);
        __wbindgen_exn_store: ((a) => void);
        __wbindgen_export_2: Table;
        __wbindgen_free: ((a, b, c) => void);
        __wbindgen_malloc: ((a, b) => number);
        __wbindgen_realloc: ((a, b, c, d) => number);
        _dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h1c40c16592036fc7: ((a, b, c) => void);
        _dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h5e61414879884c0a: ((a, b, c) => void);
        accessrights_ADD: (() => number);
        accessrights_ADD_WRITE: (() => number);
        accessrights_NONE: (() => number);
        accessrights_READ: (() => number);
        accessrights_READ_ADD: (() => number);
        accessrights_READ_ADD_WRITE: (() => number);
        accessrights_READ_WRITE: (() => number);
        accessrights_WRITE: (() => number);
        accessrights_from_bits: ((a, b, c) => number);
        accessrights_is_addable: ((a) => number);
        accessrights_is_none: ((a) => number);
        accessrights_is_readable: ((a) => number);
        accessrights_is_writeable: ((a) => number);
        accessrights_new: ((a, b) => void);
        accountHashToBase64: ((a, b, c) => void);
        accounthash_fromFormattedStr: ((a, b, c) => void);
        accounthash_fromPublicKey: ((a) => number);
        accounthash_fromUint8Array: ((a, b) => number);
        accounthash_new: ((a, b, c) => void);
        accounthash_toFormattedString: ((a, b) => void);
        accounthash_toHexString: ((a, b) => void);
        accounthash_toJson: ((a) => number);
        accountidentifier_fromAccountHash: ((a) => number);
        accountidentifier_fromFormattedStr: ((a, b, c) => void);
        accountidentifier_fromPublicKey: ((a) => number);
        accountidentifier_new: ((a, b, c) => void);
        accountidentifier_toJson: ((a) => number);
        blockhash_fromDigest: ((a, b) => void);
        blockhash_new: ((a, b, c) => void);
        blockhash_toJson: ((a) => number);
        blockhash_toString: ((a, b) => void);
        blockidentifier_fromHeight: ((a) => number);
        blockidentifier_from_hash: ((a) => number);
        blockidentifier_new: ((a) => number);
        blockidentifier_toJson: ((a) => number);
        bytes_fromUint8Array: ((a) => number);
        bytes_new: (() => number);
        cltype_Any: (() => number);
        cltype_Bool: (() => number);
        cltype_ByteArray: (() => number);
        cltype_I32: (() => number);
        cltype_I64: (() => number);
        cltype_Key: (() => number);
        cltype_List: ((a) => number);
        cltype_Map: ((a, b) => number);
        cltype_Option: ((a) => number);
        cltype_PublicKey: (() => number);
        cltype_Result: ((a, b) => number);
        cltype_String: (() => number);
        cltype_Tuple1: ((a) => number);
        cltype_Tuple2: ((a, b) => number);
        cltype_Tuple3: ((a, b, c) => number);
        cltype_U128: (() => number);
        cltype_U256: (() => number);
        cltype_U32: (() => number);
        cltype_U512: (() => number);
        cltype_U64: (() => number);
        cltype_U8: (() => number);
        cltype_URef: (() => number);
        cltype_Unit: (() => number);
        cltype_new: ((a) => number);
        cltype_toString: ((a, b) => void);
        contracthash_fromFormattedStr: ((a, b, c) => void);
        contracthash_fromString: ((a, b, c) => void);
        contracthash_fromUint8Array: ((a, b) => number);
        contracthash_toFormattedString: ((a, b) => void);
        contractpackagehash_fromFormattedStr: ((a, b, c) => void);
        contractpackagehash_fromString: ((a, b, c) => void);
        contractpackagehash_fromUint8Array: ((a, b) => number);
        contractpackagehash_toFormattedString: ((a, b) => void);
        deploy_TTL: ((a, b) => void);
        deploy_account: ((a, b) => void);
        deploy_addArg: ((a, b, c, d) => number);
        deploy_addSignature: ((a, b, c, d, e) => number);
        deploy_args: ((a) => number);
        deploy_chainName: ((a, b) => void);
        deploy_hash: ((a) => number);
        deploy_new: ((a) => number);
        deploy_sign: ((a, b, c) => number);
        deploy_timestamp: ((a, b) => void);
        deploy_toJson: ((a) => number);
        deploy_validateDeploySize: ((a) => number);
        deploy_withAccount: ((a, b, c, d) => number);
        deploy_withChainName: ((a, b, c, d, e) => number);
        deploy_withEntryPointName: ((a, b, c, d, e) => number);
        deploy_withHash: ((a, b, c, d) => number);
        deploy_withModuleBytes: ((a, b, c, d) => number);
        deploy_withPackageHash: ((a, b, c, d) => number);
        deploy_withPayment: ((a, b, c, d) => number);
        deploy_withPaymentAndSession: ((a, b, c, d) => void);
        deploy_withSecretKey: ((a, b, c) => number);
        deploy_withSession: ((a, b, c, d) => number);
        deploy_withStandardPayment: ((a, b, c, d, e) => number);
        deploy_withTTL: ((a, b, c, d, e) => number);
        deploy_withTimestamp: ((a, b, c, d, e) => number);
        deploy_withTransfer: ((a, b, c, d, e, f, g, h, i) => void);
        deployhash_fromDigest: ((a, b) => void);
        deployhash_new: ((a, b, c) => void);
        deployhash_toJson: ((a) => number);
        deployhash_toString: ((a, b) => void);
        deploystrparams_chain_name: ((a, b) => void);
        deploystrparams_new: ((a, b, c, d, e, f, g, h, i, j) => number);
        deploystrparams_secret_key: ((a, b) => void);
        deploystrparams_session_account: ((a, b) => void);
        deploystrparams_setDefaultTTL: ((a) => void);
        deploystrparams_setDefaultTimestamp: ((a) => void);
        deploystrparams_set_chain_name: ((a, b, c) => void);
        deploystrparams_set_secret_key: ((a, b, c) => void);
        deploystrparams_set_session_account: ((a, b, c) => void);
        deploystrparams_set_timestamp: ((a, b, c) => void);
        deploystrparams_set_ttl: ((a, b, c) => void);
        deploystrparams_timestamp: ((a, b) => void);
        deploystrparams_ttl: ((a, b) => void);
        deploysubscription_new: ((a, b, c) => number);
        deploywatcher_new: ((a, b, c, d) => number);
        deploywatcher_start: ((a) => number);
        deploywatcher_stop: ((a) => void);
        deploywatcher_subscribe: ((a, b, c, d) => void);
        deploywatcher_unsubscribe: ((a, b, c) => void);
        dictionaryaddr_new: ((a, b, c) => void);
        dictionaryitemidentifier_newFromAccountInfo: ((a, b, c, d, e, f, g) => void);
        dictionaryitemidentifier_newFromContractInfo: ((a, b, c, d, e, f, g) => void);
        dictionaryitemidentifier_newFromDictionaryKey: ((a, b, c) => void);
        dictionaryitemidentifier_newFromSeedUref: ((a, b, c, d, e) => void);
        dictionaryitemidentifier_toJson: ((a) => number);
        dictionaryitemstrparams_new: (() => number);
        dictionaryitemstrparams_setAccountNamedKey: ((a, b, c, d, e, f, g) => void);
        dictionaryitemstrparams_setContractNamedKey: ((a, b, c, d, e, f, g) => void);
        dictionaryitemstrparams_setDictionary: ((a, b, c) => void);
        dictionaryitemstrparams_setUref: ((a, b, c, d, e) => void);
        dictionaryitemstrparams_toJson: ((a) => number);
        digest__new: ((a, b, c) => void);
        digest_fromDigest: ((a, b, c) => void);
        digest_fromString: ((a, b, c) => void);
        digest_toJson: ((a) => number);
        digest_toString: ((a, b) => void);
        encodeLowerBlake2b: ((a, b) => number);
        eraid_new: ((a) => number);
        eraid_value: ((a) => number);
        fromTransfer: ((a, b) => number);
        generatePrivateKey: ((a) => void);
        generatePrivateKey_secp256k1: ((a) => void);
        getTimestamp: (() => number);
        getaccountresult_account: ((a) => number);
        getaccountresult_api_version: ((a) => number);
        getaccountresult_merkle_proof: ((a, b) => void);
        getaccountresult_toJson: ((a) => number);
        getauctioninforesult_api_version: ((a) => number);
        getauctioninforesult_auction_state: ((a) => number);
        getauctioninforesult_toJson: ((a) => number);
        getbalanceresult_api_version: ((a) => number);
        getbalanceresult_balance_value: ((a) => number);
        getbalanceresult_merkle_proof: ((a, b) => void);
        getbalanceresult_toJson: ((a) => number);
        getblockresult_api_version: ((a) => number);
        getblockresult_block: ((a) => number);
        getblockresult_toJson: ((a) => number);
        getblocktransfersresult_api_version: ((a) => number);
        getblocktransfersresult_block_hash: ((a) => number);
        getblocktransfersresult_toJson: ((a) => number);
        getblocktransfersresult_transfers: ((a) => number);
        getchainspecresult_api_version: ((a) => number);
        getchainspecresult_chainspec_bytes: ((a) => number);
        getchainspecresult_toJson: ((a) => number);
        getdeployresult_api_version: ((a) => number);
        getdeployresult_deploy: ((a) => number);
        getdeployresult_toJson: ((a) => number);
        getdictionaryitemresult_api_version: ((a) => number);
        getdictionaryitemresult_dictionary_key: ((a, b) => void);
        getdictionaryitemresult_merkle_proof: ((a, b) => void);
        getdictionaryitemresult_stored_value: ((a) => number);
        getdictionaryitemresult_toJson: ((a) => number);
        geterainforesult_api_version: ((a) => number);
        geterainforesult_era_summary: ((a) => number);
        geterainforesult_toJson: ((a) => number);
        geterasummaryresult_api_version: ((a) => number);
        geterasummaryresult_era_summary: ((a) => number);
        geterasummaryresult_toJson: ((a) => number);
        getnodestatusresult_api_version: ((a) => number);
        getnodestatusresult_available_block_range: ((a) => number);
        getnodestatusresult_block_sync: ((a) => number);
        getnodestatusresult_build_version: ((a, b) => void);
        getnodestatusresult_chainspec_name: ((a, b) => void);
        getnodestatusresult_last_added_block_info: ((a) => number);
        getnodestatusresult_last_progress: ((a) => number);
        getnodestatusresult_next_upgrade: ((a) => number);
        getnodestatusresult_our_public_signing_key: ((a) => number);
        getnodestatusresult_peers: ((a) => number);
        getnodestatusresult_reactor_state: ((a) => number);
        getnodestatusresult_round_length: ((a) => number);
        getnodestatusresult_starting_state_root_hash: ((a) => number);
        getnodestatusresult_toJson: ((a) => number);
        getnodestatusresult_uptime: ((a) => number);
        getpeersresult_api_version: ((a) => number);
        getpeersresult_peers: ((a) => number);
        getpeersresult_toJson: ((a) => number);
        getstateroothashresult_api_version: ((a) => number);
        getstateroothashresult_state_root_hash: ((a) => number);
        getstateroothashresult_state_root_hash_as_string: ((a, b) => void);
        getstateroothashresult_toJson: ((a) => number);
        getstateroothashresult_toString: ((a, b) => void);
        getvalidatorchangesresult_api_version: ((a) => number);
        getvalidatorchangesresult_changes: ((a) => number);
        getvalidatorchangesresult_toJson: ((a) => number);
        globalstateidentifier_fromBlockHash: ((a) => number);
        globalstateidentifier_fromBlockHeight: ((a) => number);
        globalstateidentifier_fromStateRootHash: ((a) => number);
        globalstateidentifier_new: ((a) => number);
        globalstateidentifier_toJson: ((a) => number);
        hashaddr_new: ((a, b, c) => void);
        hexToString: ((a, b, c) => void);
        hexToUint8Array: ((a, b, c) => void);
        intounderlyingbytesource_autoAllocateChunkSize: ((a) => number);
        intounderlyingbytesource_cancel: ((a) => void);
        intounderlyingbytesource_pull: ((a, b) => number);
        intounderlyingbytesource_start: ((a, b) => void);
        intounderlyingbytesource_type: ((a, b) => void);
        intounderlyingsink_abort: ((a, b) => number);
        intounderlyingsink_close: ((a) => number);
        intounderlyingsink_write: ((a, b) => number);
        intounderlyingsource_cancel: ((a) => void);
        intounderlyingsource_pull: ((a, b) => number);
        jsonPrettyPrint: ((a, b) => number);
        key_asBalance: ((a) => number);
        key_asDictionaryAddr: ((a) => number);
        key_fromAccount: ((a) => number);
        key_fromBalance: ((a) => number);
        key_fromBid: ((a) => number);
        key_fromChainspecRegistry: (() => number);
        key_fromChecksumRegistry: (() => number);
        key_fromDeployInfo: ((a) => number);
        key_fromDictionaryAddr: ((a) => number);
        key_fromDictionaryKey: ((a, b, c) => number);
        key_fromEraInfo: ((a) => number);
        key_fromEraSummary: (() => number);
        key_fromFormattedString: ((a, b) => void);
        key_fromHash: ((a) => number);
        key_fromSystemContractRegistry: (() => number);
        key_fromTransfer: ((a, b) => number);
        key_fromURef: ((a) => number);
        key_fromUnbond: ((a) => number);
        key_fromWithdraw: ((a) => number);
        key_intoAccount: ((a) => number);
        key_intoHash: ((a) => number);
        key_intoURef: ((a) => number);
        key_isDictionaryKey: ((a) => number);
        key_new: ((a, b) => void);
        key_toFormattedString: ((a, b) => void);
        key_toJson: ((a) => number);
        key_urefToHash: ((a) => number);
        key_withdrawToUnbond: ((a) => number);
        listrpcsresult_api_version: ((a) => number);
        listrpcsresult_name: ((a, b) => void);
        listrpcsresult_schema: ((a) => number);
        listrpcsresult_toJson: ((a) => number);
        makeDictionaryItemKey: ((a, b, c, d) => void);
        memory: Memory;
        motesToCSPR: ((a, b, c) => void);
        path_fromArray: ((a) => number);
        path_is_empty: ((a) => number);
        path_new: ((a) => number);
        path_toJson: ((a) => number);
        path_toString: ((a, b) => void);
        paymentstrparams_new: ((a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u) => number);
        paymentstrparams_payment_amount: ((a, b) => void);
        paymentstrparams_payment_args_complex: ((a, b) => void);
        paymentstrparams_payment_args_json: ((a, b) => void);
        paymentstrparams_payment_args_simple: ((a) => number);
        paymentstrparams_payment_entry_point: ((a, b) => void);
        paymentstrparams_payment_hash: ((a, b) => void);
        paymentstrparams_payment_name: ((a, b) => void);
        paymentstrparams_payment_package_hash: ((a, b) => void);
        paymentstrparams_payment_package_name: ((a, b) => void);
        paymentstrparams_payment_path: ((a, b) => void);
        paymentstrparams_payment_version: ((a, b) => void);
        paymentstrparams_set_payment_amount: ((a, b, c) => void);
        paymentstrparams_set_payment_args_complex: ((a, b, c) => void);
        paymentstrparams_set_payment_args_json: ((a, b, c) => void);
        paymentstrparams_set_payment_args_simple: ((a, b) => void);
        paymentstrparams_set_payment_entry_point: ((a, b, c) => void);
        paymentstrparams_set_payment_hash: ((a, b, c) => void);
        paymentstrparams_set_payment_name: ((a, b, c) => void);
        paymentstrparams_set_payment_package_hash: ((a, b, c) => void);
        paymentstrparams_set_payment_package_name: ((a, b, c) => void);
        paymentstrparams_set_payment_path: ((a, b, c) => void);
        paymentstrparams_set_payment_version: ((a, b, c) => void);
        peerentry_address: ((a, b) => void);
        peerentry_node_id: ((a, b) => void);
        privateToPublicKey: ((a, b, c) => void);
        publickey_fromUint8Array: ((a, b) => number);
        publickey_new: ((a, b, c) => void);
        publickey_toAccountHash: ((a) => number);
        publickey_toJson: ((a) => number);
        publickey_toPurseUref: ((a) => number);
        purseidentifier_fromAccountHash: ((a) => number);
        purseidentifier_fromPublicKey: ((a) => number);
        purseidentifier_fromURef: ((a) => number);
        purseidentifier_toJson: ((a) => number);
        putdeployresult_api_version: ((a) => number);
        putdeployresult_deploy_hash: ((a) => number);
        putdeployresult_toJson: ((a) => number);
        querybalanceresult_api_version: ((a) => number);
        querybalanceresult_balance: ((a) => number);
        querybalanceresult_toJson: ((a) => number);
        queryglobalstateresult_api_version: ((a) => number);
        queryglobalstateresult_block_header: ((a) => number);
        queryglobalstateresult_merkle_proof: ((a, b) => void);
        queryglobalstateresult_stored_value: ((a) => number);
        queryglobalstateresult_toJson: ((a) => number);
        sdk_account_put_deploy: ((a, b, c, d, e) => number);
        sdk_call_entrypoint: ((a, b, c, d, e, f, g) => number);
        sdk_chain_get_block: ((a, b) => number);
        sdk_chain_get_state_root_hash: ((a, b) => number);
        sdk_deploy: ((a, b, c, d, e, f, g) => number);
        sdk_getNodeAddress: ((a, b, c, d) => void);
        sdk_getVerbosity: ((a, b) => number);
        sdk_get_account: ((a, b) => number);
        sdk_get_account_options: ((a, b) => number);
        sdk_get_auction_info: ((a, b) => number);
        sdk_get_auction_info_options: ((a, b) => number);
        sdk_get_balance: ((a, b) => number);
        sdk_get_balance_options: ((a, b) => number);
        sdk_get_block: ((a, b) => number);
        sdk_get_block_options: ((a, b) => number);
        sdk_get_block_transfers: ((a, b) => number);
        sdk_get_block_transfers_options: ((a, b) => number);
        sdk_get_chainspec: ((a, b, c, d) => number);
        sdk_get_deploy: ((a, b) => number);
        sdk_get_deploy_options: ((a, b) => number);
        sdk_get_dictionary_item: ((a, b) => number);
        sdk_get_dictionary_item_options: ((a, b) => number);
        sdk_get_era_info: ((a, b) => number);
        sdk_get_era_info_options: ((a, b) => number);
        sdk_get_era_summary: ((a, b) => number);
        sdk_get_era_summary_options: ((a, b) => number);
        sdk_get_node_status: ((a, b, c, d) => number);
        sdk_get_peers: ((a, b, c, d) => number);
        sdk_get_state_root_hash: ((a, b) => number);
        sdk_get_state_root_hash_options: ((a, b) => number);
        sdk_get_validator_changes: ((a, b, c, d) => number);
        sdk_info_get_deploy: ((a, b) => number);
        sdk_install: ((a, b, c, d, e, f, g) => number);
        sdk_list_rpcs: ((a, b, c, d) => number);
        sdk_make_deploy: ((a, b, c, d, e) => void);
        sdk_make_transfer: ((a, b, c, d, e, f, g, h, i, j) => void);
        sdk_new: ((a, b, c) => number);
        sdk_put_deploy: ((a, b, c, d, e) => number);
        sdk_query_balance: ((a, b) => number);
        sdk_query_balance_options: ((a, b) => number);
        sdk_query_contract_dict: ((a, b) => number);
        sdk_query_contract_dict_options: ((a, b) => number);
        sdk_query_contract_key: ((a, b) => number);
        sdk_query_contract_key_options: ((a, b) => number);
        sdk_query_global_state: ((a, b) => number);
        sdk_query_global_state_options: ((a, b) => number);
        sdk_setNodeAddress: ((a, b, c, d) => void);
        sdk_setVerbosity: ((a, b, c) => void);
        sdk_sign_deploy: ((a, b, c, d) => number);
        sdk_speculative_deploy: ((a, b, c, d, e, f, g, h, i, j) => number);
        sdk_speculative_exec: ((a, b) => number);
        sdk_speculative_exec_options: ((a, b) => number);
        sdk_speculative_transfer: ((a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) => number);
        sdk_state_get_account_info: ((a, b) => number);
        sdk_state_get_balance: ((a, b) => number);
        sdk_state_get_dictionary_item: ((a, b) => number);
        sdk_transfer: ((a, b, c, d, e, f, g, h, i, j, k, l) => number);
        sdk_waitDeploy: ((a, b, c, d, e, f, g) => number);
        sdk_watchDeploy: ((a, b, c, d, e) => number);
        sessionstrparams_is_session_transfer: ((a) => number);
        sessionstrparams_new: ((a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u) => number);
        sessionstrparams_session_args_complex: ((a, b) => void);
        sessionstrparams_session_args_json: ((a, b) => void);
        sessionstrparams_session_args_simple: ((a) => number);
        sessionstrparams_session_bytes: ((a) => number);
        sessionstrparams_session_entry_point: ((a, b) => void);
        sessionstrparams_session_hash: ((a, b) => void);
        sessionstrparams_session_name: ((a, b) => void);
        sessionstrparams_session_package_hash: ((a, b) => void);
        sessionstrparams_session_package_name: ((a, b) => void);
        sessionstrparams_session_path: ((a, b) => void);
        sessionstrparams_session_version: ((a, b) => void);
        sessionstrparams_set_is_session_transfer: ((a, b) => void);
        sessionstrparams_set_session_args_complex: ((a, b, c) => void);
        sessionstrparams_set_session_args_json: ((a, b, c) => void);
        sessionstrparams_set_session_args_simple: ((a, b) => void);
        sessionstrparams_set_session_bytes: ((a, b) => void);
        sessionstrparams_set_session_entry_point: ((a, b, c) => void);
        sessionstrparams_set_session_hash: ((a, b, c) => void);
        sessionstrparams_set_session_name: ((a, b, c) => void);
        sessionstrparams_set_session_package_hash: ((a, b, c) => void);
        sessionstrparams_set_session_package_name: ((a, b, c) => void);
        sessionstrparams_set_session_path: ((a, b, c) => void);
        sessionstrparams_set_session_version: ((a, b, c) => void);
        speculativeexecresult_api_version: ((a) => number);
        speculativeexecresult_block_hash: ((a) => number);
        speculativeexecresult_execution_result: ((a) => number);
        speculativeexecresult_toJson: ((a) => number);
        transferaddr_new: ((a, b, c) => void);
        transferaddr_to_bytes: ((a, b) => void);
        uint8ArrayToBytes: ((a) => number);
        uref_fromUint8Array: ((a, b, c) => number);
        uref_new: ((a, b, c, d) => void);
        uref_toFormattedString: ((a, b) => void);
        uref_toJson: ((a) => number);
        urefaddr_new: ((a, b, c) => void);
        wasm_bindgen__convert__closures__invoke2_mut__h41b3897ec8604519: ((a, b, c, d) => void);
    }

    Properties

    __wbg_accessrights_free +InitOutput | api-wasm

    Interface InitOutput

    interface InitOutput {
        __wbg_accessrights_free: ((a) => void);
        __wbg_accounthash_free: ((a) => void);
        __wbg_accountidentifier_free: ((a) => void);
        __wbg_argssimple_free: ((a) => void);
        __wbg_blockhash_free: ((a) => void);
        __wbg_blockidentifier_free: ((a) => void);
        __wbg_body_free: ((a) => void);
        __wbg_bytes_free: ((a) => void);
        __wbg_cltype_free: ((a) => void);
        __wbg_contracthash_free: ((a) => void);
        __wbg_contractpackagehash_free: ((a) => void);
        __wbg_deploy_free: ((a) => void);
        __wbg_deployhash_free: ((a) => void);
        __wbg_deployprocessed_free: ((a) => void);
        __wbg_deploystrparams_free: ((a) => void);
        __wbg_deploysubscription_free: ((a) => void);
        __wbg_deploywatcher_free: ((a) => void);
        __wbg_dictionaryaddr_free: ((a) => void);
        __wbg_dictionaryitemidentifier_free: ((a) => void);
        __wbg_dictionaryitemstrparams_free: ((a) => void);
        __wbg_digest_free: ((a) => void);
        __wbg_eraid_free: ((a) => void);
        __wbg_eventparseresult_free: ((a) => void);
        __wbg_executionresult_free: ((a) => void);
        __wbg_failure_free: ((a) => void);
        __wbg_get_body_DeployProcessed: ((a) => number);
        __wbg_get_deployprocessed_account: ((a, b) => void);
        __wbg_get_deployprocessed_block_hash: ((a, b) => void);
        __wbg_get_deployprocessed_dependencies: ((a, b) => void);
        __wbg_get_deployprocessed_deploy_hash: ((a, b) => void);
        __wbg_get_deployprocessed_execution_result: ((a) => number);
        __wbg_get_deployprocessed_timestamp: ((a, b) => void);
        __wbg_get_deployprocessed_ttl: ((a, b) => void);
        __wbg_get_deploysubscription_deployHash: ((a, b) => void);
        __wbg_get_deploysubscription_eventHandlerFn: ((a) => number);
        __wbg_get_eventparseresult_body: ((a) => number);
        __wbg_get_eventparseresult_err: ((a, b) => void);
        __wbg_get_executionresult_Failure: ((a) => number);
        __wbg_get_executionresult_Success: ((a) => number);
        __wbg_get_failure_error_message: ((a, b) => void);
        __wbg_get_getaccountoptions_account_identifier: ((a) => number);
        __wbg_get_getaccountoptions_account_identifier_as_string: ((a, b) => void);
        __wbg_get_getaccountoptions_maybe_block_id_as_string: ((a, b) => void);
        __wbg_get_getaccountoptions_maybe_block_identifier: ((a) => number);
        __wbg_get_getaccountoptions_node_address: ((a, b) => void);
        __wbg_get_getaccountoptions_verbosity: ((a) => number);
        __wbg_get_getauctioninfooptions_maybe_block_id_as_string: ((a, b) => void);
        __wbg_get_getauctioninfooptions_maybe_block_identifier: ((a) => number);
        __wbg_get_getauctioninfooptions_node_address: ((a, b) => void);
        __wbg_get_getauctioninfooptions_verbosity: ((a) => number);
        __wbg_get_getbalanceoptions_node_address: ((a, b) => void);
        __wbg_get_getbalanceoptions_purse_uref: ((a) => number);
        __wbg_get_getbalanceoptions_purse_uref_as_string: ((a, b) => void);
        __wbg_get_getbalanceoptions_state_root_hash: ((a) => number);
        __wbg_get_getbalanceoptions_state_root_hash_as_string: ((a, b) => void);
        __wbg_get_getbalanceoptions_verbosity: ((a) => number);
        __wbg_get_getblockoptions_maybe_block_id_as_string: ((a, b) => void);
        __wbg_get_getblockoptions_maybe_block_identifier: ((a) => number);
        __wbg_get_getblockoptions_node_address: ((a, b) => void);
        __wbg_get_getblockoptions_verbosity: ((a) => number);
        __wbg_get_getblocktransfersoptions_maybe_block_id_as_string: ((a, b) => void);
        __wbg_get_getblocktransfersoptions_maybe_block_identifier: ((a) => number);
        __wbg_get_getblocktransfersoptions_node_address: ((a, b) => void);
        __wbg_get_getblocktransfersoptions_verbosity: ((a) => number);
        __wbg_get_getdeployoptions_deploy_hash: ((a) => number);
        __wbg_get_getdeployoptions_deploy_hash_as_string: ((a, b) => void);
        __wbg_get_getdeployoptions_finalized_approvals: ((a) => number);
        __wbg_get_getdeployoptions_node_address: ((a, b) => void);
        __wbg_get_getdeployoptions_verbosity: ((a) => number);
        __wbg_get_getdictionaryitemoptions_dictionary_item_identifier: ((a) => number);
        __wbg_get_getdictionaryitemoptions_dictionary_item_params: ((a) => number);
        __wbg_get_getdictionaryitemoptions_node_address: ((a, b) => void);
        __wbg_get_getdictionaryitemoptions_state_root_hash: ((a) => number);
        __wbg_get_getdictionaryitemoptions_state_root_hash_as_string: ((a, b) => void);
        __wbg_get_getdictionaryitemoptions_verbosity: ((a) => number);
        __wbg_get_geterainfooptions_maybe_block_id_as_string: ((a, b) => void);
        __wbg_get_geterainfooptions_maybe_block_identifier: ((a) => number);
        __wbg_get_geterainfooptions_node_address: ((a, b) => void);
        __wbg_get_geterainfooptions_verbosity: ((a) => number);
        __wbg_get_geterasummaryoptions_maybe_block_id_as_string: ((a, b) => void);
        __wbg_get_geterasummaryoptions_maybe_block_identifier: ((a) => number);
        __wbg_get_geterasummaryoptions_node_address: ((a, b) => void);
        __wbg_get_geterasummaryoptions_verbosity: ((a) => number);
        __wbg_get_getspeculativeexecoptions_deploy: ((a) => number);
        __wbg_get_getspeculativeexecoptions_deploy_as_string: ((a, b) => void);
        __wbg_get_getspeculativeexecoptions_maybe_block_id_as_string: ((a, b) => void);
        __wbg_get_getspeculativeexecoptions_maybe_block_identifier: ((a) => number);
        __wbg_get_getspeculativeexecoptions_node_address: ((a, b) => void);
        __wbg_get_getspeculativeexecoptions_verbosity: ((a) => number);
        __wbg_get_getstateroothashoptions_maybe_block_id_as_string: ((a, b) => void);
        __wbg_get_getstateroothashoptions_maybe_block_identifier: ((a) => number);
        __wbg_get_getstateroothashoptions_node_address: ((a, b) => void);
        __wbg_get_getstateroothashoptions_verbosity: ((a) => number);
        __wbg_get_querybalanceoptions_global_state_identifier: ((a) => number);
        __wbg_get_querybalanceoptions_maybe_block_id_as_string: ((a, b) => void);
        __wbg_get_querybalanceoptions_node_address: ((a, b) => void);
        __wbg_get_querybalanceoptions_purse_identifier: ((a) => number);
        __wbg_get_querybalanceoptions_purse_identifier_as_string: ((a, b) => void);
        __wbg_get_querybalanceoptions_state_root_hash: ((a) => number);
        __wbg_get_querybalanceoptions_state_root_hash_as_string: ((a, b) => void);
        __wbg_get_querybalanceoptions_verbosity: ((a) => number);
        __wbg_get_querycontractdictoptions_dictionary_item_identifier: ((a) => number);
        __wbg_get_querycontractdictoptions_dictionary_item_params: ((a) => number);
        __wbg_get_querycontractdictoptions_node_address: ((a, b) => void);
        __wbg_get_querycontractdictoptions_state_root_hash: ((a) => number);
        __wbg_get_querycontractdictoptions_state_root_hash_as_string: ((a, b) => void);
        __wbg_get_querycontractdictoptions_verbosity: ((a) => number);
        __wbg_get_querycontractkeyoptions_contract_key: ((a) => number);
        __wbg_get_querycontractkeyoptions_contract_key_as_string: ((a, b) => void);
        __wbg_get_querycontractkeyoptions_global_state_identifier: ((a) => number);
        __wbg_get_querycontractkeyoptions_maybe_block_id_as_string: ((a, b) => void);
        __wbg_get_querycontractkeyoptions_node_address: ((a, b) => void);
        __wbg_get_querycontractkeyoptions_path: ((a) => number);
        __wbg_get_querycontractkeyoptions_path_as_string: ((a, b) => void);
        __wbg_get_querycontractkeyoptions_state_root_hash: ((a) => number);
        __wbg_get_querycontractkeyoptions_state_root_hash_as_string: ((a, b) => void);
        __wbg_get_querycontractkeyoptions_verbosity: ((a) => number);
        __wbg_get_queryglobalstateoptions_global_state_identifier: ((a) => number);
        __wbg_get_queryglobalstateoptions_key: ((a) => number);
        __wbg_get_queryglobalstateoptions_key_as_string: ((a, b) => void);
        __wbg_get_queryglobalstateoptions_maybe_block_id_as_string: ((a, b) => void);
        __wbg_get_queryglobalstateoptions_node_address: ((a, b) => void);
        __wbg_get_queryglobalstateoptions_path: ((a) => number);
        __wbg_get_queryglobalstateoptions_path_as_string: ((a, b) => void);
        __wbg_get_queryglobalstateoptions_state_root_hash: ((a) => number);
        __wbg_get_queryglobalstateoptions_state_root_hash_as_string: ((a, b) => void);
        __wbg_get_queryglobalstateoptions_verbosity: ((a) => number);
        __wbg_get_success_cost: ((a, b) => void);
        __wbg_getaccountoptions_free: ((a) => void);
        __wbg_getaccountresult_free: ((a) => void);
        __wbg_getauctioninfooptions_free: ((a) => void);
        __wbg_getauctioninforesult_free: ((a) => void);
        __wbg_getbalanceoptions_free: ((a) => void);
        __wbg_getbalanceresult_free: ((a) => void);
        __wbg_getblockoptions_free: ((a) => void);
        __wbg_getblockresult_free: ((a) => void);
        __wbg_getblocktransfersoptions_free: ((a) => void);
        __wbg_getblocktransfersresult_free: ((a) => void);
        __wbg_getchainspecresult_free: ((a) => void);
        __wbg_getdeployoptions_free: ((a) => void);
        __wbg_getdeployresult_free: ((a) => void);
        __wbg_getdictionaryitemoptions_free: ((a) => void);
        __wbg_getdictionaryitemresult_free: ((a) => void);
        __wbg_geterainfooptions_free: ((a) => void);
        __wbg_geterainforesult_free: ((a) => void);
        __wbg_geterasummaryoptions_free: ((a) => void);
        __wbg_geterasummaryresult_free: ((a) => void);
        __wbg_getnodestatusresult_free: ((a) => void);
        __wbg_getpeersresult_free: ((a) => void);
        __wbg_getspeculativeexecoptions_free: ((a) => void);
        __wbg_getstateroothashoptions_free: ((a) => void);
        __wbg_getstateroothashresult_free: ((a) => void);
        __wbg_getvalidatorchangesresult_free: ((a) => void);
        __wbg_globalstateidentifier_free: ((a) => void);
        __wbg_hashaddr_free: ((a) => void);
        __wbg_intounderlyingbytesource_free: ((a) => void);
        __wbg_intounderlyingsink_free: ((a) => void);
        __wbg_intounderlyingsource_free: ((a) => void);
        __wbg_key_free: ((a) => void);
        __wbg_listrpcsresult_free: ((a) => void);
        __wbg_path_free: ((a) => void);
        __wbg_paymentstrparams_free: ((a) => void);
        __wbg_peerentry_free: ((a) => void);
        __wbg_publickey_free: ((a) => void);
        __wbg_purseidentifier_free: ((a) => void);
        __wbg_putdeployresult_free: ((a) => void);
        __wbg_querybalanceoptions_free: ((a) => void);
        __wbg_querybalanceresult_free: ((a) => void);
        __wbg_querycontractdictoptions_free: ((a) => void);
        __wbg_querycontractkeyoptions_free: ((a) => void);
        __wbg_queryglobalstateoptions_free: ((a) => void);
        __wbg_queryglobalstateresult_free: ((a) => void);
        __wbg_sdk_free: ((a) => void);
        __wbg_sessionstrparams_free: ((a) => void);
        __wbg_set_body_DeployProcessed: ((a, b) => void);
        __wbg_set_deployprocessed_account: ((a, b, c) => void);
        __wbg_set_deployprocessed_block_hash: ((a, b, c) => void);
        __wbg_set_deployprocessed_dependencies: ((a, b, c) => void);
        __wbg_set_deployprocessed_deploy_hash: ((a, b, c) => void);
        __wbg_set_deployprocessed_execution_result: ((a, b) => void);
        __wbg_set_deployprocessed_timestamp: ((a, b, c) => void);
        __wbg_set_deployprocessed_ttl: ((a, b, c) => void);
        __wbg_set_deploysubscription_deployHash: ((a, b, c) => void);
        __wbg_set_deploysubscription_eventHandlerFn: ((a, b) => void);
        __wbg_set_eventparseresult_body: ((a, b) => void);
        __wbg_set_eventparseresult_err: ((a, b, c) => void);
        __wbg_set_executionresult_Failure: ((a, b) => void);
        __wbg_set_executionresult_Success: ((a, b) => void);
        __wbg_set_failure_error_message: ((a, b, c) => void);
        __wbg_set_getaccountoptions_account_identifier: ((a, b) => void);
        __wbg_set_getaccountoptions_account_identifier_as_string: ((a, b, c) => void);
        __wbg_set_getaccountoptions_maybe_block_id_as_string: ((a, b, c) => void);
        __wbg_set_getaccountoptions_maybe_block_identifier: ((a, b) => void);
        __wbg_set_getaccountoptions_node_address: ((a, b, c) => void);
        __wbg_set_getaccountoptions_verbosity: ((a, b) => void);
        __wbg_set_getauctioninfooptions_maybe_block_id_as_string: ((a, b, c) => void);
        __wbg_set_getauctioninfooptions_maybe_block_identifier: ((a, b) => void);
        __wbg_set_getauctioninfooptions_node_address: ((a, b, c) => void);
        __wbg_set_getauctioninfooptions_verbosity: ((a, b) => void);
        __wbg_set_getbalanceoptions_node_address: ((a, b, c) => void);
        __wbg_set_getbalanceoptions_purse_uref: ((a, b) => void);
        __wbg_set_getbalanceoptions_purse_uref_as_string: ((a, b, c) => void);
        __wbg_set_getbalanceoptions_state_root_hash: ((a, b) => void);
        __wbg_set_getbalanceoptions_state_root_hash_as_string: ((a, b, c) => void);
        __wbg_set_getbalanceoptions_verbosity: ((a, b) => void);
        __wbg_set_getblockoptions_maybe_block_id_as_string: ((a, b, c) => void);
        __wbg_set_getblockoptions_maybe_block_identifier: ((a, b) => void);
        __wbg_set_getblockoptions_node_address: ((a, b, c) => void);
        __wbg_set_getblockoptions_verbosity: ((a, b) => void);
        __wbg_set_getblocktransfersoptions_maybe_block_id_as_string: ((a, b, c) => void);
        __wbg_set_getblocktransfersoptions_maybe_block_identifier: ((a, b) => void);
        __wbg_set_getblocktransfersoptions_node_address: ((a, b, c) => void);
        __wbg_set_getblocktransfersoptions_verbosity: ((a, b) => void);
        __wbg_set_getdeployoptions_deploy_hash: ((a, b) => void);
        __wbg_set_getdeployoptions_deploy_hash_as_string: ((a, b, c) => void);
        __wbg_set_getdeployoptions_finalized_approvals: ((a, b) => void);
        __wbg_set_getdeployoptions_node_address: ((a, b, c) => void);
        __wbg_set_getdeployoptions_verbosity: ((a, b) => void);
        __wbg_set_getdictionaryitemoptions_dictionary_item_identifier: ((a, b) => void);
        __wbg_set_getdictionaryitemoptions_dictionary_item_params: ((a, b) => void);
        __wbg_set_getdictionaryitemoptions_node_address: ((a, b, c) => void);
        __wbg_set_getdictionaryitemoptions_state_root_hash: ((a, b) => void);
        __wbg_set_getdictionaryitemoptions_state_root_hash_as_string: ((a, b, c) => void);
        __wbg_set_getdictionaryitemoptions_verbosity: ((a, b) => void);
        __wbg_set_geterainfooptions_maybe_block_id_as_string: ((a, b, c) => void);
        __wbg_set_geterainfooptions_maybe_block_identifier: ((a, b) => void);
        __wbg_set_geterainfooptions_node_address: ((a, b, c) => void);
        __wbg_set_geterainfooptions_verbosity: ((a, b) => void);
        __wbg_set_geterasummaryoptions_maybe_block_id_as_string: ((a, b, c) => void);
        __wbg_set_geterasummaryoptions_maybe_block_identifier: ((a, b) => void);
        __wbg_set_geterasummaryoptions_node_address: ((a, b, c) => void);
        __wbg_set_geterasummaryoptions_verbosity: ((a, b) => void);
        __wbg_set_getspeculativeexecoptions_deploy: ((a, b) => void);
        __wbg_set_getspeculativeexecoptions_deploy_as_string: ((a, b, c) => void);
        __wbg_set_getspeculativeexecoptions_maybe_block_id_as_string: ((a, b, c) => void);
        __wbg_set_getspeculativeexecoptions_maybe_block_identifier: ((a, b) => void);
        __wbg_set_getspeculativeexecoptions_node_address: ((a, b, c) => void);
        __wbg_set_getspeculativeexecoptions_verbosity: ((a, b) => void);
        __wbg_set_getstateroothashoptions_maybe_block_id_as_string: ((a, b, c) => void);
        __wbg_set_getstateroothashoptions_maybe_block_identifier: ((a, b) => void);
        __wbg_set_getstateroothashoptions_node_address: ((a, b, c) => void);
        __wbg_set_getstateroothashoptions_verbosity: ((a, b) => void);
        __wbg_set_querybalanceoptions_global_state_identifier: ((a, b) => void);
        __wbg_set_querybalanceoptions_maybe_block_id_as_string: ((a, b, c) => void);
        __wbg_set_querybalanceoptions_node_address: ((a, b, c) => void);
        __wbg_set_querybalanceoptions_purse_identifier: ((a, b) => void);
        __wbg_set_querybalanceoptions_purse_identifier_as_string: ((a, b, c) => void);
        __wbg_set_querybalanceoptions_state_root_hash: ((a, b) => void);
        __wbg_set_querybalanceoptions_state_root_hash_as_string: ((a, b, c) => void);
        __wbg_set_querybalanceoptions_verbosity: ((a, b) => void);
        __wbg_set_querycontractdictoptions_dictionary_item_identifier: ((a, b) => void);
        __wbg_set_querycontractdictoptions_dictionary_item_params: ((a, b) => void);
        __wbg_set_querycontractdictoptions_node_address: ((a, b, c) => void);
        __wbg_set_querycontractdictoptions_state_root_hash: ((a, b) => void);
        __wbg_set_querycontractdictoptions_state_root_hash_as_string: ((a, b, c) => void);
        __wbg_set_querycontractdictoptions_verbosity: ((a, b) => void);
        __wbg_set_querycontractkeyoptions_contract_key: ((a, b) => void);
        __wbg_set_querycontractkeyoptions_contract_key_as_string: ((a, b, c) => void);
        __wbg_set_querycontractkeyoptions_global_state_identifier: ((a, b) => void);
        __wbg_set_querycontractkeyoptions_maybe_block_id_as_string: ((a, b, c) => void);
        __wbg_set_querycontractkeyoptions_node_address: ((a, b, c) => void);
        __wbg_set_querycontractkeyoptions_path: ((a, b) => void);
        __wbg_set_querycontractkeyoptions_path_as_string: ((a, b, c) => void);
        __wbg_set_querycontractkeyoptions_state_root_hash: ((a, b) => void);
        __wbg_set_querycontractkeyoptions_state_root_hash_as_string: ((a, b, c) => void);
        __wbg_set_querycontractkeyoptions_verbosity: ((a, b) => void);
        __wbg_set_queryglobalstateoptions_global_state_identifier: ((a, b) => void);
        __wbg_set_queryglobalstateoptions_key: ((a, b) => void);
        __wbg_set_queryglobalstateoptions_key_as_string: ((a, b, c) => void);
        __wbg_set_queryglobalstateoptions_maybe_block_id_as_string: ((a, b, c) => void);
        __wbg_set_queryglobalstateoptions_node_address: ((a, b, c) => void);
        __wbg_set_queryglobalstateoptions_path: ((a, b) => void);
        __wbg_set_queryglobalstateoptions_path_as_string: ((a, b, c) => void);
        __wbg_set_queryglobalstateoptions_state_root_hash: ((a, b) => void);
        __wbg_set_queryglobalstateoptions_state_root_hash_as_string: ((a, b, c) => void);
        __wbg_set_queryglobalstateoptions_verbosity: ((a, b) => void);
        __wbg_set_success_cost: ((a, b, c) => void);
        __wbg_speculativeexecresult_free: ((a) => void);
        __wbg_success_free: ((a) => void);
        __wbg_transferaddr_free: ((a) => void);
        __wbg_uref_free: ((a) => void);
        __wbg_urefaddr_free: ((a) => void);
        __wbindgen_add_to_stack_pointer: ((a) => number);
        __wbindgen_exn_store: ((a) => void);
        __wbindgen_export_2: Table;
        __wbindgen_free: ((a, b, c) => void);
        __wbindgen_malloc: ((a, b) => number);
        __wbindgen_realloc: ((a, b, c, d) => number);
        _dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h1c40c16592036fc7: ((a, b, c) => void);
        _dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h5e61414879884c0a: ((a, b, c) => void);
        accessrights_ADD: (() => number);
        accessrights_ADD_WRITE: (() => number);
        accessrights_NONE: (() => number);
        accessrights_READ: (() => number);
        accessrights_READ_ADD: (() => number);
        accessrights_READ_ADD_WRITE: (() => number);
        accessrights_READ_WRITE: (() => number);
        accessrights_WRITE: (() => number);
        accessrights_from_bits: ((a, b, c) => number);
        accessrights_is_addable: ((a) => number);
        accessrights_is_none: ((a) => number);
        accessrights_is_readable: ((a) => number);
        accessrights_is_writeable: ((a) => number);
        accessrights_new: ((a, b) => void);
        accountHashToBase64: ((a, b, c) => void);
        accounthash_fromFormattedStr: ((a, b, c) => void);
        accounthash_fromPublicKey: ((a) => number);
        accounthash_fromUint8Array: ((a, b) => number);
        accounthash_new: ((a, b, c) => void);
        accounthash_toFormattedString: ((a, b) => void);
        accounthash_toHexString: ((a, b) => void);
        accounthash_toJson: ((a) => number);
        accountidentifier_fromAccountHash: ((a) => number);
        accountidentifier_fromFormattedStr: ((a, b, c) => void);
        accountidentifier_fromPublicKey: ((a) => number);
        accountidentifier_new: ((a, b, c) => void);
        accountidentifier_toJson: ((a) => number);
        blockhash_fromDigest: ((a, b) => void);
        blockhash_new: ((a, b, c) => void);
        blockhash_toJson: ((a) => number);
        blockhash_toString: ((a, b) => void);
        blockidentifier_fromHeight: ((a) => number);
        blockidentifier_from_hash: ((a) => number);
        blockidentifier_new: ((a) => number);
        blockidentifier_toJson: ((a) => number);
        bytes_fromUint8Array: ((a) => number);
        bytes_new: (() => number);
        cltype_Any: (() => number);
        cltype_Bool: (() => number);
        cltype_ByteArray: (() => number);
        cltype_I32: (() => number);
        cltype_I64: (() => number);
        cltype_Key: (() => number);
        cltype_List: ((a) => number);
        cltype_Map: ((a, b) => number);
        cltype_Option: ((a) => number);
        cltype_PublicKey: (() => number);
        cltype_Result: ((a, b) => number);
        cltype_String: (() => number);
        cltype_Tuple1: ((a) => number);
        cltype_Tuple2: ((a, b) => number);
        cltype_Tuple3: ((a, b, c) => number);
        cltype_U128: (() => number);
        cltype_U256: (() => number);
        cltype_U32: (() => number);
        cltype_U512: (() => number);
        cltype_U64: (() => number);
        cltype_U8: (() => number);
        cltype_URef: (() => number);
        cltype_Unit: (() => number);
        cltype_new: ((a) => number);
        cltype_toString: ((a, b) => void);
        contracthash_fromFormattedStr: ((a, b, c) => void);
        contracthash_fromString: ((a, b, c) => void);
        contracthash_fromUint8Array: ((a, b) => number);
        contracthash_toFormattedString: ((a, b) => void);
        contractpackagehash_fromFormattedStr: ((a, b, c) => void);
        contractpackagehash_fromString: ((a, b, c) => void);
        contractpackagehash_fromUint8Array: ((a, b) => number);
        contractpackagehash_toFormattedString: ((a, b) => void);
        deploy_TTL: ((a, b) => void);
        deploy_account: ((a, b) => void);
        deploy_addArg: ((a, b, c, d) => number);
        deploy_addSignature: ((a, b, c, d, e) => number);
        deploy_args: ((a) => number);
        deploy_chainName: ((a, b) => void);
        deploy_hash: ((a) => number);
        deploy_new: ((a) => number);
        deploy_sign: ((a, b, c) => number);
        deploy_timestamp: ((a, b) => void);
        deploy_toJson: ((a) => number);
        deploy_validateDeploySize: ((a) => number);
        deploy_withAccount: ((a, b, c, d) => number);
        deploy_withChainName: ((a, b, c, d, e) => number);
        deploy_withEntryPointName: ((a, b, c, d, e) => number);
        deploy_withHash: ((a, b, c, d) => number);
        deploy_withModuleBytes: ((a, b, c, d) => number);
        deploy_withPackageHash: ((a, b, c, d) => number);
        deploy_withPayment: ((a, b, c, d) => number);
        deploy_withPaymentAndSession: ((a, b, c, d) => void);
        deploy_withSecretKey: ((a, b, c) => number);
        deploy_withSession: ((a, b, c, d) => number);
        deploy_withStandardPayment: ((a, b, c, d, e) => number);
        deploy_withTTL: ((a, b, c, d, e) => number);
        deploy_withTimestamp: ((a, b, c, d, e) => number);
        deploy_withTransfer: ((a, b, c, d, e, f, g, h, i) => void);
        deployhash_fromDigest: ((a, b) => void);
        deployhash_new: ((a, b, c) => void);
        deployhash_toJson: ((a) => number);
        deployhash_toString: ((a, b) => void);
        deploystrparams_chain_name: ((a, b) => void);
        deploystrparams_new: ((a, b, c, d, e, f, g, h, i, j) => number);
        deploystrparams_secret_key: ((a, b) => void);
        deploystrparams_session_account: ((a, b) => void);
        deploystrparams_setDefaultTTL: ((a) => void);
        deploystrparams_setDefaultTimestamp: ((a) => void);
        deploystrparams_set_chain_name: ((a, b, c) => void);
        deploystrparams_set_secret_key: ((a, b, c) => void);
        deploystrparams_set_session_account: ((a, b, c) => void);
        deploystrparams_set_timestamp: ((a, b, c) => void);
        deploystrparams_set_ttl: ((a, b, c) => void);
        deploystrparams_timestamp: ((a, b) => void);
        deploystrparams_ttl: ((a, b) => void);
        deploysubscription_new: ((a, b, c) => number);
        deploywatcher_new: ((a, b, c, d) => number);
        deploywatcher_start: ((a) => number);
        deploywatcher_stop: ((a) => void);
        deploywatcher_subscribe: ((a, b, c, d) => void);
        deploywatcher_unsubscribe: ((a, b, c) => void);
        dictionaryaddr_new: ((a, b, c) => void);
        dictionaryitemidentifier_newFromAccountInfo: ((a, b, c, d, e, f, g) => void);
        dictionaryitemidentifier_newFromContractInfo: ((a, b, c, d, e, f, g) => void);
        dictionaryitemidentifier_newFromDictionaryKey: ((a, b, c) => void);
        dictionaryitemidentifier_newFromSeedUref: ((a, b, c, d, e) => void);
        dictionaryitemidentifier_toJson: ((a) => number);
        dictionaryitemstrparams_new: (() => number);
        dictionaryitemstrparams_setAccountNamedKey: ((a, b, c, d, e, f, g) => void);
        dictionaryitemstrparams_setContractNamedKey: ((a, b, c, d, e, f, g) => void);
        dictionaryitemstrparams_setDictionary: ((a, b, c) => void);
        dictionaryitemstrparams_setUref: ((a, b, c, d, e) => void);
        dictionaryitemstrparams_toJson: ((a) => number);
        digest__new: ((a, b, c) => void);
        digest_fromDigest: ((a, b, c) => void);
        digest_fromString: ((a, b, c) => void);
        digest_toJson: ((a) => number);
        digest_toString: ((a, b) => void);
        encodeLowerBlake2b: ((a, b) => number);
        eraid_new: ((a) => number);
        eraid_value: ((a) => number);
        fromTransfer: ((a, b) => number);
        generatePrivateKey: ((a) => void);
        generatePrivateKey_secp256k1: ((a) => void);
        getTimestamp: (() => number);
        getaccountresult_account: ((a) => number);
        getaccountresult_api_version: ((a) => number);
        getaccountresult_merkle_proof: ((a, b) => void);
        getaccountresult_toJson: ((a) => number);
        getauctioninforesult_api_version: ((a) => number);
        getauctioninforesult_auction_state: ((a) => number);
        getauctioninforesult_toJson: ((a) => number);
        getbalanceresult_api_version: ((a) => number);
        getbalanceresult_balance_value: ((a) => number);
        getbalanceresult_merkle_proof: ((a, b) => void);
        getbalanceresult_toJson: ((a) => number);
        getblockresult_api_version: ((a) => number);
        getblockresult_block: ((a) => number);
        getblockresult_toJson: ((a) => number);
        getblocktransfersresult_api_version: ((a) => number);
        getblocktransfersresult_block_hash: ((a) => number);
        getblocktransfersresult_toJson: ((a) => number);
        getblocktransfersresult_transfers: ((a) => number);
        getchainspecresult_api_version: ((a) => number);
        getchainspecresult_chainspec_bytes: ((a) => number);
        getchainspecresult_toJson: ((a) => number);
        getdeployresult_api_version: ((a) => number);
        getdeployresult_deploy: ((a) => number);
        getdeployresult_toJson: ((a) => number);
        getdictionaryitemresult_api_version: ((a) => number);
        getdictionaryitemresult_dictionary_key: ((a, b) => void);
        getdictionaryitemresult_merkle_proof: ((a, b) => void);
        getdictionaryitemresult_stored_value: ((a) => number);
        getdictionaryitemresult_toJson: ((a) => number);
        geterainforesult_api_version: ((a) => number);
        geterainforesult_era_summary: ((a) => number);
        geterainforesult_toJson: ((a) => number);
        geterasummaryresult_api_version: ((a) => number);
        geterasummaryresult_era_summary: ((a) => number);
        geterasummaryresult_toJson: ((a) => number);
        getnodestatusresult_api_version: ((a) => number);
        getnodestatusresult_available_block_range: ((a) => number);
        getnodestatusresult_block_sync: ((a) => number);
        getnodestatusresult_build_version: ((a, b) => void);
        getnodestatusresult_chainspec_name: ((a, b) => void);
        getnodestatusresult_last_added_block_info: ((a) => number);
        getnodestatusresult_last_progress: ((a) => number);
        getnodestatusresult_next_upgrade: ((a) => number);
        getnodestatusresult_our_public_signing_key: ((a) => number);
        getnodestatusresult_peers: ((a) => number);
        getnodestatusresult_reactor_state: ((a) => number);
        getnodestatusresult_round_length: ((a) => number);
        getnodestatusresult_starting_state_root_hash: ((a) => number);
        getnodestatusresult_toJson: ((a) => number);
        getnodestatusresult_uptime: ((a) => number);
        getpeersresult_api_version: ((a) => number);
        getpeersresult_peers: ((a) => number);
        getpeersresult_toJson: ((a) => number);
        getstateroothashresult_api_version: ((a) => number);
        getstateroothashresult_state_root_hash: ((a) => number);
        getstateroothashresult_state_root_hash_as_string: ((a, b) => void);
        getstateroothashresult_toJson: ((a) => number);
        getstateroothashresult_toString: ((a, b) => void);
        getvalidatorchangesresult_api_version: ((a) => number);
        getvalidatorchangesresult_changes: ((a) => number);
        getvalidatorchangesresult_toJson: ((a) => number);
        globalstateidentifier_fromBlockHash: ((a) => number);
        globalstateidentifier_fromBlockHeight: ((a) => number);
        globalstateidentifier_fromStateRootHash: ((a) => number);
        globalstateidentifier_new: ((a) => number);
        globalstateidentifier_toJson: ((a) => number);
        hashaddr_new: ((a, b, c) => void);
        hexToString: ((a, b, c) => void);
        hexToUint8Array: ((a, b, c) => void);
        intounderlyingbytesource_autoAllocateChunkSize: ((a) => number);
        intounderlyingbytesource_cancel: ((a) => void);
        intounderlyingbytesource_pull: ((a, b) => number);
        intounderlyingbytesource_start: ((a, b) => void);
        intounderlyingbytesource_type: ((a, b) => void);
        intounderlyingsink_abort: ((a, b) => number);
        intounderlyingsink_close: ((a) => number);
        intounderlyingsink_write: ((a, b) => number);
        intounderlyingsource_cancel: ((a) => void);
        intounderlyingsource_pull: ((a, b) => number);
        jsonPrettyPrint: ((a, b) => number);
        key_asBalance: ((a) => number);
        key_asDictionaryAddr: ((a) => number);
        key_fromAccount: ((a) => number);
        key_fromBalance: ((a) => number);
        key_fromBid: ((a) => number);
        key_fromChainspecRegistry: (() => number);
        key_fromChecksumRegistry: (() => number);
        key_fromDeployInfo: ((a) => number);
        key_fromDictionaryAddr: ((a) => number);
        key_fromDictionaryKey: ((a, b, c) => number);
        key_fromEraInfo: ((a) => number);
        key_fromEraSummary: (() => number);
        key_fromFormattedString: ((a, b) => void);
        key_fromHash: ((a) => number);
        key_fromSystemContractRegistry: (() => number);
        key_fromTransfer: ((a, b) => number);
        key_fromURef: ((a) => number);
        key_fromUnbond: ((a) => number);
        key_fromWithdraw: ((a) => number);
        key_intoAccount: ((a) => number);
        key_intoHash: ((a) => number);
        key_intoURef: ((a) => number);
        key_isDictionaryKey: ((a) => number);
        key_new: ((a, b) => void);
        key_toFormattedString: ((a, b) => void);
        key_toJson: ((a) => number);
        key_urefToHash: ((a) => number);
        key_withdrawToUnbond: ((a) => number);
        listrpcsresult_api_version: ((a) => number);
        listrpcsresult_name: ((a, b) => void);
        listrpcsresult_schema: ((a) => number);
        listrpcsresult_toJson: ((a) => number);
        makeDictionaryItemKey: ((a, b, c, d) => void);
        memory: Memory;
        motesToCSPR: ((a, b, c) => void);
        path_fromArray: ((a) => number);
        path_is_empty: ((a) => number);
        path_new: ((a) => number);
        path_toJson: ((a) => number);
        path_toString: ((a, b) => void);
        paymentstrparams_new: ((a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u) => number);
        paymentstrparams_payment_amount: ((a, b) => void);
        paymentstrparams_payment_args_complex: ((a, b) => void);
        paymentstrparams_payment_args_json: ((a, b) => void);
        paymentstrparams_payment_args_simple: ((a) => number);
        paymentstrparams_payment_entry_point: ((a, b) => void);
        paymentstrparams_payment_hash: ((a, b) => void);
        paymentstrparams_payment_name: ((a, b) => void);
        paymentstrparams_payment_package_hash: ((a, b) => void);
        paymentstrparams_payment_package_name: ((a, b) => void);
        paymentstrparams_payment_path: ((a, b) => void);
        paymentstrparams_payment_version: ((a, b) => void);
        paymentstrparams_set_payment_amount: ((a, b, c) => void);
        paymentstrparams_set_payment_args_complex: ((a, b, c) => void);
        paymentstrparams_set_payment_args_json: ((a, b, c) => void);
        paymentstrparams_set_payment_args_simple: ((a, b) => void);
        paymentstrparams_set_payment_entry_point: ((a, b, c) => void);
        paymentstrparams_set_payment_hash: ((a, b, c) => void);
        paymentstrparams_set_payment_name: ((a, b, c) => void);
        paymentstrparams_set_payment_package_hash: ((a, b, c) => void);
        paymentstrparams_set_payment_package_name: ((a, b, c) => void);
        paymentstrparams_set_payment_path: ((a, b, c) => void);
        paymentstrparams_set_payment_version: ((a, b, c) => void);
        peerentry_address: ((a, b) => void);
        peerentry_node_id: ((a, b) => void);
        privateToPublicKey: ((a, b, c) => void);
        publickey_fromUint8Array: ((a, b) => number);
        publickey_new: ((a, b, c) => void);
        publickey_toAccountHash: ((a) => number);
        publickey_toJson: ((a) => number);
        publickey_toPurseUref: ((a) => number);
        purseidentifier_fromAccountHash: ((a) => number);
        purseidentifier_fromPublicKey: ((a) => number);
        purseidentifier_fromURef: ((a) => number);
        purseidentifier_toJson: ((a) => number);
        putdeployresult_api_version: ((a) => number);
        putdeployresult_deploy_hash: ((a) => number);
        putdeployresult_toJson: ((a) => number);
        querybalanceresult_api_version: ((a) => number);
        querybalanceresult_balance: ((a) => number);
        querybalanceresult_toJson: ((a) => number);
        queryglobalstateresult_api_version: ((a) => number);
        queryglobalstateresult_block_header: ((a) => number);
        queryglobalstateresult_merkle_proof: ((a, b) => void);
        queryglobalstateresult_stored_value: ((a) => number);
        queryglobalstateresult_toJson: ((a) => number);
        sdk_account_put_deploy: ((a, b, c, d, e) => number);
        sdk_call_entrypoint: ((a, b, c, d, e, f, g) => number);
        sdk_chain_get_block: ((a, b) => number);
        sdk_chain_get_state_root_hash: ((a, b) => number);
        sdk_deploy: ((a, b, c, d, e, f, g) => number);
        sdk_getNodeAddress: ((a, b, c, d) => void);
        sdk_getVerbosity: ((a, b) => number);
        sdk_get_account: ((a, b) => number);
        sdk_get_account_options: ((a, b) => number);
        sdk_get_auction_info: ((a, b) => number);
        sdk_get_auction_info_options: ((a, b) => number);
        sdk_get_balance: ((a, b) => number);
        sdk_get_balance_options: ((a, b) => number);
        sdk_get_block: ((a, b) => number);
        sdk_get_block_options: ((a, b) => number);
        sdk_get_block_transfers: ((a, b) => number);
        sdk_get_block_transfers_options: ((a, b) => number);
        sdk_get_chainspec: ((a, b, c, d) => number);
        sdk_get_deploy: ((a, b) => number);
        sdk_get_deploy_options: ((a, b) => number);
        sdk_get_dictionary_item: ((a, b) => number);
        sdk_get_dictionary_item_options: ((a, b) => number);
        sdk_get_era_info: ((a, b) => number);
        sdk_get_era_info_options: ((a, b) => number);
        sdk_get_era_summary: ((a, b) => number);
        sdk_get_era_summary_options: ((a, b) => number);
        sdk_get_node_status: ((a, b, c, d) => number);
        sdk_get_peers: ((a, b, c, d) => number);
        sdk_get_state_root_hash: ((a, b) => number);
        sdk_get_state_root_hash_options: ((a, b) => number);
        sdk_get_validator_changes: ((a, b, c, d) => number);
        sdk_info_get_deploy: ((a, b) => number);
        sdk_install: ((a, b, c, d, e, f, g) => number);
        sdk_list_rpcs: ((a, b, c, d) => number);
        sdk_make_deploy: ((a, b, c, d, e) => void);
        sdk_make_transfer: ((a, b, c, d, e, f, g, h, i, j) => void);
        sdk_new: ((a, b, c) => number);
        sdk_put_deploy: ((a, b, c, d, e) => number);
        sdk_query_balance: ((a, b) => number);
        sdk_query_balance_options: ((a, b) => number);
        sdk_query_contract_dict: ((a, b) => number);
        sdk_query_contract_dict_options: ((a, b) => number);
        sdk_query_contract_key: ((a, b) => number);
        sdk_query_contract_key_options: ((a, b) => number);
        sdk_query_global_state: ((a, b) => number);
        sdk_query_global_state_options: ((a, b) => number);
        sdk_setNodeAddress: ((a, b, c, d) => void);
        sdk_setVerbosity: ((a, b, c) => void);
        sdk_sign_deploy: ((a, b, c, d) => number);
        sdk_speculative_deploy: ((a, b, c, d, e, f, g, h, i, j) => number);
        sdk_speculative_exec: ((a, b) => number);
        sdk_speculative_exec_options: ((a, b) => number);
        sdk_speculative_transfer: ((a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) => number);
        sdk_state_get_account_info: ((a, b) => number);
        sdk_state_get_balance: ((a, b) => number);
        sdk_state_get_dictionary_item: ((a, b) => number);
        sdk_transfer: ((a, b, c, d, e, f, g, h, i, j, k, l) => number);
        sdk_waitDeploy: ((a, b, c, d, e, f, g) => number);
        sdk_watchDeploy: ((a, b, c, d, e) => number);
        sessionstrparams_is_session_transfer: ((a) => number);
        sessionstrparams_new: ((a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u) => number);
        sessionstrparams_session_args_complex: ((a, b) => void);
        sessionstrparams_session_args_json: ((a, b) => void);
        sessionstrparams_session_args_simple: ((a) => number);
        sessionstrparams_session_bytes: ((a) => number);
        sessionstrparams_session_entry_point: ((a, b) => void);
        sessionstrparams_session_hash: ((a, b) => void);
        sessionstrparams_session_name: ((a, b) => void);
        sessionstrparams_session_package_hash: ((a, b) => void);
        sessionstrparams_session_package_name: ((a, b) => void);
        sessionstrparams_session_path: ((a, b) => void);
        sessionstrparams_session_version: ((a, b) => void);
        sessionstrparams_set_is_session_transfer: ((a, b) => void);
        sessionstrparams_set_session_args_complex: ((a, b, c) => void);
        sessionstrparams_set_session_args_json: ((a, b, c) => void);
        sessionstrparams_set_session_args_simple: ((a, b) => void);
        sessionstrparams_set_session_bytes: ((a, b) => void);
        sessionstrparams_set_session_entry_point: ((a, b, c) => void);
        sessionstrparams_set_session_hash: ((a, b, c) => void);
        sessionstrparams_set_session_name: ((a, b, c) => void);
        sessionstrparams_set_session_package_hash: ((a, b, c) => void);
        sessionstrparams_set_session_package_name: ((a, b, c) => void);
        sessionstrparams_set_session_path: ((a, b, c) => void);
        sessionstrparams_set_session_version: ((a, b, c) => void);
        speculativeexecresult_api_version: ((a) => number);
        speculativeexecresult_block_hash: ((a) => number);
        speculativeexecresult_execution_result: ((a) => number);
        speculativeexecresult_toJson: ((a) => number);
        transferaddr_new: ((a, b, c) => void);
        transferaddr_to_bytes: ((a, b) => void);
        uint8ArrayToBytes: ((a) => number);
        uref_fromUint8Array: ((a, b, c) => number);
        uref_new: ((a, b, c, d) => void);
        uref_toFormattedString: ((a, b) => void);
        uref_toJson: ((a) => number);
        urefaddr_new: ((a, b, c) => void);
        wasm_bindgen__convert__closures__invoke2_mut__h41b3897ec8604519: ((a, b, c, d) => void);
    }

    Properties

    __wbg_accessrights_free: ((a) => void)

    Type declaration

      • (a): void
      • Parameters

        • a: number

        Returns void

    __wbg_accounthash_free: ((a) => void)

    Type declaration

      • (a): void
      • Parameters

        • a: number

        Returns void

    __wbg_accountidentifier_free: ((a) => void)

    Type declaration

      • (a): void
      • Parameters

        • a: number

        Returns void

    __wbg_argssimple_free: ((a) => void)

    Type declaration

      • (a): void
      • Parameters

        • a: number

        Returns void

    __wbg_blockhash_free: ((a) => void)

    Type declaration

      • (a): void
      • Parameters

        • a: number

        Returns void

    __wbg_blockidentifier_free: ((a) => void)

    Type declaration

      • (a): void
      • Parameters

        • a: number

        Returns void

    __wbg_body_free: ((a) => void)

    Type declaration

      • (a): void
      • Parameters

        • a: number

        Returns void

    __wbg_bytes_free: ((a) => void)

    Type declaration

      • (a): void
      • Parameters

        • a: number

        Returns void

    __wbg_cltype_free: ((a) => void)

    Type declaration

      • (a): void
      • Parameters

        • a: number

        Returns void

    __wbg_contracthash_free: ((a) => void)

    Type declaration

      • (a): void
      • Parameters

        • a: number

        Returns void

    __wbg_contractpackagehash_free: ((a) => void)

    Type declaration

      • (a): void
      • Parameters

        • a: number

        Returns void

    __wbg_deploy_free: ((a) => void)

    Type declaration

      • (a): void
      • Parameters

        • a: number

        Returns void

    __wbg_deployhash_free: ((a) => void)

    Type declaration

      • (a): void
      • Parameters

        • a: number

        Returns void

    __wbg_deployprocessed_free: ((a) => void)

    Type declaration

      • (a): void
      • Parameters

        • a: number

        Returns void

    __wbg_deploystrparams_free: ((a) => void)

    Type declaration

      • (a): void
      • Parameters

        • a: number

        Returns void

    __wbg_deploysubscription_free: ((a) => void)

    Type declaration

      • (a): void
      • Parameters

        • a: number

        Returns void

    __wbg_deploywatcher_free: ((a) => void)

    Type declaration

      • (a): void
      • Parameters

        • a: number

        Returns void

    __wbg_dictionaryaddr_free: ((a) => void)

    Type declaration

      • (a): void
      • Parameters

        • a: number

        Returns void

    __wbg_dictionaryitemidentifier_free: ((a) => void)

    Type declaration

      • (a): void
      • Parameters

        • a: number

        Returns void

    __wbg_dictionaryitemstrparams_free: ((a) => void)

    Type declaration

      • (a): void
      • Parameters

        • a: number

        Returns void

    __wbg_digest_free: ((a) => void)

    Type declaration

      • (a): void
      • Parameters

        • a: number

        Returns void

    __wbg_eraid_free: ((a) => void)

    Type declaration

      • (a): void
      • Parameters

        • a: number

        Returns void

    __wbg_eventparseresult_free: ((a) => void)

    Type declaration

      • (a): void
      • Parameters

        • a: number

        Returns void

    __wbg_executionresult_free: ((a) => void)

    Type declaration

      • (a): void
      • Parameters

        • a: number

        Returns void

    __wbg_failure_free: ((a) => void)

    Type declaration

      • (a): void
      • Parameters

        • a: number

        Returns void

    __wbg_get_body_DeployProcessed: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    __wbg_get_deployprocessed_account: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_get_deployprocessed_block_hash: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_get_deployprocessed_dependencies: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_get_deployprocessed_deploy_hash: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_get_deployprocessed_execution_result: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    __wbg_get_deployprocessed_timestamp: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_get_deployprocessed_ttl: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_get_deploysubscription_deployHash: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_get_deploysubscription_eventHandlerFn: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    __wbg_get_eventparseresult_body: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    __wbg_get_eventparseresult_err: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_get_executionresult_Failure: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    __wbg_get_executionresult_Success: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    __wbg_get_failure_error_message: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_get_getaccountoptions_account_identifier: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    __wbg_get_getaccountoptions_account_identifier_as_string: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_get_getaccountoptions_maybe_block_id_as_string: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_get_getaccountoptions_maybe_block_identifier: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    __wbg_get_getaccountoptions_node_address: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_get_getaccountoptions_verbosity: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    __wbg_get_getauctioninfooptions_maybe_block_id_as_string: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_get_getauctioninfooptions_maybe_block_identifier: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    __wbg_get_getauctioninfooptions_node_address: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_get_getauctioninfooptions_verbosity: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    __wbg_get_getbalanceoptions_node_address: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_get_getbalanceoptions_purse_uref: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    __wbg_get_getbalanceoptions_purse_uref_as_string: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_get_getbalanceoptions_state_root_hash: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    __wbg_get_getbalanceoptions_state_root_hash_as_string: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_get_getbalanceoptions_verbosity: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    __wbg_get_getblockoptions_maybe_block_id_as_string: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_get_getblockoptions_maybe_block_identifier: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    __wbg_get_getblockoptions_node_address: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_get_getblockoptions_verbosity: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    __wbg_get_getblocktransfersoptions_maybe_block_id_as_string: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_get_getblocktransfersoptions_maybe_block_identifier: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    __wbg_get_getblocktransfersoptions_node_address: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_get_getblocktransfersoptions_verbosity: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    __wbg_get_getdeployoptions_deploy_hash: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    __wbg_get_getdeployoptions_deploy_hash_as_string: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_get_getdeployoptions_finalized_approvals: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    __wbg_get_getdeployoptions_node_address: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_get_getdeployoptions_verbosity: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    __wbg_get_getdictionaryitemoptions_dictionary_item_identifier: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    __wbg_get_getdictionaryitemoptions_dictionary_item_params: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    __wbg_get_getdictionaryitemoptions_node_address: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_get_getdictionaryitemoptions_state_root_hash: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    __wbg_get_getdictionaryitemoptions_state_root_hash_as_string: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_get_getdictionaryitemoptions_verbosity: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    __wbg_get_geterainfooptions_maybe_block_id_as_string: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_get_geterainfooptions_maybe_block_identifier: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    __wbg_get_geterainfooptions_node_address: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_get_geterainfooptions_verbosity: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    __wbg_get_geterasummaryoptions_maybe_block_id_as_string: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_get_geterasummaryoptions_maybe_block_identifier: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    __wbg_get_geterasummaryoptions_node_address: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_get_geterasummaryoptions_verbosity: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    __wbg_get_getspeculativeexecoptions_deploy: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    __wbg_get_getspeculativeexecoptions_deploy_as_string: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_get_getspeculativeexecoptions_maybe_block_id_as_string: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_get_getspeculativeexecoptions_maybe_block_identifier: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    __wbg_get_getspeculativeexecoptions_node_address: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_get_getspeculativeexecoptions_verbosity: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    __wbg_get_getstateroothashoptions_maybe_block_id_as_string: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_get_getstateroothashoptions_maybe_block_identifier: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    __wbg_get_getstateroothashoptions_node_address: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_get_getstateroothashoptions_verbosity: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    __wbg_get_querybalanceoptions_global_state_identifier: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    __wbg_get_querybalanceoptions_maybe_block_id_as_string: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_get_querybalanceoptions_node_address: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_get_querybalanceoptions_purse_identifier: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    __wbg_get_querybalanceoptions_purse_identifier_as_string: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_get_querybalanceoptions_state_root_hash: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    __wbg_get_querybalanceoptions_state_root_hash_as_string: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_get_querybalanceoptions_verbosity: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    __wbg_get_querycontractdictoptions_dictionary_item_identifier: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    __wbg_get_querycontractdictoptions_dictionary_item_params: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    __wbg_get_querycontractdictoptions_node_address: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_get_querycontractdictoptions_state_root_hash: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    __wbg_get_querycontractdictoptions_state_root_hash_as_string: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_get_querycontractdictoptions_verbosity: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    __wbg_get_querycontractkeyoptions_contract_key: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    __wbg_get_querycontractkeyoptions_contract_key_as_string: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_get_querycontractkeyoptions_global_state_identifier: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    __wbg_get_querycontractkeyoptions_maybe_block_id_as_string: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_get_querycontractkeyoptions_node_address: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_get_querycontractkeyoptions_path: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    __wbg_get_querycontractkeyoptions_path_as_string: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_get_querycontractkeyoptions_state_root_hash: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    __wbg_get_querycontractkeyoptions_state_root_hash_as_string: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_get_querycontractkeyoptions_verbosity: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    __wbg_get_queryglobalstateoptions_global_state_identifier: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    __wbg_get_queryglobalstateoptions_key: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    __wbg_get_queryglobalstateoptions_key_as_string: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_get_queryglobalstateoptions_maybe_block_id_as_string: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_get_queryglobalstateoptions_node_address: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_get_queryglobalstateoptions_path: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    __wbg_get_queryglobalstateoptions_path_as_string: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_get_queryglobalstateoptions_state_root_hash: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    __wbg_get_queryglobalstateoptions_state_root_hash_as_string: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_get_queryglobalstateoptions_verbosity: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    __wbg_get_success_cost: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_getaccountoptions_free: ((a) => void)

    Type declaration

      • (a): void
      • Parameters

        • a: number

        Returns void

    __wbg_getaccountresult_free: ((a) => void)

    Type declaration

      • (a): void
      • Parameters

        • a: number

        Returns void

    __wbg_getauctioninfooptions_free: ((a) => void)

    Type declaration

      • (a): void
      • Parameters

        • a: number

        Returns void

    __wbg_getauctioninforesult_free: ((a) => void)

    Type declaration

      • (a): void
      • Parameters

        • a: number

        Returns void

    __wbg_getbalanceoptions_free: ((a) => void)

    Type declaration

      • (a): void
      • Parameters

        • a: number

        Returns void

    __wbg_getbalanceresult_free: ((a) => void)

    Type declaration

      • (a): void
      • Parameters

        • a: number

        Returns void

    __wbg_getblockoptions_free: ((a) => void)

    Type declaration

      • (a): void
      • Parameters

        • a: number

        Returns void

    __wbg_getblockresult_free: ((a) => void)

    Type declaration

      • (a): void
      • Parameters

        • a: number

        Returns void

    __wbg_getblocktransfersoptions_free: ((a) => void)

    Type declaration

      • (a): void
      • Parameters

        • a: number

        Returns void

    __wbg_getblocktransfersresult_free: ((a) => void)

    Type declaration

      • (a): void
      • Parameters

        • a: number

        Returns void

    __wbg_getchainspecresult_free: ((a) => void)

    Type declaration

      • (a): void
      • Parameters

        • a: number

        Returns void

    __wbg_getdeployoptions_free: ((a) => void)

    Type declaration

      • (a): void
      • Parameters

        • a: number

        Returns void

    __wbg_getdeployresult_free: ((a) => void)

    Type declaration

      • (a): void
      • Parameters

        • a: number

        Returns void

    __wbg_getdictionaryitemoptions_free: ((a) => void)

    Type declaration

      • (a): void
      • Parameters

        • a: number

        Returns void

    __wbg_getdictionaryitemresult_free: ((a) => void)

    Type declaration

      • (a): void
      • Parameters

        • a: number

        Returns void

    __wbg_geterainfooptions_free: ((a) => void)

    Type declaration

      • (a): void
      • Parameters

        • a: number

        Returns void

    __wbg_geterainforesult_free: ((a) => void)

    Type declaration

      • (a): void
      • Parameters

        • a: number

        Returns void

    __wbg_geterasummaryoptions_free: ((a) => void)

    Type declaration

      • (a): void
      • Parameters

        • a: number

        Returns void

    __wbg_geterasummaryresult_free: ((a) => void)

    Type declaration

      • (a): void
      • Parameters

        • a: number

        Returns void

    __wbg_getnodestatusresult_free: ((a) => void)

    Type declaration

      • (a): void
      • Parameters

        • a: number

        Returns void

    __wbg_getpeersresult_free: ((a) => void)

    Type declaration

      • (a): void
      • Parameters

        • a: number

        Returns void

    __wbg_getspeculativeexecoptions_free: ((a) => void)

    Type declaration

      • (a): void
      • Parameters

        • a: number

        Returns void

    __wbg_getstateroothashoptions_free: ((a) => void)

    Type declaration

      • (a): void
      • Parameters

        • a: number

        Returns void

    __wbg_getstateroothashresult_free: ((a) => void)

    Type declaration

      • (a): void
      • Parameters

        • a: number

        Returns void

    __wbg_getvalidatorchangesresult_free: ((a) => void)

    Type declaration

      • (a): void
      • Parameters

        • a: number

        Returns void

    __wbg_globalstateidentifier_free: ((a) => void)

    Type declaration

      • (a): void
      • Parameters

        • a: number

        Returns void

    __wbg_hashaddr_free: ((a) => void)

    Type declaration

      • (a): void
      • Parameters

        • a: number

        Returns void

    __wbg_intounderlyingbytesource_free: ((a) => void)

    Type declaration

      • (a): void
      • Parameters

        • a: number

        Returns void

    __wbg_intounderlyingsink_free: ((a) => void)

    Type declaration

      • (a): void
      • Parameters

        • a: number

        Returns void

    __wbg_intounderlyingsource_free: ((a) => void)

    Type declaration

      • (a): void
      • Parameters

        • a: number

        Returns void

    __wbg_key_free: ((a) => void)

    Type declaration

      • (a): void
      • Parameters

        • a: number

        Returns void

    __wbg_listrpcsresult_free: ((a) => void)

    Type declaration

      • (a): void
      • Parameters

        • a: number

        Returns void

    __wbg_path_free: ((a) => void)

    Type declaration

      • (a): void
      • Parameters

        • a: number

        Returns void

    __wbg_paymentstrparams_free: ((a) => void)

    Type declaration

      • (a): void
      • Parameters

        • a: number

        Returns void

    __wbg_peerentry_free: ((a) => void)

    Type declaration

      • (a): void
      • Parameters

        • a: number

        Returns void

    __wbg_publickey_free: ((a) => void)

    Type declaration

      • (a): void
      • Parameters

        • a: number

        Returns void

    __wbg_purseidentifier_free: ((a) => void)

    Type declaration

      • (a): void
      • Parameters

        • a: number

        Returns void

    __wbg_putdeployresult_free: ((a) => void)

    Type declaration

      • (a): void
      • Parameters

        • a: number

        Returns void

    __wbg_querybalanceoptions_free: ((a) => void)

    Type declaration

      • (a): void
      • Parameters

        • a: number

        Returns void

    __wbg_querybalanceresult_free: ((a) => void)

    Type declaration

      • (a): void
      • Parameters

        • a: number

        Returns void

    __wbg_querycontractdictoptions_free: ((a) => void)

    Type declaration

      • (a): void
      • Parameters

        • a: number

        Returns void

    __wbg_querycontractkeyoptions_free: ((a) => void)

    Type declaration

      • (a): void
      • Parameters

        • a: number

        Returns void

    __wbg_queryglobalstateoptions_free: ((a) => void)

    Type declaration

      • (a): void
      • Parameters

        • a: number

        Returns void

    __wbg_queryglobalstateresult_free: ((a) => void)

    Type declaration

      • (a): void
      • Parameters

        • a: number

        Returns void

    __wbg_sdk_free: ((a) => void)

    Type declaration

      • (a): void
      • Parameters

        • a: number

        Returns void

    __wbg_sessionstrparams_free: ((a) => void)

    Type declaration

      • (a): void
      • Parameters

        • a: number

        Returns void

    __wbg_set_body_DeployProcessed: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_set_deployprocessed_account: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    __wbg_set_deployprocessed_block_hash: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    __wbg_set_deployprocessed_dependencies: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    __wbg_set_deployprocessed_deploy_hash: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    __wbg_set_deployprocessed_execution_result: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_set_deployprocessed_timestamp: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    __wbg_set_deployprocessed_ttl: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    __wbg_set_deploysubscription_deployHash: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    __wbg_set_deploysubscription_eventHandlerFn: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_set_eventparseresult_body: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_set_eventparseresult_err: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    __wbg_set_executionresult_Failure: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_set_executionresult_Success: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_set_failure_error_message: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    __wbg_set_getaccountoptions_account_identifier: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_set_getaccountoptions_account_identifier_as_string: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    __wbg_set_getaccountoptions_maybe_block_id_as_string: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    __wbg_set_getaccountoptions_maybe_block_identifier: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_set_getaccountoptions_node_address: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    __wbg_set_getaccountoptions_verbosity: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_set_getauctioninfooptions_maybe_block_id_as_string: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    __wbg_set_getauctioninfooptions_maybe_block_identifier: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_set_getauctioninfooptions_node_address: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    __wbg_set_getauctioninfooptions_verbosity: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_set_getbalanceoptions_node_address: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    __wbg_set_getbalanceoptions_purse_uref: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_set_getbalanceoptions_purse_uref_as_string: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    __wbg_set_getbalanceoptions_state_root_hash: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_set_getbalanceoptions_state_root_hash_as_string: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    __wbg_set_getbalanceoptions_verbosity: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_set_getblockoptions_maybe_block_id_as_string: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    __wbg_set_getblockoptions_maybe_block_identifier: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_set_getblockoptions_node_address: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    __wbg_set_getblockoptions_verbosity: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_set_getblocktransfersoptions_maybe_block_id_as_string: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    __wbg_set_getblocktransfersoptions_maybe_block_identifier: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_set_getblocktransfersoptions_node_address: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    __wbg_set_getblocktransfersoptions_verbosity: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_set_getdeployoptions_deploy_hash: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_set_getdeployoptions_deploy_hash_as_string: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    __wbg_set_getdeployoptions_finalized_approvals: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_set_getdeployoptions_node_address: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    __wbg_set_getdeployoptions_verbosity: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_set_getdictionaryitemoptions_dictionary_item_identifier: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_set_getdictionaryitemoptions_dictionary_item_params: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_set_getdictionaryitemoptions_node_address: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    __wbg_set_getdictionaryitemoptions_state_root_hash: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_set_getdictionaryitemoptions_state_root_hash_as_string: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    __wbg_set_getdictionaryitemoptions_verbosity: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_set_geterainfooptions_maybe_block_id_as_string: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    __wbg_set_geterainfooptions_maybe_block_identifier: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_set_geterainfooptions_node_address: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    __wbg_set_geterainfooptions_verbosity: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_set_geterasummaryoptions_maybe_block_id_as_string: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    __wbg_set_geterasummaryoptions_maybe_block_identifier: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_set_geterasummaryoptions_node_address: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    __wbg_set_geterasummaryoptions_verbosity: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_set_getspeculativeexecoptions_deploy: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_set_getspeculativeexecoptions_deploy_as_string: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    __wbg_set_getspeculativeexecoptions_maybe_block_id_as_string: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    __wbg_set_getspeculativeexecoptions_maybe_block_identifier: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_set_getspeculativeexecoptions_node_address: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    __wbg_set_getspeculativeexecoptions_verbosity: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_set_getstateroothashoptions_maybe_block_id_as_string: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    __wbg_set_getstateroothashoptions_maybe_block_identifier: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_set_getstateroothashoptions_node_address: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    __wbg_set_getstateroothashoptions_verbosity: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_set_querybalanceoptions_global_state_identifier: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_set_querybalanceoptions_maybe_block_id_as_string: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    __wbg_set_querybalanceoptions_node_address: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    __wbg_set_querybalanceoptions_purse_identifier: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_set_querybalanceoptions_purse_identifier_as_string: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    __wbg_set_querybalanceoptions_state_root_hash: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_set_querybalanceoptions_state_root_hash_as_string: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    __wbg_set_querybalanceoptions_verbosity: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_set_querycontractdictoptions_dictionary_item_identifier: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_set_querycontractdictoptions_dictionary_item_params: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_set_querycontractdictoptions_node_address: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    __wbg_set_querycontractdictoptions_state_root_hash: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_set_querycontractdictoptions_state_root_hash_as_string: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    __wbg_set_querycontractdictoptions_verbosity: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_set_querycontractkeyoptions_contract_key: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_set_querycontractkeyoptions_contract_key_as_string: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    __wbg_set_querycontractkeyoptions_global_state_identifier: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_set_querycontractkeyoptions_maybe_block_id_as_string: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    __wbg_set_querycontractkeyoptions_node_address: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    __wbg_set_querycontractkeyoptions_path: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_set_querycontractkeyoptions_path_as_string: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    __wbg_set_querycontractkeyoptions_state_root_hash: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_set_querycontractkeyoptions_state_root_hash_as_string: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    __wbg_set_querycontractkeyoptions_verbosity: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_set_queryglobalstateoptions_global_state_identifier: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_set_queryglobalstateoptions_key: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_set_queryglobalstateoptions_key_as_string: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    __wbg_set_queryglobalstateoptions_maybe_block_id_as_string: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    __wbg_set_queryglobalstateoptions_node_address: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    __wbg_set_queryglobalstateoptions_path: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_set_queryglobalstateoptions_path_as_string: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    __wbg_set_queryglobalstateoptions_state_root_hash: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_set_queryglobalstateoptions_state_root_hash_as_string: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    __wbg_set_queryglobalstateoptions_verbosity: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_set_success_cost: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    __wbg_speculativeexecresult_free: ((a) => void)

    Type declaration

      • (a): void
      • Parameters

        • a: number

        Returns void

    __wbg_success_free: ((a) => void)

    Type declaration

      • (a): void
      • Parameters

        • a: number

        Returns void

    __wbg_transferaddr_free: ((a) => void)

    Type declaration

      • (a): void
      • Parameters

        • a: number

        Returns void

    __wbg_uref_free: ((a) => void)

    Type declaration

      • (a): void
      • Parameters

        • a: number

        Returns void

    __wbg_urefaddr_free: ((a) => void)

    Type declaration

      • (a): void
      • Parameters

        • a: number

        Returns void

    __wbindgen_add_to_stack_pointer: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    __wbindgen_exn_store: ((a) => void)

    Type declaration

      • (a): void
      • Parameters

        • a: number

        Returns void

    __wbindgen_export_2: Table
    __wbindgen_free: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    __wbindgen_malloc: ((a, b) => number)

    Type declaration

      • (a, b): number
      • Parameters

        • a: number
        • b: number

        Returns number

    __wbindgen_realloc: ((a, b, c, d) => number)

    Type declaration

      • (a, b, c, d): number
      • Parameters

        • a: number
        • b: number
        • c: number
        • d: number

        Returns number

    _dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h1c40c16592036fc7: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    _dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h5e61414879884c0a: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    accessrights_ADD: (() => number)

    Type declaration

      • (): number
      • Returns number

    accessrights_ADD_WRITE: (() => number)

    Type declaration

      • (): number
      • Returns number

    accessrights_NONE: (() => number)

    Type declaration

      • (): number
      • Returns number

    accessrights_READ: (() => number)

    Type declaration

      • (): number
      • Returns number

    accessrights_READ_ADD: (() => number)

    Type declaration

      • (): number
      • Returns number

    accessrights_READ_ADD_WRITE: (() => number)

    Type declaration

      • (): number
      • Returns number

    accessrights_READ_WRITE: (() => number)

    Type declaration

      • (): number
      • Returns number

    accessrights_WRITE: (() => number)

    Type declaration

      • (): number
      • Returns number

    accessrights_from_bits: ((a, b, c) => number)

    Type declaration

      • (a, b, c): number
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns number

    accessrights_is_addable: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    accessrights_is_none: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    accessrights_is_readable: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    accessrights_is_writeable: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    accessrights_new: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    accountHashToBase64: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    accounthash_fromFormattedStr: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    accounthash_fromPublicKey: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    accounthash_fromUint8Array: ((a, b) => number)

    Type declaration

      • (a, b): number
      • Parameters

        • a: number
        • b: number

        Returns number

    accounthash_new: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    accounthash_toFormattedString: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    accounthash_toHexString: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    accounthash_toJson: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    accountidentifier_fromAccountHash: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    accountidentifier_fromFormattedStr: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    accountidentifier_fromPublicKey: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    accountidentifier_new: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    accountidentifier_toJson: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    blockhash_fromDigest: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    blockhash_new: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    blockhash_toJson: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    blockhash_toString: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    blockidentifier_fromHeight: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    blockidentifier_from_hash: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    blockidentifier_new: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    blockidentifier_toJson: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    bytes_fromUint8Array: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    bytes_new: (() => number)

    Type declaration

      • (): number
      • Returns number

    cltype_Any: (() => number)

    Type declaration

      • (): number
      • Returns number

    cltype_Bool: (() => number)

    Type declaration

      • (): number
      • Returns number

    cltype_ByteArray: (() => number)

    Type declaration

      • (): number
      • Returns number

    cltype_I32: (() => number)

    Type declaration

      • (): number
      • Returns number

    cltype_I64: (() => number)

    Type declaration

      • (): number
      • Returns number

    cltype_Key: (() => number)

    Type declaration

      • (): number
      • Returns number

    cltype_List: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    cltype_Map: ((a, b) => number)

    Type declaration

      • (a, b): number
      • Parameters

        • a: number
        • b: number

        Returns number

    cltype_Option: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    cltype_PublicKey: (() => number)

    Type declaration

      • (): number
      • Returns number

    cltype_Result: ((a, b) => number)

    Type declaration

      • (a, b): number
      • Parameters

        • a: number
        • b: number

        Returns number

    cltype_String: (() => number)

    Type declaration

      • (): number
      • Returns number

    cltype_Tuple1: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    cltype_Tuple2: ((a, b) => number)

    Type declaration

      • (a, b): number
      • Parameters

        • a: number
        • b: number

        Returns number

    cltype_Tuple3: ((a, b, c) => number)

    Type declaration

      • (a, b, c): number
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns number

    cltype_U128: (() => number)

    Type declaration

      • (): number
      • Returns number

    cltype_U256: (() => number)

    Type declaration

      • (): number
      • Returns number

    cltype_U32: (() => number)

    Type declaration

      • (): number
      • Returns number

    cltype_U512: (() => number)

    Type declaration

      • (): number
      • Returns number

    cltype_U64: (() => number)

    Type declaration

      • (): number
      • Returns number

    cltype_U8: (() => number)

    Type declaration

      • (): number
      • Returns number

    cltype_URef: (() => number)

    Type declaration

      • (): number
      • Returns number

    cltype_Unit: (() => number)

    Type declaration

      • (): number
      • Returns number

    cltype_new: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    cltype_toString: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    contracthash_fromFormattedStr: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    contracthash_fromString: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    contracthash_fromUint8Array: ((a, b) => number)

    Type declaration

      • (a, b): number
      • Parameters

        • a: number
        • b: number

        Returns number

    contracthash_toFormattedString: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    contractpackagehash_fromFormattedStr: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    contractpackagehash_fromString: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    contractpackagehash_fromUint8Array: ((a, b) => number)

    Type declaration

      • (a, b): number
      • Parameters

        • a: number
        • b: number

        Returns number

    contractpackagehash_toFormattedString: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    deploy_TTL: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    deploy_account: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    deploy_addArg: ((a, b, c, d) => number)

    Type declaration

      • (a, b, c, d): number
      • Parameters

        • a: number
        • b: number
        • c: number
        • d: number

        Returns number

    deploy_addSignature: ((a, b, c, d, e) => number)

    Type declaration

      • (a, b, c, d, e): number
      • Parameters

        • a: number
        • b: number
        • c: number
        • d: number
        • e: number

        Returns number

    deploy_args: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    deploy_chainName: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    deploy_hash: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    deploy_new: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    deploy_sign: ((a, b, c) => number)

    Type declaration

      • (a, b, c): number
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns number

    deploy_timestamp: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    deploy_toJson: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    deploy_validateDeploySize: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    deploy_withAccount: ((a, b, c, d) => number)

    Type declaration

      • (a, b, c, d): number
      • Parameters

        • a: number
        • b: number
        • c: number
        • d: number

        Returns number

    deploy_withChainName: ((a, b, c, d, e) => number)

    Type declaration

      • (a, b, c, d, e): number
      • Parameters

        • a: number
        • b: number
        • c: number
        • d: number
        • e: number

        Returns number

    deploy_withEntryPointName: ((a, b, c, d, e) => number)

    Type declaration

      • (a, b, c, d, e): number
      • Parameters

        • a: number
        • b: number
        • c: number
        • d: number
        • e: number

        Returns number

    deploy_withHash: ((a, b, c, d) => number)

    Type declaration

      • (a, b, c, d): number
      • Parameters

        • a: number
        • b: number
        • c: number
        • d: number

        Returns number

    deploy_withModuleBytes: ((a, b, c, d) => number)

    Type declaration

      • (a, b, c, d): number
      • Parameters

        • a: number
        • b: number
        • c: number
        • d: number

        Returns number

    deploy_withPackageHash: ((a, b, c, d) => number)

    Type declaration

      • (a, b, c, d): number
      • Parameters

        • a: number
        • b: number
        • c: number
        • d: number

        Returns number

    deploy_withPayment: ((a, b, c, d) => number)

    Type declaration

      • (a, b, c, d): number
      • Parameters

        • a: number
        • b: number
        • c: number
        • d: number

        Returns number

    deploy_withPaymentAndSession: ((a, b, c, d) => void)

    Type declaration

      • (a, b, c, d): void
      • Parameters

        • a: number
        • b: number
        • c: number
        • d: number

        Returns void

    deploy_withSecretKey: ((a, b, c) => number)

    Type declaration

      • (a, b, c): number
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns number

    deploy_withSession: ((a, b, c, d) => number)

    Type declaration

      • (a, b, c, d): number
      • Parameters

        • a: number
        • b: number
        • c: number
        • d: number

        Returns number

    deploy_withStandardPayment: ((a, b, c, d, e) => number)

    Type declaration

      • (a, b, c, d, e): number
      • Parameters

        • a: number
        • b: number
        • c: number
        • d: number
        • e: number

        Returns number

    deploy_withTTL: ((a, b, c, d, e) => number)

    Type declaration

      • (a, b, c, d, e): number
      • Parameters

        • a: number
        • b: number
        • c: number
        • d: number
        • e: number

        Returns number

    deploy_withTimestamp: ((a, b, c, d, e) => number)

    Type declaration

      • (a, b, c, d, e): number
      • Parameters

        • a: number
        • b: number
        • c: number
        • d: number
        • e: number

        Returns number

    deploy_withTransfer: ((a, b, c, d, e, f, g, h, i) => void)

    Type declaration

      • (a, b, c, d, e, f, g, h, i): void
      • Parameters

        • a: number
        • b: number
        • c: number
        • d: number
        • e: number
        • f: number
        • g: number
        • h: number
        • i: number

        Returns void

    deployhash_fromDigest: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    deployhash_new: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    deployhash_toJson: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    deployhash_toString: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    deploystrparams_chain_name: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    deploystrparams_new: ((a, b, c, d, e, f, g, h, i, j) => number)

    Type declaration

      • (a, b, c, d, e, f, g, h, i, j): number
      • Parameters

        • a: number
        • b: number
        • c: number
        • d: number
        • e: number
        • f: number
        • g: number
        • h: number
        • i: number
        • j: number

        Returns number

    deploystrparams_secret_key: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    deploystrparams_session_account: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    deploystrparams_setDefaultTTL: ((a) => void)

    Type declaration

      • (a): void
      • Parameters

        • a: number

        Returns void

    deploystrparams_setDefaultTimestamp: ((a) => void)

    Type declaration

      • (a): void
      • Parameters

        • a: number

        Returns void

    deploystrparams_set_chain_name: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    deploystrparams_set_secret_key: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    deploystrparams_set_session_account: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    deploystrparams_set_timestamp: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    deploystrparams_set_ttl: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    deploystrparams_timestamp: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    deploystrparams_ttl: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    deploysubscription_new: ((a, b, c) => number)

    Type declaration

      • (a, b, c): number
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns number

    deploywatcher_new: ((a, b, c, d) => number)

    Type declaration

      • (a, b, c, d): number
      • Parameters

        • a: number
        • b: number
        • c: number
        • d: number

        Returns number

    deploywatcher_start: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    deploywatcher_stop: ((a) => void)

    Type declaration

      • (a): void
      • Parameters

        • a: number

        Returns void

    deploywatcher_subscribe: ((a, b, c, d) => void)

    Type declaration

      • (a, b, c, d): void
      • Parameters

        • a: number
        • b: number
        • c: number
        • d: number

        Returns void

    deploywatcher_unsubscribe: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    dictionaryaddr_new: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    dictionaryitemidentifier_newFromAccountInfo: ((a, b, c, d, e, f, g) => void)

    Type declaration

      • (a, b, c, d, e, f, g): void
      • Parameters

        • a: number
        • b: number
        • c: number
        • d: number
        • e: number
        • f: number
        • g: number

        Returns void

    dictionaryitemidentifier_newFromContractInfo: ((a, b, c, d, e, f, g) => void)

    Type declaration

      • (a, b, c, d, e, f, g): void
      • Parameters

        • a: number
        • b: number
        • c: number
        • d: number
        • e: number
        • f: number
        • g: number

        Returns void

    dictionaryitemidentifier_newFromDictionaryKey: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    dictionaryitemidentifier_newFromSeedUref: ((a, b, c, d, e) => void)

    Type declaration

      • (a, b, c, d, e): void
      • Parameters

        • a: number
        • b: number
        • c: number
        • d: number
        • e: number

        Returns void

    dictionaryitemidentifier_toJson: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    dictionaryitemstrparams_new: (() => number)

    Type declaration

      • (): number
      • Returns number

    dictionaryitemstrparams_setAccountNamedKey: ((a, b, c, d, e, f, g) => void)

    Type declaration

      • (a, b, c, d, e, f, g): void
      • Parameters

        • a: number
        • b: number
        • c: number
        • d: number
        • e: number
        • f: number
        • g: number

        Returns void

    dictionaryitemstrparams_setContractNamedKey: ((a, b, c, d, e, f, g) => void)

    Type declaration

      • (a, b, c, d, e, f, g): void
      • Parameters

        • a: number
        • b: number
        • c: number
        • d: number
        • e: number
        • f: number
        • g: number

        Returns void

    dictionaryitemstrparams_setDictionary: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    dictionaryitemstrparams_setUref: ((a, b, c, d, e) => void)

    Type declaration

      • (a, b, c, d, e): void
      • Parameters

        • a: number
        • b: number
        • c: number
        • d: number
        • e: number

        Returns void

    dictionaryitemstrparams_toJson: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    digest__new: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    digest_fromDigest: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    digest_fromString: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    digest_toJson: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    digest_toString: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    encodeLowerBlake2b: ((a, b) => number)

    Type declaration

      • (a, b): number
      • Parameters

        • a: number
        • b: number

        Returns number

    eraid_new: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    eraid_value: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    fromTransfer: ((a, b) => number)

    Type declaration

      • (a, b): number
      • Parameters

        • a: number
        • b: number

        Returns number

    generatePrivateKey: ((a) => void)

    Type declaration

      • (a): void
      • Parameters

        • a: number

        Returns void

    generatePrivateKey_secp256k1: ((a) => void)

    Type declaration

      • (a): void
      • Parameters

        • a: number

        Returns void

    getTimestamp: (() => number)

    Type declaration

      • (): number
      • Returns number

    getaccountresult_account: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    getaccountresult_api_version: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    getaccountresult_merkle_proof: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    getaccountresult_toJson: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    getauctioninforesult_api_version: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    getauctioninforesult_auction_state: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    getauctioninforesult_toJson: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    getbalanceresult_api_version: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    getbalanceresult_balance_value: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    getbalanceresult_merkle_proof: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    getbalanceresult_toJson: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    getblockresult_api_version: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    getblockresult_block: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    getblockresult_toJson: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    getblocktransfersresult_api_version: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    getblocktransfersresult_block_hash: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    getblocktransfersresult_toJson: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    getblocktransfersresult_transfers: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    getchainspecresult_api_version: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    getchainspecresult_chainspec_bytes: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    getchainspecresult_toJson: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    getdeployresult_api_version: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    getdeployresult_deploy: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    getdeployresult_toJson: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    getdictionaryitemresult_api_version: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    getdictionaryitemresult_dictionary_key: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    getdictionaryitemresult_merkle_proof: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    getdictionaryitemresult_stored_value: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    getdictionaryitemresult_toJson: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    geterainforesult_api_version: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    geterainforesult_era_summary: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    geterainforesult_toJson: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    geterasummaryresult_api_version: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    geterasummaryresult_era_summary: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    geterasummaryresult_toJson: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    getnodestatusresult_api_version: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    getnodestatusresult_available_block_range: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    getnodestatusresult_block_sync: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    getnodestatusresult_build_version: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    getnodestatusresult_chainspec_name: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    getnodestatusresult_last_added_block_info: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    getnodestatusresult_last_progress: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    getnodestatusresult_next_upgrade: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    getnodestatusresult_our_public_signing_key: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    getnodestatusresult_peers: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    getnodestatusresult_reactor_state: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    getnodestatusresult_round_length: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    getnodestatusresult_starting_state_root_hash: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    getnodestatusresult_toJson: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    getnodestatusresult_uptime: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    getpeersresult_api_version: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    getpeersresult_peers: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    getpeersresult_toJson: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    getstateroothashresult_api_version: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    getstateroothashresult_state_root_hash: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    getstateroothashresult_state_root_hash_as_string: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    getstateroothashresult_toJson: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    getstateroothashresult_toString: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    getvalidatorchangesresult_api_version: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    getvalidatorchangesresult_changes: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    getvalidatorchangesresult_toJson: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    globalstateidentifier_fromBlockHash: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    globalstateidentifier_fromBlockHeight: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    globalstateidentifier_fromStateRootHash: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    globalstateidentifier_new: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    globalstateidentifier_toJson: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    hashaddr_new: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    hexToString: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    hexToUint8Array: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    intounderlyingbytesource_autoAllocateChunkSize: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    intounderlyingbytesource_cancel: ((a) => void)

    Type declaration

      • (a): void
      • Parameters

        • a: number

        Returns void

    intounderlyingbytesource_pull: ((a, b) => number)

    Type declaration

      • (a, b): number
      • Parameters

        • a: number
        • b: number

        Returns number

    intounderlyingbytesource_start: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    intounderlyingbytesource_type: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    intounderlyingsink_abort: ((a, b) => number)

    Type declaration

      • (a, b): number
      • Parameters

        • a: number
        • b: number

        Returns number

    intounderlyingsink_close: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    intounderlyingsink_write: ((a, b) => number)

    Type declaration

      • (a, b): number
      • Parameters

        • a: number
        • b: number

        Returns number

    intounderlyingsource_cancel: ((a) => void)

    Type declaration

      • (a): void
      • Parameters

        • a: number

        Returns void

    intounderlyingsource_pull: ((a, b) => number)

    Type declaration

      • (a, b): number
      • Parameters

        • a: number
        • b: number

        Returns number

    jsonPrettyPrint: ((a, b) => number)

    Type declaration

      • (a, b): number
      • Parameters

        • a: number
        • b: number

        Returns number

    key_asBalance: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    key_asDictionaryAddr: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    key_fromAccount: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    key_fromBalance: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    key_fromBid: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    key_fromChainspecRegistry: (() => number)

    Type declaration

      • (): number
      • Returns number

    key_fromChecksumRegistry: (() => number)

    Type declaration

      • (): number
      • Returns number

    key_fromDeployInfo: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    key_fromDictionaryAddr: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    key_fromDictionaryKey: ((a, b, c) => number)

    Type declaration

      • (a, b, c): number
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns number

    key_fromEraInfo: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    key_fromEraSummary: (() => number)

    Type declaration

      • (): number
      • Returns number

    key_fromFormattedString: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    key_fromHash: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    key_fromSystemContractRegistry: (() => number)

    Type declaration

      • (): number
      • Returns number

    key_fromTransfer: ((a, b) => number)

    Type declaration

      • (a, b): number
      • Parameters

        • a: number
        • b: number

        Returns number

    key_fromURef: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    key_fromUnbond: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    key_fromWithdraw: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    key_intoAccount: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    key_intoHash: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    key_intoURef: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    key_isDictionaryKey: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    key_new: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    key_toFormattedString: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    key_toJson: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    key_urefToHash: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    key_withdrawToUnbond: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    listrpcsresult_api_version: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    listrpcsresult_name: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    listrpcsresult_schema: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    listrpcsresult_toJson: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    makeDictionaryItemKey: ((a, b, c, d) => void)

    Type declaration

      • (a, b, c, d): void
      • Parameters

        • a: number
        • b: number
        • c: number
        • d: number

        Returns void

    memory: Memory
    motesToCSPR: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    path_fromArray: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    path_is_empty: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    path_new: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    path_toJson: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    path_toString: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    paymentstrparams_new: ((a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u) => number)

    Type declaration

      • (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u): number
      • Parameters

        • 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

        Returns number

    paymentstrparams_payment_amount: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    paymentstrparams_payment_args_complex: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    paymentstrparams_payment_args_json: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    paymentstrparams_payment_args_simple: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    paymentstrparams_payment_entry_point: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    paymentstrparams_payment_hash: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    paymentstrparams_payment_name: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    paymentstrparams_payment_package_hash: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    paymentstrparams_payment_package_name: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    paymentstrparams_payment_path: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    paymentstrparams_payment_version: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    paymentstrparams_set_payment_amount: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    paymentstrparams_set_payment_args_complex: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    paymentstrparams_set_payment_args_json: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    paymentstrparams_set_payment_args_simple: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    paymentstrparams_set_payment_entry_point: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    paymentstrparams_set_payment_hash: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    paymentstrparams_set_payment_name: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    paymentstrparams_set_payment_package_hash: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    paymentstrparams_set_payment_package_name: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    paymentstrparams_set_payment_path: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    paymentstrparams_set_payment_version: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    peerentry_address: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    peerentry_node_id: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    privateToPublicKey: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    publickey_fromUint8Array: ((a, b) => number)

    Type declaration

      • (a, b): number
      • Parameters

        • a: number
        • b: number

        Returns number

    publickey_new: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    publickey_toAccountHash: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    publickey_toJson: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    publickey_toPurseUref: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    purseidentifier_fromAccountHash: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    purseidentifier_fromPublicKey: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    purseidentifier_fromURef: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    purseidentifier_toJson: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    putdeployresult_api_version: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    putdeployresult_deploy_hash: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    putdeployresult_toJson: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    querybalanceresult_api_version: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    querybalanceresult_balance: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    querybalanceresult_toJson: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    queryglobalstateresult_api_version: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    queryglobalstateresult_block_header: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    queryglobalstateresult_merkle_proof: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    queryglobalstateresult_stored_value: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    queryglobalstateresult_toJson: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    sdk_account_put_deploy: ((a, b, c, d, e) => number)

    Type declaration

      • (a, b, c, d, e): number
      • Parameters

        • a: number
        • b: number
        • c: number
        • d: number
        • e: number

        Returns number

    sdk_call_entrypoint: ((a, b, c, d, e, f, g) => number)

    Type declaration

      • (a, b, c, d, e, f, g): number
      • Parameters

        • a: number
        • b: number
        • c: number
        • d: number
        • e: number
        • f: number
        • g: number

        Returns number

    sdk_chain_get_block: ((a, b) => number)

    Type declaration

      • (a, b): number
      • Parameters

        • a: number
        • b: number

        Returns number

    sdk_chain_get_state_root_hash: ((a, b) => number)

    Type declaration

      • (a, b): number
      • Parameters

        • a: number
        • b: number

        Returns number

    sdk_deploy: ((a, b, c, d, e, f, g) => number)

    Type declaration

      • (a, b, c, d, e, f, g): number
      • Parameters

        • a: number
        • b: number
        • c: number
        • d: number
        • e: number
        • f: number
        • g: number

        Returns number

    sdk_getNodeAddress: ((a, b, c, d) => void)

    Type declaration

      • (a, b, c, d): void
      • Parameters

        • a: number
        • b: number
        • c: number
        • d: number

        Returns void

    sdk_getVerbosity: ((a, b) => number)

    Type declaration

      • (a, b): number
      • Parameters

        • a: number
        • b: number

        Returns number

    sdk_get_account: ((a, b) => number)

    Type declaration

      • (a, b): number
      • Parameters

        • a: number
        • b: number

        Returns number

    sdk_get_account_options: ((a, b) => number)

    Type declaration

      • (a, b): number
      • Parameters

        • a: number
        • b: number

        Returns number

    sdk_get_auction_info: ((a, b) => number)

    Type declaration

      • (a, b): number
      • Parameters

        • a: number
        • b: number

        Returns number

    sdk_get_auction_info_options: ((a, b) => number)

    Type declaration

      • (a, b): number
      • Parameters

        • a: number
        • b: number

        Returns number

    sdk_get_balance: ((a, b) => number)

    Type declaration

      • (a, b): number
      • Parameters

        • a: number
        • b: number

        Returns number

    sdk_get_balance_options: ((a, b) => number)

    Type declaration

      • (a, b): number
      • Parameters

        • a: number
        • b: number

        Returns number

    sdk_get_block: ((a, b) => number)

    Type declaration

      • (a, b): number
      • Parameters

        • a: number
        • b: number

        Returns number

    sdk_get_block_options: ((a, b) => number)

    Type declaration

      • (a, b): number
      • Parameters

        • a: number
        • b: number

        Returns number

    sdk_get_block_transfers: ((a, b) => number)

    Type declaration

      • (a, b): number
      • Parameters

        • a: number
        • b: number

        Returns number

    sdk_get_block_transfers_options: ((a, b) => number)

    Type declaration

      • (a, b): number
      • Parameters

        • a: number
        • b: number

        Returns number

    sdk_get_chainspec: ((a, b, c, d) => number)

    Type declaration

      • (a, b, c, d): number
      • Parameters

        • a: number
        • b: number
        • c: number
        • d: number

        Returns number

    sdk_get_deploy: ((a, b) => number)

    Type declaration

      • (a, b): number
      • Parameters

        • a: number
        • b: number

        Returns number

    sdk_get_deploy_options: ((a, b) => number)

    Type declaration

      • (a, b): number
      • Parameters

        • a: number
        • b: number

        Returns number

    sdk_get_dictionary_item: ((a, b) => number)

    Type declaration

      • (a, b): number
      • Parameters

        • a: number
        • b: number

        Returns number

    sdk_get_dictionary_item_options: ((a, b) => number)

    Type declaration

      • (a, b): number
      • Parameters

        • a: number
        • b: number

        Returns number

    sdk_get_era_info: ((a, b) => number)

    Type declaration

      • (a, b): number
      • Parameters

        • a: number
        • b: number

        Returns number

    sdk_get_era_info_options: ((a, b) => number)

    Type declaration

      • (a, b): number
      • Parameters

        • a: number
        • b: number

        Returns number

    sdk_get_era_summary: ((a, b) => number)

    Type declaration

      • (a, b): number
      • Parameters

        • a: number
        • b: number

        Returns number

    sdk_get_era_summary_options: ((a, b) => number)

    Type declaration

      • (a, b): number
      • Parameters

        • a: number
        • b: number

        Returns number

    sdk_get_node_status: ((a, b, c, d) => number)

    Type declaration

      • (a, b, c, d): number
      • Parameters

        • a: number
        • b: number
        • c: number
        • d: number

        Returns number

    sdk_get_peers: ((a, b, c, d) => number)

    Type declaration

      • (a, b, c, d): number
      • Parameters

        • a: number
        • b: number
        • c: number
        • d: number

        Returns number

    sdk_get_state_root_hash: ((a, b) => number)

    Type declaration

      • (a, b): number
      • Parameters

        • a: number
        • b: number

        Returns number

    sdk_get_state_root_hash_options: ((a, b) => number)

    Type declaration

      • (a, b): number
      • Parameters

        • a: number
        • b: number

        Returns number

    sdk_get_validator_changes: ((a, b, c, d) => number)

    Type declaration

      • (a, b, c, d): number
      • Parameters

        • a: number
        • b: number
        • c: number
        • d: number

        Returns number

    sdk_info_get_deploy: ((a, b) => number)

    Type declaration

      • (a, b): number
      • Parameters

        • a: number
        • b: number

        Returns number

    sdk_install: ((a, b, c, d, e, f, g) => number)

    Type declaration

      • (a, b, c, d, e, f, g): number
      • Parameters

        • a: number
        • b: number
        • c: number
        • d: number
        • e: number
        • f: number
        • g: number

        Returns number

    sdk_list_rpcs: ((a, b, c, d) => number)

    Type declaration

      • (a, b, c, d): number
      • Parameters

        • a: number
        • b: number
        • c: number
        • d: number

        Returns number

    sdk_make_deploy: ((a, b, c, d, e) => void)

    Type declaration

      • (a, b, c, d, e): void
      • Parameters

        • a: number
        • b: number
        • c: number
        • d: number
        • e: number

        Returns void

    sdk_make_transfer: ((a, b, c, d, e, f, g, h, i, j) => void)

    Type declaration

      • (a, b, c, d, e, f, g, h, i, j): void
      • Parameters

        • a: number
        • b: number
        • c: number
        • d: number
        • e: number
        • f: number
        • g: number
        • h: number
        • i: number
        • j: number

        Returns void

    sdk_new: ((a, b, c) => number)

    Type declaration

      • (a, b, c): number
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns number

    sdk_put_deploy: ((a, b, c, d, e) => number)

    Type declaration

      • (a, b, c, d, e): number
      • Parameters

        • a: number
        • b: number
        • c: number
        • d: number
        • e: number

        Returns number

    sdk_query_balance: ((a, b) => number)

    Type declaration

      • (a, b): number
      • Parameters

        • a: number
        • b: number

        Returns number

    sdk_query_balance_options: ((a, b) => number)

    Type declaration

      • (a, b): number
      • Parameters

        • a: number
        • b: number

        Returns number

    sdk_query_contract_dict: ((a, b) => number)

    Type declaration

      • (a, b): number
      • Parameters

        • a: number
        • b: number

        Returns number

    sdk_query_contract_dict_options: ((a, b) => number)

    Type declaration

      • (a, b): number
      • Parameters

        • a: number
        • b: number

        Returns number

    sdk_query_contract_key: ((a, b) => number)

    Type declaration

      • (a, b): number
      • Parameters

        • a: number
        • b: number

        Returns number

    sdk_query_contract_key_options: ((a, b) => number)

    Type declaration

      • (a, b): number
      • Parameters

        • a: number
        • b: number

        Returns number

    sdk_query_global_state: ((a, b) => number)

    Type declaration

      • (a, b): number
      • Parameters

        • a: number
        • b: number

        Returns number

    sdk_query_global_state_options: ((a, b) => number)

    Type declaration

      • (a, b): number
      • Parameters

        • a: number
        • b: number

        Returns number

    sdk_setNodeAddress: ((a, b, c, d) => void)

    Type declaration

      • (a, b, c, d): void
      • Parameters

        • a: number
        • b: number
        • c: number
        • d: number

        Returns void

    sdk_setVerbosity: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    sdk_sign_deploy: ((a, b, c, d) => number)

    Type declaration

      • (a, b, c, d): number
      • Parameters

        • a: number
        • b: number
        • c: number
        • d: number

        Returns number

    sdk_speculative_deploy: ((a, b, c, d, e, f, g, h, i, j) => number)

    Type declaration

      • (a, b, c, d, e, f, g, h, i, j): number
      • Parameters

        • a: number
        • b: number
        • c: number
        • d: number
        • e: number
        • f: number
        • g: number
        • h: number
        • i: number
        • j: number

        Returns number

    sdk_speculative_exec: ((a, b) => number)

    Type declaration

      • (a, b): number
      • Parameters

        • a: number
        • b: number

        Returns number

    sdk_speculative_exec_options: ((a, b) => number)

    Type declaration

      • (a, b): number
      • Parameters

        • a: number
        • b: number

        Returns number

    sdk_speculative_transfer: ((a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) => number)

    Type declaration

      • (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o): number
      • Parameters

        • 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

        Returns number

    sdk_state_get_account_info: ((a, b) => number)

    Type declaration

      • (a, b): number
      • Parameters

        • a: number
        • b: number

        Returns number

    sdk_state_get_balance: ((a, b) => number)

    Type declaration

      • (a, b): number
      • Parameters

        • a: number
        • b: number

        Returns number

    sdk_state_get_dictionary_item: ((a, b) => number)

    Type declaration

      • (a, b): number
      • Parameters

        • a: number
        • b: number

        Returns number

    sdk_transfer: ((a, b, c, d, e, f, g, h, i, j, k, l) => number)

    Type declaration

      • (a, b, c, d, e, f, g, h, i, j, k, l): number
      • Parameters

        • a: number
        • b: number
        • c: number
        • d: number
        • e: number
        • f: number
        • g: number
        • h: number
        • i: number
        • j: number
        • k: number
        • l: number

        Returns number

    sdk_waitDeploy: ((a, b, c, d, e, f, g) => number)

    Type declaration

      • (a, b, c, d, e, f, g): number
      • Parameters

        • a: number
        • b: number
        • c: number
        • d: number
        • e: number
        • f: number
        • g: number

        Returns number

    sdk_watchDeploy: ((a, b, c, d, e) => number)

    Type declaration

      • (a, b, c, d, e): number
      • Parameters

        • a: number
        • b: number
        • c: number
        • d: number
        • e: number

        Returns number

    sessionstrparams_is_session_transfer: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    sessionstrparams_new: ((a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u) => number)

    Type declaration

      • (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u): number
      • Parameters

        • 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

        Returns number

    sessionstrparams_session_args_complex: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    sessionstrparams_session_args_json: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    sessionstrparams_session_args_simple: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    sessionstrparams_session_bytes: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    sessionstrparams_session_entry_point: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    sessionstrparams_session_hash: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    sessionstrparams_session_name: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    sessionstrparams_session_package_hash: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    sessionstrparams_session_package_name: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    sessionstrparams_session_path: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    sessionstrparams_session_version: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    sessionstrparams_set_is_session_transfer: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    sessionstrparams_set_session_args_complex: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    sessionstrparams_set_session_args_json: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    sessionstrparams_set_session_args_simple: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    sessionstrparams_set_session_bytes: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    sessionstrparams_set_session_entry_point: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    sessionstrparams_set_session_hash: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    sessionstrparams_set_session_name: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    sessionstrparams_set_session_package_hash: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    sessionstrparams_set_session_package_name: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    sessionstrparams_set_session_path: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    sessionstrparams_set_session_version: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    speculativeexecresult_api_version: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    speculativeexecresult_block_hash: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    speculativeexecresult_execution_result: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    speculativeexecresult_toJson: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    transferaddr_new: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    transferaddr_to_bytes: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    uint8ArrayToBytes: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    uref_fromUint8Array: ((a, b, c) => number)

    Type declaration

      • (a, b, c): number
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns number

    uref_new: ((a, b, c, d) => void)

    Type declaration

      • (a, b, c, d): void
      • Parameters

        • a: number
        • b: number
        • c: number
        • d: number

        Returns void

    uref_toFormattedString: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    uref_toJson: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    urefaddr_new: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    wasm_bindgen__convert__closures__invoke2_mut__h41b3897ec8604519: ((a, b, c, d) => void)

    Type declaration

      • (a, b, c, d): void
      • Parameters

        • a: number
        • b: number
        • c: number
        • d: number

        Returns void

    \ No newline at end of file +

    Properties

    __wbg_accessrights_free: ((a) => void)

    Type declaration

      • (a): void
      • Parameters

        • a: number

        Returns void

    __wbg_accounthash_free: ((a) => void)

    Type declaration

      • (a): void
      • Parameters

        • a: number

        Returns void

    __wbg_accountidentifier_free: ((a) => void)

    Type declaration

      • (a): void
      • Parameters

        • a: number

        Returns void

    __wbg_argssimple_free: ((a) => void)

    Type declaration

      • (a): void
      • Parameters

        • a: number

        Returns void

    __wbg_blockhash_free: ((a) => void)

    Type declaration

      • (a): void
      • Parameters

        • a: number

        Returns void

    __wbg_blockidentifier_free: ((a) => void)

    Type declaration

      • (a): void
      • Parameters

        • a: number

        Returns void

    __wbg_body_free: ((a) => void)

    Type declaration

      • (a): void
      • Parameters

        • a: number

        Returns void

    __wbg_bytes_free: ((a) => void)

    Type declaration

      • (a): void
      • Parameters

        • a: number

        Returns void

    __wbg_cltype_free: ((a) => void)

    Type declaration

      • (a): void
      • Parameters

        • a: number

        Returns void

    __wbg_contracthash_free: ((a) => void)

    Type declaration

      • (a): void
      • Parameters

        • a: number

        Returns void

    __wbg_contractpackagehash_free: ((a) => void)

    Type declaration

      • (a): void
      • Parameters

        • a: number

        Returns void

    __wbg_deploy_free: ((a) => void)

    Type declaration

      • (a): void
      • Parameters

        • a: number

        Returns void

    __wbg_deployhash_free: ((a) => void)

    Type declaration

      • (a): void
      • Parameters

        • a: number

        Returns void

    __wbg_deployprocessed_free: ((a) => void)

    Type declaration

      • (a): void
      • Parameters

        • a: number

        Returns void

    __wbg_deploystrparams_free: ((a) => void)

    Type declaration

      • (a): void
      • Parameters

        • a: number

        Returns void

    __wbg_deploysubscription_free: ((a) => void)

    Type declaration

      • (a): void
      • Parameters

        • a: number

        Returns void

    __wbg_deploywatcher_free: ((a) => void)

    Type declaration

      • (a): void
      • Parameters

        • a: number

        Returns void

    __wbg_dictionaryaddr_free: ((a) => void)

    Type declaration

      • (a): void
      • Parameters

        • a: number

        Returns void

    __wbg_dictionaryitemidentifier_free: ((a) => void)

    Type declaration

      • (a): void
      • Parameters

        • a: number

        Returns void

    __wbg_dictionaryitemstrparams_free: ((a) => void)

    Type declaration

      • (a): void
      • Parameters

        • a: number

        Returns void

    __wbg_digest_free: ((a) => void)

    Type declaration

      • (a): void
      • Parameters

        • a: number

        Returns void

    __wbg_eraid_free: ((a) => void)

    Type declaration

      • (a): void
      • Parameters

        • a: number

        Returns void

    __wbg_eventparseresult_free: ((a) => void)

    Type declaration

      • (a): void
      • Parameters

        • a: number

        Returns void

    __wbg_executionresult_free: ((a) => void)

    Type declaration

      • (a): void
      • Parameters

        • a: number

        Returns void

    __wbg_failure_free: ((a) => void)

    Type declaration

      • (a): void
      • Parameters

        • a: number

        Returns void

    __wbg_get_body_DeployProcessed: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    __wbg_get_deployprocessed_account: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_get_deployprocessed_block_hash: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_get_deployprocessed_dependencies: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_get_deployprocessed_deploy_hash: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_get_deployprocessed_execution_result: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    __wbg_get_deployprocessed_timestamp: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_get_deployprocessed_ttl: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_get_deploysubscription_deployHash: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_get_deploysubscription_eventHandlerFn: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    __wbg_get_eventparseresult_body: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    __wbg_get_eventparseresult_err: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_get_executionresult_Failure: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    __wbg_get_executionresult_Success: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    __wbg_get_failure_error_message: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_get_getaccountoptions_account_identifier: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    __wbg_get_getaccountoptions_account_identifier_as_string: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_get_getaccountoptions_maybe_block_id_as_string: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_get_getaccountoptions_maybe_block_identifier: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    __wbg_get_getaccountoptions_node_address: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_get_getaccountoptions_verbosity: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    __wbg_get_getauctioninfooptions_maybe_block_id_as_string: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_get_getauctioninfooptions_maybe_block_identifier: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    __wbg_get_getauctioninfooptions_node_address: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_get_getauctioninfooptions_verbosity: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    __wbg_get_getbalanceoptions_node_address: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_get_getbalanceoptions_purse_uref: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    __wbg_get_getbalanceoptions_purse_uref_as_string: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_get_getbalanceoptions_state_root_hash: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    __wbg_get_getbalanceoptions_state_root_hash_as_string: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_get_getbalanceoptions_verbosity: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    __wbg_get_getblockoptions_maybe_block_id_as_string: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_get_getblockoptions_maybe_block_identifier: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    __wbg_get_getblockoptions_node_address: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_get_getblockoptions_verbosity: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    __wbg_get_getblocktransfersoptions_maybe_block_id_as_string: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_get_getblocktransfersoptions_maybe_block_identifier: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    __wbg_get_getblocktransfersoptions_node_address: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_get_getblocktransfersoptions_verbosity: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    __wbg_get_getdeployoptions_deploy_hash: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    __wbg_get_getdeployoptions_deploy_hash_as_string: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_get_getdeployoptions_finalized_approvals: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    __wbg_get_getdeployoptions_node_address: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_get_getdeployoptions_verbosity: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    __wbg_get_getdictionaryitemoptions_dictionary_item_identifier: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    __wbg_get_getdictionaryitemoptions_dictionary_item_params: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    __wbg_get_getdictionaryitemoptions_node_address: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_get_getdictionaryitemoptions_state_root_hash: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    __wbg_get_getdictionaryitemoptions_state_root_hash_as_string: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_get_getdictionaryitemoptions_verbosity: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    __wbg_get_geterainfooptions_maybe_block_id_as_string: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_get_geterainfooptions_maybe_block_identifier: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    __wbg_get_geterainfooptions_node_address: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_get_geterainfooptions_verbosity: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    __wbg_get_geterasummaryoptions_maybe_block_id_as_string: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_get_geterasummaryoptions_maybe_block_identifier: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    __wbg_get_geterasummaryoptions_node_address: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_get_geterasummaryoptions_verbosity: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    __wbg_get_getspeculativeexecoptions_deploy: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    __wbg_get_getspeculativeexecoptions_deploy_as_string: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_get_getspeculativeexecoptions_maybe_block_id_as_string: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_get_getspeculativeexecoptions_maybe_block_identifier: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    __wbg_get_getspeculativeexecoptions_node_address: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_get_getspeculativeexecoptions_verbosity: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    __wbg_get_getstateroothashoptions_maybe_block_id_as_string: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_get_getstateroothashoptions_maybe_block_identifier: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    __wbg_get_getstateroothashoptions_node_address: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_get_getstateroothashoptions_verbosity: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    __wbg_get_querybalanceoptions_global_state_identifier: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    __wbg_get_querybalanceoptions_maybe_block_id_as_string: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_get_querybalanceoptions_node_address: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_get_querybalanceoptions_purse_identifier: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    __wbg_get_querybalanceoptions_purse_identifier_as_string: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_get_querybalanceoptions_state_root_hash: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    __wbg_get_querybalanceoptions_state_root_hash_as_string: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_get_querybalanceoptions_verbosity: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    __wbg_get_querycontractdictoptions_dictionary_item_identifier: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    __wbg_get_querycontractdictoptions_dictionary_item_params: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    __wbg_get_querycontractdictoptions_node_address: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_get_querycontractdictoptions_state_root_hash: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    __wbg_get_querycontractdictoptions_state_root_hash_as_string: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_get_querycontractdictoptions_verbosity: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    __wbg_get_querycontractkeyoptions_contract_key: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    __wbg_get_querycontractkeyoptions_contract_key_as_string: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_get_querycontractkeyoptions_global_state_identifier: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    __wbg_get_querycontractkeyoptions_maybe_block_id_as_string: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_get_querycontractkeyoptions_node_address: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_get_querycontractkeyoptions_path: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    __wbg_get_querycontractkeyoptions_path_as_string: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_get_querycontractkeyoptions_state_root_hash: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    __wbg_get_querycontractkeyoptions_state_root_hash_as_string: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_get_querycontractkeyoptions_verbosity: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    __wbg_get_queryglobalstateoptions_global_state_identifier: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    __wbg_get_queryglobalstateoptions_key: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    __wbg_get_queryglobalstateoptions_key_as_string: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_get_queryglobalstateoptions_maybe_block_id_as_string: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_get_queryglobalstateoptions_node_address: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_get_queryglobalstateoptions_path: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    __wbg_get_queryglobalstateoptions_path_as_string: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_get_queryglobalstateoptions_state_root_hash: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    __wbg_get_queryglobalstateoptions_state_root_hash_as_string: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_get_queryglobalstateoptions_verbosity: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    __wbg_get_success_cost: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_getaccountoptions_free: ((a) => void)

    Type declaration

      • (a): void
      • Parameters

        • a: number

        Returns void

    __wbg_getaccountresult_free: ((a) => void)

    Type declaration

      • (a): void
      • Parameters

        • a: number

        Returns void

    __wbg_getauctioninfooptions_free: ((a) => void)

    Type declaration

      • (a): void
      • Parameters

        • a: number

        Returns void

    __wbg_getauctioninforesult_free: ((a) => void)

    Type declaration

      • (a): void
      • Parameters

        • a: number

        Returns void

    __wbg_getbalanceoptions_free: ((a) => void)

    Type declaration

      • (a): void
      • Parameters

        • a: number

        Returns void

    __wbg_getbalanceresult_free: ((a) => void)

    Type declaration

      • (a): void
      • Parameters

        • a: number

        Returns void

    __wbg_getblockoptions_free: ((a) => void)

    Type declaration

      • (a): void
      • Parameters

        • a: number

        Returns void

    __wbg_getblockresult_free: ((a) => void)

    Type declaration

      • (a): void
      • Parameters

        • a: number

        Returns void

    __wbg_getblocktransfersoptions_free: ((a) => void)

    Type declaration

      • (a): void
      • Parameters

        • a: number

        Returns void

    __wbg_getblocktransfersresult_free: ((a) => void)

    Type declaration

      • (a): void
      • Parameters

        • a: number

        Returns void

    __wbg_getchainspecresult_free: ((a) => void)

    Type declaration

      • (a): void
      • Parameters

        • a: number

        Returns void

    __wbg_getdeployoptions_free: ((a) => void)

    Type declaration

      • (a): void
      • Parameters

        • a: number

        Returns void

    __wbg_getdeployresult_free: ((a) => void)

    Type declaration

      • (a): void
      • Parameters

        • a: number

        Returns void

    __wbg_getdictionaryitemoptions_free: ((a) => void)

    Type declaration

      • (a): void
      • Parameters

        • a: number

        Returns void

    __wbg_getdictionaryitemresult_free: ((a) => void)

    Type declaration

      • (a): void
      • Parameters

        • a: number

        Returns void

    __wbg_geterainfooptions_free: ((a) => void)

    Type declaration

      • (a): void
      • Parameters

        • a: number

        Returns void

    __wbg_geterainforesult_free: ((a) => void)

    Type declaration

      • (a): void
      • Parameters

        • a: number

        Returns void

    __wbg_geterasummaryoptions_free: ((a) => void)

    Type declaration

      • (a): void
      • Parameters

        • a: number

        Returns void

    __wbg_geterasummaryresult_free: ((a) => void)

    Type declaration

      • (a): void
      • Parameters

        • a: number

        Returns void

    __wbg_getnodestatusresult_free: ((a) => void)

    Type declaration

      • (a): void
      • Parameters

        • a: number

        Returns void

    __wbg_getpeersresult_free: ((a) => void)

    Type declaration

      • (a): void
      • Parameters

        • a: number

        Returns void

    __wbg_getspeculativeexecoptions_free: ((a) => void)

    Type declaration

      • (a): void
      • Parameters

        • a: number

        Returns void

    __wbg_getstateroothashoptions_free: ((a) => void)

    Type declaration

      • (a): void
      • Parameters

        • a: number

        Returns void

    __wbg_getstateroothashresult_free: ((a) => void)

    Type declaration

      • (a): void
      • Parameters

        • a: number

        Returns void

    __wbg_getvalidatorchangesresult_free: ((a) => void)

    Type declaration

      • (a): void
      • Parameters

        • a: number

        Returns void

    __wbg_globalstateidentifier_free: ((a) => void)

    Type declaration

      • (a): void
      • Parameters

        • a: number

        Returns void

    __wbg_hashaddr_free: ((a) => void)

    Type declaration

      • (a): void
      • Parameters

        • a: number

        Returns void

    __wbg_intounderlyingbytesource_free: ((a) => void)

    Type declaration

      • (a): void
      • Parameters

        • a: number

        Returns void

    __wbg_intounderlyingsink_free: ((a) => void)

    Type declaration

      • (a): void
      • Parameters

        • a: number

        Returns void

    __wbg_intounderlyingsource_free: ((a) => void)

    Type declaration

      • (a): void
      • Parameters

        • a: number

        Returns void

    __wbg_key_free: ((a) => void)

    Type declaration

      • (a): void
      • Parameters

        • a: number

        Returns void

    __wbg_listrpcsresult_free: ((a) => void)

    Type declaration

      • (a): void
      • Parameters

        • a: number

        Returns void

    __wbg_path_free: ((a) => void)

    Type declaration

      • (a): void
      • Parameters

        • a: number

        Returns void

    __wbg_paymentstrparams_free: ((a) => void)

    Type declaration

      • (a): void
      • Parameters

        • a: number

        Returns void

    __wbg_peerentry_free: ((a) => void)

    Type declaration

      • (a): void
      • Parameters

        • a: number

        Returns void

    __wbg_publickey_free: ((a) => void)

    Type declaration

      • (a): void
      • Parameters

        • a: number

        Returns void

    __wbg_purseidentifier_free: ((a) => void)

    Type declaration

      • (a): void
      • Parameters

        • a: number

        Returns void

    __wbg_putdeployresult_free: ((a) => void)

    Type declaration

      • (a): void
      • Parameters

        • a: number

        Returns void

    __wbg_querybalanceoptions_free: ((a) => void)

    Type declaration

      • (a): void
      • Parameters

        • a: number

        Returns void

    __wbg_querybalanceresult_free: ((a) => void)

    Type declaration

      • (a): void
      • Parameters

        • a: number

        Returns void

    __wbg_querycontractdictoptions_free: ((a) => void)

    Type declaration

      • (a): void
      • Parameters

        • a: number

        Returns void

    __wbg_querycontractkeyoptions_free: ((a) => void)

    Type declaration

      • (a): void
      • Parameters

        • a: number

        Returns void

    __wbg_queryglobalstateoptions_free: ((a) => void)

    Type declaration

      • (a): void
      • Parameters

        • a: number

        Returns void

    __wbg_queryglobalstateresult_free: ((a) => void)

    Type declaration

      • (a): void
      • Parameters

        • a: number

        Returns void

    __wbg_sdk_free: ((a) => void)

    Type declaration

      • (a): void
      • Parameters

        • a: number

        Returns void

    __wbg_sessionstrparams_free: ((a) => void)

    Type declaration

      • (a): void
      • Parameters

        • a: number

        Returns void

    __wbg_set_body_DeployProcessed: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_set_deployprocessed_account: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    __wbg_set_deployprocessed_block_hash: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    __wbg_set_deployprocessed_dependencies: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    __wbg_set_deployprocessed_deploy_hash: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    __wbg_set_deployprocessed_execution_result: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_set_deployprocessed_timestamp: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    __wbg_set_deployprocessed_ttl: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    __wbg_set_deploysubscription_deployHash: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    __wbg_set_deploysubscription_eventHandlerFn: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_set_eventparseresult_body: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_set_eventparseresult_err: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    __wbg_set_executionresult_Failure: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_set_executionresult_Success: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_set_failure_error_message: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    __wbg_set_getaccountoptions_account_identifier: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_set_getaccountoptions_account_identifier_as_string: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    __wbg_set_getaccountoptions_maybe_block_id_as_string: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    __wbg_set_getaccountoptions_maybe_block_identifier: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_set_getaccountoptions_node_address: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    __wbg_set_getaccountoptions_verbosity: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_set_getauctioninfooptions_maybe_block_id_as_string: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    __wbg_set_getauctioninfooptions_maybe_block_identifier: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_set_getauctioninfooptions_node_address: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    __wbg_set_getauctioninfooptions_verbosity: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_set_getbalanceoptions_node_address: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    __wbg_set_getbalanceoptions_purse_uref: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_set_getbalanceoptions_purse_uref_as_string: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    __wbg_set_getbalanceoptions_state_root_hash: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_set_getbalanceoptions_state_root_hash_as_string: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    __wbg_set_getbalanceoptions_verbosity: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_set_getblockoptions_maybe_block_id_as_string: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    __wbg_set_getblockoptions_maybe_block_identifier: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_set_getblockoptions_node_address: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    __wbg_set_getblockoptions_verbosity: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_set_getblocktransfersoptions_maybe_block_id_as_string: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    __wbg_set_getblocktransfersoptions_maybe_block_identifier: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_set_getblocktransfersoptions_node_address: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    __wbg_set_getblocktransfersoptions_verbosity: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_set_getdeployoptions_deploy_hash: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_set_getdeployoptions_deploy_hash_as_string: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    __wbg_set_getdeployoptions_finalized_approvals: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_set_getdeployoptions_node_address: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    __wbg_set_getdeployoptions_verbosity: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_set_getdictionaryitemoptions_dictionary_item_identifier: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_set_getdictionaryitemoptions_dictionary_item_params: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_set_getdictionaryitemoptions_node_address: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    __wbg_set_getdictionaryitemoptions_state_root_hash: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_set_getdictionaryitemoptions_state_root_hash_as_string: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    __wbg_set_getdictionaryitemoptions_verbosity: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_set_geterainfooptions_maybe_block_id_as_string: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    __wbg_set_geterainfooptions_maybe_block_identifier: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_set_geterainfooptions_node_address: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    __wbg_set_geterainfooptions_verbosity: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_set_geterasummaryoptions_maybe_block_id_as_string: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    __wbg_set_geterasummaryoptions_maybe_block_identifier: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_set_geterasummaryoptions_node_address: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    __wbg_set_geterasummaryoptions_verbosity: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_set_getspeculativeexecoptions_deploy: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_set_getspeculativeexecoptions_deploy_as_string: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    __wbg_set_getspeculativeexecoptions_maybe_block_id_as_string: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    __wbg_set_getspeculativeexecoptions_maybe_block_identifier: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_set_getspeculativeexecoptions_node_address: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    __wbg_set_getspeculativeexecoptions_verbosity: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_set_getstateroothashoptions_maybe_block_id_as_string: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    __wbg_set_getstateroothashoptions_maybe_block_identifier: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_set_getstateroothashoptions_node_address: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    __wbg_set_getstateroothashoptions_verbosity: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_set_querybalanceoptions_global_state_identifier: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_set_querybalanceoptions_maybe_block_id_as_string: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    __wbg_set_querybalanceoptions_node_address: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    __wbg_set_querybalanceoptions_purse_identifier: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_set_querybalanceoptions_purse_identifier_as_string: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    __wbg_set_querybalanceoptions_state_root_hash: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_set_querybalanceoptions_state_root_hash_as_string: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    __wbg_set_querybalanceoptions_verbosity: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_set_querycontractdictoptions_dictionary_item_identifier: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_set_querycontractdictoptions_dictionary_item_params: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_set_querycontractdictoptions_node_address: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    __wbg_set_querycontractdictoptions_state_root_hash: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_set_querycontractdictoptions_state_root_hash_as_string: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    __wbg_set_querycontractdictoptions_verbosity: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_set_querycontractkeyoptions_contract_key: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_set_querycontractkeyoptions_contract_key_as_string: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    __wbg_set_querycontractkeyoptions_global_state_identifier: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_set_querycontractkeyoptions_maybe_block_id_as_string: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    __wbg_set_querycontractkeyoptions_node_address: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    __wbg_set_querycontractkeyoptions_path: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_set_querycontractkeyoptions_path_as_string: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    __wbg_set_querycontractkeyoptions_state_root_hash: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_set_querycontractkeyoptions_state_root_hash_as_string: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    __wbg_set_querycontractkeyoptions_verbosity: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_set_queryglobalstateoptions_global_state_identifier: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_set_queryglobalstateoptions_key: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_set_queryglobalstateoptions_key_as_string: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    __wbg_set_queryglobalstateoptions_maybe_block_id_as_string: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    __wbg_set_queryglobalstateoptions_node_address: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    __wbg_set_queryglobalstateoptions_path: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_set_queryglobalstateoptions_path_as_string: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    __wbg_set_queryglobalstateoptions_state_root_hash: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_set_queryglobalstateoptions_state_root_hash_as_string: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    __wbg_set_queryglobalstateoptions_verbosity: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    __wbg_set_success_cost: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    __wbg_speculativeexecresult_free: ((a) => void)

    Type declaration

      • (a): void
      • Parameters

        • a: number

        Returns void

    __wbg_success_free: ((a) => void)

    Type declaration

      • (a): void
      • Parameters

        • a: number

        Returns void

    __wbg_transferaddr_free: ((a) => void)

    Type declaration

      • (a): void
      • Parameters

        • a: number

        Returns void

    __wbg_uref_free: ((a) => void)

    Type declaration

      • (a): void
      • Parameters

        • a: number

        Returns void

    __wbg_urefaddr_free: ((a) => void)

    Type declaration

      • (a): void
      • Parameters

        • a: number

        Returns void

    __wbindgen_add_to_stack_pointer: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    __wbindgen_exn_store: ((a) => void)

    Type declaration

      • (a): void
      • Parameters

        • a: number

        Returns void

    __wbindgen_export_2: Table
    __wbindgen_free: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    __wbindgen_malloc: ((a, b) => number)

    Type declaration

      • (a, b): number
      • Parameters

        • a: number
        • b: number

        Returns number

    __wbindgen_realloc: ((a, b, c, d) => number)

    Type declaration

      • (a, b, c, d): number
      • Parameters

        • a: number
        • b: number
        • c: number
        • d: number

        Returns number

    _dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h1c40c16592036fc7: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    _dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h5e61414879884c0a: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    accessrights_ADD: (() => number)

    Type declaration

      • (): number
      • Returns number

    accessrights_ADD_WRITE: (() => number)

    Type declaration

      • (): number
      • Returns number

    accessrights_NONE: (() => number)

    Type declaration

      • (): number
      • Returns number

    accessrights_READ: (() => number)

    Type declaration

      • (): number
      • Returns number

    accessrights_READ_ADD: (() => number)

    Type declaration

      • (): number
      • Returns number

    accessrights_READ_ADD_WRITE: (() => number)

    Type declaration

      • (): number
      • Returns number

    accessrights_READ_WRITE: (() => number)

    Type declaration

      • (): number
      • Returns number

    accessrights_WRITE: (() => number)

    Type declaration

      • (): number
      • Returns number

    accessrights_from_bits: ((a, b, c) => number)

    Type declaration

      • (a, b, c): number
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns number

    accessrights_is_addable: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    accessrights_is_none: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    accessrights_is_readable: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    accessrights_is_writeable: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    accessrights_new: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    accountHashToBase64: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    accounthash_fromFormattedStr: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    accounthash_fromPublicKey: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    accounthash_fromUint8Array: ((a, b) => number)

    Type declaration

      • (a, b): number
      • Parameters

        • a: number
        • b: number

        Returns number

    accounthash_new: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    accounthash_toFormattedString: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    accounthash_toHexString: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    accounthash_toJson: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    accountidentifier_fromAccountHash: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    accountidentifier_fromFormattedStr: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    accountidentifier_fromPublicKey: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    accountidentifier_new: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    accountidentifier_toJson: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    blockhash_fromDigest: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    blockhash_new: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    blockhash_toJson: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    blockhash_toString: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    blockidentifier_fromHeight: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    blockidentifier_from_hash: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    blockidentifier_new: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    blockidentifier_toJson: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    bytes_fromUint8Array: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    bytes_new: (() => number)

    Type declaration

      • (): number
      • Returns number

    cltype_Any: (() => number)

    Type declaration

      • (): number
      • Returns number

    cltype_Bool: (() => number)

    Type declaration

      • (): number
      • Returns number

    cltype_ByteArray: (() => number)

    Type declaration

      • (): number
      • Returns number

    cltype_I32: (() => number)

    Type declaration

      • (): number
      • Returns number

    cltype_I64: (() => number)

    Type declaration

      • (): number
      • Returns number

    cltype_Key: (() => number)

    Type declaration

      • (): number
      • Returns number

    cltype_List: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    cltype_Map: ((a, b) => number)

    Type declaration

      • (a, b): number
      • Parameters

        • a: number
        • b: number

        Returns number

    cltype_Option: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    cltype_PublicKey: (() => number)

    Type declaration

      • (): number
      • Returns number

    cltype_Result: ((a, b) => number)

    Type declaration

      • (a, b): number
      • Parameters

        • a: number
        • b: number

        Returns number

    cltype_String: (() => number)

    Type declaration

      • (): number
      • Returns number

    cltype_Tuple1: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    cltype_Tuple2: ((a, b) => number)

    Type declaration

      • (a, b): number
      • Parameters

        • a: number
        • b: number

        Returns number

    cltype_Tuple3: ((a, b, c) => number)

    Type declaration

      • (a, b, c): number
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns number

    cltype_U128: (() => number)

    Type declaration

      • (): number
      • Returns number

    cltype_U256: (() => number)

    Type declaration

      • (): number
      • Returns number

    cltype_U32: (() => number)

    Type declaration

      • (): number
      • Returns number

    cltype_U512: (() => number)

    Type declaration

      • (): number
      • Returns number

    cltype_U64: (() => number)

    Type declaration

      • (): number
      • Returns number

    cltype_U8: (() => number)

    Type declaration

      • (): number
      • Returns number

    cltype_URef: (() => number)

    Type declaration

      • (): number
      • Returns number

    cltype_Unit: (() => number)

    Type declaration

      • (): number
      • Returns number

    cltype_new: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    cltype_toString: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    contracthash_fromFormattedStr: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    contracthash_fromString: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    contracthash_fromUint8Array: ((a, b) => number)

    Type declaration

      • (a, b): number
      • Parameters

        • a: number
        • b: number

        Returns number

    contracthash_toFormattedString: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    contractpackagehash_fromFormattedStr: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    contractpackagehash_fromString: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    contractpackagehash_fromUint8Array: ((a, b) => number)

    Type declaration

      • (a, b): number
      • Parameters

        • a: number
        • b: number

        Returns number

    contractpackagehash_toFormattedString: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    deploy_TTL: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    deploy_account: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    deploy_addArg: ((a, b, c, d) => number)

    Type declaration

      • (a, b, c, d): number
      • Parameters

        • a: number
        • b: number
        • c: number
        • d: number

        Returns number

    deploy_addSignature: ((a, b, c, d, e) => number)

    Type declaration

      • (a, b, c, d, e): number
      • Parameters

        • a: number
        • b: number
        • c: number
        • d: number
        • e: number

        Returns number

    deploy_args: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    deploy_chainName: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    deploy_hash: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    deploy_new: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    deploy_sign: ((a, b, c) => number)

    Type declaration

      • (a, b, c): number
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns number

    deploy_timestamp: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    deploy_toJson: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    deploy_validateDeploySize: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    deploy_withAccount: ((a, b, c, d) => number)

    Type declaration

      • (a, b, c, d): number
      • Parameters

        • a: number
        • b: number
        • c: number
        • d: number

        Returns number

    deploy_withChainName: ((a, b, c, d, e) => number)

    Type declaration

      • (a, b, c, d, e): number
      • Parameters

        • a: number
        • b: number
        • c: number
        • d: number
        • e: number

        Returns number

    deploy_withEntryPointName: ((a, b, c, d, e) => number)

    Type declaration

      • (a, b, c, d, e): number
      • Parameters

        • a: number
        • b: number
        • c: number
        • d: number
        • e: number

        Returns number

    deploy_withHash: ((a, b, c, d) => number)

    Type declaration

      • (a, b, c, d): number
      • Parameters

        • a: number
        • b: number
        • c: number
        • d: number

        Returns number

    deploy_withModuleBytes: ((a, b, c, d) => number)

    Type declaration

      • (a, b, c, d): number
      • Parameters

        • a: number
        • b: number
        • c: number
        • d: number

        Returns number

    deploy_withPackageHash: ((a, b, c, d) => number)

    Type declaration

      • (a, b, c, d): number
      • Parameters

        • a: number
        • b: number
        • c: number
        • d: number

        Returns number

    deploy_withPayment: ((a, b, c, d) => number)

    Type declaration

      • (a, b, c, d): number
      • Parameters

        • a: number
        • b: number
        • c: number
        • d: number

        Returns number

    deploy_withPaymentAndSession: ((a, b, c, d) => void)

    Type declaration

      • (a, b, c, d): void
      • Parameters

        • a: number
        • b: number
        • c: number
        • d: number

        Returns void

    deploy_withSecretKey: ((a, b, c) => number)

    Type declaration

      • (a, b, c): number
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns number

    deploy_withSession: ((a, b, c, d) => number)

    Type declaration

      • (a, b, c, d): number
      • Parameters

        • a: number
        • b: number
        • c: number
        • d: number

        Returns number

    deploy_withStandardPayment: ((a, b, c, d, e) => number)

    Type declaration

      • (a, b, c, d, e): number
      • Parameters

        • a: number
        • b: number
        • c: number
        • d: number
        • e: number

        Returns number

    deploy_withTTL: ((a, b, c, d, e) => number)

    Type declaration

      • (a, b, c, d, e): number
      • Parameters

        • a: number
        • b: number
        • c: number
        • d: number
        • e: number

        Returns number

    deploy_withTimestamp: ((a, b, c, d, e) => number)

    Type declaration

      • (a, b, c, d, e): number
      • Parameters

        • a: number
        • b: number
        • c: number
        • d: number
        • e: number

        Returns number

    deploy_withTransfer: ((a, b, c, d, e, f, g, h, i) => void)

    Type declaration

      • (a, b, c, d, e, f, g, h, i): void
      • Parameters

        • a: number
        • b: number
        • c: number
        • d: number
        • e: number
        • f: number
        • g: number
        • h: number
        • i: number

        Returns void

    deployhash_fromDigest: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    deployhash_new: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    deployhash_toJson: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    deployhash_toString: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    deploystrparams_chain_name: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    deploystrparams_new: ((a, b, c, d, e, f, g, h, i, j) => number)

    Type declaration

      • (a, b, c, d, e, f, g, h, i, j): number
      • Parameters

        • a: number
        • b: number
        • c: number
        • d: number
        • e: number
        • f: number
        • g: number
        • h: number
        • i: number
        • j: number

        Returns number

    deploystrparams_secret_key: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    deploystrparams_session_account: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    deploystrparams_setDefaultTTL: ((a) => void)

    Type declaration

      • (a): void
      • Parameters

        • a: number

        Returns void

    deploystrparams_setDefaultTimestamp: ((a) => void)

    Type declaration

      • (a): void
      • Parameters

        • a: number

        Returns void

    deploystrparams_set_chain_name: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    deploystrparams_set_secret_key: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    deploystrparams_set_session_account: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    deploystrparams_set_timestamp: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    deploystrparams_set_ttl: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    deploystrparams_timestamp: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    deploystrparams_ttl: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    deploysubscription_new: ((a, b, c) => number)

    Type declaration

      • (a, b, c): number
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns number

    deploywatcher_new: ((a, b, c, d) => number)

    Type declaration

      • (a, b, c, d): number
      • Parameters

        • a: number
        • b: number
        • c: number
        • d: number

        Returns number

    deploywatcher_start: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    deploywatcher_stop: ((a) => void)

    Type declaration

      • (a): void
      • Parameters

        • a: number

        Returns void

    deploywatcher_subscribe: ((a, b, c, d) => void)

    Type declaration

      • (a, b, c, d): void
      • Parameters

        • a: number
        • b: number
        • c: number
        • d: number

        Returns void

    deploywatcher_unsubscribe: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    dictionaryaddr_new: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    dictionaryitemidentifier_newFromAccountInfo: ((a, b, c, d, e, f, g) => void)

    Type declaration

      • (a, b, c, d, e, f, g): void
      • Parameters

        • a: number
        • b: number
        • c: number
        • d: number
        • e: number
        • f: number
        • g: number

        Returns void

    dictionaryitemidentifier_newFromContractInfo: ((a, b, c, d, e, f, g) => void)

    Type declaration

      • (a, b, c, d, e, f, g): void
      • Parameters

        • a: number
        • b: number
        • c: number
        • d: number
        • e: number
        • f: number
        • g: number

        Returns void

    dictionaryitemidentifier_newFromDictionaryKey: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    dictionaryitemidentifier_newFromSeedUref: ((a, b, c, d, e) => void)

    Type declaration

      • (a, b, c, d, e): void
      • Parameters

        • a: number
        • b: number
        • c: number
        • d: number
        • e: number

        Returns void

    dictionaryitemidentifier_toJson: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    dictionaryitemstrparams_new: (() => number)

    Type declaration

      • (): number
      • Returns number

    dictionaryitemstrparams_setAccountNamedKey: ((a, b, c, d, e, f, g) => void)

    Type declaration

      • (a, b, c, d, e, f, g): void
      • Parameters

        • a: number
        • b: number
        • c: number
        • d: number
        • e: number
        • f: number
        • g: number

        Returns void

    dictionaryitemstrparams_setContractNamedKey: ((a, b, c, d, e, f, g) => void)

    Type declaration

      • (a, b, c, d, e, f, g): void
      • Parameters

        • a: number
        • b: number
        • c: number
        • d: number
        • e: number
        • f: number
        • g: number

        Returns void

    dictionaryitemstrparams_setDictionary: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    dictionaryitemstrparams_setUref: ((a, b, c, d, e) => void)

    Type declaration

      • (a, b, c, d, e): void
      • Parameters

        • a: number
        • b: number
        • c: number
        • d: number
        • e: number

        Returns void

    dictionaryitemstrparams_toJson: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    digest__new: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    digest_fromDigest: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    digest_fromString: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    digest_toJson: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    digest_toString: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    encodeLowerBlake2b: ((a, b) => number)

    Type declaration

      • (a, b): number
      • Parameters

        • a: number
        • b: number

        Returns number

    eraid_new: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    eraid_value: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    fromTransfer: ((a, b) => number)

    Type declaration

      • (a, b): number
      • Parameters

        • a: number
        • b: number

        Returns number

    generatePrivateKey: ((a) => void)

    Type declaration

      • (a): void
      • Parameters

        • a: number

        Returns void

    generatePrivateKey_secp256k1: ((a) => void)

    Type declaration

      • (a): void
      • Parameters

        • a: number

        Returns void

    getTimestamp: (() => number)

    Type declaration

      • (): number
      • Returns number

    getaccountresult_account: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    getaccountresult_api_version: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    getaccountresult_merkle_proof: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    getaccountresult_toJson: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    getauctioninforesult_api_version: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    getauctioninforesult_auction_state: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    getauctioninforesult_toJson: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    getbalanceresult_api_version: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    getbalanceresult_balance_value: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    getbalanceresult_merkle_proof: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    getbalanceresult_toJson: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    getblockresult_api_version: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    getblockresult_block: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    getblockresult_toJson: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    getblocktransfersresult_api_version: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    getblocktransfersresult_block_hash: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    getblocktransfersresult_toJson: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    getblocktransfersresult_transfers: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    getchainspecresult_api_version: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    getchainspecresult_chainspec_bytes: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    getchainspecresult_toJson: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    getdeployresult_api_version: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    getdeployresult_deploy: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    getdeployresult_toJson: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    getdictionaryitemresult_api_version: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    getdictionaryitemresult_dictionary_key: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    getdictionaryitemresult_merkle_proof: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    getdictionaryitemresult_stored_value: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    getdictionaryitemresult_toJson: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    geterainforesult_api_version: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    geterainforesult_era_summary: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    geterainforesult_toJson: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    geterasummaryresult_api_version: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    geterasummaryresult_era_summary: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    geterasummaryresult_toJson: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    getnodestatusresult_api_version: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    getnodestatusresult_available_block_range: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    getnodestatusresult_block_sync: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    getnodestatusresult_build_version: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    getnodestatusresult_chainspec_name: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    getnodestatusresult_last_added_block_info: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    getnodestatusresult_last_progress: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    getnodestatusresult_next_upgrade: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    getnodestatusresult_our_public_signing_key: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    getnodestatusresult_peers: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    getnodestatusresult_reactor_state: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    getnodestatusresult_round_length: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    getnodestatusresult_starting_state_root_hash: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    getnodestatusresult_toJson: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    getnodestatusresult_uptime: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    getpeersresult_api_version: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    getpeersresult_peers: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    getpeersresult_toJson: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    getstateroothashresult_api_version: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    getstateroothashresult_state_root_hash: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    getstateroothashresult_state_root_hash_as_string: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    getstateroothashresult_toJson: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    getstateroothashresult_toString: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    getvalidatorchangesresult_api_version: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    getvalidatorchangesresult_changes: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    getvalidatorchangesresult_toJson: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    globalstateidentifier_fromBlockHash: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    globalstateidentifier_fromBlockHeight: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    globalstateidentifier_fromStateRootHash: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    globalstateidentifier_new: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    globalstateidentifier_toJson: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    hashaddr_new: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    hexToString: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    hexToUint8Array: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    intounderlyingbytesource_autoAllocateChunkSize: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    intounderlyingbytesource_cancel: ((a) => void)

    Type declaration

      • (a): void
      • Parameters

        • a: number

        Returns void

    intounderlyingbytesource_pull: ((a, b) => number)

    Type declaration

      • (a, b): number
      • Parameters

        • a: number
        • b: number

        Returns number

    intounderlyingbytesource_start: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    intounderlyingbytesource_type: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    intounderlyingsink_abort: ((a, b) => number)

    Type declaration

      • (a, b): number
      • Parameters

        • a: number
        • b: number

        Returns number

    intounderlyingsink_close: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    intounderlyingsink_write: ((a, b) => number)

    Type declaration

      • (a, b): number
      • Parameters

        • a: number
        • b: number

        Returns number

    intounderlyingsource_cancel: ((a) => void)

    Type declaration

      • (a): void
      • Parameters

        • a: number

        Returns void

    intounderlyingsource_pull: ((a, b) => number)

    Type declaration

      • (a, b): number
      • Parameters

        • a: number
        • b: number

        Returns number

    jsonPrettyPrint: ((a, b) => number)

    Type declaration

      • (a, b): number
      • Parameters

        • a: number
        • b: number

        Returns number

    key_asBalance: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    key_asDictionaryAddr: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    key_fromAccount: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    key_fromBalance: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    key_fromBid: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    key_fromChainspecRegistry: (() => number)

    Type declaration

      • (): number
      • Returns number

    key_fromChecksumRegistry: (() => number)

    Type declaration

      • (): number
      • Returns number

    key_fromDeployInfo: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    key_fromDictionaryAddr: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    key_fromDictionaryKey: ((a, b, c) => number)

    Type declaration

      • (a, b, c): number
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns number

    key_fromEraInfo: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    key_fromEraSummary: (() => number)

    Type declaration

      • (): number
      • Returns number

    key_fromFormattedString: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    key_fromHash: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    key_fromSystemContractRegistry: (() => number)

    Type declaration

      • (): number
      • Returns number

    key_fromTransfer: ((a, b) => number)

    Type declaration

      • (a, b): number
      • Parameters

        • a: number
        • b: number

        Returns number

    key_fromURef: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    key_fromUnbond: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    key_fromWithdraw: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    key_intoAccount: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    key_intoHash: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    key_intoURef: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    key_isDictionaryKey: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    key_new: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    key_toFormattedString: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    key_toJson: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    key_urefToHash: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    key_withdrawToUnbond: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    listrpcsresult_api_version: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    listrpcsresult_name: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    listrpcsresult_schema: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    listrpcsresult_toJson: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    makeDictionaryItemKey: ((a, b, c, d) => void)

    Type declaration

      • (a, b, c, d): void
      • Parameters

        • a: number
        • b: number
        • c: number
        • d: number

        Returns void

    memory: Memory
    motesToCSPR: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    path_fromArray: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    path_is_empty: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    path_new: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    path_toJson: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    path_toString: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    paymentstrparams_new: ((a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u) => number)

    Type declaration

      • (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u): number
      • Parameters

        • 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

        Returns number

    paymentstrparams_payment_amount: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    paymentstrparams_payment_args_complex: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    paymentstrparams_payment_args_json: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    paymentstrparams_payment_args_simple: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    paymentstrparams_payment_entry_point: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    paymentstrparams_payment_hash: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    paymentstrparams_payment_name: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    paymentstrparams_payment_package_hash: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    paymentstrparams_payment_package_name: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    paymentstrparams_payment_path: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    paymentstrparams_payment_version: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    paymentstrparams_set_payment_amount: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    paymentstrparams_set_payment_args_complex: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    paymentstrparams_set_payment_args_json: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    paymentstrparams_set_payment_args_simple: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    paymentstrparams_set_payment_entry_point: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    paymentstrparams_set_payment_hash: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    paymentstrparams_set_payment_name: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    paymentstrparams_set_payment_package_hash: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    paymentstrparams_set_payment_package_name: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    paymentstrparams_set_payment_path: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    paymentstrparams_set_payment_version: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    peerentry_address: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    peerentry_node_id: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    privateToPublicKey: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    publickey_fromUint8Array: ((a, b) => number)

    Type declaration

      • (a, b): number
      • Parameters

        • a: number
        • b: number

        Returns number

    publickey_new: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    publickey_toAccountHash: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    publickey_toJson: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    publickey_toPurseUref: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    purseidentifier_fromAccountHash: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    purseidentifier_fromPublicKey: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    purseidentifier_fromURef: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    purseidentifier_toJson: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    putdeployresult_api_version: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    putdeployresult_deploy_hash: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    putdeployresult_toJson: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    querybalanceresult_api_version: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    querybalanceresult_balance: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    querybalanceresult_toJson: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    queryglobalstateresult_api_version: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    queryglobalstateresult_block_header: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    queryglobalstateresult_merkle_proof: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    queryglobalstateresult_stored_value: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    queryglobalstateresult_toJson: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    sdk_account_put_deploy: ((a, b, c, d, e) => number)

    Type declaration

      • (a, b, c, d, e): number
      • Parameters

        • a: number
        • b: number
        • c: number
        • d: number
        • e: number

        Returns number

    sdk_call_entrypoint: ((a, b, c, d, e, f, g) => number)

    Type declaration

      • (a, b, c, d, e, f, g): number
      • Parameters

        • a: number
        • b: number
        • c: number
        • d: number
        • e: number
        • f: number
        • g: number

        Returns number

    sdk_chain_get_block: ((a, b) => number)

    Type declaration

      • (a, b): number
      • Parameters

        • a: number
        • b: number

        Returns number

    sdk_chain_get_state_root_hash: ((a, b) => number)

    Type declaration

      • (a, b): number
      • Parameters

        • a: number
        • b: number

        Returns number

    sdk_deploy: ((a, b, c, d, e, f, g) => number)

    Type declaration

      • (a, b, c, d, e, f, g): number
      • Parameters

        • a: number
        • b: number
        • c: number
        • d: number
        • e: number
        • f: number
        • g: number

        Returns number

    sdk_getNodeAddress: ((a, b, c, d) => void)

    Type declaration

      • (a, b, c, d): void
      • Parameters

        • a: number
        • b: number
        • c: number
        • d: number

        Returns void

    sdk_getVerbosity: ((a, b) => number)

    Type declaration

      • (a, b): number
      • Parameters

        • a: number
        • b: number

        Returns number

    sdk_get_account: ((a, b) => number)

    Type declaration

      • (a, b): number
      • Parameters

        • a: number
        • b: number

        Returns number

    sdk_get_account_options: ((a, b) => number)

    Type declaration

      • (a, b): number
      • Parameters

        • a: number
        • b: number

        Returns number

    sdk_get_auction_info: ((a, b) => number)

    Type declaration

      • (a, b): number
      • Parameters

        • a: number
        • b: number

        Returns number

    sdk_get_auction_info_options: ((a, b) => number)

    Type declaration

      • (a, b): number
      • Parameters

        • a: number
        • b: number

        Returns number

    sdk_get_balance: ((a, b) => number)

    Type declaration

      • (a, b): number
      • Parameters

        • a: number
        • b: number

        Returns number

    sdk_get_balance_options: ((a, b) => number)

    Type declaration

      • (a, b): number
      • Parameters

        • a: number
        • b: number

        Returns number

    sdk_get_block: ((a, b) => number)

    Type declaration

      • (a, b): number
      • Parameters

        • a: number
        • b: number

        Returns number

    sdk_get_block_options: ((a, b) => number)

    Type declaration

      • (a, b): number
      • Parameters

        • a: number
        • b: number

        Returns number

    sdk_get_block_transfers: ((a, b) => number)

    Type declaration

      • (a, b): number
      • Parameters

        • a: number
        • b: number

        Returns number

    sdk_get_block_transfers_options: ((a, b) => number)

    Type declaration

      • (a, b): number
      • Parameters

        • a: number
        • b: number

        Returns number

    sdk_get_chainspec: ((a, b, c, d) => number)

    Type declaration

      • (a, b, c, d): number
      • Parameters

        • a: number
        • b: number
        • c: number
        • d: number

        Returns number

    sdk_get_deploy: ((a, b) => number)

    Type declaration

      • (a, b): number
      • Parameters

        • a: number
        • b: number

        Returns number

    sdk_get_deploy_options: ((a, b) => number)

    Type declaration

      • (a, b): number
      • Parameters

        • a: number
        • b: number

        Returns number

    sdk_get_dictionary_item: ((a, b) => number)

    Type declaration

      • (a, b): number
      • Parameters

        • a: number
        • b: number

        Returns number

    sdk_get_dictionary_item_options: ((a, b) => number)

    Type declaration

      • (a, b): number
      • Parameters

        • a: number
        • b: number

        Returns number

    sdk_get_era_info: ((a, b) => number)

    Type declaration

      • (a, b): number
      • Parameters

        • a: number
        • b: number

        Returns number

    sdk_get_era_info_options: ((a, b) => number)

    Type declaration

      • (a, b): number
      • Parameters

        • a: number
        • b: number

        Returns number

    sdk_get_era_summary: ((a, b) => number)

    Type declaration

      • (a, b): number
      • Parameters

        • a: number
        • b: number

        Returns number

    sdk_get_era_summary_options: ((a, b) => number)

    Type declaration

      • (a, b): number
      • Parameters

        • a: number
        • b: number

        Returns number

    sdk_get_node_status: ((a, b, c, d) => number)

    Type declaration

      • (a, b, c, d): number
      • Parameters

        • a: number
        • b: number
        • c: number
        • d: number

        Returns number

    sdk_get_peers: ((a, b, c, d) => number)

    Type declaration

      • (a, b, c, d): number
      • Parameters

        • a: number
        • b: number
        • c: number
        • d: number

        Returns number

    sdk_get_state_root_hash: ((a, b) => number)

    Type declaration

      • (a, b): number
      • Parameters

        • a: number
        • b: number

        Returns number

    sdk_get_state_root_hash_options: ((a, b) => number)

    Type declaration

      • (a, b): number
      • Parameters

        • a: number
        • b: number

        Returns number

    sdk_get_validator_changes: ((a, b, c, d) => number)

    Type declaration

      • (a, b, c, d): number
      • Parameters

        • a: number
        • b: number
        • c: number
        • d: number

        Returns number

    sdk_info_get_deploy: ((a, b) => number)

    Type declaration

      • (a, b): number
      • Parameters

        • a: number
        • b: number

        Returns number

    sdk_install: ((a, b, c, d, e, f, g) => number)

    Type declaration

      • (a, b, c, d, e, f, g): number
      • Parameters

        • a: number
        • b: number
        • c: number
        • d: number
        • e: number
        • f: number
        • g: number

        Returns number

    sdk_list_rpcs: ((a, b, c, d) => number)

    Type declaration

      • (a, b, c, d): number
      • Parameters

        • a: number
        • b: number
        • c: number
        • d: number

        Returns number

    sdk_make_deploy: ((a, b, c, d, e) => void)

    Type declaration

      • (a, b, c, d, e): void
      • Parameters

        • a: number
        • b: number
        • c: number
        • d: number
        • e: number

        Returns void

    sdk_make_transfer: ((a, b, c, d, e, f, g, h, i, j) => void)

    Type declaration

      • (a, b, c, d, e, f, g, h, i, j): void
      • Parameters

        • a: number
        • b: number
        • c: number
        • d: number
        • e: number
        • f: number
        • g: number
        • h: number
        • i: number
        • j: number

        Returns void

    sdk_new: ((a, b, c) => number)

    Type declaration

      • (a, b, c): number
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns number

    sdk_put_deploy: ((a, b, c, d, e) => number)

    Type declaration

      • (a, b, c, d, e): number
      • Parameters

        • a: number
        • b: number
        • c: number
        • d: number
        • e: number

        Returns number

    sdk_query_balance: ((a, b) => number)

    Type declaration

      • (a, b): number
      • Parameters

        • a: number
        • b: number

        Returns number

    sdk_query_balance_options: ((a, b) => number)

    Type declaration

      • (a, b): number
      • Parameters

        • a: number
        • b: number

        Returns number

    sdk_query_contract_dict: ((a, b) => number)

    Type declaration

      • (a, b): number
      • Parameters

        • a: number
        • b: number

        Returns number

    sdk_query_contract_dict_options: ((a, b) => number)

    Type declaration

      • (a, b): number
      • Parameters

        • a: number
        • b: number

        Returns number

    sdk_query_contract_key: ((a, b) => number)

    Type declaration

      • (a, b): number
      • Parameters

        • a: number
        • b: number

        Returns number

    sdk_query_contract_key_options: ((a, b) => number)

    Type declaration

      • (a, b): number
      • Parameters

        • a: number
        • b: number

        Returns number

    sdk_query_global_state: ((a, b) => number)

    Type declaration

      • (a, b): number
      • Parameters

        • a: number
        • b: number

        Returns number

    sdk_query_global_state_options: ((a, b) => number)

    Type declaration

      • (a, b): number
      • Parameters

        • a: number
        • b: number

        Returns number

    sdk_setNodeAddress: ((a, b, c, d) => void)

    Type declaration

      • (a, b, c, d): void
      • Parameters

        • a: number
        • b: number
        • c: number
        • d: number

        Returns void

    sdk_setVerbosity: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    sdk_sign_deploy: ((a, b, c, d) => number)

    Type declaration

      • (a, b, c, d): number
      • Parameters

        • a: number
        • b: number
        • c: number
        • d: number

        Returns number

    sdk_speculative_deploy: ((a, b, c, d, e, f, g, h, i, j) => number)

    Type declaration

      • (a, b, c, d, e, f, g, h, i, j): number
      • Parameters

        • a: number
        • b: number
        • c: number
        • d: number
        • e: number
        • f: number
        • g: number
        • h: number
        • i: number
        • j: number

        Returns number

    sdk_speculative_exec: ((a, b) => number)

    Type declaration

      • (a, b): number
      • Parameters

        • a: number
        • b: number

        Returns number

    sdk_speculative_exec_options: ((a, b) => number)

    Type declaration

      • (a, b): number
      • Parameters

        • a: number
        • b: number

        Returns number

    sdk_speculative_transfer: ((a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) => number)

    Type declaration

      • (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o): number
      • Parameters

        • 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

        Returns number

    sdk_state_get_account_info: ((a, b) => number)

    Type declaration

      • (a, b): number
      • Parameters

        • a: number
        • b: number

        Returns number

    sdk_state_get_balance: ((a, b) => number)

    Type declaration

      • (a, b): number
      • Parameters

        • a: number
        • b: number

        Returns number

    sdk_state_get_dictionary_item: ((a, b) => number)

    Type declaration

      • (a, b): number
      • Parameters

        • a: number
        • b: number

        Returns number

    sdk_transfer: ((a, b, c, d, e, f, g, h, i, j, k, l) => number)

    Type declaration

      • (a, b, c, d, e, f, g, h, i, j, k, l): number
      • Parameters

        • a: number
        • b: number
        • c: number
        • d: number
        • e: number
        • f: number
        • g: number
        • h: number
        • i: number
        • j: number
        • k: number
        • l: number

        Returns number

    sdk_waitDeploy: ((a, b, c, d, e, f, g) => number)

    Type declaration

      • (a, b, c, d, e, f, g): number
      • Parameters

        • a: number
        • b: number
        • c: number
        • d: number
        • e: number
        • f: number
        • g: number

        Returns number

    sdk_watchDeploy: ((a, b, c, d, e) => number)

    Type declaration

      • (a, b, c, d, e): number
      • Parameters

        • a: number
        • b: number
        • c: number
        • d: number
        • e: number

        Returns number

    sessionstrparams_is_session_transfer: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    sessionstrparams_new: ((a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u) => number)

    Type declaration

      • (a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u): number
      • Parameters

        • 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

        Returns number

    sessionstrparams_session_args_complex: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    sessionstrparams_session_args_json: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    sessionstrparams_session_args_simple: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    sessionstrparams_session_bytes: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    sessionstrparams_session_entry_point: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    sessionstrparams_session_hash: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    sessionstrparams_session_name: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    sessionstrparams_session_package_hash: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    sessionstrparams_session_package_name: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    sessionstrparams_session_path: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    sessionstrparams_session_version: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    sessionstrparams_set_is_session_transfer: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    sessionstrparams_set_session_args_complex: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    sessionstrparams_set_session_args_json: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    sessionstrparams_set_session_args_simple: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    sessionstrparams_set_session_bytes: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    sessionstrparams_set_session_entry_point: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    sessionstrparams_set_session_hash: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    sessionstrparams_set_session_name: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    sessionstrparams_set_session_package_hash: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    sessionstrparams_set_session_package_name: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    sessionstrparams_set_session_path: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    sessionstrparams_set_session_version: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    speculativeexecresult_api_version: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    speculativeexecresult_block_hash: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    speculativeexecresult_execution_result: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    speculativeexecresult_toJson: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    transferaddr_new: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    transferaddr_to_bytes: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    uint8ArrayToBytes: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    uref_fromUint8Array: ((a, b, c) => number)

    Type declaration

      • (a, b, c): number
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns number

    uref_new: ((a, b, c, d) => void)

    Type declaration

      • (a, b, c, d): void
      • Parameters

        • a: number
        • b: number
        • c: number
        • d: number

        Returns void

    uref_toFormattedString: ((a, b) => void)

    Type declaration

      • (a, b): void
      • Parameters

        • a: number
        • b: number

        Returns void

    uref_toJson: ((a) => number)

    Type declaration

      • (a): number
      • Parameters

        • a: number

        Returns number

    urefaddr_new: ((a, b, c) => void)

    Type declaration

      • (a, b, c): void
      • Parameters

        • a: number
        • b: number
        • c: number

        Returns void

    wasm_bindgen__convert__closures__invoke2_mut__h41b3897ec8604519: ((a, b, c, d) => void)

    Type declaration

      • (a, b, c, d): void
      • Parameters

        • a: number
        • b: number
        • c: number
        • d: number

        Returns void

    \ No newline at end of file diff --git a/api-wasm/types/InitInput.html b/api-wasm/types/InitInput.html index 156cc992b..4f4102201 100644 --- a/api-wasm/types/InitInput.html +++ b/api-wasm/types/InitInput.html @@ -1 +1 @@ -InitInput | api-wasm

    Type alias InitInput

    InitInput: RequestInfo | URL | Response | BufferSource | WebAssembly.Module
    \ No newline at end of file +InitInput | api-wasm

    Type alias InitInput

    InitInput: RequestInfo | URL | Response | BufferSource | WebAssembly.Module
    \ No newline at end of file diff --git a/api-wasm/types/SyncInitInput.html b/api-wasm/types/SyncInitInput.html index a463d466d..8a092edbe 100644 --- a/api-wasm/types/SyncInitInput.html +++ b/api-wasm/types/SyncInitInput.html @@ -1 +1 @@ -SyncInitInput | api-wasm

    Type alias SyncInitInput

    SyncInitInput: BufferSource | WebAssembly.Module
    \ No newline at end of file +SyncInitInput | api-wasm

    Type alias SyncInitInput

    SyncInitInput: BufferSource | WebAssembly.Module
    \ No newline at end of file