Mirror node and mnemonic feature #1
Conversation
Signed-off-by: iron-prog <dt915725@gmail.com>
Signed-off-by: iron-prog <dt915725@gmail.com>
Signed-off-by: iron-prog <dt915725@gmail.com>
…tion Signed-off-by: iron-prog <dt915725@gmail.com>
Signed-off-by: iron-prog <dt915725@gmail.com>
Signed-off-by: iron-prog <dt915725@gmail.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 53578bf789
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| """Build a transaction model from a mirror node transaction payload.""" | ||
| node_account_id = _optional_str(data, "node") | ||
| return cls( | ||
| transaction_id=TransactionId.from_string(_require_str(data, "transaction_id")), |
There was a problem hiding this comment.
Parse mirror-node transaction IDs before constructing TransactionId
Real mirror-node transaction responses use hyphen-separated IDs such as 0.0.8-1234567890-000000006, while TransactionId.from_string only accepts the SDK form account@seconds.nanos. In any real list_transactions() or get_transaction() response, this line raises ValueError while mapping the page instead of returning transactions; the new tests mask this by using the SDK format rather than the mirror-node response format.
Useful? React with 👍 / 👎.
| if transaction_type is not None: | ||
| params["type"] = transaction_type |
There was a problem hiding this comment.
Send transactiontype for transaction operation filters
When callers pass transaction_type="CRYPTOTRANSFER", this builds type=CRYPTOTRANSFER, but the mirror-node list-transactions API uses transactiontype for operation names; type is the separate credit/debit account-balance modification filter. This means the documented transaction_type argument either returns a 400 for operation names or filters on the wrong field instead of selecting transaction names.
Useful? React with 👍 / 👎.
| from hiero_sdk_python import MirrorNodeClient | ||
| from hiero_sdk_python.account.account_id import AccountId | ||
| from hiero_sdk_python.hbar import Hbar | ||
| from hiero_sdk_python.mirror_node import MirrorNodeError |
There was a problem hiding this comment.
Export MirrorNodeError from the mirror_node package
This import path cannot resolve because the commit adds mirror_node_client.py but no hiero_sdk_python/mirror_node/__init__.py that re-exports MirrorNodeError. In a normal test environment collection will fail with ImportError: cannot import name 'MirrorNodeError' from 'hiero_sdk_python.mirror_node' before any of these new unit tests run.
Useful? React with 👍 / 👎.
This PR introduces a typed synchronous Mirror Node client for the Python SDK.
Highlights:
MirrorNodeClientfor common Mirror Node REST workflows.hiero_sdk_pythonandhiero_sdk_python.mirror_node.Testing performed:
Known limitation: