xchainpy2-thorchain 0.0.35
Generated-file or MITRE mapping markerReferences a versioned Node distribution name
SHA-2560fc9e502022e801e35f3406b84e958633682415f80a1d3beaf14c5f974914458
Evidence
1Metadata-Version: 2.4
2Name: xchainpy2_thorchain
3Version: 0.0.35
4Summary: XChainPy2 THORChain Client
5Author-email: Tirinox <[email protected]>
6License: MIT
⋯11 lines
18Classifier: Programming Language :: Python :: 3.10
19Classifier: Programming Language :: Python :: 3.11
20Requires-Python: >=3.7
21Description-Content-Type: text/markdown
22License-File: LICENSE
23Requires-Dist: xchainpy2_utils
24Requires-Dist: xchainpy2_crypto
25Requires-Dist: xchainpy2_client
26Requires-Dist: xchainpy2_cosmos
27Requires-Dist: cosmpy
28Provides-Extra: test
29Requires-Dist: pytest; extra == "test"
30Dynamic: license-file
31
⋯13 lines
1import asyncio
2from typing import Optional, Union, List
3
4from aiohttp import ClientSession
5from bip_utils import Bech32ChecksumError
6from cosmpy.aerial.tx import Transaction
7from cosmpy.aerial.tx_helpers import SubmittedTx
8
9from xchainpy2_client import RootDerivationPaths, FeeBounds
10from xchainpy2_client import XcTx, TxType, Fees, FeeType, TokenTransfer
11from xchainpy2_client.fees import single_fee
12from xchainpy2_cosmos import CosmosGaiaClient, TxLoadException, TxInternalException
13from xchainpy2_cosmos.utils import parse_tx_response_json
14from xchainpy2_crypto import decode_address
15from xchainpy2_thornode import ApiClient, NetworkApi, TradeAccountApi, TradeAccountResponse
16from xchainpy2_utils import Chain, NetworkType, AssetRUNE, RUNE_DECIMAL, CryptoAmount, Amount, remove_0x_prefix, \
17 Asset, AssetKind
18from .const import NodeURL, DEFAULT_CHAIN_IDS, DEFAULT_CLIENT_URLS, DENOM_RUNE_NATIVE, ROOT_DERIVATION_PATHS, \
19 THOR_EXPLORERS, DEFAULT_GAS_LIMIT_VALUE, DEPOSIT_GAS_LIMIT_VALUE, FALLBACK_CLIENT_URLS, DEFAULT_RUNE_FEE, \
20 make_client_urls_from_ip_address
21from .utils import get_thor_address_prefix, build_deposit_tx_unsigned, build_transfer_tx_draft
22
23
24class THORChainClient(CosmosGaiaClient):
25 @classmethod
26 def from_node_ip(cls, ip: str):
27 """
28 Initialize THORChainClient from node IP address.
29
30 :param ip: IP address of the node
31 :return: THORChainClient
32 """
33 return cls(client_urls=make_client_urls_from_ip_address(ip))
34
35 def …
37 phrase: Optional[str] = None,
38 private_key: Union[str, bytes, callable, None] = None,
39 fee_bound: Optional[FeeBounds] = None,
40 root_derivat …
50:63… MAINNET`
51 :param phrase: Mnemonic phrase
52 :param private_key: Private key (if you want to use a private key instead of a mnemonic phrase)
53 :param fee_bound: Fee bound structure. See: FeeBounds
54 :param root_derivation_paths: Dictionary of derivation paths for each network type. See: ROOT_DERIVATION_PATHS
55 :param client_urls: Dictionary of client …
210
211 tx.complete()
212
213 result = await asyncio.get_event_loop().run_in_executor(
214 None,
215 self._client.broadcast_tx,
216 tx
217 )
⋯4 lines
Showing the top 5 files — 7 more files (27 regions) not shown.
No evidence locations were recorded for this file. Raw result