Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fetching Public Account State on Testnet Using the WebClient #716

Open
partylikeits1983 opened this issue Feb 5, 2025 · 1 comment
Open
Labels
enhancement New feature or request
Milestone

Comments

@partylikeits1983
Copy link

partylikeits1983 commented Feb 5, 2025

Feature description

I’m trying to retrieve the state of a public account on testnet using the webclient, but I’m unsure how to accomplish this.

This is possible with the Rust client since I can initialize the TonicRpcClient or use the .test_rpc_api() method on the client, however, as far as I know exporting the TonicRpcClient to the webClient is not possible because it requires std.

It would be very useful to have a way to ping the Miden node directly via the webClient, to get certain data such as the state of a public account that is not in the client, or getting all the notes for a given Id.

Here’s how I retrieve the account state in Rust:

let account_details = client
    .test_rpc_api()
    .get_account_update(counter_contract_id)
    .await
    .unwrap();

Looking to achieve similar functionality in TypeScript as the Rust snippet above.

@partylikeits1983 partylikeits1983 added the enhancement New feature or request label Feb 5, 2025
@igamigo
Copy link
Collaborator

igamigo commented Feb 5, 2025

This is somewhat being tackled/discussed on #710.

Could you share more details on your use case for the endpoint?

@igamigo igamigo added this to the v0.8.0 milestone Feb 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants