Skip to main content

agton-dedust

from os import getenv

from agton.ton import ToncenterClient, Address, to_nano
from agton.wallet import WalletV3R2
from agton.dedust import Factory, NativeVault
import agton.dedust.types.asset as Asset


mnemonic = getenv('WALLET_MNEMONIC')
assert mnemonic is not None

provider = ToncenterClient(net='mainnet')
my_wallet = WalletV3R2.from_mnemonic(provider, mnemonic)

usdt = Asset.Jetton(Address.parse('EQCxE6mUtQJKFnGfaROTKOt1lZbDiiX1kCixRv7Nw2Id_sDs'))
ton = Asset.Native()

factory = Factory.from_mainnet(provider)

ton_usdt_pool = factory.get_pool(ton, usdt)
ton_vault = factory.get_vault(ton)

assert isinstance(ton_vault, NativeVault)

swap_message = ton_vault.create_swap_message(
    value=to_nano(0.5),
    query_id=0,
    amount=to_nano(0.05),
    swap_step=ton_usdt_pool.pack_swap_step(limit=0),
    recepient_addr=my_wallet.address
)

# my_wallet.send(swap_message)

Metadata

Release files for agton-dedust 0.2.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for agton-dedust 0.2.5
File Size Uploaded Provenance
agton_dedust-0.2.5.tar.gz 8.9 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for agton-dedust 0.2.5
File Interpreter ABI Platform
agton_dedust-0.2.5-py3-none-any.whl Python 3 none any Details

Total release size: 24.7 kB

Release files / agton_dedust-0.2.5.tar.gz

Download URL agton_dedust-0.2.5.tar.gz
Size 8.9 kB
Tags Source
SHA-256 checksum
How to use checksums
97f3e0c007a5a555956f39d0e0596f6fe92ea7e2d2d6606d3e3eccde6ce1d25e
BLAKE2b-256 checksum
How to use checksums
0feca918e3d40d6c2f79c8a4ba7106c1dce3ae9c367f8e0baddabc6cf900ec8f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.2

Release files / agton_dedust-0.2.5-py3-none-any.whl

Download URL agton_dedust-0.2.5-py3-none-any.whl
Size 15.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
90262945fd23f65be096c0055242a50659b62e7b76435f22e75bc1d4ed9c1e13
BLAKE2b-256 checksum
How to use checksums
ecb3ef014968b6daa29ad9d27692511c224e67d0374bf78b0a0aa89fa36bafc5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.2

Security for agton-dedust 0.2.5

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page