Streamlit component that allows you to connect to Pera Wallet.
Project description
pera_wallet
Streamlit component that allows you to Streamlit component that allows you to connect to Pera Wallet.
Installation instructions
pip install pera-wallet
Usage instructions
import streamlit as st
from pera_wallet import pera_wallet
if "account" not in st.session_state:
st.session_state.account = None
if "transaction_id" not in st.session_state:
st.session_state.transaction_id = None
NETWORK = "testnet"
st.title("My App")
def account():
with st.expander("Account", expanded=True):
# Add msgpack-encoded transactions to sign, if needed
transactions_to_sign = []
wallet = pera_wallet(
network=NETWORK,
transactions_to_sign=transactions_to_sign,
key="pera_wallet",
)
if wallet is not None:
st.session_state.account, st.session_state.transaction_id = wallet
st.caption(
f"Connected address: {st.session_state.account}"
if st.session_state.account
else "Connect your wallet to begin."
)
if st.session_state.transaction_id:
st.caption(
f"View your transaction on [lora](https://lora.algokit.io/{NETWORK}/transaction/{st.session_state.transaction_id}) the explorer 🥳"
)
account()
if not st.session_state.account:
st.stop()
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pera_wallet-0.0.7.tar.gz
(1.8 MB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pera_wallet-0.0.7.tar.gz.
File metadata
- Download URL: pera_wallet-0.0.7.tar.gz
- Upload date:
- Size: 1.8 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2a287b071e6c343c5e1859183622363ee2f2e592a1f7df44ff9686bfc0832c0b
|
|
| MD5 |
3f2b9e2d1a92cab28950bfa95ebdd42a
|
|
| BLAKE2b-256 |
717ec4d164343b3b36c513a24660e3eb2559be281c9302fab9c59ae0f1bb5d58
|
File details
Details for the file pera_wallet-0.0.7-py3-none-any.whl.
File metadata
- Download URL: pera_wallet-0.0.7-py3-none-any.whl
- Upload date:
- Size: 8.9 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f566e1d5979bbd0fee2d80bab3d525cde5951e9a942afe502c9bdac7d487eb76
|
|
| MD5 |
8947668c31340de3c7512a3ed963f544
|
|
| BLAKE2b-256 |
9bee8d59251e4af49889fb359ecb2bdb2b357c4e6a3be5313f6971799a39d135
|