semvec/pypi-packages huggingface dataset:
goat-sdk-wallet-multiversx 0.1.0
Goat SDK MultiversX wallet implementation
Requires Python: <4.0,>=3.10
Keywords: goat, sdk, multiversx, agents, ai, wallet

# MultiversX Wallet for GOAT SDK

A Python implementation of a MultiversX wallet for the GOAT SDK, providing secure key management and transaction signing capabilities.

## Installation

```bash
poetry add goat-sdk-wallet-multiversx
```

## Usage

```python
from goat_wallets.multiversx import multiversx_wallet

# Initialize wallet with seed phrase
wallet = multiversx_wallet(
    seed="${MULTIVERSX_WALLET_SEED}",  # Your MultiversX seed phrase
    network="${MULTIVERSX_NETWORK}", # The MultiversX network - "mainnet", "testnet" or "devnet"
)

# Get wallet address
address = wallet.get_address()

# Get EGLD balance
balance = await wallet.get_balance(
    address="the specified wallet address"
)

# Sign message
signature = await wallet.sign_message(
    message="your_message"
)

# Sign and send transaction
transaction_hash = await wallet.send_transaction(
    native_amount="the amount of EGLD to send with the transaction"
    receiver="the receiver of the transaction"
)

# Get transaction status
status = await wallet.get_transaction_status(
    tx_hash="the transaction hash"
)
```

## Use the Embedded SendEGLD Plugin

You can integrate the embedded `SendEGLD` plugin to your agent to enable EGLD transfers like so:

```python
from goat_wallets.multiversx import send_egld

# Initialize tools with MultiversX wallet
tools = get_on_chain_tools(
    wallet=wallet,
    plugins=[
        send_egld(),
    ],
)
```

## Full MultiversX Wallet/Plugin Working Example

A full working example demonstrating all the capabilities of the MultiversX wallet and plugin using GOAT SDK can be found in the gist below

[GitHub Gist: MultiversX Example](https://gist.github.com/ofemeteng/b848e953bbcd6630ad325f81c7cb5fc6)

## Tools Available

- **get_address**: Retrieves the address of the wallet.
- **get_chain**: Gets the chain of the wallet.
- **get_balance**: Gets the balance of the wallet for a specified address.
- **sign_message**: Signs a message with the current account.
- **get_transaction_status**: Checks the status of a transaction using its hash.
- **get_fungible_tokens_balance**: Retrieves the fungible tokens (ESDT) balance of an address.
- **get_non_fungible_tokens_balance**: Retrieves the non-fungible tokens (NFTs) balance of an address.
- **deploy_token**: Deploys an ESDT token with specified parameters (name, ticker, initial supply, and decimals).
- **send_EGLD**: Sends EGLD to a specified address.

## Features

- Secure Key Management:
  - Seed phrase support
  - Address derivation

- Transaction Operations:
  - Transaction signing
  - Transaction sending
  - Status tracking
  - Signature verification

- Balance Management:
  - EGLD balance queries
  - Token account balance

- Network Support:
  - Mainnet
  - Testnet
  - Devnet

## License

This project is licensed under the terms of the MIT license.
pybberlink 0.1.1
A package to encode and decode text using the Gibberlink protocol.
Requires Python: >=3.6

# Pybberlink

Pybberlink is a Python package that implements the Gibberlink protocol for encoding and decoding text messages into audio signals. It provides a robust way to transmit text data through sound waves using frequency-based encoding with Reed-Solomon error correction.

## Features

- Text to audio signal encoding
- Audio signal to text decoding
- Support for both audible and ultrasonic frequency modes
- Reed-Solomon error correction for reliable data transmission
- Configurable protocol parameters
- Parallel tone channels for efficient data transmission

## Installation

You can install Pybberlink using pip:

```bash
pip install pybberlink
```

Or install from source:

```bash
git clone https://github.com/syv-ai/pybberlink.git
cd pybberlink
pip install -e .
```

## Requirements

- Python 3.6 or higher
- NumPy
- reedsolo

## Usage

### Basic Example

```python
from pybberlink import encode_text_to_signal, decode_signal_to_text

# Encode text to audio signal
text = "Hello, Gibberlink!"
signal, pad_len, rs_encoded_length = encode_text_to_signal(text)

# Decode audio signal back to text
decoded_text = decode_signal_to_text(signal, pad_bytes=pad_len, rs_encoded_length=rs_encoded_length)
print(decoded_text)  # Output: Hello, Gibberlink!
```

### Advanced Usage

#### Ultrasonic Mode

```python
# Encode in ultrasonic mode
signal, pad_len, rs_encoded_length = encode_text_to_signal(
    text,
    ultrasonic=True
)
```

#### Custom Parameters

```python
# Customize encoding parameters
signal, pad_len, rs_encoded_length = encode_text_to_signal(
    text,
    sample_rate=44100,      # Custom sample rate
    symbol_duration=2048,    # Longer symbol duration
    rs_ecc_bytes=8          # More error correction bytes
)
```

## Technical Details

### Protocol Parameters

- Normal mode base frequency: 1875 Hz
- Ultrasonic mode base frequency: 15000 Hz
- Frequency step: 46.875 Hz
- Tones per nibble: 16 (4-bit encoding)
- Parallel tone channels: 6 (24 bits per symbol)
- Default sample rate: 48000 Hz
- Default symbol duration: 1024 samples
- Default Reed-Solomon ECC bytes: 4

### Encoding Process

1. Text is converted to UTF-8 bytes
2. Reed-Solomon error correction is applied
3. Data is padded to ensure complete symbols
4. Bytes are split into 4-bit nibbles
5. Nibbles are encoded using frequency-shift keying (FSK)
6. Multiple tones are combined into a single audio signal

### Decoding Process

1. Signal is split into symbols
2. Hann window is applied to reduce spectral leakage
3. FFT is computed for each symbol
4. Frequency peaks are detected to recover nibbles
5. Nibbles are combined into bytes
6. Reed-Solomon error correction is applied
7. Bytes are decoded back to UTF-8 text

## Testing

The package includes unit tests to verify encoding and decoding functionality. Run tests using:

```bash
python -m unittest tests/test_encode_decode.py
```

## Acknowledgments

This project implements the Gibberlink protocol for audio-based data transmission.