pub struct SDK { /* private fields */ }Implementations§
Source§impl SDK
impl SDK
Sourcepub async fn get_binary_latest_switch_block_header(
&self,
node_address: Option<String>,
) -> Result<Option<BlockHeader>, SdkError>
pub async fn get_binary_latest_switch_block_header( &self, node_address: Option<String>, ) -> Result<Option<BlockHeader>, SdkError>
Returns the latest switch block header.
Sourcepub async fn get_binary_latest_block_header(
&self,
node_address: Option<String>,
) -> Result<Option<BlockHeader>, SdkError>
pub async fn get_binary_latest_block_header( &self, node_address: Option<String>, ) -> Result<Option<BlockHeader>, SdkError>
Returns the latest block header.
Sourcepub async fn get_binary_block_header_by_height(
&self,
node_address: Option<String>,
height: u64,
) -> Result<Option<BlockHeader>, SdkError>
pub async fn get_binary_block_header_by_height( &self, node_address: Option<String>, height: u64, ) -> Result<Option<BlockHeader>, SdkError>
Returns the block header at the given height.
Sourcepub async fn get_binary_block_header_by_hash(
&self,
node_address: Option<String>,
block_hash: BlockHash,
) -> Result<Option<BlockHeader>, SdkError>
pub async fn get_binary_block_header_by_hash( &self, node_address: Option<String>, block_hash: BlockHash, ) -> Result<Option<BlockHeader>, SdkError>
Returns the block header with the given hash.
Sourcepub async fn get_binary_latest_block_with_signatures(
&self,
node_address: Option<String>,
) -> Result<Option<BlockWithSignatures>, SdkError>
pub async fn get_binary_latest_block_with_signatures( &self, node_address: Option<String>, ) -> Result<Option<BlockWithSignatures>, SdkError>
Returns the latest signed block along with signatures.
Sourcepub async fn get_binary_block_with_signatures_by_height(
&self,
node_address: Option<String>,
height: u64,
) -> Result<Option<BlockWithSignatures>, SdkError>
pub async fn get_binary_block_with_signatures_by_height( &self, node_address: Option<String>, height: u64, ) -> Result<Option<BlockWithSignatures>, SdkError>
Returns the signed block at the given height.
Sourcepub async fn get_binary_block_with_signatures_by_hash(
&self,
node_address: Option<String>,
block_hash: BlockHash,
) -> Result<Option<BlockWithSignatures>, SdkError>
pub async fn get_binary_block_with_signatures_by_hash( &self, node_address: Option<String>, block_hash: BlockHash, ) -> Result<Option<BlockWithSignatures>, SdkError>
Returns the signed block with the given hash.
Sourcepub async fn get_binary_transaction_by_hash(
&self,
node_address: Option<String>,
hash: TransactionHash,
with_finalized_approvals: bool,
) -> Result<Option<TransactionWithExecutionInfo>, SdkError>
pub async fn get_binary_transaction_by_hash( &self, node_address: Option<String>, hash: TransactionHash, with_finalized_approvals: bool, ) -> Result<Option<TransactionWithExecutionInfo>, SdkError>
Returns the transaction by its hash.
Sourcepub async fn get_binary_peers(
&self,
node_address: Option<String>,
) -> Result<Peers, SdkError>
pub async fn get_binary_peers( &self, node_address: Option<String>, ) -> Result<Peers, SdkError>
Returns the peer list.
Sourcepub async fn get_binary_uptime(
&self,
node_address: Option<String>,
) -> Result<Uptime, SdkError>
pub async fn get_binary_uptime( &self, node_address: Option<String>, ) -> Result<Uptime, SdkError>
Returns the node uptime.
Sourcepub async fn get_binary_last_progress(
&self,
node_address: Option<String>,
) -> Result<LastProgress, SdkError>
pub async fn get_binary_last_progress( &self, node_address: Option<String>, ) -> Result<LastProgress, SdkError>
Returns the last progress recorded by the node.
Sourcepub async fn get_binary_reactor_state(
&self,
node_address: Option<String>,
) -> Result<ReactorStateName, SdkError>
pub async fn get_binary_reactor_state( &self, node_address: Option<String>, ) -> Result<ReactorStateName, SdkError>
Returns the current reactor state.
Sourcepub async fn get_binary_network_name(
&self,
node_address: Option<String>,
) -> Result<NetworkName, SdkError>
pub async fn get_binary_network_name( &self, node_address: Option<String>, ) -> Result<NetworkName, SdkError>
Returns the network name.
Sourcepub async fn get_binary_consensus_validator_changes(
&self,
node_address: Option<String>,
) -> Result<ConsensusValidatorChanges, SdkError>
pub async fn get_binary_consensus_validator_changes( &self, node_address: Option<String>, ) -> Result<ConsensusValidatorChanges, SdkError>
Returns the last consensus validator changes.
Sourcepub async fn get_binary_block_synchronizer_status(
&self,
node_address: Option<String>,
) -> Result<BlockSynchronizerStatus, SdkError>
pub async fn get_binary_block_synchronizer_status( &self, node_address: Option<String>, ) -> Result<BlockSynchronizerStatus, SdkError>
Returns the block synchronizer status.
Sourcepub async fn get_binary_available_block_range(
&self,
node_address: Option<String>,
) -> Result<AvailableBlockRange, SdkError>
pub async fn get_binary_available_block_range( &self, node_address: Option<String>, ) -> Result<AvailableBlockRange, SdkError>
Returns the available block range.
Sourcepub async fn get_binary_next_upgrade(
&self,
node_address: Option<String>,
) -> Result<Option<NextUpgrade>, SdkError>
pub async fn get_binary_next_upgrade( &self, node_address: Option<String>, ) -> Result<Option<NextUpgrade>, SdkError>
Returns information about the next upgrade point.
Sourcepub async fn get_binary_consensus_status(
&self,
node_address: Option<String>,
) -> Result<ConsensusStatus, SdkError>
pub async fn get_binary_consensus_status( &self, node_address: Option<String>, ) -> Result<ConsensusStatus, SdkError>
Returns the consensus status.
Sourcepub async fn get_binary_chainspec_raw_bytes(
&self,
node_address: Option<String>,
) -> Result<ChainspecRawBytes, SdkError>
pub async fn get_binary_chainspec_raw_bytes( &self, node_address: Option<String>, ) -> Result<ChainspecRawBytes, SdkError>
Returns the raw chainspec bytes and additional configuration.
Sourcepub async fn get_binary_node_status(
&self,
node_address: Option<String>,
) -> Result<NodeStatus, SdkError>
pub async fn get_binary_node_status( &self, node_address: Option<String>, ) -> Result<NodeStatus, SdkError>
Retrieves the node status.
Sourcepub async fn get_binary_validator_reward_by_era(
&self,
node_address: Option<String>,
validator_key: PublicKey,
era: EraId,
) -> Result<Option<RewardResponse>, SdkError>
pub async fn get_binary_validator_reward_by_era( &self, node_address: Option<String>, validator_key: PublicKey, era: EraId, ) -> Result<Option<RewardResponse>, SdkError>
Retrieves the reward for the given validator at the given era.
Sourcepub async fn get_binary_validator_reward_by_block_height(
&self,
node_address: Option<String>,
validator_key: PublicKey,
block_height: u64,
) -> Result<Option<RewardResponse>, SdkError>
pub async fn get_binary_validator_reward_by_block_height( &self, node_address: Option<String>, validator_key: PublicKey, block_height: u64, ) -> Result<Option<RewardResponse>, SdkError>
Retrieves the reward for the given validator at the era containing the block at given height.
Sourcepub async fn get_binary_validator_reward_by_block_hash(
&self,
node_address: Option<String>,
validator_key: PublicKey,
block_hash: BlockHash,
) -> Result<Option<RewardResponse>, SdkError>
pub async fn get_binary_validator_reward_by_block_hash( &self, node_address: Option<String>, validator_key: PublicKey, block_hash: BlockHash, ) -> Result<Option<RewardResponse>, SdkError>
Retrieves the reward for the given validator at the era containing the block with given hash.
Sourcepub async fn get_binary_delegator_reward_by_era(
&self,
node_address: Option<String>,
validator_key: PublicKey,
delegator_key: PublicKey,
era: EraId,
) -> Result<Option<RewardResponse>, SdkError>
pub async fn get_binary_delegator_reward_by_era( &self, node_address: Option<String>, validator_key: PublicKey, delegator_key: PublicKey, era: EraId, ) -> Result<Option<RewardResponse>, SdkError>
Retrieves the reward for the given delegator at the given era.
Sourcepub async fn get_binary_delegator_reward_by_block_height(
&self,
node_address: Option<String>,
validator_key: PublicKey,
delegator_key: PublicKey,
block_height: u64,
) -> Result<Option<RewardResponse>, SdkError>
pub async fn get_binary_delegator_reward_by_block_height( &self, node_address: Option<String>, validator_key: PublicKey, delegator_key: PublicKey, block_height: u64, ) -> Result<Option<RewardResponse>, SdkError>
Retrieves the reward for the given delegator at the era containing the block at given height.
Sourcepub async fn get_binary_delegator_reward_by_block_hash(
&self,
node_address: Option<String>,
validator_key: PublicKey,
delegator_key: PublicKey,
block_hash: BlockHash,
) -> Result<Option<RewardResponse>, SdkError>
pub async fn get_binary_delegator_reward_by_block_hash( &self, node_address: Option<String>, validator_key: PublicKey, delegator_key: PublicKey, block_hash: BlockHash, ) -> Result<Option<RewardResponse>, SdkError>
Retrieves the reward for the given delegator at the era containing the block with given hash.
Sourcepub async fn get_binary_read_record(
&self,
node_address: Option<String>,
record_id: RecordId,
key: &[u8],
) -> Result<Vec<u8>, SdkError>
pub async fn get_binary_read_record( &self, node_address: Option<String>, record_id: RecordId, key: &[u8], ) -> Result<Vec<u8>, SdkError>
Reads a record from the node.
Sourcepub async fn get_binary_global_state_item(
&self,
node_address: Option<String>,
key: Key,
path: Vec<String>,
) -> Result<Option<GlobalStateQueryResult>, SdkError>
pub async fn get_binary_global_state_item( &self, node_address: Option<String>, key: Key, path: Vec<String>, ) -> Result<Option<GlobalStateQueryResult>, SdkError>
Retrieves an item from the global state using the most recent state root hash.
Sourcepub async fn get_binary_global_state_item_by_state_root_hash(
&self,
node_address: Option<String>,
state_root_hash: Digest,
key: Key,
path: Vec<String>,
) -> Result<Option<GlobalStateQueryResult>, SdkError>
pub async fn get_binary_global_state_item_by_state_root_hash( &self, node_address: Option<String>, state_root_hash: Digest, key: Key, path: Vec<String>, ) -> Result<Option<GlobalStateQueryResult>, SdkError>
Retrieves an item from the global state using a specific state root hash.
Sourcepub async fn get_binary_global_state_item_by_block_hash(
&self,
node_address: Option<String>,
block_hash: BlockHash,
key: Key,
path: Vec<String>,
) -> Result<Option<GlobalStateQueryResult>, SdkError>
pub async fn get_binary_global_state_item_by_block_hash( &self, node_address: Option<String>, block_hash: BlockHash, key: Key, path: Vec<String>, ) -> Result<Option<GlobalStateQueryResult>, SdkError>
Retrieves an item from the global state using a block hash.
Sourcepub async fn get_binary_global_state_item_by_block_height(
&self,
node_address: Option<String>,
block_height: u64,
key: Key,
path: Vec<String>,
) -> Result<Option<GlobalStateQueryResult>, SdkError>
pub async fn get_binary_global_state_item_by_block_height( &self, node_address: Option<String>, block_height: u64, key: Key, path: Vec<String>, ) -> Result<Option<GlobalStateQueryResult>, SdkError>
Retrieves an item from the global state using a block height.
Sourcepub async fn get_binary_try_accept_transaction(
&self,
node_address: Option<String>,
transaction: Transaction,
) -> Result<(), SdkError>
pub async fn get_binary_try_accept_transaction( &self, node_address: Option<String>, transaction: Transaction, ) -> Result<(), SdkError>
Attempts to send a transaction to the node for inclusion.
Sourcepub async fn get_binary_try_speculative_execution(
&self,
node_address: Option<String>,
transaction: Transaction,
) -> Result<SpeculativeExecutionResult, SdkError>
pub async fn get_binary_try_speculative_execution( &self, node_address: Option<String>, transaction: Transaction, ) -> Result<SpeculativeExecutionResult, SdkError>
Attempts to send a transaction to the node for speculative execution.
Sourcepub async fn get_binary_protocol_version(
&self,
node_address: Option<String>,
) -> Result<ProtocolVersion, SdkError>
pub async fn get_binary_protocol_version( &self, node_address: Option<String>, ) -> Result<ProtocolVersion, SdkError>
Retrieves the protocol version from the node.
Source§impl SDK
impl SDK
Sourcepub async fn deploy(
&self,
deploy_params: DeployStrParams,
session_params: SessionStrParams,
payment_params: PaymentStrParams,
verbosity: Option<Verbosity>,
rpc_address: Option<String>,
) -> Result<SuccessResponse<_PutDeployResult>, SdkError>
pub async fn deploy( &self, deploy_params: DeployStrParams, session_params: SessionStrParams, payment_params: PaymentStrParams, verbosity: Option<Verbosity>, rpc_address: Option<String>, ) -> Result<SuccessResponse<_PutDeployResult>, SdkError>
Perform a deploy operation.
§Arguments
deploy_params- Deploy parameters.session_params- Session parameters.payment_params- Payment parameters.verbosity- An optional verbosity level.rpc_address- An optional rpc address.
§Returns
A result containing a SuccessResponse<_PutDeployResult> or an SdkError.
Source§impl SDK
impl SDK
Sourcepub async fn speculative_deploy(
&self,
deploy_params: DeployStrParams,
session_params: SessionStrParams,
payment_params: PaymentStrParams,
verbosity: Option<Verbosity>,
rpc_address: Option<String>,
) -> Result<SuccessResponse<_SpeculativeExecResult>, SdkError>
👎Deprecated: prefer speculative_transaction
pub async fn speculative_deploy( &self, deploy_params: DeployStrParams, session_params: SessionStrParams, payment_params: PaymentStrParams, verbosity: Option<Verbosity>, rpc_address: Option<String>, ) -> Result<SuccessResponse<_SpeculativeExecResult>, 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.verbosity- Optional verbosity level.rpc_address- Optional rpc 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,
verbosity: Option<Verbosity>,
rpc_address: Option<String>,
) -> Result<SuccessResponse<_SpeculativeExecResult>, SdkError>
👎Deprecated: prefer speculative_transfer_transaction
pub async fn speculative_transfer( &self, amount: &str, target_account: &str, transfer_id: Option<String>, deploy_params: DeployStrParams, payment_params: PaymentStrParams, verbosity: Option<Verbosity>, rpc_address: Option<String>, ) -> Result<SuccessResponse<_SpeculativeExecResult>, 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.verbosity- The verbosity level for logging (optional).rpc_address- The address of the node to connect to (optional).
§Returns
A Result containing the result a SuccessResponse<_SpeculativeExecResult> 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>,
rpc_address: Option<String>,
) -> Result<SuccessResponse<_PutDeployResult>, SdkError>
👎Deprecated: prefer transfer_transaction
pub async fn transfer( &self, amount: &str, target_account: &str, transfer_id: Option<String>, deploy_params: DeployStrParams, payment_params: PaymentStrParams, verbosity: Option<Verbosity>, rpc_address: Option<String>, ) -> Result<SuccessResponse<_PutDeployResult>, 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).rpc_address- The address of the node to connect to (optional).
§Returns
A Result containing the result a SuccessResponse<_PutDeployResult> 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>,
rpc_address: Option<String>,
) -> Result<SuccessResponse<_GetAccountResult>, SdkError>
👎Deprecated: prefer ‘get_entity’
pub async fn get_account( &self, account_identifier: Option<AccountIdentifier>, account_identifier_as_string: Option<String>, maybe_block_identifier: Option<BlockIdentifierInput>, verbosity: Option<Verbosity>, rpc_address: Option<String>, ) -> Result<SuccessResponse<_GetAccountResult>, SdkError>
Retrieves account information based on the provided options.
§Arguments
account_identifier- An optionalAccountIdentifierfor specifying the account identifier.account_identifier_as_string- An optional string representing the account identifier.maybe_block_identifier- An optionalBlockIdentifierInputfor specifying a block identifier.verbosity- An optionalVerbositylevel for controlling the output verbosity.rpc_address- An optional string specifying the rpc address to use for the request.
§Returns
A Result containing either a 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>,
rpc_address: Option<String>,
) -> Result<SuccessResponse<_GetAuctionInfoResult>, SdkError>
pub async fn get_auction_info( &self, maybe_block_identifier: Option<BlockIdentifierInput>, verbosity: Option<Verbosity>, rpc_address: Option<String>, ) -> Result<SuccessResponse<_GetAuctionInfoResult>, SdkError>
Retrieves auction information based on the provided options.
§Arguments
maybe_block_identifier- An optionalBlockIdentifierInputfor specifying a block identifier.verbosity- An optionalVerbositylevel for controlling the output verbosity.rpc_address- An optional string specifying the rpc address to use for the request.
§Returns
A Result containing either a _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>,
rpc_address: Option<String>,
) -> Result<SuccessResponse<_GetBalanceResult>, SdkError>
pub async fn get_balance( &self, purse_uref: GetBalanceInput, state_root_hash: Option<impl ToDigest>, verbosity: Option<Verbosity>, rpc_address: Option<String>, ) -> Result<SuccessResponse<_GetBalanceResult>, 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 optionalVerbositylevel for controlling the output verbosity.rpc_address- An optional string specifying the rpc address to use for the request.
§Returns
A Result containing either a 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>,
rpc_address: Option<String>,
) -> Result<SuccessResponse<_GetBlockResult>, SdkError>
pub async fn get_block( &self, maybe_block_identifier: Option<BlockIdentifierInput>, verbosity: Option<Verbosity>, rpc_address: Option<String>, ) -> Result<SuccessResponse<_GetBlockResult>, SdkError>
Retrieves block information using the provided options.
§Arguments
maybe_block_identifier- An optionalBlockIdentifierInputspecifying the block identifier.verbosity- An optionalVerbositylevel for the retrieval.rpc_address- An optional rpc 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>,
rpc_address: Option<String>,
) -> Result<SuccessResponse<_GetBlockTransfersResult>, SdkError>
pub async fn get_block_transfers( &self, maybe_block_identifier: Option<BlockIdentifierInput>, verbosity: Option<Verbosity>, rpc_address: Option<String>, ) -> Result<SuccessResponse<_GetBlockTransfersResult>, SdkError>
Retrieves block transfers information based on the provided options.
§Arguments
maybe_block_identifier- An optionalBlockIdentifierInputspecifying the block identifier.verbosity- An optionalVerbositylevel for controlling the output verbosity.rpc_address- An optional string specifying the rpc address to use for the request.
§Returns
A Result containing either a _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
Implementations for the SDK struct.
impl SDK
Implementations for the SDK struct.
Sourcepub async fn get_chainspec(
&self,
verbosity: Option<Verbosity>,
rpc_address: Option<String>,
) -> Result<SuccessResponse<_GetChainspecResult>, Error>
pub async fn get_chainspec( &self, verbosity: Option<Verbosity>, rpc_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>,
rpc_address: Option<String>,
) -> Result<SuccessResponse<_GetDeployResult>, Error>
👎Deprecated: prefer ‘get_transaction’
pub async fn get_deploy( &self, deploy_hash: DeployHash, finalized_approvals: Option<bool>, verbosity: Option<Verbosity>, rpc_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.rpc_address- An optional rpc 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>,
rpc_address: Option<String>,
) -> Result<SuccessResponse<_GetDictionaryItemResult>, SdkError>
pub async fn get_dictionary_item( &self, dictionary_item_input: DictionaryItemInput, state_root_hash: Option<impl ToDigest>, verbosity: Option<Verbosity>, rpc_address: Option<String>, ) -> Result<SuccessResponse<_GetDictionaryItemResult>, SdkError>
Retrieves dictionary item information based on the provided options.
§Arguments
state_root_hash- AToDigestimplementation for specifying the state root hash.dictionary_item- ADictionaryItemInputenum specifying the dictionary item to retrieve.verbosity- An optionalVerbositylevel for controlling the output verbosity.rpc_address- An optional string specifying the rpc address to use for the request.
§Returns
A Result containing either a _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
Sourcepub async fn get_entity(
&self,
entity_identifier: Option<EntityIdentifier>,
entity_identifier_as_string: Option<String>,
maybe_block_identifier: Option<BlockIdentifierInput>,
verbosity: Option<Verbosity>,
rpc_address: Option<String>,
) -> Result<SuccessResponse<_GetAddressableEntityResult>, SdkError>
pub async fn get_entity( &self, entity_identifier: Option<EntityIdentifier>, entity_identifier_as_string: Option<String>, maybe_block_identifier: Option<BlockIdentifierInput>, verbosity: Option<Verbosity>, rpc_address: Option<String>, ) -> Result<SuccessResponse<_GetAddressableEntityResult>, SdkError>
Retrieves account information based on the provided options.
§Arguments
entity_identifier- An optionalEntityIdentifierfor specifying the entity identifier.entity_identifier_as_string- An optional string representing the entity identifier.maybe_block_identifier- An optionalBlockIdentifierInputfor specifying a block identifier.verbosity- An optionalVerbositylevel for controlling the output verbosity.rpc_address- An optional string specifying the rpc address to use for the request.
§Returns
A Result containing either a SuccessResponse<_GetAddressableEntityResult> 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>, rpc_address: Option<String>, ) -> Result<SuccessResponse<_GetEraInfoResult>, SdkError>
Source§impl SDK
impl SDK
Sourcepub async fn get_era_summary(
&self,
maybe_block_identifier: Option<BlockIdentifierInput>,
verbosity: Option<Verbosity>,
rpc_address: Option<String>,
) -> Result<SuccessResponse<_GetEraSummaryResult>, SdkError>
pub async fn get_era_summary( &self, maybe_block_identifier: Option<BlockIdentifierInput>, verbosity: Option<Verbosity>, rpc_address: Option<String>, ) -> Result<SuccessResponse<_GetEraSummaryResult>, SdkError>
Retrieves era summary information based on the provided options.
§Arguments
maybe_block_identifier- An optionalBlockIdentifierInputfor specifying a block identifier.verbosity- An optionalVerbositylevel for controlling the output verbosity.rpc_address- An optional string specifying the rpc address to use for the request.
§Returns
A Result containing either a _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>,
rpc_address: Option<String>,
) -> Result<SuccessResponse<_GetNodeStatusResult>, Error>
pub async fn get_node_status( &self, verbosity: Option<Verbosity>, rpc_address: Option<String>, ) -> Result<SuccessResponse<_GetNodeStatusResult>, Error>
Retrieves node status information based on the provided options.
§Arguments
verbosity- An optionalVerbositylevel for controlling the output verbosity.rpc_address- An optional string specifying the rpc address to use for the request.
§Returns
A Result containing either a _GetNodeStatusResult or 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>,
rpc_address: Option<String>,
) -> Result<SuccessResponse<_GetPeersResult>, Error>
pub async fn get_peers( &self, verbosity: Option<Verbosity>, rpc_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>,
rpc_address: Option<String>,
) -> Result<SuccessResponse<_GetStateRootHashResult>, SdkError>
pub async fn get_state_root_hash( &self, maybe_block_identifier: Option<BlockIdentifierInput>, verbosity: Option<Verbosity>, rpc_address: Option<String>, ) -> Result<SuccessResponse<_GetStateRootHashResult>, SdkError>
Retrieves state root hash information based on the provided options.
§Arguments
maybe_block_identifier- An optionalBlockIdentifierInputfor specifying a block identifier.verbosity- An optionalVerbositylevel for controlling the output verbosity.rpc_address- An optional string specifying the rpc address to use for the request.
§Returns
A Result containing either a _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_transaction(
&self,
transaction_hash: TransactionHash,
finalized_approvals: Option<bool>,
verbosity: Option<Verbosity>,
rpc_address: Option<String>,
) -> Result<SuccessResponse<_GetTransactionResult>, Error>
pub async fn get_transaction( &self, transaction_hash: TransactionHash, finalized_approvals: Option<bool>, verbosity: Option<Verbosity>, rpc_address: Option<String>, ) -> Result<SuccessResponse<_GetTransactionResult>, Error>
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.rpc_address- An optional rpc address.
§Returns
A Result containing either a _GetTransactionResult or an error.
Source§impl SDK
impl SDK
Sourcepub async fn get_validator_changes(
&self,
verbosity: Option<Verbosity>,
rpc_address: Option<String>,
) -> Result<SuccessResponse<_GetValidatorChangesResult>, Error>
pub async fn get_validator_changes( &self, verbosity: Option<Verbosity>, rpc_address: Option<String>, ) -> Result<SuccessResponse<_GetValidatorChangesResult>, Error>
Retrieves validator changes based on the provided options.
§Arguments
verbosity- An optionalVerbositylevel for controlling the output verbosity.rpc_address- An optional string specifying the rpc address to use for the request.
§Returns
A Result containing either a _GetValidatorChangesResult or 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>,
rpc_address: Option<String>,
) -> Result<SuccessResponse<_ListRpcsResult>, Error>
pub async fn list_rpcs( &self, verbosity: Option<Verbosity>, rpc_address: Option<String>, ) -> Result<SuccessResponse<_ListRpcsResult>, Error>
Lists available RPCs based on the provided options.
§Arguments
verbosity- An optionalVerbositylevel for controlling the output verbosity.rpc_address- An optional string specifying the rpc address to use for the request.
§Returns
A Result containing either a _ListRpcsResult or 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>,
rpc_address: Option<String>,
) -> Result<SuccessResponse<_PutDeployResult>, Error>
pub async fn put_deploy( &self, deploy: Deploy, verbosity: Option<Verbosity>, rpc_address: Option<String>, ) -> Result<SuccessResponse<_PutDeployResult>, Error>
Puts a deploy based on the provided options.
§Arguments
deploy- TheDeployobject to be sent.verbosity- An optionalVerbositylevel for controlling the output verbosity.rpc_address- An optional string specifying the rpc address to use for the request.
§Returns
A Result containing either a _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 put_transaction(
&self,
transaction: Transaction,
verbosity: Option<Verbosity>,
rpc_address: Option<String>,
) -> Result<SuccessResponse<_PutTransactionResult>, Error>
pub async fn put_transaction( &self, transaction: Transaction, verbosity: Option<Verbosity>, rpc_address: Option<String>, ) -> Result<SuccessResponse<_PutTransactionResult>, Error>
Puts a transaction based on the provided options.
§Arguments
transaction- TheTransactionobject to be sent.verbosity- An optionalVerbositylevel for controlling the output verbosity.rpc_address- An optional string specifying the rpc address to use for the request.
§Returns
A Result containing either a _PutTransactionResult or an Error in case of an error.
§Errors
Returns an Error if there is an error during the transaction 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>,
rpc_address: Option<String>,
) -> Result<SuccessResponse<_QueryBalanceResult>, 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>, rpc_address: Option<String>, ) -> Result<SuccessResponse<_QueryBalanceResult>, SdkError>
Retrieves balance information based on the provided options.
§Arguments
maybe_global_state_identifier- An optionalGlobalStateIdentifierfor 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 optionalVerbositylevel for controlling the output verbosity.rpc_address- An optional string specifying the rpc address to use for the request.
§Returns
A Result containing either a 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_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>,
rpc_address: Option<String>,
) -> Result<SuccessResponse<_QueryBalanceDetailsResult>, SdkError>
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>, rpc_address: Option<String>, ) -> Result<SuccessResponse<_QueryBalanceDetailsResult>, SdkError>
Retrieves balance information details based on the provided options.
§Arguments
maybe_global_state_identifier- An optionalGlobalStateIdentifierfor 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 optionalVerbositylevel for controlling the output verbosity.rpc_address- An optional string specifying the rpc address to use for the request.
§Returns
A Result containing either a SuccessResponse<_QueryBalanceDetailsResult> 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>, SdkError>
pub async fn query_global_state( &self, query_params: QueryGlobalStateParams, ) -> Result<SuccessResponse<_QueryGlobalStateResult>, SdkError>
Source§impl SDK
impl SDK
Sourcepub async fn speculative_exec(
&self,
transaction: Transaction,
verbosity: Option<Verbosity>,
rpc_address: Option<String>,
) -> Result<SuccessResponse<_SpeculativeExecTxnResult>, SdkError>
pub async fn speculative_exec( &self, transaction: Transaction, verbosity: Option<Verbosity>, rpc_address: Option<String>, ) -> Result<SuccessResponse<_SpeculativeExecTxnResult>, SdkError>
Source§impl SDK
impl SDK
Sourcepub async fn speculative_exec_deploy(
&self,
deploy: Deploy,
verbosity: Option<Verbosity>,
rpc_address: Option<String>,
) -> Result<SuccessResponse<_SpeculativeExecResult>, SdkError>
👎Deprecated: prefer speculative_exec_transaction
pub async fn speculative_exec_deploy( &self, deploy: Deploy, verbosity: Option<Verbosity>, rpc_address: Option<String>, ) -> Result<SuccessResponse<_SpeculativeExecResult>, SdkError>
Source§impl SDK
impl SDK
Sourcepub async fn speculative_transaction(
&self,
builder_params: TransactionBuilderParams,
transaction_params: TransactionStrParams,
verbosity: Option<Verbosity>,
rpc_address: Option<String>,
) -> Result<SuccessResponse<_SpeculativeExecTxnResult>, SdkError>
pub async fn speculative_transaction( &self, builder_params: TransactionBuilderParams, transaction_params: TransactionStrParams, verbosity: Option<Verbosity>, rpc_address: Option<String>, ) -> Result<SuccessResponse<_SpeculativeExecTxnResult>, SdkError>
This function allows executing a transaction speculatively.
§Arguments
builder_params- Transaction Builder parameters.transaction_params- Transactionment parameters for the transaction.verbosity- Optional verbosity level.rpc_address- Optional rpc address.
§Returns
A Result containing either a SuccessResponse<_SpeculativeExecTxnResult> or a SdkError in case of an error.
Source§impl SDK
impl SDK
Sourcepub async fn speculative_transfer_transaction(
&self,
maybe_source: Option<URef>,
target_account: &str,
amount: &str,
transaction_params: TransactionStrParams,
maybe_id: Option<String>,
verbosity: Option<Verbosity>,
rpc_address: Option<String>,
) -> Result<SuccessResponse<_SpeculativeExecTxnResult>, SdkError>
pub async fn speculative_transfer_transaction( &self, maybe_source: Option<URef>, target_account: &str, amount: &str, transaction_params: TransactionStrParams, maybe_id: Option<String>, verbosity: Option<Verbosity>, rpc_address: Option<String>, ) -> Result<SuccessResponse<_SpeculativeExecTxnResult>, SdkError>
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).verbosity- The verbosity level for logging (optional).rpc_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.
Source§impl SDK
impl SDK
Sourcepub async fn transaction(
&self,
builder_params: TransactionBuilderParams,
transaction_params: TransactionStrParams,
verbosity: Option<Verbosity>,
rpc_address: Option<String>,
) -> Result<SuccessResponse<_PutTransactionResult>, SdkError>
pub async fn transaction( &self, builder_params: TransactionBuilderParams, transaction_params: TransactionStrParams, verbosity: Option<Verbosity>, rpc_address: Option<String>, ) -> Result<SuccessResponse<_PutTransactionResult>, SdkError>
Perform a transaction operation.
§Arguments
builder_params- Transaction Builder parameters.transaction_params- Transaction parameters.verbosity- An optional verbosity level.rpc_address- An optional rpc address.
§Returns
A result containing a SuccessResponse<_PutTransactionResult> or an SdkError.
Source§impl SDK
impl SDK
Sourcepub async fn transfer_transaction(
&self,
maybe_source: Option<URef>,
target_account: &str,
amount: &str,
transaction_params: TransactionStrParams,
maybe_id: Option<String>,
verbosity: Option<Verbosity>,
rpc_address: Option<String>,
) -> Result<SuccessResponse<_PutTransactionResult>, SdkError>
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>, rpc_address: Option<String>, ) -> Result<SuccessResponse<_PutTransactionResult>, SdkError>
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).rpc_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.
Source§impl SDK
impl SDK
Sourcepub fn make_deploy(
&self,
deploy_params: DeployStrParams,
session_params: SessionStrParams,
payment_params: PaymentStrParams,
) -> Result<Deploy, Box<SdkError>>
👎Deprecated: prefer ‘make_transaction’
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>>
👎Deprecated: prefer ‘make_transfer_transaction’
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 make_transaction(
&self,
builder_params: TransactionBuilderParams,
transaction_params: TransactionStrParams,
) -> Result<Transaction, Box<SdkError>>
pub fn make_transaction( &self, builder_params: TransactionBuilderParams, transaction_params: TransactionStrParams, ) -> Result<Transaction, Box<SdkError>>
Source§impl SDK
impl SDK
Sourcepub fn make_transfer_transaction(
&self,
maybe_source: Option<URef>,
target: &str,
amount: &str,
transaction_params: TransactionStrParams,
maybe_id: Option<String>,
) -> Result<Transaction, Box<SdkError>>
pub fn make_transfer_transaction( &self, maybe_source: Option<URef>, target: &str, amount: &str, transaction_params: TransactionStrParams, maybe_id: Option<String>, ) -> Result<Transaction, Box<SdkError>>
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.
Source§impl SDK
impl SDK
Sourcepub fn sign_transaction(
&self,
transaction: Transaction,
secret_key: &str,
) -> Transaction
pub fn sign_transaction( &self, transaction: Transaction, secret_key: &str, ) -> Transaction
Source§impl SDK
impl SDK
Sourcepub fn watch_deploy(
&self,
events_url: &str,
timeout_duration: Option<u64>,
) -> Watcher
👎Deprecated: prefer ‘watch_transaction’
pub fn watch_deploy( &self, events_url: &str, timeout_duration: Option<u64>, ) -> Watcher
Sourcepub fn watch_transaction(
&self,
events_url: &str,
timeout_duration: Option<u64>,
) -> Watcher
pub fn watch_transaction( &self, events_url: &str, timeout_duration: Option<u64>, ) -> Watcher
Sourcepub async fn wait_deploy(
&self,
events_url: &str,
deploy_hash: &str,
timeout_duration: Option<u64>,
) -> Result<EventParseResult, String>
👎Deprecated: prefer ‘wait_transaction’ with transaction
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. 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.
Sourcepub async fn wait_transaction(
&self,
events_url: &str,
target_hash: &str,
timeout_duration: Option<u64>,
) -> Result<EventParseResult, String>
pub async fn wait_transaction( &self, events_url: &str, target_hash: &str, timeout_duration: Option<u64>, ) -> Result<EventParseResult, String>
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
Source§impl SDK
A set of functions for working with smart contract entry points.
Alias of sdk.transaction
impl SDK
A set of functions for working with smart contract entry points. Alias of sdk.transaction
Sourcepub async fn call_entrypoint(
&self,
builder_params: TransactionBuilderParams,
transaction_params: TransactionStrParams,
rpc_address: Option<String>,
) -> Result<SuccessResponse<_PutTransactionResult>, SdkError>
pub async fn call_entrypoint( &self, builder_params: TransactionBuilderParams, transaction_params: TransactionStrParams, rpc_address: Option<String>, ) -> Result<SuccessResponse<_PutTransactionResult>, SdkError>
Calls a smart contract entry point with the specified parameters and returns the result.
§Arguments
builder_params- Transaction Builder parameters.transaction_params- Transaction parameters.rpc_address- An optional rpc address to send the request to.
§Returns
A Result containing either a _PutTransactionResult or a SdkError in case of an error.
§Errors
Returns a SdkError if there is an error during the call.
Source§impl SDK
A set of functions for working with smart contract entry points.
Alias of sdk.deploy
impl SDK
A set of functions for working with smart contract entry points. Alias of sdk.deploy
Sourcepub async fn call_entrypoint_deploy(
&self,
deploy_params: DeployStrParams,
session_params: SessionStrParams,
payment_params: PaymentStrParams,
rpc_address: Option<String>,
) -> Result<SuccessResponse<_PutDeployResult>, SdkError>
👎Deprecated: prefer ‘call_entrypoint’ with transaction
pub async fn call_entrypoint_deploy( &self, deploy_params: DeployStrParams, session_params: SessionStrParams, payment_params: PaymentStrParams, rpc_address: Option<String>, ) -> Result<SuccessResponse<_PutDeployResult>, 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.rpc_address- An optional rpc 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
A set of functions for installing smart contracts on the blockchain.
Alias of sdk.transaction
impl SDK
A set of functions for installing smart contracts on the blockchain. Alias of sdk.transaction
Sourcepub async fn install(
&self,
transaction_params: TransactionStrParams,
transaction_bytes: Bytes,
rpc_address: Option<String>,
) -> Result<SuccessResponse<_PutTransactionResult>, SdkError>
pub async fn install( &self, transaction_params: TransactionStrParams, transaction_bytes: Bytes, rpc_address: Option<String>, ) -> Result<SuccessResponse<_PutTransactionResult>, SdkError>
Installs a smart contract with the specified parameters and returns the result.
§Arguments
transaction_params- Transaction parameters.transaction_bytes- Transaction Bytes to installrpc_address- An optional rpc address to send the request to.
§Returns
A Result containing either a _PutTransactionResult or a SdkError in case of an error.
§Errors
Returns a SdkError if there is an error during the installation.
Source§impl SDK
A set of functions for installing smart contracts on the blockchain.
Alias of sdk.deploy
impl SDK
A set of functions for installing smart contracts on the blockchain. Alias of sdk.deploy
Sourcepub async fn install_deploy(
&self,
deploy_params: DeployStrParams,
session_params: SessionStrParams,
payment_amount: &str,
rpc_address: Option<String>,
) -> Result<SuccessResponse<_PutDeployResult>, SdkError>
👎Deprecated: prefer ‘install’ with transaction
pub async fn install_deploy( &self, deploy_params: DeployStrParams, session_params: SessionStrParams, payment_amount: &str, rpc_address: Option<String>, ) -> Result<SuccessResponse<_PutDeployResult>, 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.rpc_address- An optional rpc 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
Alias of sdk.get_dictionary_item
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>,
rpc_address: Option<String>,
) -> Result<SuccessResponse<_GetDictionaryItemResult>, SdkError>
pub async fn query_contract_dict( &self, dictionary_item: DictionaryItemInput, state_root_hash: Option<impl ToDigest>, verbosity: Option<Verbosity>, rpc_address: Option<String>, ) -> Result<SuccessResponse<_GetDictionaryItemResult>, SdkError>
Query a contract dictionary item.
§Arguments
state_root_hash- State root hash.dictionary_item- Dictionary item input.verbosity- Optional verbosity level.rpc_address- Optional rpc address.
§Returns
A Result containing either a SuccessResponse<_GetDictionaryItemResult> or a SdkError in case of an error.
Source§impl SDK
Alias of sdk.query_global_state
impl SDK
Alias of sdk.query_global_state
Sourcepub async fn query_contract_key(
&self,
entity_identifier: Option<EntityIdentifier>,
entity_identifier_as_string: Option<String>,
path: PathIdentifierInput,
maybe_block_identifier: Option<BlockIdentifierInput>,
verbosity: Option<Verbosity>,
rpc_address: Option<String>,
) -> Result<SuccessResponse<_QueryGlobalStateResult>, SdkError>
pub async fn query_contract_key( &self, entity_identifier: Option<EntityIdentifier>, entity_identifier_as_string: Option<String>, path: PathIdentifierInput, maybe_block_identifier: Option<BlockIdentifierInput>, verbosity: Option<Verbosity>, rpc_address: Option<String>, ) -> Result<SuccessResponse<_QueryGlobalStateResult>, SdkError>
Source§impl SDK
impl SDK
pub fn new( rpc_address: Option<String>, node_address: Option<String>, verbosity: Option<Verbosity>, ) -> Self
pub fn get_rpc_address(&self, rpc_address: Option<String>) -> String
pub fn set_rpc_address( &mut self, rpc_address: Option<String>, ) -> Result<(), String>
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
impl SupportsConstructor for SDK
impl SupportsInstanceProperty for SDK
impl SupportsStaticProperty 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 more§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§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::AbiSource§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.