Skip to content

Feature: Voucher Integrations #218

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

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

Feature: Voucher Integrations #218

wants to merge 5 commits into from

Conversation

1yam
Copy link
Member

@1yam 1yam commented May 20, 2025

This PR goal is to add Voucher into the sdk

Related ClickUp, GitHub or Jira tickets : ALEPH-XXX

Self proofreading checklist

  • The new code clear, easy to read and well commented.
  • New code does not duplicate the functions of builtin or popular libraries.
  • An LLM was used to review the new code and look for simplifications.
  • New classes and functions contain docstrings explaining what they provide.
  • All new code is covered by relevant tests.

Changes

This pull request introduces significant enhancements to the Aleph SDK, primarily focusing on voucher management, including support for EVM and Solana vouchers, as well as improvements to address resolution and metadata handling. Additionally, it includes updates to typing and configuration settings to support these new features.

Voucher Management Enhancements:

  • Added methods in AuthenticatedAlephClient and AlephHttpClient to retrieve vouchers (get_vouchers, get_evm_vouchers, get_solana_vouchers) for EVM and Solana chains, along with helper methods for fetching voucher updates and metadata. [1] [2]
  • Introduced new models in src/aleph/sdk/types.py for Voucher, VoucherMetadata, and VoucherAttribute to represent voucher-related data.

Address Resolution:

  • Added _resolve_address methods to handle address resolution with fallback to the account's address if none is provided. [1] [2]

Configuration Updates:

  • Added new voucher-related configuration settings (VOUCHER_METDATA_TEMPLATE_URL, VOUCHER_SOL_REGISTRY, VOUCHER_SENDER) in src/aleph/sdk/conf.py to support voucher metadata and Solana registry integration.

Typing Improvements:

  • Updated imports to include overload and override for enhanced type checking and method overriding. [1] [2]
  • Extended typing in src/aleph/sdk/types.py to include Union and Decimal for voucher attributes.

These changes collectively enhance the SDK's functionality for interacting with blockchain-based vouchers while improving type safety and configurability.

@github-actions github-actions bot added the BLACK This PR has critical implications and must be reviewed by a senior engineer. label May 20, 2025
@aleph-im aleph-im deleted a comment from github-actions bot Jun 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BLACK This PR has critical implications and must be reviewed by a senior engineer.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant