Streamlit component that allows you to connect to Pera Wallet.
Project description
pera_wallet
Streamlit component that allows you to do X
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("Chat")
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.1.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.1.tar.gz.
File metadata
- Download URL: pera_wallet-0.0.1.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 |
e0404f8819a29ff4c2119c13a039a072e373bd2eaa80302e0b07177552ccee31
|
|
| MD5 |
eda9527196269aad2fc6f148ca35c71f
|
|
| BLAKE2b-256 |
7b6790e7165676621339daf0ba002341e7aee5d7f59194e0bdb04731a6ad2ac3
|
File details
Details for the file pera_wallet-0.0.1-py3-none-any.whl.
File metadata
- Download URL: pera_wallet-0.0.1-py3-none-any.whl
- Upload date:
- Size: 1.8 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 |
05212cb13126dc8268ace0641b4c3acbb6b5f007e9138d2787950deb76c1818e
|
|
| MD5 |
abcec5308343be29930fe4b067f663a5
|
|
| BLAKE2b-256 |
58b9cd971f21c1d57a38b953ed96494dc0a286bc0101c5bc199262e21da5d73d
|