pub struct GolemBaseRoClient { /* private fields */ }
Expand description
A client for interacting with the GolemBase system. Provides methods for account management, entity operations, balance queries, and event subscriptions.
Implementations§
Source§impl GolemBaseRoClient
impl GolemBaseRoClient
Sourcepub async fn get_entity_count(&self) -> Result<u64, Error>
pub async fn get_entity_count(&self) -> Result<u64, Error>
Gets the total count of entities in GolemBase. Returns the number of entities currently stored.
Sourcepub async fn get_all_entity_keys(&self) -> Result<Vec<Hash>, Error>
pub async fn get_all_entity_keys(&self) -> Result<Vec<Hash>, Error>
Gets the entity keys of all entities in GolemBase. Returns a vector of all entity keys.
Sourcepub async fn get_entities_of_owner(
&self,
address: Address,
) -> Result<Vec<Hash>, Error>
pub async fn get_entities_of_owner( &self, address: Address, ) -> Result<Vec<Hash>, Error>
Gets the entity keys of all entities owned by the given address. Returns a vector of entity keys for the specified owner.
Sourcepub async fn get_storage_value<T: TryFrom<Vec<u8>>>(
&self,
key: Hash,
) -> Result<T, Error>
pub async fn get_storage_value<T: TryFrom<Vec<u8>>>( &self, key: Hash, ) -> Result<T, Error>
Gets the storage value associated with the given entity key. Decodes the value from base64 and attempts to convert it to the requested type.
Sourcepub async fn query_entities(
&self,
query: &str,
) -> Result<Vec<SearchResult>, Error>
pub async fn query_entities( &self, query: &str, ) -> Result<Vec<SearchResult>, Error>
Queries entities in GolemBase based on annotations.
Returns a vector of SearchResult
matching the query string.
Sourcepub async fn query_entity_keys(&self, query: &str) -> Result<Vec<Hash>, Error>
pub async fn query_entity_keys(&self, query: &str) -> Result<Vec<Hash>, Error>
Queries entities in GolemBase based on annotations and returns only their keys. Returns a vector of entity keys matching the query string.
Sourcepub async fn get_entities_to_expire_at_block(
&self,
block_number: u64,
) -> Result<Vec<Hash>, Error>
pub async fn get_entities_to_expire_at_block( &self, block_number: u64, ) -> Result<Vec<Hash>, Error>
Gets all entity keys for entities that will expire at the given block number. Returns a vector of entity keys expiring at the specified block.
Sourcepub async fn get_entity_metadata(
&self,
key: Hash,
) -> Result<EntityMetaData, Error>
pub async fn get_entity_metadata( &self, key: Hash, ) -> Result<EntityMetaData, Error>
Gets metadata for a specific entity.
Returns an EntityMetaData
struct for the given entity key.
Source§impl GolemBaseRoClient
impl GolemBaseRoClient
Sourcepub fn builder() -> GolemBaseRoClientBuilder
pub fn builder() -> GolemBaseRoClientBuilder
Creates a new builder for GolemBaseClient
with the given wallet and RPC URL.
Initializes the provider and sets up default configuration.
Trait Implementations§
Source§impl Clone for GolemBaseRoClient
impl Clone for GolemBaseRoClient
Source§fn clone(&self) -> GolemBaseRoClient
fn clone(&self) -> GolemBaseRoClient
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
source
. Read moreAuto Trait Implementations§
impl Freeze for GolemBaseRoClient
impl !RefUnwindSafe for GolemBaseRoClient
impl Send for GolemBaseRoClient
impl Sync for GolemBaseRoClient
impl Unpin for GolemBaseRoClient
impl !UnwindSafe for GolemBaseRoClient
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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