rango-basic-sdk 0.0.7__tar.gz → 0.0.9__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.4
1
+ Metadata-Version: 2.5
2
2
  Name: rango-basic-sdk
3
- Version: 0.0.7
3
+ Version: 0.0.9
4
4
  Summary: Python bindings for Rango Exchange Basic API
5
5
  Project-URL: Home, https://github.com/rango-exchange/rango-python-basic
6
6
  Project-URL: Contact, https://t.me/rangoexchange
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "rango-basic-sdk"
7
- version = "0.0.7"
7
+ version = "0.0.9"
8
8
  description = "Python bindings for Rango Exchange Basic API"
9
9
  readme = "README.md"
10
10
  license-files = ["LICENSE"]
@@ -1,6 +1,6 @@
1
1
  """Python SDK for Rango Exchange Basic API."""
2
2
 
3
- __version__ = "0.0.7"
3
+ __version__ = "0.0.9"
4
4
 
5
5
  from .client import AsyncClient, Client
6
6
  from .models import *
@@ -515,6 +515,7 @@ class RoutingOperations:
515
515
  referrer_fee: Optional[float] = None,
516
516
  avoid_native_fee: Optional[bool] = None,
517
517
  enable_centralized_swappers: Optional[bool] = None,
518
+ deposit_transaction: Optional[bool] = None,
518
519
  header_x_rango_id: Optional[str] = None,
519
520
  ) -> Optional[models.BasicApiQuoteResponse]:
520
521
  """
@@ -579,6 +580,13 @@ class RoutingOperations:
579
580
  false (exclude) Wire name
580
581
  ``enableCentralizedSwappers``
581
582
  (query).
583
+ deposit_transaction (Optional[bool]): The transaction execution type the
584
+ client supports. Sending DEPOSIT
585
+ limits routing to routes that are
586
+ executable with a single plain
587
+ transfer to a deposit address. Default
588
+ is REGULAR Wire name
589
+ ``depositTransaction`` (query).
582
590
  header_x_rango_id (Optional[str]): A unique client generated Id, better use
583
591
  UUID Wire name ``X-Rango-Id`` (header).
584
592
 
@@ -625,6 +633,8 @@ class RoutingOperations:
625
633
  params["avoidNativeFee"] = avoid_native_fee
626
634
  if enable_centralized_swappers is not None:
627
635
  params["enableCentralizedSwappers"] = enable_centralized_swappers
636
+ if deposit_transaction is not None:
637
+ params["depositTransaction"] = deposit_transaction
628
638
  req_headers: Dict[str, str] = {}
629
639
  if header_x_rango_id is not None:
630
640
  req_headers["X-Rango-Id"] = str(header_x_rango_id)
@@ -746,7 +756,7 @@ class TransactionOperations:
746
756
  """
747
757
  Check TX Status
748
758
 
749
- Check if the user swapp has succeeded or not. When a user signs the swap
759
+ Check if the user swap has succeeded or not. When a user signs the swap
750
760
  transaction on his/her wallet, you should call this endpoint periodically to see
751
761
  the swap status.
752
762
 
@@ -808,6 +818,7 @@ class TransactionOperations:
808
818
  avoid_native_fee: Optional[bool] = None,
809
819
  enable_centralized_swappers: Optional[bool] = None,
810
820
  use_max_native_token_balance: Optional[bool] = None,
821
+ deposit_transaction: Optional[bool] = None,
811
822
  header_x_rango_id: Optional[str] = None,
812
823
  ) -> Optional[models.BasicApiSwapResponse]:
813
824
  """
@@ -896,6 +907,13 @@ class TransactionOperations:
896
907
  insufficient. Wire name
897
908
  ``useMaxNativeTokenBalance``
898
909
  (query).
910
+ deposit_transaction (Optional[bool]): The transaction execution type the
911
+ client supports. Sending DEPOSIT
912
+ limits routing to routes that are
913
+ executable with a single plain
914
+ transfer to a deposit address. Default
915
+ is REGULAR Wire name
916
+ ``depositTransaction`` (query).
899
917
  header_x_rango_id (Optional[str]): A unique client generated Id, better use
900
918
  UUID Wire name ``X-Rango-Id`` (header).
901
919
 
@@ -951,6 +969,8 @@ class TransactionOperations:
951
969
  params["enableCentralizedSwappers"] = enable_centralized_swappers
952
970
  if use_max_native_token_balance is not None:
953
971
  params["useMaxNativeTokenBalance"] = use_max_native_token_balance
972
+ if deposit_transaction is not None:
973
+ params["depositTransaction"] = deposit_transaction
954
974
  req_headers: Dict[str, str] = {}
955
975
  if header_x_rango_id is not None:
956
976
  req_headers["X-Rango-Id"] = str(header_x_rango_id)
@@ -1470,6 +1490,7 @@ class AsyncRoutingOperations:
1470
1490
  referrer_fee: Optional[float] = None,
1471
1491
  avoid_native_fee: Optional[bool] = None,
1472
1492
  enable_centralized_swappers: Optional[bool] = None,
1493
+ deposit_transaction: Optional[bool] = None,
1473
1494
  header_x_rango_id: Optional[str] = None,
1474
1495
  ) -> Optional[models.BasicApiQuoteResponse]:
1475
1496
  """
@@ -1534,6 +1555,13 @@ class AsyncRoutingOperations:
1534
1555
  false (exclude) Wire name
1535
1556
  ``enableCentralizedSwappers``
1536
1557
  (query).
1558
+ deposit_transaction (Optional[bool]): The transaction execution type the
1559
+ client supports. Sending DEPOSIT
1560
+ limits routing to routes that are
1561
+ executable with a single plain
1562
+ transfer to a deposit address. Default
1563
+ is REGULAR Wire name
1564
+ ``depositTransaction`` (query).
1537
1565
  header_x_rango_id (Optional[str]): A unique client generated Id, better use
1538
1566
  UUID Wire name ``X-Rango-Id`` (header).
1539
1567
 
@@ -1580,6 +1608,8 @@ class AsyncRoutingOperations:
1580
1608
  params["avoidNativeFee"] = avoid_native_fee
1581
1609
  if enable_centralized_swappers is not None:
1582
1610
  params["enableCentralizedSwappers"] = enable_centralized_swappers
1611
+ if deposit_transaction is not None:
1612
+ params["depositTransaction"] = deposit_transaction
1583
1613
  req_headers: Dict[str, str] = {}
1584
1614
  if header_x_rango_id is not None:
1585
1615
  req_headers["X-Rango-Id"] = str(header_x_rango_id)
@@ -1701,7 +1731,7 @@ class AsyncTransactionOperations:
1701
1731
  """
1702
1732
  Check TX Status
1703
1733
 
1704
- Check if the user swapp has succeeded or not. When a user signs the swap
1734
+ Check if the user swap has succeeded or not. When a user signs the swap
1705
1735
  transaction on his/her wallet, you should call this endpoint periodically to see
1706
1736
  the swap status.
1707
1737
 
@@ -1763,6 +1793,7 @@ class AsyncTransactionOperations:
1763
1793
  avoid_native_fee: Optional[bool] = None,
1764
1794
  enable_centralized_swappers: Optional[bool] = None,
1765
1795
  use_max_native_token_balance: Optional[bool] = None,
1796
+ deposit_transaction: Optional[bool] = None,
1766
1797
  header_x_rango_id: Optional[str] = None,
1767
1798
  ) -> Optional[models.BasicApiSwapResponse]:
1768
1799
  """
@@ -1851,6 +1882,13 @@ class AsyncTransactionOperations:
1851
1882
  insufficient. Wire name
1852
1883
  ``useMaxNativeTokenBalance``
1853
1884
  (query).
1885
+ deposit_transaction (Optional[bool]): The transaction execution type the
1886
+ client supports. Sending DEPOSIT
1887
+ limits routing to routes that are
1888
+ executable with a single plain
1889
+ transfer to a deposit address. Default
1890
+ is REGULAR Wire name
1891
+ ``depositTransaction`` (query).
1854
1892
  header_x_rango_id (Optional[str]): A unique client generated Id, better use
1855
1893
  UUID Wire name ``X-Rango-Id`` (header).
1856
1894
 
@@ -1906,6 +1944,8 @@ class AsyncTransactionOperations:
1906
1944
  params["enableCentralizedSwappers"] = enable_centralized_swappers
1907
1945
  if use_max_native_token_balance is not None:
1908
1946
  params["useMaxNativeTokenBalance"] = use_max_native_token_balance
1947
+ if deposit_transaction is not None:
1948
+ params["depositTransaction"] = deposit_transaction
1909
1949
  req_headers: Dict[str, str] = {}
1910
1950
  if header_x_rango_id is not None:
1911
1951
  req_headers["X-Rango-Id"] = str(header_x_rango_id)
@@ -0,0 +1,14 @@
1
+ from rango_basic_sdk.models import BasicApiEvmTransaction
2
+
3
+ from web3 import Web3
4
+ from web3.types import TxParams
5
+
6
+
7
+ def evm_transaction_to_tx_params(evm_transaction: BasicApiEvmTransaction) -> TxParams:
8
+ return {
9
+ 'chainId': evm_transaction.block_chain.chain_id,
10
+ 'data': evm_transaction.tx_data,
11
+ 'from': evm_transaction.from_,
12
+ 'to': evm_transaction.tx_to,
13
+ 'value': evm_transaction.value,
14
+ }
@@ -175,6 +175,8 @@ class Blockchain(_WireStrEnum):
175
175
  SEPOLIA_ARBITRUM = "SEPOLIA_ARBITRUM"
176
176
  SEPOLIA_OPTIMISM = "SEPOLIA_OPTIMISM"
177
177
  HYPERLIQUID = "HYPERLIQUID"
178
+ ROBINHOOD = "ROBINHOOD"
179
+ ARC = "ARC"
178
180
 
179
181
 
180
182
  class CheckApprovalResponseTxStatus(_WireStrEnum):
@@ -199,6 +201,7 @@ class GenericTransactionPrerequisiteType(_WireStrEnum):
199
201
  """Transaction Prerequisite type. e.g. StellarTrustLine"""
200
202
 
201
203
  EVM_APPROVE = "EVM_APPROVE"
204
+ TRON_APPROVE = "TRON_APPROVE"
202
205
  STELLAR_CHANGE_TRUSTLINE = "STELLAR_CHANGE_TRUSTLINE"
203
206
  XRPL_CHANGE_TRUSTLINE = "XRPL_CHANGE_TRUSTLINE"
204
207
 
@@ -219,6 +222,7 @@ class GenericTransactionType(_WireStrEnum):
219
222
  STELLAR = "STELLAR"
220
223
  XRPL = "XRPL"
221
224
  HYPERLIQUID = "HYPERLIQUID"
225
+ DEPOSIT = "DEPOSIT"
222
226
 
223
227
 
224
228
  class ParamMessagingProtocolsItem(_WireStrEnum):
@@ -264,6 +268,7 @@ class AbstractBlockchainMetaInfo(BaseClientModel):
264
268
  address_url: str = Field(alias="addressUrl")
265
269
  block_explorer_urls: List[str] = Field(alias="blockExplorerUrls")
266
270
  info_type: str = Field(alias="infoType")
271
+ token_url: Optional[str] = Field(default=None, alias="tokenUrl")
267
272
  transaction_url: str = Field(alias="transactionUrl")
268
273
 
269
274
 
@@ -444,7 +449,7 @@ class CheckApprovalResponse(BaseClientModel):
444
449
  default=None,
445
450
  alias="currentApprovedAmount",
446
451
  description="current approved amount",
447
- examples=[Decimal("8.0")],
452
+ examples=[Decimal("8")],
448
453
  )
449
454
  is_approved: bool = Field(
450
455
  alias="isApproved",
@@ -455,7 +460,7 @@ class CheckApprovalResponse(BaseClientModel):
455
460
  default=None,
456
461
  alias="requiredApprovedAmount",
457
462
  description="required approve amount",
458
- examples=[Decimal("10.0")],
463
+ examples=[Decimal("10")],
459
464
  )
460
465
  tx_status: Optional[CheckApprovalResponseTxStatus] = Field(
461
466
  default=None,
@@ -636,7 +641,7 @@ class StellarTransactionPreconditionsTimeBounds(BaseClientModel):
636
641
 
637
642
  max_time: int = Field(
638
643
  alias="maxTime",
639
- description="Unix timestamped constraint for minimum time of transaction validity",
644
+ description="Unix timestamped constraint for maximum time of transaction validity",
640
645
  )
641
646
  min_time: int = Field(
642
647
  alias="minTime",
@@ -714,6 +719,10 @@ class TronTransaction(BaseClientModel):
714
719
  type_: str = Field(alias="type")
715
720
 
716
721
 
722
+ class TrxContractWrapperParameterValue(BaseClientModel):
723
+ type_: str = Field(alias="type")
724
+
725
+
717
726
  class AssetBalance(BaseClientModel):
718
727
  """Balance of Asset in specified wallet"""
719
728
 
@@ -1055,20 +1064,30 @@ class TonMetaInfo(AbstractBlockchainMetaInfo):
1055
1064
  pass
1056
1065
 
1057
1066
 
1067
+ class TransferContract(TrxContractWrapperParameterValue):
1068
+ amount: Optional[int] = Field(default=None, alias="amount")
1069
+ owner_address: str = Field(alias="owner_address")
1070
+ to_address: str = Field(alias="to_address")
1071
+
1072
+
1058
1073
  class TransferMetaInfo(AbstractBlockchainMetaInfo):
1059
1074
  pass
1060
1075
 
1061
1076
 
1062
- class TrxRawData(BaseClientModel):
1063
- """Raw data of TrxTransaction"""
1077
+ class TriggerSmartContract(TrxContractWrapperParameterValue):
1078
+ call_value: Optional[int] = Field(default=None, alias="call_value")
1079
+ contract_address: str = Field(alias="contract_address")
1080
+ data: str = Field(alias="data")
1081
+ owner_address: str = Field(alias="owner_address")
1064
1082
 
1065
- contract: List[Any] = Field(alias="contract")
1066
- data: Optional[str] = Field(default=None, alias="data")
1067
- expiration: int = Field(alias="expiration")
1068
- fee_limit: Optional[int] = Field(default=None, alias="fee_limit")
1069
- ref_block_bytes: str = Field(alias="ref_block_bytes")
1070
- ref_block_hash: str = Field(alias="ref_block_hash")
1071
- timestamp: int = Field(alias="timestamp")
1083
+
1084
+ class TrxContractWrapperParameter(BaseClientModel):
1085
+ """Wrapper parameter of contract of Trx transaction's raw data"""
1086
+
1087
+ type_url: Optional[str] = Field(default=None, alias="type_url")
1088
+ value: Optional[TrxContractWrapperParameterValue] = Field(
1089
+ default=None, alias="value"
1090
+ )
1072
1091
 
1073
1092
 
1074
1093
  class XRPLMetaInfo(AbstractBlockchainMetaInfo):
@@ -1084,10 +1103,10 @@ class XrplChangeTrustLinePrerequisite(GenericTransactionPrerequisite):
1084
1103
  description="Xrpl Asset Issuer",
1085
1104
  examples=["rMxCKbEDwqr76QuheSUMdEGf4B9xJ8m5De"],
1086
1105
  )
1087
- value: str = Field(
1106
+ value: Decimal = Field(
1088
1107
  alias="value",
1089
1108
  description="Minimum expected limit value of trust",
1090
- examples=["1000000000"],
1109
+ examples=[Decimal("1000000000")],
1091
1110
  )
1092
1111
  wallet: str = Field(
1093
1112
  alias="wallet", description="User's wallet address", examples=["r....."]
@@ -1245,6 +1264,14 @@ class StellarTransactionData(BaseClientModel):
1245
1264
  )
1246
1265
 
1247
1266
 
1267
+ class TrxContractWrapper(BaseClientModel):
1268
+ parameter: TrxContractWrapperParameter = Field(
1269
+ alias="parameter",
1270
+ description="Wrapper parameter of contract of Trx transaction's raw data",
1271
+ )
1272
+ type_: str = Field(alias="type")
1273
+
1274
+
1248
1275
  class WalletDetails(BaseClientModel):
1249
1276
  """A wallet's details"""
1250
1277
 
@@ -1332,14 +1359,6 @@ class BasicApiEvmTransaction(GenericTransaction):
1332
1359
  validator
1333
1360
  """),
1334
1361
  )
1335
- priority_gas_price: Optional[int] = Field(
1336
- default=None,
1337
- alias="priorityGasPrice",
1338
- description=("""
1339
- The maximum price of the consumed gas to be included as a tip to the
1340
- validator
1341
- """),
1342
- )
1343
1362
  tx_data: Optional[str] = Field(
1344
1363
  default=None,
1345
1364
  alias="txData",
@@ -1456,54 +1475,6 @@ class BasicApiStarkNetTransaction(GenericTransaction):
1456
1475
  )
1457
1476
 
1458
1477
 
1459
- class BasicApiTrxTransaction(GenericTransaction):
1460
- payload: Optional[Any] = Field(
1461
- default=None,
1462
- alias="__payload__",
1463
- description="the payload data for transaction",
1464
- )
1465
- approve_tx_id: Optional[str] = Field(
1466
- default=None,
1467
- alias="approveTxID",
1468
- description="the txID data for approve transaction",
1469
- )
1470
- approve_visible: Optional[bool] = Field(
1471
- default=None,
1472
- alias="approveVisible",
1473
- description="the visible data for approve transaction",
1474
- )
1475
- approve_payload: Optional[Any] = Field(
1476
- default=None,
1477
- alias="approve_payload",
1478
- description="the payload data for approve transaction",
1479
- )
1480
- approve_raw_data: Optional[TrxRawData] = Field(
1481
- default=None, alias="approve_raw_data", description="Raw data of TrxTransaction"
1482
- )
1483
- approve_raw_data_hex: Optional[str] = Field(
1484
- default=None,
1485
- alias="approve_raw_data_hex",
1486
- description="The hex data for approve transaction",
1487
- )
1488
- block_chain: BasicApiBlockchainMetaSummary = Field(
1489
- alias="blockChain", description="Blockchain metadata"
1490
- )
1491
- raw_data: Optional[TrxRawData] = Field(
1492
- default=None, alias="raw_data", description="Raw data of TrxTransaction"
1493
- )
1494
- raw_data_hex: Optional[str] = Field(
1495
- default=None,
1496
- alias="raw_data_hex",
1497
- description="The hex data for smart contract call",
1498
- )
1499
- tx_id: str = Field(
1500
- alias="txID", description="the txID data for smart contract call"
1501
- )
1502
- visible: bool = Field(
1503
- alias="visible", description="the visible data for smart contract call"
1504
- )
1505
-
1506
-
1507
1478
  class CosmosTransaction(GenericTransaction):
1508
1479
  block_chain: Blockchain = Field(
1509
1480
  alias="blockChain",
@@ -1537,6 +1508,38 @@ class CosmosTransaction(GenericTransaction):
1537
1508
  )
1538
1509
 
1539
1510
 
1511
+ class DepositTransaction(GenericTransaction):
1512
+ amount: int = Field(
1513
+ alias="amount",
1514
+ description="The machine-readable amount to deposit",
1515
+ examples=[1000000000000000000],
1516
+ )
1517
+ block_chain: Blockchain = Field(
1518
+ alias="blockChain",
1519
+ description="The blockchain that this deposit must be executed on",
1520
+ )
1521
+ deposit_address: str = Field(
1522
+ alias="depositAddress",
1523
+ description="The deposit address that the funds must be transferred to",
1524
+ )
1525
+ from_: str = Field(
1526
+ alias="from", description="User's wallet address that must send the deposit"
1527
+ )
1528
+ memo: Optional[str] = Field(
1529
+ default=None,
1530
+ alias="memo",
1531
+ description="The memo that must be attached to the deposit if non-null",
1532
+ )
1533
+ token_address: Optional[str] = Field(
1534
+ default=None,
1535
+ alias="tokenAddress",
1536
+ description=("""
1537
+ Contract address of the asset to deposit, null means the blockchain's
1538
+ native asset
1539
+ """),
1540
+ )
1541
+
1542
+
1540
1543
  class HyperliquidTransaction(GenericTransaction):
1541
1544
  action: HyperliquidTransactionActionMessage = Field(
1542
1545
  alias="action", description="hyperliquid action to send"
@@ -1570,7 +1573,7 @@ class SolanaTransaction(GenericTransaction):
1570
1573
  alias="recentBlockhash",
1571
1574
  description="Recent blockHash. fills only if message is already partially signed",
1572
1575
  )
1573
- serialized_message: Optional[str] = Field(default=None, alias="serializedMessage")
1576
+ serialized_message: Optional[List[int]] = Field(default=None, alias="serializedMessage")
1574
1577
  signatures: List[SolanaSignature] = Field(
1575
1578
  alias="signatures",
1576
1579
  description="List of signatures. fills only if message is already partially signed",
@@ -1680,6 +1683,18 @@ class TransferTransaction(GenericTransaction):
1680
1683
  )
1681
1684
 
1682
1685
 
1686
+ class TrxRawData(BaseClientModel):
1687
+ """Raw data of TrxTransaction"""
1688
+
1689
+ contract: List[TrxContractWrapper] = Field(alias="contract")
1690
+ data: Optional[str] = Field(default=None, alias="data")
1691
+ expiration: int = Field(alias="expiration")
1692
+ fee_limit: Optional[int] = Field(default=None, alias="fee_limit")
1693
+ ref_block_bytes: str = Field(alias="ref_block_bytes")
1694
+ ref_block_hash: str = Field(alias="ref_block_hash")
1695
+ timestamp: int = Field(alias="timestamp")
1696
+
1697
+
1683
1698
  class WalletDetailsResponse(BaseClientModel):
1684
1699
  """A list of wallets details"""
1685
1700
 
@@ -1732,6 +1747,54 @@ class BasicApiQuoteResponse(BaseClientModel):
1732
1747
  )
1733
1748
 
1734
1749
 
1750
+ class BasicApiTrxTransaction(GenericTransaction):
1751
+ payload: Optional[Any] = Field(
1752
+ default=None,
1753
+ alias="__payload__",
1754
+ description="the payload data for transaction",
1755
+ )
1756
+ approve_tx_id: Optional[str] = Field(
1757
+ default=None,
1758
+ alias="approveTxID",
1759
+ description="the txID data for approve transaction",
1760
+ )
1761
+ approve_visible: Optional[bool] = Field(
1762
+ default=None,
1763
+ alias="approveVisible",
1764
+ description="the visible data for approve transaction",
1765
+ )
1766
+ approve_payload: Optional[Any] = Field(
1767
+ default=None,
1768
+ alias="approve_payload",
1769
+ description="the payload data for approve transaction",
1770
+ )
1771
+ approve_raw_data: Optional[TrxRawData] = Field(
1772
+ default=None, alias="approve_raw_data", description="Raw data of TrxTransaction"
1773
+ )
1774
+ approve_raw_data_hex: Optional[str] = Field(
1775
+ default=None,
1776
+ alias="approve_raw_data_hex",
1777
+ description="The hex data for approve transaction",
1778
+ )
1779
+ block_chain: BasicApiBlockchainMetaSummary = Field(
1780
+ alias="blockChain", description="Blockchain metadata"
1781
+ )
1782
+ raw_data: Optional[TrxRawData] = Field(
1783
+ default=None, alias="raw_data", description="Raw data of TrxTransaction"
1784
+ )
1785
+ raw_data_hex: Optional[str] = Field(
1786
+ default=None,
1787
+ alias="raw_data_hex",
1788
+ description="The hex data for smart contract call",
1789
+ )
1790
+ tx_id: str = Field(
1791
+ alias="txID", description="the txID data for smart contract call"
1792
+ )
1793
+ visible: bool = Field(
1794
+ alias="visible", description="the visible data for smart contract call"
1795
+ )
1796
+
1797
+
1735
1798
  class BasicApiSwapResponse(BaseClientModel):
1736
1799
  """Swap response"""
1737
1800
 
@@ -1749,6 +1812,7 @@ class BasicApiSwapResponse(BaseClientModel):
1749
1812
  BasicApiStarkNetTransaction,
1750
1813
  BasicApiTrxTransaction,
1751
1814
  CosmosTransaction,
1815
+ DepositTransaction,
1752
1816
  HyperliquidTransaction,
1753
1817
  SolanaTransaction,
1754
1818
  StellarTransaction,
@@ -7,20 +7,21 @@ from rango_basic_sdk.models import Blockchain, XrplChangeTrustLinePrerequisite
7
7
  if __name__ == '__main__':
8
8
  async def _main():
9
9
  _rango = RangoClient(
10
- base_url='http://localhost:8080',
11
- api_key='4a624ab5-16ff-4f96-90b7-ab00ddfc342c',
12
- log_http_debug=True,
10
+ # base_url='http://localhost:8080',
11
+ api_key='c6381a79-2817-4602-83bf-6a641a409e32',
12
+ # log_http_debug=True,
13
13
  )
14
14
 
15
- from_ = 'XRPL.XRP'
16
- to_ = 'XRPL.RLUSD--RLUSD-rMxCKbEDwqr76QuheSUMdEGf4B9xJ8m5De'
17
- amount_mr = 1500000
15
+ from_ = 'LTC.LTC'
16
+ to_ = 'ETH.ETH'
17
+ amount_mr = 100000000
18
18
 
19
19
  quote = await _rango.routing.quote(
20
20
  from_=from_,
21
21
  to=to_,
22
22
  amount=amount_mr,
23
23
  slippage=3.0,
24
+ enable_centralized_swappers=True
24
25
  )
25
26
  print('quote')
26
27
  print(quote)
@@ -32,8 +33,9 @@ if __name__ == '__main__':
32
33
  to=to_,
33
34
  amount=amount_mr,
34
35
  slippage=3.0,
35
- from_address='rPWrVmZQ3kBhxiBMdk9zqnkpF2MUhobi8x',
36
- to_address='rPWrVmZQ3kBhxiBMdk9zqnkpF2MUhobi8x',
36
+ enable_centralized_swappers=True,
37
+ from_address='MQd1fJwqBJvwLuyhr17PhEFx1swiqDbPQS',
38
+ to_address='0x84e37f0A37f4c1dEd6A13fbC4f16537F2479Bf67',
37
39
  disable_estimate=True,
38
40
  # swappers=['NearIntent'],
39
41
  # swappers_exclude=True,
@@ -45,7 +47,9 @@ if __name__ == '__main__':
45
47
  print(swap.tx)
46
48
  print('type of swap.tx')
47
49
  print(type(swap.tx))
50
+ print(swap.tx.psbt)
48
51
 
52
+ return
49
53
 
50
54
  import asyncio
51
55
 
File without changes