From e52680f251a05b507f4cfd07d7d1f2dcdde6c050 Mon Sep 17 00:00:00 2001 From: 1yam Date: Tue, 12 Aug 2025 15:24:56 +0200 Subject: [PATCH] Feature: vouchers services on sdk side & vouchers cmds on cli --- .../sdks-and-tools/aleph-cli/commands/account.md | 5 +++++ docs/devhub/sdks-and-tools/python-sdk/index.md | 14 ++++++++++++++ 2 files changed, 19 insertions(+) diff --git a/docs/devhub/sdks-and-tools/aleph-cli/commands/account.md b/docs/devhub/sdks-and-tools/aleph-cli/commands/account.md index 66212a6..ba1efec 100644 --- a/docs/devhub/sdks-and-tools/aleph-cli/commands/account.md +++ b/docs/devhub/sdks-and-tools/aleph-cli/commands/account.md @@ -73,6 +73,11 @@ aleph account address aleph account balance ``` +## Checking Voucher +```` +aleph account vouchers +```` + ## Managing Multiple Keys The CLI supports multiple keys for different chains: diff --git a/docs/devhub/sdks-and-tools/python-sdk/index.md b/docs/devhub/sdks-and-tools/python-sdk/index.md index 1a05b6d..6e7078a 100644 --- a/docs/devhub/sdks-and-tools/python-sdk/index.md +++ b/docs/devhub/sdks-and-tools/python-sdk/index.md @@ -818,6 +818,20 @@ Remove all the ports for a VM item_hash=ItemHash("item_hash") ) ``` +### Voucher +Fetch Voucher by address +````python + evm_voucher: list[Voucher] = await client.voucher.get_evm_vouchers("0x...") + sol_voucher: list[Voucher] = await client.voucher.get_solana_vouchers("address") + + voucher: list[Voucher] = await client.voucher.get_vouchers(addres) # Will get voucher based on address if it evm or sol + + voucher: list[Voucher] = awaot client.voucher.fetch_vouchers_by_chain("address", Chain.ETH) + + for voucher in evem_voucher: + metadata = await client.voucher.fetch_voucher_metadata(voucher.metadata_id) + +```` # Resources - [GitHub Repository](https://github.com/aleph-im/aleph-sdk-python)