pub struct SDK { /* private fields */ }
Implementations§
source§impl SDK
impl SDK
sourcepub async fn deploy(
&self,
deploy_params: DeployStrParams,
session_params: SessionStrParams,
payment_params: PaymentStrParams,
verbosity: Option<Verbosity>,
node_address: Option<String>,
) -> Result<SuccessResponse<_PutDeployResult>, Box<SdkError>>
pub async fn deploy( &self, deploy_params: DeployStrParams, session_params: SessionStrParams, payment_params: PaymentStrParams, verbosity: Option<Verbosity>, node_address: Option<String>, ) -> Result<SuccessResponse<_PutDeployResult>, Box<SdkError>>
source§impl SDK
impl SDK
sourcepub async fn speculative_deploy(
&self,
deploy_params: DeployStrParams,
session_params: SessionStrParams,
payment_params: PaymentStrParams,
maybe_block_identifier: Option<BlockIdentifierInput>,
verbosity: Option<Verbosity>,
node_address: Option<String>,
) -> Result<SuccessResponse<_SpeculativeExecResult>, Box<SdkError>>
pub async fn speculative_deploy( &self, deploy_params: DeployStrParams, session_params: SessionStrParams, payment_params: PaymentStrParams, maybe_block_identifier: Option<BlockIdentifierInput>, verbosity: Option<Verbosity>, node_address: Option<String>, ) -> Result<SuccessResponse<_SpeculativeExecResult>, Box<SdkError>>
This function allows executing a deploy speculatively.
§Arguments
deploy_params
- Deployment parameters for the deploy.session_params
- Session parameters for the deploy.payment_params
- Payment parameters for the deploy.maybe_block_identifier
- Optional block identifier.verbosity
- Optional verbosity level.node_address
- Optional node address.
§Returns
A Result
containing either a SuccessResponse<SpeculativeExecResult>
or a SdkError
in case of an error.
source§impl SDK
impl SDK
sourcepub async fn speculative_transfer(
&self,
amount: &str,
target_account: &str,
transfer_id: Option<String>,
deploy_params: DeployStrParams,
payment_params: PaymentStrParams,
maybe_block_identifier: Option<BlockIdentifierInput>,
verbosity: Option<Verbosity>,
node_address: Option<String>,
) -> Result<SuccessResponse<_SpeculativeExecResult>, Box<SdkError>>
pub async fn speculative_transfer( &self, amount: &str, target_account: &str, transfer_id: Option<String>, deploy_params: DeployStrParams, payment_params: PaymentStrParams, maybe_block_identifier: Option<BlockIdentifierInput>, verbosity: Option<Verbosity>, node_address: Option<String>, ) -> Result<SuccessResponse<_SpeculativeExecResult>, Box<SdkError>>
Perform a speculative transfer.
§Arguments
amount
- The amount to transfer.target_account
- The target account.transfer_id
- An optional transfer ID (defaults to a random number).deploy_params
- The deployment parameters.payment_params
- The payment parameters.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 SdkError
in case of an error.
source§impl SDK
impl SDK
sourcepub async fn transfer(
&self,
amount: &str,
target_account: &str,
transfer_id: Option<String>,
deploy_params: DeployStrParams,
payment_params: PaymentStrParams,
verbosity: Option<Verbosity>,
node_address: Option<String>,
) -> Result<SuccessResponse<_PutDeployResult>, Box<SdkError>>
pub async fn transfer( &self, amount: &str, target_account: &str, transfer_id: Option<String>, deploy_params: DeployStrParams, payment_params: PaymentStrParams, verbosity: Option<Verbosity>, node_address: Option<String>, ) -> Result<SuccessResponse<_PutDeployResult>, Box<SdkError>>
Perform a transfer of funds.
§Arguments
amount
- The amount to transfer.target_account
- The target account.transfer_id
- An optional transfer ID (defaults to a random number).deploy_params
- The deployment parameters.payment_params
- The payment parameters.verbosity
- The verbosity level for logging (optional).node_address
- The address of the node to connect to (optional).
§Returns
A Result
containing the result of the transfer or a SdkError
in case of an error.
source§impl SDK
impl SDK
sourcepub async fn get_account(
&self,
account_identifier: Option<AccountIdentifier>,
account_identifier_as_string: Option<String>,
maybe_block_identifier: Option<BlockIdentifierInput>,
verbosity: Option<Verbosity>,
node_address: Option<String>,
) -> Result<SuccessResponse<_GetAccountResult>, Box<SdkError>>
pub async fn get_account( &self, account_identifier: Option<AccountIdentifier>, account_identifier_as_string: Option<String>, maybe_block_identifier: Option<BlockIdentifierInput>, verbosity: Option<Verbosity>, node_address: Option<String>, ) -> Result<SuccessResponse<_GetAccountResult>, Box<SdkError>>
Retrieves account information based on the provided options.
§Arguments
account_identifier
- An optionalAccountIdentifier
for specifying the account identifier.account_identifier_as_string
- An optional string representing the account identifier.maybe_block_identifier
- An optionalBlockIdentifierInput
for specifying a block identifier.verbosity
- An optionalVerbosity
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<_GetAccountResult>
or a SdkError
in case of an error.
§Errors
Returns a SdkError
if there is an error during the retrieval process.
source§impl SDK
impl SDK
sourcepub async fn get_auction_info(
&self,
maybe_block_identifier: Option<BlockIdentifierInput>,
verbosity: Option<Verbosity>,
node_address: Option<String>,
) -> Result<SuccessResponse<_GetAuctionInfoResult>, Box<SdkError>>
pub async fn get_auction_info( &self, maybe_block_identifier: Option<BlockIdentifierInput>, verbosity: Option<Verbosity>, node_address: Option<String>, ) -> Result<SuccessResponse<_GetAuctionInfoResult>, Box<SdkError>>
Retrieves auction information based on the provided options.
§Arguments
maybe_block_identifier
- An optionalBlockIdentifierInput
for specifying a block identifier.verbosity
- An optionalVerbosity
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 GetAuctionInfoResult
or a SdkError
in case of an error.
§Errors
Returns a SdkError
if there is an error during the retrieval process.
source§impl SDK
impl SDK
sourcepub async fn get_balance(
&self,
purse_uref: GetBalanceInput,
state_root_hash: Option<impl ToDigest>,
verbosity: Option<Verbosity>,
node_address: Option<String>,
) -> Result<SuccessResponse<_GetBalanceResult>, Box<SdkError>>
pub async fn get_balance( &self, purse_uref: GetBalanceInput, state_root_hash: Option<impl ToDigest>, verbosity: Option<Verbosity>, node_address: Option<String>, ) -> Result<SuccessResponse<_GetBalanceResult>, Box<SdkError>>
Retrieves balance information based on the provided options.
§Arguments
state_root_hash
- The state root hash to query for balance information.purse_uref
- The purse uref specifying the purse for which to retrieve the balance.verbosity
- An optionalVerbosity
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 GetBalanceResult
or a SdkError
in case of an error.
§Errors
Returns a SdkError
if there is an error during the retrieval process.
source§impl SDK
impl SDK
sourcepub async fn get_block(
&self,
maybe_block_identifier: Option<BlockIdentifierInput>,
verbosity: Option<Verbosity>,
node_address: Option<String>,
) -> Result<SuccessResponse<_GetBlockResult>, Box<SdkError>>
pub async fn get_block( &self, maybe_block_identifier: Option<BlockIdentifierInput>, verbosity: Option<Verbosity>, node_address: Option<String>, ) -> Result<SuccessResponse<_GetBlockResult>, Box<SdkError>>
Retrieves block information using the provided options.
§Arguments
maybe_block_identifier
- An optionalBlockIdentifierInput
specifying the block identifier.verbosity
- An optionalVerbosity
level for the retrieval.node_address
- An optional node address to target for retrieval.
§Returns
A Result
containing either a GetBlockResult
or a SdkError
in case of an error.
§Errors
Returns a SdkError
if there is an error during the retrieval process.
source§impl SDK
impl SDK
sourcepub async fn get_block_transfers(
&self,
maybe_block_identifier: Option<BlockIdentifierInput>,
verbosity: Option<Verbosity>,
node_address: Option<String>,
) -> Result<SuccessResponse<_GetBlockTransfersResult>, Box<SdkError>>
pub async fn get_block_transfers( &self, maybe_block_identifier: Option<BlockIdentifierInput>, verbosity: Option<Verbosity>, node_address: Option<String>, ) -> Result<SuccessResponse<_GetBlockTransfersResult>, Box<SdkError>>
Retrieves block transfers information based on the provided options.
§Arguments
maybe_block_identifier
- An optionalBlockIdentifierInput
specifying the block identifier.verbosity
- An optionalVerbosity
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 GetBlockTransfersResult
or a SdkError
in case of an error.
§Errors
Returns a SdkError
if there is an error during the retrieval process.
source§impl SDK
impl SDK
Implementations for the SDK
struct.
sourcepub async fn get_chainspec(
&self,
verbosity: Option<Verbosity>,
node_address: Option<String>,
) -> Result<SuccessResponse<_GetChainspecResult>, Error>
pub async fn get_chainspec( &self, verbosity: Option<Verbosity>, node_address: Option<String>, ) -> Result<SuccessResponse<_GetChainspecResult>, Error>
source§impl SDK
impl SDK
sourcepub async fn get_deploy(
&self,
deploy_hash: DeployHash,
finalized_approvals: Option<bool>,
verbosity: Option<Verbosity>,
node_address: Option<String>,
) -> Result<SuccessResponse<_GetDeployResult>, Error>
pub async fn get_deploy( &self, deploy_hash: DeployHash, finalized_approvals: Option<bool>, verbosity: Option<Verbosity>, node_address: Option<String>, ) -> Result<SuccessResponse<_GetDeployResult>, Error>
Retrieves deploy information based on the provided options.
§Arguments
deploy_hash
- The deploy 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 GetDeployResult
or an error.
source§impl SDK
impl SDK
sourcepub async fn get_dictionary_item(
&self,
dictionary_item_input: DictionaryItemInput,
state_root_hash: Option<impl ToDigest>,
verbosity: Option<Verbosity>,
node_address: Option<String>,
) -> Result<SuccessResponse<_GetDictionaryItemResult>, Box<SdkError>>
pub async fn get_dictionary_item( &self, dictionary_item_input: DictionaryItemInput, state_root_hash: Option<impl ToDigest>, verbosity: Option<Verbosity>, node_address: Option<String>, ) -> Result<SuccessResponse<_GetDictionaryItemResult>, Box<SdkError>>
Retrieves dictionary item information based on the provided options.
§Arguments
state_root_hash
- AToDigest
implementation for specifying the state root hash.dictionary_item
- ADictionaryItemInput
enum specifying the dictionary item to retrieve.verbosity
- An optionalVerbosity
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 GetDictionaryItemResult
or a SdkError
in case of an error.
§Errors
Returns a SdkError
if there is an error during the retrieval process.
source§impl SDK
impl SDK
pub async fn get_era_info( &self, maybe_block_identifier: Option<BlockIdentifierInput>, verbosity: Option<Verbosity>, node_address: Option<String>, ) -> Result<SuccessResponse<_GetEraInfoResult>, Box<SdkError>>
source§impl SDK
impl SDK
sourcepub async fn get_era_summary(
&self,
maybe_block_identifier: Option<BlockIdentifierInput>,
verbosity: Option<Verbosity>,
node_address: Option<String>,
) -> Result<SuccessResponse<_GetEraSummaryResult>, Box<SdkError>>
pub async fn get_era_summary( &self, maybe_block_identifier: Option<BlockIdentifierInput>, verbosity: Option<Verbosity>, node_address: Option<String>, ) -> Result<SuccessResponse<_GetEraSummaryResult>, Box<SdkError>>
Retrieves era summary information based on the provided options.
§Arguments
maybe_block_identifier
- An optionalBlockIdentifierInput
for specifying a block identifier.verbosity
- An optionalVerbosity
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 GetEraSummaryResult
or a SdkError
in case of an error.
§Errors
Returns a SdkError
if there is an error during the retrieval process.
source§impl SDK
impl SDK
sourcepub async fn get_node_status(
&self,
verbosity: Option<Verbosity>,
node_address: Option<String>,
) -> Result<SuccessResponse<_GetNodeStatusResult>, Error>
pub async fn get_node_status( &self, verbosity: Option<Verbosity>, node_address: Option<String>, ) -> Result<SuccessResponse<_GetNodeStatusResult>, Error>
Retrieves node status information based on the provided options.
§Arguments
verbosity
- An optionalVerbosity
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 an Error
in case of an error.
§Errors
Returns an Error
if there is an error during the retrieval process.
source§impl SDK
impl SDK
sourcepub async fn get_peers(
&self,
verbosity: Option<Verbosity>,
node_address: Option<String>,
) -> Result<SuccessResponse<_GetPeersResult>, Error>
pub async fn get_peers( &self, verbosity: Option<Verbosity>, node_address: Option<String>, ) -> Result<SuccessResponse<_GetPeersResult>, Error>
source§impl SDK
impl SDK
sourcepub async fn get_state_root_hash(
&self,
maybe_block_identifier: Option<BlockIdentifierInput>,
verbosity: Option<Verbosity>,
node_address: Option<String>,
) -> Result<SuccessResponse<_GetStateRootHashResult>, Box<SdkError>>
pub async fn get_state_root_hash( &self, maybe_block_identifier: Option<BlockIdentifierInput>, verbosity: Option<Verbosity>, node_address: Option<String>, ) -> Result<SuccessResponse<_GetStateRootHashResult>, Box<SdkError>>
Retrieves state root hash information based on the provided options.
§Arguments
maybe_block_identifier
- An optionalBlockIdentifierInput
for specifying a block identifier.verbosity
- An optionalVerbosity
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 GetStateRootHashResult
or a SdkError
in case of an error.
§Errors
Returns a SdkError
if there is an error during the retrieval process.
source§impl SDK
impl SDK
sourcepub async fn get_validator_changes(
&self,
verbosity: Option<Verbosity>,
node_address: Option<String>,
) -> Result<SuccessResponse<_GetValidatorChangesResult>, Error>
pub async fn get_validator_changes( &self, verbosity: Option<Verbosity>, node_address: Option<String>, ) -> Result<SuccessResponse<_GetValidatorChangesResult>, Error>
Retrieves validator changes based on the provided options.
§Arguments
verbosity
- An optionalVerbosity
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 an Error
in case of an error.
§Errors
Returns an Error
if there is an error during the retrieval process.
source§impl SDK
impl SDK
sourcepub async fn list_rpcs(
&self,
verbosity: Option<Verbosity>,
node_address: Option<String>,
) -> Result<SuccessResponse<_ListRpcsResult>, Error>
pub async fn list_rpcs( &self, verbosity: Option<Verbosity>, node_address: Option<String>, ) -> Result<SuccessResponse<_ListRpcsResult>, Error>
Lists available RPCs based on the provided options.
§Arguments
verbosity
- An optionalVerbosity
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 an Error
in case of an error.
§Errors
Returns an Error
if there is an error during the listing process.
source§impl SDK
impl SDK
sourcepub async fn put_deploy(
&self,
deploy: Deploy,
verbosity: Option<Verbosity>,
node_address: Option<String>,
) -> Result<SuccessResponse<_PutDeployResult>, Error>
pub async fn put_deploy( &self, deploy: Deploy, verbosity: Option<Verbosity>, node_address: Option<String>, ) -> Result<SuccessResponse<_PutDeployResult>, Error>
Puts a deploy based on the provided options.
§Arguments
deploy
- TheDeploy
object to be sent.verbosity
- An optionalVerbosity
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 PutDeployResult
or an Error
in case of an error.
§Errors
Returns an Error
if there is an error during the deploy process.
source§impl SDK
impl SDK
sourcepub async fn query_balance(
&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<_QueryBalanceResult>, Box<SdkError>>
pub async fn query_balance( &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<_QueryBalanceResult>, Box<SdkError>>
Retrieves balance information based on the provided options.
§Arguments
maybe_global_state_identifier
- An optionalGlobalStateIdentifier
for specifying global state.purse_identifier_as_string
- An optional string representing a purse identifier.purse_identifier
- An optionalPurseIdentifier
.state_root_hash
- An optional string representing a state root hash.maybe_block_id
- An optional string representing a block identifier.verbosity
- An optionalVerbosity
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<_QueryBalanceResult>
or a SdkError
in case of an error.
§Errors
Returns a SdkError
if there is an error during the retrieval process.
source§impl SDK
impl SDK
sourcepub async fn query_global_state(
&self,
query_params: QueryGlobalStateParams,
) -> Result<SuccessResponse<_QueryGlobalStateResult>, Box<SdkError>>
pub async fn query_global_state( &self, query_params: QueryGlobalStateParams, ) -> Result<SuccessResponse<_QueryGlobalStateResult>, Box<SdkError>>
source§impl SDK
impl SDK
sourcepub async fn speculative_exec(
&self,
deploy: Deploy,
maybe_block_identifier: Option<BlockIdentifierInput>,
verbosity: Option<Verbosity>,
node_address: Option<String>,
) -> Result<SuccessResponse<_SpeculativeExecResult>, Box<SdkError>>
pub async fn speculative_exec( &self, deploy: Deploy, maybe_block_identifier: Option<BlockIdentifierInput>, verbosity: Option<Verbosity>, node_address: Option<String>, ) -> Result<SuccessResponse<_SpeculativeExecResult>, Box<SdkError>>
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 the speculative execution or a SdkError
in case of an error.
source§impl SDK
impl SDK
sourcepub fn make_deploy(
&self,
deploy_params: DeployStrParams,
session_params: SessionStrParams,
payment_params: PaymentStrParams,
) -> Result<Deploy, Box<SdkError>>
pub fn make_deploy( &self, deploy_params: DeployStrParams, session_params: SessionStrParams, payment_params: PaymentStrParams, ) -> Result<Deploy, Box<SdkError>>
source§impl SDK
impl SDK
sourcepub fn make_transfer(
&self,
amount: &str,
target_account: &str,
transfer_id: Option<String>,
deploy_params: DeployStrParams,
payment_params: PaymentStrParams,
) -> Result<Deploy, Box<SdkError>>
pub fn make_transfer( &self, amount: &str, target_account: &str, transfer_id: Option<String>, deploy_params: DeployStrParams, payment_params: PaymentStrParams, ) -> Result<Deploy, Box<SdkError>>
Creates a transfer deploy with the provided parameters.
§Arguments
amount
- The transfer amount.target_account
- The target account.transfer_id
- Optional transfer identifier.deploy_params
- The deploy parameters.payment_params
- The payment parameters.
§Returns
A Result
containing the created Deploy
or a SdkError
in case of an error.
source§impl SDK
impl SDK
sourcepub fn watch_deploy(
&self,
events_url: &str,
timeout_duration: Option<u64>,
) -> DeployWatcher
pub fn watch_deploy( &self, events_url: &str, timeout_duration: Option<u64>, ) -> DeployWatcher
sourcepub async fn wait_deploy(
&self,
events_url: &str,
deploy_hash: &str,
timeout_duration: Option<u64>,
) -> Result<EventParseResult, String>
pub async fn wait_deploy( &self, events_url: &str, deploy_hash: &str, timeout_duration: Option<u64>, ) -> Result<EventParseResult, String>
Waits for a deploy event to be processed asynchronously.
§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 milliseconds.
§Returns
A Result
containing either the processed EventParseResult
or an error message.
source§impl SDK
impl SDK
A set of functions for working with smart contract entry points. Alias of sdk.deploy
sourcepub async fn call_entrypoint(
&self,
deploy_params: DeployStrParams,
session_params: SessionStrParams,
payment_params: PaymentStrParams,
node_address: Option<String>,
) -> Result<SuccessResponse<_PutDeployResult>, Box<SdkError>>
pub async fn call_entrypoint( &self, deploy_params: DeployStrParams, session_params: SessionStrParams, payment_params: PaymentStrParams, node_address: Option<String>, ) -> Result<SuccessResponse<_PutDeployResult>, Box<SdkError>>
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.
source§impl SDK
impl SDK
A set of functions for installing smart contracts on the blockchain. Alias of sdk.deploy
sourcepub async fn install(
&self,
deploy_params: DeployStrParams,
session_params: SessionStrParams,
payment_amount: &str,
node_address: Option<String>,
) -> Result<SuccessResponse<_PutDeployResult>, Box<SdkError>>
pub async fn install( &self, deploy_params: DeployStrParams, session_params: SessionStrParams, payment_amount: &str, node_address: Option<String>, ) -> Result<SuccessResponse<_PutDeployResult>, Box<SdkError>>
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.
source§impl SDK
impl SDK
Alias of sdk.get_dictionary_item
sourcepub async fn query_contract_dict(
&self,
dictionary_item: DictionaryItemInput,
state_root_hash: Option<impl ToDigest>,
verbosity: Option<Verbosity>,
node_address: Option<String>,
) -> Result<SuccessResponse<_GetDictionaryItemResult>, Box<SdkError>>
pub async fn query_contract_dict( &self, dictionary_item: DictionaryItemInput, state_root_hash: Option<impl ToDigest>, verbosity: Option<Verbosity>, node_address: Option<String>, ) -> Result<SuccessResponse<_GetDictionaryItemResult>, Box<SdkError>>
Query a contract dictionary item.
§Arguments
state_root_hash
- State root hash.dictionary_item
- Dictionary item input.verbosity
- Optional verbosity level.node_address
- Optional node address.
§Returns
A Result
containing either a SuccessResponse<GetDictionaryItemResult>
or a SdkError
in case of an error.
source§impl SDK
impl SDK
Alias of sdk.query_global_state
sourcepub async fn query_contract_key(
&self,
query_params: QueryGlobalStateParams,
) -> Result<SuccessResponse<_QueryGlobalStateResult>, Box<SdkError>>
pub async fn query_contract_key( &self, query_params: QueryGlobalStateParams, ) -> Result<SuccessResponse<_QueryGlobalStateResult>, Box<SdkError>>
source§impl SDK
impl SDK
pub fn new(node_address: Option<String>, verbosity: Option<Verbosity>) -> Self
pub fn get_node_address(&self, node_address: Option<String>) -> String
pub fn set_node_address( &mut self, node_address: Option<String>, ) -> Result<(), String>
pub fn get_verbosity(&self, verbosity: Option<Verbosity>) -> Verbosity
pub fn set_verbosity( &mut self, verbosity: Option<Verbosity>, ) -> Result<(), String>
Trait Implementations§
source§impl FromWasmAbi for SDK
impl FromWasmAbi for SDK
source§impl IntoWasmAbi for SDK
impl IntoWasmAbi for SDK
source§impl LongRefFromWasmAbi for SDK
impl LongRefFromWasmAbi for SDK
source§impl OptionFromWasmAbi for SDK
impl OptionFromWasmAbi for SDK
source§impl OptionIntoWasmAbi for SDK
impl OptionIntoWasmAbi for SDK
source§impl RefFromWasmAbi for SDK
impl RefFromWasmAbi for SDK
source§impl RefMutFromWasmAbi for SDK
impl RefMutFromWasmAbi for SDK
source§impl TryFromJsValue for SDK
impl TryFromJsValue for SDK
source§impl VectorFromWasmAbi for SDK
impl VectorFromWasmAbi for SDK
source§impl VectorIntoWasmAbi for SDK
impl VectorIntoWasmAbi for SDK
Auto Trait Implementations§
impl Freeze for SDK
impl RefUnwindSafe for SDK
impl Send for SDK
impl Sync for SDK
impl Unpin for SDK
impl UnwindSafe for SDK
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
source§type Abi = <T as IntoWasmAbi>::Abi
type Abi = <T as IntoWasmAbi>::Abi
IntoWasmAbi::Abi
source§fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
IntoWasmAbi::into_abi
, except that it may throw and never
return in the case of Err
.