Skip to content

feat: add getCompleteAddress to GRPC#6969

Merged
stringhandler merged 2 commits intotari-project:developmentfrom
Krakaw:feat/complete-address
Apr 22, 2025
Merged

feat: add getCompleteAddress to GRPC#6969
stringhandler merged 2 commits intotari-project:developmentfrom
Krakaw:feat/complete-address

Conversation

@Krakaw
Copy link
Copy Markdown
Contributor

@Krakaw Krakaw commented Apr 18, 2025

Description

Adds getCompleteAddress to the wallet GRPC interface which returns a complete set of address data:

address: {
  interactiveAddress: <Buffer 02 03 8a ba 62 f2 56 e0 58 d6 29 b4 e8 26 b8 8d 74 0d 41 ff bb b4 2b 60 7d 11 4e 66 1a c1 7c c5 c8 34 44 c3 cb 8b bc ad ef 30 47 75 e7 72 a0 9c 7a 94 ... 17 more bytes>,
  oneSidedAddress: <Buffer 02 01 8a ba 62 f2 56 e0 58 d6 29 b4 e8 26 b8 8d 74 0d 41 ff bb b4 2b 60 7d 11 4e 66 1a c1 7c c5 c8 34 44 c3 cb 8b bc ad ef 30 47 75 e7 72 a0 9c 7a 94 ... 17 more bytes>,
  interactiveAddressBase58: '34DF3gsz43FKz3K1XoBTtwTuTrqCjXYNvFJYefRvdCcoFiNsW31WXab7WZb3aYMMPLPze6ptCc62rHhVVKo2Y4qr2NU',
  oneSidedAddressBase58: '32DF3gsz43FKz3K1XoBTtwTuTrqCjXYNvFJYefRvdCcoFiNsW31WXab7WZb3aYMMPLPze6ptCc62rHhVVKo2Y4qr2Ny',
  interactiveAddressEmoji: '🌈🌊🐵💤🏁🚓🎳🗽🎷🔦🍟💐😷🍗💡🐸🙈🌵🤖🧲💦💐🍣🎿🦋🌻🎩🏠🍉💳🐞💼📌🍳🎒💺📿🐶💨💈🚚🍬🎡🐗😱🐑👞👘🐜👅👂🎲🍄🐛👟🎵🐼⭐🎋👃😷👠🤠😎🎵⚽📎',
  oneSidedAddressEmoji: '🌈📟🐵💤🏁🚓🎳🗽🎷🔦🍟💐😷🍗💡🐸🙈🌵🤖🧲💦💐🍣🎿🦋🌻🎩🏠🍉💳🐞💼📌🍳🎒💺📿🐶💨💈🚚🍬🎡🐗😱🐑👞👘🐜👅👂🎲🍄🐛👟🎵🐼⭐🎋👃😷👠🤠😎🎵⚽😎'
}

Motivation and Context

Using the GRPC interface to extract address information required a lot of post-processing to get the same values that are presented in the console wallet.

How Has This Been Tested?

I ran the the wallet with grpc enabled and extracted the address and compared it to the console wallet.

What process can a PR reviewer use to test or verify this change?

Run the console wallet with grpc enabled and request the getCompleteAddress rpc endpoint.

Breaking Changes

  • None
  • Requires data directory on base node to be deleted
  • Requires hard fork
  • Other - Please specify

Summary by CodeRabbit

  • New Features
    • Added a new option to retrieve wallet addresses in multiple formats (binary, Base58, and emoji) via the gRPC API.
    • Users can now view both interactive and one-sided wallet addresses in all supported formats.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 18, 2025

"""

Walkthrough

A new gRPC method, GetCompleteAddress, was introduced to the wallet service, both in the protocol buffer definition and in the Rust server implementation. This method provides the wallet's interactive and one-sided addresses in three formats: binary, Base58, and emoji. The server-side logic retrieves these addresses, formats them accordingly, and returns them in a structured response. This extends the previous functionality, which only supported binary format addresses, by adding more user-friendly representations.

Changes

File(s) Change Summary
applications/minotari_app_grpc/proto/wallet.proto Added GetCompleteAddress RPC method to the Wallet service, and defined the GetCompleteAddressResponse message with fields for interactive and one-sided addresses in binary, Base58, and emoji formats.
applications/minotari_console_wallet/src/grpc/wallet_grpc_server.rs Implemented the new get_complete_address async gRPC method in WalletGrpcServer, returning addresses in multiple formats.

Sequence Diagram(s)

sequenceDiagram
    participant Client
    participant WalletGrpcServer
    participant Wallet

    Client->>WalletGrpcServer: GetCompleteAddress (Empty)
    WalletGrpcServer->>Wallet: get_interactive_address()
    WalletGrpcServer->>Wallet: get_one_sided_address()
    WalletGrpcServer->>WalletGrpcServer: Format addresses (binary, Base58, emoji)
    WalletGrpcServer-->>Client: GetCompleteAddressResponse (all formats)
Loading

Poem

In the warren of wallets, a new trick appears,
Addresses in bytes, and Base58 cheers!
Emoji now dances, a bunny’s delight,
For sharing your wallet is now just right.
With formats galore, we hop with glee—
More ways to connect, for you and for me!
🐰✨
"""


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 53997e9 and d1e2837.

📒 Files selected for processing (1)
  • applications/minotari_console_wallet/src/grpc/wallet_grpc_server.rs (2 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • applications/minotari_console_wallet/src/grpc/wallet_grpc_server.rs

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

stringhandler
stringhandler previously approved these changes Apr 18, 2025
@github-actions
Copy link
Copy Markdown

Test Results (CI)

    3 files    129 suites   55m 57s ⏱️
1 335 tests 1 335 ✅ 0 💤 0 ❌
4 003 runs  4 003 ✅ 0 💤 0 ❌

Results for commit 53997e9.

@github-actions
Copy link
Copy Markdown

Test Results (Integration tests)

 2 files  + 2  11 suites  +11   1h 27m 56s ⏱️ + 1h 27m 56s
36 tests +36  32 ✅ +32  0 💤 ±0   4 ❌ + 4 
44 runs  +44  32 ✅ +32  0 💤 ±0  12 ❌ +12 

For more details on these failures, see this check.

Results for commit 53997e9. ± Comparison against base commit 6951379.

@stringhandler stringhandler changed the title feat: Add getCompleteAddress to GRPC feat: add getCompleteAddress to GRPC Apr 22, 2025
@stringhandler stringhandler merged commit aa0ce64 into tari-project:development Apr 22, 2025
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants