Goat SDK MultiversX wallet implementation
Project description
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
poetry add goat-sdk-wallet-multiversx
Usage
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:
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
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.
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
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 goat_sdk_wallet_multiversx-0.1.0.tar.gz.
File metadata
- Download URL: goat_sdk_wallet_multiversx-0.1.0.tar.gz
- Upload date:
- Size: 5.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.7.1 CPython/3.10.16 Linux/6.8.0-1021-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
29fc2df0fc7ecd1b1a27180217778a12ddfbd097cb26f6e916310c1338fd3644
|
|
| MD5 |
0335c5b6e9686b2457461b74d21f96ca
|
|
| BLAKE2b-256 |
9a74bf4c11909b2253197bb0152f9430bfe041c0c26122ccbd5bf3f46a72d315
|
File details
Details for the file goat_sdk_wallet_multiversx-0.1.0-py3-none-any.whl.
File metadata
- Download URL: goat_sdk_wallet_multiversx-0.1.0-py3-none-any.whl
- Upload date:
- Size: 6.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.7.1 CPython/3.10.16 Linux/6.8.0-1021-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
62b9aabb45addacc3fc1c4d78695148bb46c1d60db29f28565358d1f62e78a37
|
|
| MD5 |
7c702ec08ed478bd50601bdd75a04200
|
|
| BLAKE2b-256 |
6129eb72c6e37474bb0d864087e5361e1782c4b9eb3f88c9ca968bf27061a635
|