Skip to content

Commit bf29390

Browse files
authored
Merge pull request #31 from aleph-im/1yam-voucher-docs
Feature: vouchers services on sdk side & vouchers cmds on cli
2 parents 4524574 + e52680f commit bf29390

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

docs/devhub/sdks-and-tools/aleph-cli/commands/account.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,11 @@ aleph account address
7373
aleph account balance
7474
```
7575

76+
## Checking Voucher
77+
````
78+
aleph account vouchers
79+
````
80+
7681
## Managing Multiple Keys
7782

7883
The CLI supports multiple keys for different chains:

docs/devhub/sdks-and-tools/python-sdk/index.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -818,6 +818,20 @@ Remove all the ports for a VM
818818
item_hash=ItemHash("item_hash")
819819
)
820820
```
821+
### Voucher
822+
Fetch Voucher by address
823+
````python
824+
evm_voucher: list[Voucher] = await client.voucher.get_evm_vouchers("0x...")
825+
sol_voucher: list[Voucher] = await client.voucher.get_solana_vouchers("address")
826+
827+
voucher: list[Voucher] = await client.voucher.get_vouchers(addres) # Will get voucher based on address if it evm or sol
828+
829+
voucher: list[Voucher] = awaot client.voucher.fetch_vouchers_by_chain("address", Chain.ETH)
830+
831+
for voucher in evem_voucher:
832+
metadata = await client.voucher.fetch_voucher_metadata(voucher.metadata_id)
833+
834+
````
821835
# Resources
822836

823837
- [GitHub Repository](https://github.com/aleph-im/aleph-sdk-python)

0 commit comments

Comments
 (0)