rango-basic-sdk 0.0.3__tar.gz → 0.0.5__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.
- {rango_basic_sdk-0.0.3 → rango_basic_sdk-0.0.5}/PKG-INFO +1 -1
- {rango_basic_sdk-0.0.3 → rango_basic_sdk-0.0.5}/pyproject.toml +1 -1
- {rango_basic_sdk-0.0.3 → rango_basic_sdk-0.0.5}/rango_basic_sdk/__init__.py +1 -1
- {rango_basic_sdk-0.0.3 → rango_basic_sdk-0.0.5}/rango_basic_sdk/models.py +364 -537
- {rango_basic_sdk-0.0.3 → rango_basic_sdk-0.0.5}/.gitignore +0 -0
- {rango_basic_sdk-0.0.3 → rango_basic_sdk-0.0.5}/LICENSE +0 -0
- {rango_basic_sdk-0.0.3 → rango_basic_sdk-0.0.5}/README.md +0 -0
- {rango_basic_sdk-0.0.3 → rango_basic_sdk-0.0.5}/rango_basic_sdk/client.py +0 -0
- {rango_basic_sdk-0.0.3 → rango_basic_sdk-0.0.5}/rango_basic_sdk/py.typed +0 -0
- {rango_basic_sdk-0.0.3 → rango_basic_sdk-0.0.5}/requirements.txt +0 -0
- {rango_basic_sdk-0.0.3 → rango_basic_sdk-0.0.5}/ttt.py +0 -0
|
@@ -505,38 +505,6 @@ class CosmosGasPriceStep(BaseClientModel):
|
|
|
505
505
|
low: float = Field(alias="low")
|
|
506
506
|
|
|
507
507
|
|
|
508
|
-
class EvmApprovePrerequisite(BaseClientModel):
|
|
509
|
-
amount: int = Field(
|
|
510
|
-
alias="amount",
|
|
511
|
-
description="Minimum expected allowance in machine-readable units",
|
|
512
|
-
examples=[1000000000000000000],
|
|
513
|
-
)
|
|
514
|
-
block_chain: Blockchain = Field(
|
|
515
|
-
alias="blockChain",
|
|
516
|
-
description="The blockchain that this approve prerequisite must be executed on",
|
|
517
|
-
)
|
|
518
|
-
spender: str = Field(
|
|
519
|
-
alias="spender",
|
|
520
|
-
description="Spender contract address that will use the allowance",
|
|
521
|
-
)
|
|
522
|
-
token: str = Field(
|
|
523
|
-
alias="token", description="Token contract address that should be approved"
|
|
524
|
-
)
|
|
525
|
-
type_: GenericTransactionPrerequisiteType = Field(
|
|
526
|
-
alias="type", description="Transaction Prerequisite type. e.g. StellarTrustLine"
|
|
527
|
-
)
|
|
528
|
-
wallet: str = Field(
|
|
529
|
-
alias="wallet",
|
|
530
|
-
description="User's wallet address that should approve allowance",
|
|
531
|
-
)
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
class EvmNetworkFeeMeta(BaseClientModel):
|
|
535
|
-
gas_limit: int = Field(alias="gasLimit")
|
|
536
|
-
gas_price: int = Field(alias="gasPrice")
|
|
537
|
-
type_: str = Field(alias="type")
|
|
538
|
-
|
|
539
|
-
|
|
540
508
|
class ExplorerUrl(BaseClientModel):
|
|
541
509
|
"""
|
|
542
510
|
A transaction's url that can be displayed to advanced user to track the progress
|
|
@@ -572,13 +540,6 @@ class GenericTransactionPrerequisite(BaseClientModel):
|
|
|
572
540
|
)
|
|
573
541
|
|
|
574
542
|
|
|
575
|
-
class HyperliquidMetaInfo(BaseClientModel):
|
|
576
|
-
address_url: str = Field(alias="addressUrl")
|
|
577
|
-
block_explorer_urls: List[str] = Field(alias="blockExplorerUrls")
|
|
578
|
-
info_type: str = Field(alias="infoType")
|
|
579
|
-
transaction_url: str = Field(alias="transactionUrl")
|
|
580
|
-
|
|
581
|
-
|
|
582
543
|
class HyperliquidTransactionActionMessage(BaseClientModel):
|
|
583
544
|
"""hyperliquid action to send"""
|
|
584
545
|
|
|
@@ -624,13 +585,6 @@ class SolanaInstructionKey(BaseClientModel):
|
|
|
624
585
|
pubkey: str = Field(alias="pubkey")
|
|
625
586
|
|
|
626
587
|
|
|
627
|
-
class SolanaMetaInfo(BaseClientModel):
|
|
628
|
-
address_url: str = Field(alias="addressUrl")
|
|
629
|
-
block_explorer_urls: List[str] = Field(alias="blockExplorerUrls")
|
|
630
|
-
info_type: str = Field(alias="infoType")
|
|
631
|
-
transaction_url: str = Field(alias="transactionUrl")
|
|
632
|
-
|
|
633
|
-
|
|
634
588
|
class SolanaSignature(BaseClientModel):
|
|
635
589
|
"""List of signatures. fills only if message is already partially signed"""
|
|
636
590
|
|
|
@@ -661,34 +615,6 @@ class StarknetCallData(BaseClientModel):
|
|
|
661
615
|
entrypoint: str = Field(alias="entrypoint", description="Function name to call")
|
|
662
616
|
|
|
663
617
|
|
|
664
|
-
class StellarChangeTrustLinePrerequisite(BaseClientModel):
|
|
665
|
-
block_chain: Blockchain = Field(alias="blockChain")
|
|
666
|
-
code: str = Field(alias="code", description="Stellar Asset Code", examples=["USDC"])
|
|
667
|
-
issuer: str = Field(
|
|
668
|
-
alias="issuer",
|
|
669
|
-
description="Stellar Asset Issuer",
|
|
670
|
-
examples=["GA5ZSEJYB37JRC5AVCIA5MOP4RHTM335X2KGX3IHOJAPP5RE34K4KZVN"],
|
|
671
|
-
)
|
|
672
|
-
type_: GenericTransactionPrerequisiteType = Field(
|
|
673
|
-
alias="type", description="Transaction Prerequisite type. e.g. StellarTrustLine"
|
|
674
|
-
)
|
|
675
|
-
value: Decimal = Field(
|
|
676
|
-
alias="value",
|
|
677
|
-
description="Minimum expected value of trustline",
|
|
678
|
-
examples=[Decimal("922337203685.4775")],
|
|
679
|
-
)
|
|
680
|
-
wallet: str = Field(
|
|
681
|
-
alias="wallet", description="User's wallet address", examples=["G....."]
|
|
682
|
-
)
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
class StellarMetaInfo(BaseClientModel):
|
|
686
|
-
address_url: str = Field(alias="addressUrl")
|
|
687
|
-
block_explorer_urls: List[str] = Field(alias="blockExplorerUrls")
|
|
688
|
-
info_type: str = Field(alias="infoType")
|
|
689
|
-
transaction_url: str = Field(alias="transactionUrl")
|
|
690
|
-
|
|
691
|
-
|
|
692
618
|
class StellarTransactionPreconditionsLedgerBounds(BaseClientModel):
|
|
693
619
|
"""
|
|
694
620
|
ledger bounds of stellar transaction data, Transaction only valid for ledger numbers
|
|
@@ -718,13 +644,6 @@ class StellarTransactionPreconditionsTimeBounds(BaseClientModel):
|
|
|
718
644
|
)
|
|
719
645
|
|
|
720
646
|
|
|
721
|
-
class SuiMetaInfo(BaseClientModel):
|
|
722
|
-
address_url: str = Field(alias="addressUrl")
|
|
723
|
-
block_explorer_urls: List[str] = Field(alias="blockExplorerUrls")
|
|
724
|
-
info_type: str = Field(alias="infoType")
|
|
725
|
-
transaction_url: str = Field(alias="transactionUrl")
|
|
726
|
-
|
|
727
|
-
|
|
728
647
|
class SwapFeeMeta(BaseClientModel):
|
|
729
648
|
"""Meta data of swap fee"""
|
|
730
649
|
|
|
@@ -771,13 +690,6 @@ class TokenBalanceResponse(BaseClientModel):
|
|
|
771
690
|
)
|
|
772
691
|
|
|
773
692
|
|
|
774
|
-
class TonMetaInfo(BaseClientModel):
|
|
775
|
-
address_url: str = Field(alias="addressUrl")
|
|
776
|
-
block_explorer_urls: List[str] = Field(alias="blockExplorerUrls")
|
|
777
|
-
info_type: str = Field(alias="infoType")
|
|
778
|
-
transaction_url: str = Field(alias="transactionUrl")
|
|
779
|
-
|
|
780
|
-
|
|
781
693
|
class TonTransactionMessage(BaseClientModel):
|
|
782
694
|
"""TON message model"""
|
|
783
695
|
|
|
@@ -795,13 +707,6 @@ class TonTransactionMessage(BaseClientModel):
|
|
|
795
707
|
)
|
|
796
708
|
|
|
797
709
|
|
|
798
|
-
class TransferMetaInfo(BaseClientModel):
|
|
799
|
-
address_url: str = Field(alias="addressUrl")
|
|
800
|
-
block_explorer_urls: List[str] = Field(alias="blockExplorerUrls")
|
|
801
|
-
info_type: str = Field(alias="infoType")
|
|
802
|
-
transaction_url: str = Field(alias="transactionUrl")
|
|
803
|
-
|
|
804
|
-
|
|
805
710
|
class TronTransaction(BaseClientModel):
|
|
806
711
|
"""Payload of Trx Transaction"""
|
|
807
712
|
|
|
@@ -813,36 +718,6 @@ class TrxContractWrapperParameterValue(BaseClientModel):
|
|
|
813
718
|
type_: str = Field(alias="type")
|
|
814
719
|
|
|
815
720
|
|
|
816
|
-
class XRPLMetaInfo(BaseClientModel):
|
|
817
|
-
address_url: str = Field(alias="addressUrl")
|
|
818
|
-
block_explorer_urls: List[str] = Field(alias="blockExplorerUrls")
|
|
819
|
-
info_type: str = Field(alias="infoType")
|
|
820
|
-
transaction_url: str = Field(alias="transactionUrl")
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
class XrplChangeTrustLinePrerequisite(BaseClientModel):
|
|
824
|
-
block_chain: Blockchain = Field(alias="blockChain")
|
|
825
|
-
currency: str = Field(
|
|
826
|
-
alias="currency", description="Xrpl Currency", examples=["RLUSD"]
|
|
827
|
-
)
|
|
828
|
-
issuer: str = Field(
|
|
829
|
-
alias="issuer",
|
|
830
|
-
description="Xrpl Asset Issuer",
|
|
831
|
-
examples=["rMxCKbEDwqr76QuheSUMdEGf4B9xJ8m5De"],
|
|
832
|
-
)
|
|
833
|
-
type_: GenericTransactionPrerequisiteType = Field(
|
|
834
|
-
alias="type", description="Transaction Prerequisite type. e.g. StellarTrustLine"
|
|
835
|
-
)
|
|
836
|
-
value: str = Field(
|
|
837
|
-
alias="value",
|
|
838
|
-
description="Minimum expected value of trust",
|
|
839
|
-
examples=["1000000000"],
|
|
840
|
-
)
|
|
841
|
-
wallet: str = Field(
|
|
842
|
-
alias="wallet", description="User's wallet address", examples=["r....."]
|
|
843
|
-
)
|
|
844
|
-
|
|
845
|
-
|
|
846
721
|
class AssetBalance(BaseClientModel):
|
|
847
722
|
"""Balance of Asset in specified wallet"""
|
|
848
723
|
|
|
@@ -906,19 +781,6 @@ class BasicApiQuotePath(BaseClientModel):
|
|
|
906
781
|
)
|
|
907
782
|
|
|
908
783
|
|
|
909
|
-
class BasicApiSwapFee(BaseClientModel):
|
|
910
|
-
amount: int = Field(alias="amount")
|
|
911
|
-
expense_type: BasicApiSwapFeeExpenseType = Field(alias="expenseType")
|
|
912
|
-
meta: Optional[EvmNetworkFeeMeta] = Field(default=None, alias="meta")
|
|
913
|
-
name: str = Field(alias="name")
|
|
914
|
-
token: BasicApiToken = Field(
|
|
915
|
-
alias="token",
|
|
916
|
-
description=("""
|
|
917
|
-
A token's metadata, which is unique by (blockchain, symbol, and address)
|
|
918
|
-
"""),
|
|
919
|
-
)
|
|
920
|
-
|
|
921
|
-
|
|
922
784
|
class BasicCustomTokenResponse(BaseClientModel):
|
|
923
785
|
error: Optional[str] = Field(
|
|
924
786
|
default=None, alias="error", description="Error occurred during operation"
|
|
@@ -942,11 +804,9 @@ class BasicCustomTokenResponse(BaseClientModel):
|
|
|
942
804
|
)
|
|
943
805
|
|
|
944
806
|
|
|
945
|
-
class CosmosMetaInfo(
|
|
946
|
-
address_url: str = Field(alias="addressUrl")
|
|
807
|
+
class CosmosMetaInfo(AbstractBlockchainMetaInfo):
|
|
947
808
|
bech32_config: CosmosChainBech32Config = Field(alias="bech32Config")
|
|
948
809
|
bip44: CosmosChainBip44 = Field(alias="bip44")
|
|
949
|
-
block_explorer_urls: List[str] = Field(alias="blockExplorerUrls")
|
|
950
810
|
chain_name: str = Field(alias="chainName")
|
|
951
811
|
cosmostation_api_url: Optional[str] = Field(
|
|
952
812
|
default=None, alias="cosmostationApiUrl"
|
|
@@ -963,12 +823,10 @@ class CosmosMetaInfo(BaseClientModel):
|
|
|
963
823
|
gas_price_step: Optional[CosmosGasPriceStep] = Field(
|
|
964
824
|
default=None, alias="gasPriceStep"
|
|
965
825
|
)
|
|
966
|
-
info_type: str = Field(alias="infoType")
|
|
967
826
|
mint_scan_name: Optional[str] = Field(default=None, alias="mintScanName")
|
|
968
827
|
rest: str = Field(alias="rest")
|
|
969
828
|
rpc: str = Field(alias="rpc")
|
|
970
829
|
stake_currency: CosmosChainStakeCurrency = Field(alias="stakeCurrency")
|
|
971
|
-
transaction_url: str = Field(alias="transactionUrl")
|
|
972
830
|
|
|
973
831
|
|
|
974
832
|
class CosmosRawTransferData(BaseClientModel):
|
|
@@ -1004,57 +862,39 @@ class CosmosStdFee(BaseClientModel):
|
|
|
1004
862
|
gas: str = Field(alias="gas")
|
|
1005
863
|
|
|
1006
864
|
|
|
1007
|
-
class
|
|
1008
|
-
|
|
1009
|
-
|
|
865
|
+
class EvmApprovePrerequisite(GenericTransactionPrerequisite):
|
|
866
|
+
amount: int = Field(
|
|
867
|
+
alias="amount",
|
|
868
|
+
description="Minimum expected allowance in machine-readable units",
|
|
869
|
+
examples=[1000000000000000000],
|
|
870
|
+
)
|
|
871
|
+
spender: str = Field(
|
|
872
|
+
alias="spender",
|
|
873
|
+
description="Spender contract address that will use the allowance",
|
|
874
|
+
)
|
|
875
|
+
token: str = Field(
|
|
876
|
+
alias="token", description="Token contract address that should be approved"
|
|
877
|
+
)
|
|
878
|
+
wallet: str = Field(
|
|
879
|
+
alias="wallet",
|
|
880
|
+
description="User's wallet address that should approve allowance",
|
|
881
|
+
)
|
|
882
|
+
|
|
883
|
+
|
|
884
|
+
class EvmMetaInfo(AbstractBlockchainMetaInfo):
|
|
1010
885
|
chain_name: str = Field(alias="chainName")
|
|
1011
886
|
enable_gas_v2: bool = Field(alias="enableGasV2")
|
|
1012
|
-
info_type: str = Field(alias="infoType")
|
|
1013
887
|
native_currency: BlockchainNativeCurrency = Field(alias="nativeCurrency")
|
|
1014
888
|
rpc_urls: List[str] = Field(alias="rpcUrls")
|
|
1015
|
-
transaction_url: str = Field(alias="transactionUrl")
|
|
1016
889
|
|
|
1017
890
|
|
|
1018
|
-
class
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
expected_output: Decimal = Field(alias="expectedOutput")
|
|
1022
|
-
prerequisites: List[
|
|
1023
|
-
Union[
|
|
1024
|
-
EvmApprovePrerequisite,
|
|
1025
|
-
StellarChangeTrustLinePrerequisite,
|
|
1026
|
-
XrplChangeTrustLinePrerequisite,
|
|
1027
|
-
]
|
|
1028
|
-
] = Field(alias="prerequisites")
|
|
1029
|
-
type_: GenericTransactionType = Field(
|
|
1030
|
-
alias="type", description="Blockchain transaction type. e.g. EVM"
|
|
1031
|
-
)
|
|
891
|
+
class EvmNetworkFeeMeta(SwapFeeMeta):
|
|
892
|
+
gas_limit: int = Field(alias="gasLimit")
|
|
893
|
+
gas_price: int = Field(alias="gasPrice")
|
|
1032
894
|
|
|
1033
895
|
|
|
1034
|
-
class
|
|
1035
|
-
|
|
1036
|
-
alias="action", description="hyperliquid action to send"
|
|
1037
|
-
)
|
|
1038
|
-
block_chain: Optional[Blockchain] = Field(default=None, alias="blockChain")
|
|
1039
|
-
expected_output: Decimal = Field(alias="expectedOutput")
|
|
1040
|
-
message: str = Field(
|
|
1041
|
-
alias="message",
|
|
1042
|
-
description="EIP712 Json message to be signed by the user's wallet",
|
|
1043
|
-
)
|
|
1044
|
-
nonce: int = Field(
|
|
1045
|
-
alias="nonce",
|
|
1046
|
-
description="nonce for the transaction. must match time in the action parameter",
|
|
1047
|
-
)
|
|
1048
|
-
prerequisites: List[
|
|
1049
|
-
Union[
|
|
1050
|
-
EvmApprovePrerequisite,
|
|
1051
|
-
StellarChangeTrustLinePrerequisite,
|
|
1052
|
-
XrplChangeTrustLinePrerequisite,
|
|
1053
|
-
]
|
|
1054
|
-
] = Field(alias="prerequisites")
|
|
1055
|
-
type_: GenericTransactionType = Field(
|
|
1056
|
-
alias="type", description="Blockchain transaction type. e.g. EVM"
|
|
1057
|
-
)
|
|
896
|
+
class HyperliquidMetaInfo(AbstractBlockchainMetaInfo):
|
|
897
|
+
pass
|
|
1058
898
|
|
|
1059
899
|
|
|
1060
900
|
class MessagingProtocolsResponse(BaseClientModel):
|
|
@@ -1083,13 +923,13 @@ class SolanaInstruction(BaseClientModel):
|
|
|
1083
923
|
program_id: str = Field(alias="programId")
|
|
1084
924
|
|
|
1085
925
|
|
|
1086
|
-
class
|
|
1087
|
-
|
|
1088
|
-
|
|
926
|
+
class SolanaMetaInfo(AbstractBlockchainMetaInfo):
|
|
927
|
+
pass
|
|
928
|
+
|
|
929
|
+
|
|
930
|
+
class StarkNetMetaInfo(AbstractBlockchainMetaInfo):
|
|
1089
931
|
chain_name: str = Field(alias="chainName")
|
|
1090
|
-
info_type: str = Field(alias="infoType")
|
|
1091
932
|
native_currency: BlockchainNativeCurrency = Field(alias="nativeCurrency")
|
|
1092
|
-
transaction_url: str = Field(alias="transactionUrl")
|
|
1093
933
|
|
|
1094
934
|
|
|
1095
935
|
class StarkNetResourceBounds(BaseClientModel):
|
|
@@ -1119,6 +959,27 @@ class StatusOutput(BaseClientModel):
|
|
|
1119
959
|
type_: StatusOutputType = Field(alias="type")
|
|
1120
960
|
|
|
1121
961
|
|
|
962
|
+
class StellarChangeTrustLinePrerequisite(GenericTransactionPrerequisite):
|
|
963
|
+
code: str = Field(alias="code", description="Stellar Asset Code", examples=["USDC"])
|
|
964
|
+
issuer: str = Field(
|
|
965
|
+
alias="issuer",
|
|
966
|
+
description="Stellar Asset Issuer",
|
|
967
|
+
examples=["GA5ZSEJYB37JRC5AVCIA5MOP4RHTM335X2KGX3IHOJAPP5RE34K4KZVN"],
|
|
968
|
+
)
|
|
969
|
+
value: Decimal = Field(
|
|
970
|
+
alias="value",
|
|
971
|
+
description="Minimum expected limit value of trustline",
|
|
972
|
+
examples=[Decimal("922337203685.4775")],
|
|
973
|
+
)
|
|
974
|
+
wallet: str = Field(
|
|
975
|
+
alias="wallet", description="User's wallet address", examples=["G....."]
|
|
976
|
+
)
|
|
977
|
+
|
|
978
|
+
|
|
979
|
+
class StellarMetaInfo(AbstractBlockchainMetaInfo):
|
|
980
|
+
pass
|
|
981
|
+
|
|
982
|
+
|
|
1122
983
|
class StellarTransactionPreconditions(BaseClientModel):
|
|
1123
984
|
"""
|
|
1124
985
|
CAP-21 PreconditionsV2 of transaction transaction
|
|
@@ -1176,29 +1037,8 @@ class StellarTransactionPreconditions(BaseClientModel):
|
|
|
1176
1037
|
)
|
|
1177
1038
|
|
|
1178
1039
|
|
|
1179
|
-
class
|
|
1180
|
-
|
|
1181
|
-
alias="blockChain", description="Transaction blockchain"
|
|
1182
|
-
)
|
|
1183
|
-
expected_output: Decimal = Field(alias="expectedOutput")
|
|
1184
|
-
json_tx_parameters: Dict[str, Any] = Field(
|
|
1185
|
-
alias="jsonTxParameters",
|
|
1186
|
-
description="Transaction Json string that should be con select and sign in wallet",
|
|
1187
|
-
)
|
|
1188
|
-
prerequisites: List[
|
|
1189
|
-
Union[
|
|
1190
|
-
EvmApprovePrerequisite,
|
|
1191
|
-
StellarChangeTrustLinePrerequisite,
|
|
1192
|
-
XrplChangeTrustLinePrerequisite,
|
|
1193
|
-
]
|
|
1194
|
-
] = Field(alias="prerequisites")
|
|
1195
|
-
type_: GenericTransactionType = Field(
|
|
1196
|
-
alias="type", description="Blockchain transaction type. e.g. EVM"
|
|
1197
|
-
)
|
|
1198
|
-
unsigned_ptb_base64: str = Field(
|
|
1199
|
-
alias="unsignedPtbBase64",
|
|
1200
|
-
description="Transaction ByteArray that should be send to the wallet for signing",
|
|
1201
|
-
)
|
|
1040
|
+
class SuiMetaInfo(AbstractBlockchainMetaInfo):
|
|
1041
|
+
pass
|
|
1202
1042
|
|
|
1203
1043
|
|
|
1204
1044
|
class SwapperMetaFullDto(BaseClientModel):
|
|
@@ -1215,78 +1055,41 @@ class SwapperMetaFullDto(BaseClientModel):
|
|
|
1215
1055
|
types: Optional[List[SwapperMetaDtoTypesItem]] = Field(default=None, alias="types")
|
|
1216
1056
|
|
|
1217
1057
|
|
|
1218
|
-
class
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
)
|
|
1231
|
-
messages: List[TonTransactionMessage] = Field(
|
|
1232
|
-
alias="messages", description="Messages to send: min is 1, max is 4."
|
|
1233
|
-
)
|
|
1234
|
-
network: str = Field(
|
|
1235
|
-
alias="network",
|
|
1236
|
-
description=("""
|
|
1237
|
-
The network (mainnet or testnet) where DApp intends to send the
|
|
1238
|
-
transaction. If not set, the transaction is sent to the network
|
|
1239
|
-
currently set in the wallet, but this is not safe and DApp should always
|
|
1240
|
-
strive to set the network. If the network parameter is set, but the
|
|
1241
|
-
wallet has a different network set, the wallet should show an alert and
|
|
1242
|
-
DO NOT ALLOW TO SEND this transaction. +mainnet: "-239" testnet: "-3"
|
|
1243
|
-
"""),
|
|
1244
|
-
)
|
|
1245
|
-
prerequisites: List[
|
|
1246
|
-
Union[
|
|
1247
|
-
EvmApprovePrerequisite,
|
|
1248
|
-
StellarChangeTrustLinePrerequisite,
|
|
1249
|
-
XrplChangeTrustLinePrerequisite,
|
|
1250
|
-
]
|
|
1251
|
-
] = Field(alias="prerequisites")
|
|
1252
|
-
type_: GenericTransactionType = Field(
|
|
1253
|
-
alias="type", description="Blockchain transaction type. e.g. EVM"
|
|
1254
|
-
)
|
|
1255
|
-
valid_until: int = Field(
|
|
1256
|
-
alias="validUntil",
|
|
1257
|
-
description="Sending transaction deadline in unix epoch seconds.",
|
|
1058
|
+
class TonMetaInfo(AbstractBlockchainMetaInfo):
|
|
1059
|
+
pass
|
|
1060
|
+
|
|
1061
|
+
|
|
1062
|
+
class TransferMetaInfo(AbstractBlockchainMetaInfo):
|
|
1063
|
+
pass
|
|
1064
|
+
|
|
1065
|
+
|
|
1066
|
+
class TrxContractWrapperParameter(BaseClientModel):
|
|
1067
|
+
type_url: Optional[str] = Field(default=None, alias="type_url")
|
|
1068
|
+
value: Optional[TrxContractWrapperParameterValue] = Field(
|
|
1069
|
+
default=None, alias="value"
|
|
1258
1070
|
)
|
|
1259
1071
|
|
|
1260
1072
|
|
|
1261
|
-
class
|
|
1262
|
-
|
|
1263
|
-
value: Optional[TrxContractWrapperParameterValue] = Field(
|
|
1264
|
-
default=None, alias="value"
|
|
1265
|
-
)
|
|
1073
|
+
class XRPLMetaInfo(AbstractBlockchainMetaInfo):
|
|
1074
|
+
pass
|
|
1266
1075
|
|
|
1267
1076
|
|
|
1268
|
-
class
|
|
1269
|
-
|
|
1270
|
-
alias="
|
|
1271
|
-
description="The blockchain that this transaction is going to run in",
|
|
1077
|
+
class XrplChangeTrustLinePrerequisite(GenericTransactionPrerequisite):
|
|
1078
|
+
currency: str = Field(
|
|
1079
|
+
alias="currency", description="Xrpl Currency", examples=["RLUSD"]
|
|
1272
1080
|
)
|
|
1273
|
-
|
|
1274
|
-
alias="
|
|
1275
|
-
description=
|
|
1276
|
-
|
|
1277
|
-
Docs](https://xrpl.org/docs/references/protocol/transactions/types)
|
|
1278
|
-
"""),
|
|
1081
|
+
issuer: str = Field(
|
|
1082
|
+
alias="issuer",
|
|
1083
|
+
description="Xrpl Asset Issuer",
|
|
1084
|
+
examples=["rMxCKbEDwqr76QuheSUMdEGf4B9xJ8m5De"],
|
|
1279
1085
|
)
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
]
|
|
1287
|
-
] = Field(alias="prerequisites")
|
|
1288
|
-
type_: GenericTransactionType = Field(
|
|
1289
|
-
alias="type", description="Blockchain transaction type. e.g. EVM"
|
|
1086
|
+
value: str = Field(
|
|
1087
|
+
alias="value",
|
|
1088
|
+
description="Minimum expected limit value of trust",
|
|
1089
|
+
examples=["1000000000"],
|
|
1090
|
+
)
|
|
1091
|
+
wallet: str = Field(
|
|
1092
|
+
alias="wallet", description="User's wallet address", examples=["r....."]
|
|
1290
1093
|
)
|
|
1291
1094
|
|
|
1292
1095
|
|
|
@@ -1327,7 +1130,164 @@ class BasicApiBlockchainMeta(BaseClientModel):
|
|
|
1327
1130
|
)
|
|
1328
1131
|
|
|
1329
1132
|
|
|
1330
|
-
class
|
|
1133
|
+
class BasicApiStatusResponse(BaseClientModel):
|
|
1134
|
+
"""Transaction status response"""
|
|
1135
|
+
|
|
1136
|
+
bridge_data: Optional[BasicApiEvmBridgeData] = Field(
|
|
1137
|
+
default=None, alias="bridgeData", description="EVM bridging data"
|
|
1138
|
+
)
|
|
1139
|
+
diagnosis_url: Optional[str] = Field(
|
|
1140
|
+
default=None,
|
|
1141
|
+
alias="diagnosisUrl",
|
|
1142
|
+
description=("""
|
|
1143
|
+
Some times transaction will fail and user need follow this diagnosis to
|
|
1144
|
+
redeem the assets
|
|
1145
|
+
"""),
|
|
1146
|
+
)
|
|
1147
|
+
error: Optional[str] = Field(default=None, alias="error")
|
|
1148
|
+
explorer_url: Optional[List[ExplorerUrl]] = Field(
|
|
1149
|
+
default=None, alias="explorerUrl", description="Transactions explorer urls"
|
|
1150
|
+
)
|
|
1151
|
+
output: Optional[StatusOutput] = Field(
|
|
1152
|
+
default=None, alias="output", description="Transactions output"
|
|
1153
|
+
)
|
|
1154
|
+
status: Optional[CheckApprovalResponseTxStatus] = Field(
|
|
1155
|
+
default=None, alias="status"
|
|
1156
|
+
)
|
|
1157
|
+
|
|
1158
|
+
|
|
1159
|
+
class BasicApiSwapFee(BaseClientModel):
|
|
1160
|
+
amount: int = Field(alias="amount")
|
|
1161
|
+
expense_type: BasicApiSwapFeeExpenseType = Field(alias="expenseType")
|
|
1162
|
+
meta: Optional[EvmNetworkFeeMeta] = Field(default=None, alias="meta")
|
|
1163
|
+
name: str = Field(alias="name")
|
|
1164
|
+
token: BasicApiToken = Field(
|
|
1165
|
+
alias="token",
|
|
1166
|
+
description=("""
|
|
1167
|
+
A token's metadata, which is unique by (blockchain, symbol, and address)
|
|
1168
|
+
"""),
|
|
1169
|
+
)
|
|
1170
|
+
|
|
1171
|
+
|
|
1172
|
+
class ConnectedAssetsResponse(BaseClientModel):
|
|
1173
|
+
data: List[RoutingAccessItem] = Field(alias="data")
|
|
1174
|
+
|
|
1175
|
+
|
|
1176
|
+
class CosmosMessage(BaseClientModel):
|
|
1177
|
+
"""
|
|
1178
|
+
A real cosmos message, most fields of this object should be directly passed to
|
|
1179
|
+
wallet for signing by user, the important part is `msgs` field that contains all the
|
|
1180
|
+
cosmos actions that should be performed.
|
|
1181
|
+
"""
|
|
1182
|
+
|
|
1183
|
+
account_number: Optional[int] = Field(default=None, alias="account_number")
|
|
1184
|
+
chain_id: Optional[str] = Field(default=None, alias="chainId")
|
|
1185
|
+
fee: Optional[CosmosStdFee] = Field(default=None, alias="fee")
|
|
1186
|
+
memo: Optional[str] = Field(default=None, alias="memo")
|
|
1187
|
+
msgs: List[Msg] = Field(alias="msgs")
|
|
1188
|
+
proto_msgs: List[ProtoMsg] = Field(alias="protoMsgs")
|
|
1189
|
+
rpc_url: Optional[str] = Field(default=None, alias="rpcUrl")
|
|
1190
|
+
sequence: Optional[int] = Field(default=None, alias="sequence")
|
|
1191
|
+
sign_type: CosmosMessageSignType = Field(
|
|
1192
|
+
alias="signType",
|
|
1193
|
+
description=("""
|
|
1194
|
+
Sign type is important field to consider, you should use AMINO or DIRECT
|
|
1195
|
+
mode of wallet depending on value of this field
|
|
1196
|
+
"""),
|
|
1197
|
+
)
|
|
1198
|
+
source: Optional[int] = Field(default=None, alias="source")
|
|
1199
|
+
|
|
1200
|
+
|
|
1201
|
+
class GenericTransaction(BaseClientModel):
|
|
1202
|
+
"""Transaction's raw data"""
|
|
1203
|
+
|
|
1204
|
+
expected_output: Decimal = Field(alias="expectedOutput")
|
|
1205
|
+
prerequisites: List[
|
|
1206
|
+
Union[
|
|
1207
|
+
EvmApprovePrerequisite,
|
|
1208
|
+
StellarChangeTrustLinePrerequisite,
|
|
1209
|
+
XrplChangeTrustLinePrerequisite,
|
|
1210
|
+
]
|
|
1211
|
+
] = Field(alias="prerequisites")
|
|
1212
|
+
type_: GenericTransactionType = Field(
|
|
1213
|
+
alias="type", description="Blockchain transaction type. e.g. EVM"
|
|
1214
|
+
)
|
|
1215
|
+
|
|
1216
|
+
|
|
1217
|
+
class StellarTransactionData(BaseClientModel):
|
|
1218
|
+
"""The data and parameters for building the stellar transaction"""
|
|
1219
|
+
|
|
1220
|
+
base_fee: Optional[int] = Field(
|
|
1221
|
+
default=None,
|
|
1222
|
+
alias="baseFee",
|
|
1223
|
+
description=("""
|
|
1224
|
+
Recommended base fee (in stroops) for building the stellar transaction,
|
|
1225
|
+
can be null or overridden on client side based on user's demand
|
|
1226
|
+
"""),
|
|
1227
|
+
)
|
|
1228
|
+
memo_xdr_base64: Optional[str] = Field(
|
|
1229
|
+
default=None,
|
|
1230
|
+
alias="memoXdrBase64",
|
|
1231
|
+
description="Base64-encoded Memo XDR of stellar transaction",
|
|
1232
|
+
)
|
|
1233
|
+
operations_xdr_base64: List[str] = Field(
|
|
1234
|
+
alias="operationsXdrBase64",
|
|
1235
|
+
description="List of Base64-encoded XDR for each operation in the transaction",
|
|
1236
|
+
)
|
|
1237
|
+
preconditions: Optional[StellarTransactionPreconditions] = Field(
|
|
1238
|
+
default=None,
|
|
1239
|
+
alias="preconditions",
|
|
1240
|
+
description=("""
|
|
1241
|
+
CAP-21 PreconditionsV2 of transaction transaction
|
|
1242
|
+
(https://github.com/stellar/stellar-protocol/blob/master/core/cap-0021.md)
|
|
1243
|
+
"""),
|
|
1244
|
+
)
|
|
1245
|
+
|
|
1246
|
+
|
|
1247
|
+
class TrxContractWrapper(BaseClientModel):
|
|
1248
|
+
parameter: TrxContractWrapperParameter = Field(alias="parameter")
|
|
1249
|
+
type_: str = Field(alias="type")
|
|
1250
|
+
|
|
1251
|
+
|
|
1252
|
+
class WalletDetails(BaseClientModel):
|
|
1253
|
+
"""A wallet's details"""
|
|
1254
|
+
|
|
1255
|
+
address: str = Field(
|
|
1256
|
+
alias="address",
|
|
1257
|
+
description="Address of the wallet",
|
|
1258
|
+
examples=["0x55d398326f99059ff775485246999027b3197955"],
|
|
1259
|
+
)
|
|
1260
|
+
balances: Optional[List[AssetBalance]] = Field(
|
|
1261
|
+
default=None,
|
|
1262
|
+
alias="balances",
|
|
1263
|
+
description=("""
|
|
1264
|
+
Balance of the wallet, null value means server failed to fetch balances,
|
|
1265
|
+
empty list indicates that the wallet is empty
|
|
1266
|
+
"""),
|
|
1267
|
+
)
|
|
1268
|
+
block_chain: Blockchain = Field(
|
|
1269
|
+
alias="blockChain",
|
|
1270
|
+
description="The blockchain which this wallet belongs to",
|
|
1271
|
+
examples=[Blockchain.BSC],
|
|
1272
|
+
)
|
|
1273
|
+
explorer_url: str = Field(
|
|
1274
|
+
alias="explorerUrl",
|
|
1275
|
+
description="The explorer url of the wallet, e.g. bscscan or harmony explorer",
|
|
1276
|
+
examples=[
|
|
1277
|
+
"https://bscscan.com/address/0x9F8cCdaFCc39F3c7D6EBf637c9151673CBc36b88",
|
|
1278
|
+
],
|
|
1279
|
+
)
|
|
1280
|
+
failed: bool = Field(
|
|
1281
|
+
alias="failed",
|
|
1282
|
+
description=("""
|
|
1283
|
+
If it's true, it means that Rango could not fetch this wallet's balance;
|
|
1284
|
+
maybe trying again later could solve the problem.
|
|
1285
|
+
"""),
|
|
1286
|
+
examples=[False],
|
|
1287
|
+
)
|
|
1288
|
+
|
|
1289
|
+
|
|
1290
|
+
class BasicApiEvmTransaction(GenericTransaction):
|
|
1331
1291
|
approve_data: Optional[str] = Field(
|
|
1332
1292
|
default=None,
|
|
1333
1293
|
alias="approveData",
|
|
@@ -1347,7 +1307,6 @@ class BasicApiEvmTransaction(BaseClientModel):
|
|
|
1347
1307
|
block_chain: BasicApiBlockchainMetaSummary = Field(
|
|
1348
1308
|
alias="blockChain", description="Blockchain metadata"
|
|
1349
1309
|
)
|
|
1350
|
-
expected_output: Decimal = Field(alias="expectedOutput")
|
|
1351
1310
|
from_: str = Field(
|
|
1352
1311
|
alias="from", description="The source wallet address, it can be null"
|
|
1353
1312
|
)
|
|
@@ -1369,14 +1328,6 @@ class BasicApiEvmTransaction(BaseClientModel):
|
|
|
1369
1328
|
(inclusive of baseFeePerGas and maxPriorityFeePerGas)
|
|
1370
1329
|
"""),
|
|
1371
1330
|
)
|
|
1372
|
-
max_gas_price: Optional[int] = Field(
|
|
1373
|
-
default=None,
|
|
1374
|
-
alias="maxGasPrice",
|
|
1375
|
-
description=("""
|
|
1376
|
-
The maximum fee per unit of gas willing to be paid for the transaction
|
|
1377
|
-
(inclusive of baseFeePerGas and maxPriorityFeePerGas)
|
|
1378
|
-
"""),
|
|
1379
|
-
)
|
|
1380
1331
|
max_priority_fee_per_gas: Optional[int] = Field(
|
|
1381
1332
|
default=None,
|
|
1382
1333
|
alias="maxPriorityFeePerGas",
|
|
@@ -1385,13 +1336,6 @@ class BasicApiEvmTransaction(BaseClientModel):
|
|
|
1385
1336
|
validator
|
|
1386
1337
|
"""),
|
|
1387
1338
|
)
|
|
1388
|
-
prerequisites: List[
|
|
1389
|
-
Union[
|
|
1390
|
-
EvmApprovePrerequisite,
|
|
1391
|
-
StellarChangeTrustLinePrerequisite,
|
|
1392
|
-
XrplChangeTrustLinePrerequisite,
|
|
1393
|
-
]
|
|
1394
|
-
] = Field(alias="prerequisites")
|
|
1395
1339
|
priority_gas_price: Optional[int] = Field(
|
|
1396
1340
|
default=None,
|
|
1397
1341
|
alias="priorityGasPrice",
|
|
@@ -1411,9 +1355,6 @@ class BasicApiEvmTransaction(BaseClientModel):
|
|
|
1411
1355
|
tx_to: str = Field(
|
|
1412
1356
|
alias="txTo", description="Address of smart contract that is going to be called"
|
|
1413
1357
|
)
|
|
1414
|
-
type_: GenericTransactionType = Field(
|
|
1415
|
-
alias="type", description="Blockchain transaction type. e.g. EVM"
|
|
1416
|
-
)
|
|
1417
1358
|
value: Optional[str] = Field(
|
|
1418
1359
|
default=None,
|
|
1419
1360
|
alias="value",
|
|
@@ -1421,6 +1362,20 @@ class BasicApiEvmTransaction(BaseClientModel):
|
|
|
1421
1362
|
)
|
|
1422
1363
|
|
|
1423
1364
|
|
|
1365
|
+
class BasicApiMetaResponse(BaseClientModel):
|
|
1366
|
+
"""A wrapper class for all tokens, blockchains, and swappers' metadata of Rango"""
|
|
1367
|
+
|
|
1368
|
+
blockchains: List[BasicApiBlockchainMeta] = Field(
|
|
1369
|
+
alias="blockchains", description="List of all supported blockchains"
|
|
1370
|
+
)
|
|
1371
|
+
swappers: List[SwapperMetaDto] = Field(
|
|
1372
|
+
alias="swappers", description="List of all DEXes & Bridges"
|
|
1373
|
+
)
|
|
1374
|
+
tokens: List[BasicApiToken] = Field(
|
|
1375
|
+
alias="tokens", description="List of all tokens"
|
|
1376
|
+
)
|
|
1377
|
+
|
|
1378
|
+
|
|
1424
1379
|
class BasicApiQuoteResponseRoute(BaseClientModel):
|
|
1425
1380
|
"""Route found by Rango"""
|
|
1426
1381
|
|
|
@@ -1473,7 +1428,7 @@ class BasicApiQuoteResponseRoute(BaseClientModel):
|
|
|
1473
1428
|
)
|
|
1474
1429
|
|
|
1475
1430
|
|
|
1476
|
-
class BasicApiStarkNetTransaction(
|
|
1431
|
+
class BasicApiStarkNetTransaction(GenericTransaction):
|
|
1477
1432
|
approve_calls: Optional[List[StarknetCallData]] = Field(
|
|
1478
1433
|
default=None, alias="approveCalls", description="List of approves calldata"
|
|
1479
1434
|
)
|
|
@@ -1483,7 +1438,6 @@ class BasicApiStarkNetTransaction(BaseClientModel):
|
|
|
1483
1438
|
alias="calls",
|
|
1484
1439
|
description="List of calldata to sign a multiple transaction",
|
|
1485
1440
|
)
|
|
1486
|
-
expected_output: Decimal = Field(alias="expectedOutput")
|
|
1487
1441
|
fee_data_availability_mode: Optional[
|
|
1488
1442
|
BasicApiStarkNetTransactionFeeDataAvailabilityMode
|
|
1489
1443
|
] = Field(
|
|
@@ -1498,84 +1452,66 @@ class BasicApiStarkNetTransaction(BaseClientModel):
|
|
|
1498
1452
|
alias="nonceDataAvailabilityMode",
|
|
1499
1453
|
description="Nonce data availability mode",
|
|
1500
1454
|
)
|
|
1501
|
-
prerequisites: List[
|
|
1502
|
-
Union[
|
|
1503
|
-
EvmApprovePrerequisite,
|
|
1504
|
-
StellarChangeTrustLinePrerequisite,
|
|
1505
|
-
XrplChangeTrustLinePrerequisite,
|
|
1506
|
-
]
|
|
1507
|
-
] = Field(alias="prerequisites")
|
|
1508
1455
|
resource_bounds: StarkNetResourceBounds = Field(
|
|
1509
1456
|
alias="resourceBounds", description="Resource bounds for different gas types"
|
|
1510
1457
|
)
|
|
1511
1458
|
tip: Optional[int] = Field(
|
|
1512
1459
|
default=None, alias="tip", description="Tip for the sequencer"
|
|
1513
1460
|
)
|
|
1514
|
-
type_: GenericTransactionType = Field(
|
|
1515
|
-
alias="type", description="Blockchain transaction type. e.g. EVM"
|
|
1516
|
-
)
|
|
1517
1461
|
|
|
1518
1462
|
|
|
1519
|
-
class
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
bridge_data: Optional[BasicApiEvmBridgeData] = Field(
|
|
1523
|
-
default=None, alias="bridgeData", description="EVM bridging data"
|
|
1524
|
-
)
|
|
1525
|
-
diagnosis_url: Optional[str] = Field(
|
|
1526
|
-
default=None,
|
|
1527
|
-
alias="diagnosisUrl",
|
|
1463
|
+
class CosmosTransaction(GenericTransaction):
|
|
1464
|
+
block_chain: Blockchain = Field(
|
|
1465
|
+
alias="blockChain",
|
|
1528
1466
|
description=("""
|
|
1529
|
-
|
|
1530
|
-
|
|
1467
|
+
The blockchain that this transaction will be executed in, same as the
|
|
1468
|
+
input blockchainof create transaction
|
|
1531
1469
|
"""),
|
|
1532
1470
|
)
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
|
|
1471
|
+
data: CosmosMessage = Field(
|
|
1472
|
+
alias="data",
|
|
1473
|
+
description=("""
|
|
1474
|
+
A real cosmos message, most fields of this object should be directly
|
|
1475
|
+
passed to wallet for signing by user, the important part is `msgs` field
|
|
1476
|
+
that contains all the cosmos actions that should be performed.
|
|
1477
|
+
"""),
|
|
1536
1478
|
)
|
|
1537
|
-
|
|
1538
|
-
|
|
1479
|
+
from_wallet_address: str = Field(
|
|
1480
|
+
alias="fromWalletAddress",
|
|
1481
|
+
description=("""
|
|
1482
|
+
Address of wallet that this transaction should be executed in, same as
|
|
1483
|
+
the create transaction request's input
|
|
1484
|
+
"""),
|
|
1539
1485
|
)
|
|
1540
|
-
|
|
1541
|
-
default=None,
|
|
1486
|
+
raw_transfer: Optional[CosmosRawTransferData] = Field(
|
|
1487
|
+
default=None,
|
|
1488
|
+
alias="rawTransfer",
|
|
1489
|
+
description=("""
|
|
1490
|
+
An alternative to CosmosMessage object for the cosmos wallets that do
|
|
1491
|
+
not support generic Cosmos messages
|
|
1492
|
+
"""),
|
|
1542
1493
|
)
|
|
1543
1494
|
|
|
1544
1495
|
|
|
1545
|
-
class
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
chain_id: Optional[str] = Field(default=None, alias="chainId")
|
|
1558
|
-
fee: Optional[CosmosStdFee] = Field(default=None, alias="fee")
|
|
1559
|
-
memo: Optional[str] = Field(default=None, alias="memo")
|
|
1560
|
-
msgs: List[Msg] = Field(alias="msgs")
|
|
1561
|
-
proto_msgs: List[ProtoMsg] = Field(alias="protoMsgs")
|
|
1562
|
-
rpc_url: Optional[str] = Field(default=None, alias="rpcUrl")
|
|
1563
|
-
sequence: Optional[int] = Field(default=None, alias="sequence")
|
|
1564
|
-
sign_type: CosmosMessageSignType = Field(
|
|
1565
|
-
alias="signType",
|
|
1566
|
-
description=("""
|
|
1567
|
-
Sign type is important field to consider, you should use AMINO or DIRECT
|
|
1568
|
-
mode of wallet depending on value of this field
|
|
1569
|
-
"""),
|
|
1496
|
+
class HyperliquidTransaction(GenericTransaction):
|
|
1497
|
+
action: HyperliquidTransactionActionMessage = Field(
|
|
1498
|
+
alias="action", description="hyperliquid action to send"
|
|
1499
|
+
)
|
|
1500
|
+
block_chain: Optional[Blockchain] = Field(default=None, alias="blockChain")
|
|
1501
|
+
message: str = Field(
|
|
1502
|
+
alias="message",
|
|
1503
|
+
description="EIP712 Json message to be signed by the user's wallet",
|
|
1504
|
+
)
|
|
1505
|
+
nonce: int = Field(
|
|
1506
|
+
alias="nonce",
|
|
1507
|
+
description="nonce for the transaction. must match time in the action parameter",
|
|
1570
1508
|
)
|
|
1571
|
-
source: Optional[int] = Field(default=None, alias="source")
|
|
1572
1509
|
|
|
1573
1510
|
|
|
1574
|
-
class SolanaTransaction(
|
|
1511
|
+
class SolanaTransaction(GenericTransaction):
|
|
1575
1512
|
block_chain: Blockchain = Field(
|
|
1576
1513
|
alias="blockChain", description="Transaction blockchain"
|
|
1577
1514
|
)
|
|
1578
|
-
expected_output: Decimal = Field(alias="expectedOutput")
|
|
1579
1515
|
from_: str = Field(
|
|
1580
1516
|
alias="from", description="Wallet address of transaction initiator"
|
|
1581
1517
|
)
|
|
@@ -1585,13 +1521,6 @@ class SolanaTransaction(BaseClientModel):
|
|
|
1585
1521
|
instructions: List[SolanaInstruction] = Field(
|
|
1586
1522
|
alias="instructions", description="List of instructions"
|
|
1587
1523
|
)
|
|
1588
|
-
prerequisites: List[
|
|
1589
|
-
Union[
|
|
1590
|
-
EvmApprovePrerequisite,
|
|
1591
|
-
StellarChangeTrustLinePrerequisite,
|
|
1592
|
-
XrplChangeTrustLinePrerequisite,
|
|
1593
|
-
]
|
|
1594
|
-
] = Field(alias="prerequisites")
|
|
1595
1524
|
recent_blockhash: Optional[str] = Field(
|
|
1596
1525
|
default=None,
|
|
1597
1526
|
alias="recentBlockhash",
|
|
@@ -1606,37 +1535,66 @@ class SolanaTransaction(BaseClientModel):
|
|
|
1606
1535
|
alias="txType",
|
|
1607
1536
|
description="type of Solana transaction. available values are {LEGACY, VERSIONED}",
|
|
1608
1537
|
)
|
|
1609
|
-
|
|
1610
|
-
|
|
1538
|
+
|
|
1539
|
+
|
|
1540
|
+
class StellarTransaction(GenericTransaction):
|
|
1541
|
+
block_chain: Blockchain = Field(
|
|
1542
|
+
alias="blockChain",
|
|
1543
|
+
description="The blockchain that this transaction is going to run in",
|
|
1544
|
+
)
|
|
1545
|
+
data: StellarTransactionData = Field(
|
|
1546
|
+
alias="data",
|
|
1547
|
+
description="The data and parameters for building the stellar transaction",
|
|
1611
1548
|
)
|
|
1612
1549
|
|
|
1613
1550
|
|
|
1614
|
-
class
|
|
1615
|
-
|
|
1551
|
+
class SuiTransaction(GenericTransaction):
|
|
1552
|
+
block_chain: Blockchain = Field(
|
|
1553
|
+
alias="blockChain", description="Transaction blockchain"
|
|
1554
|
+
)
|
|
1555
|
+
json_tx_parameters: Dict[str, Any] = Field(
|
|
1556
|
+
alias="jsonTxParameters",
|
|
1557
|
+
description="Transaction Json string that should be con select and sign in wallet",
|
|
1558
|
+
)
|
|
1559
|
+
unsigned_ptb_base64: str = Field(
|
|
1560
|
+
alias="unsignedPtbBase64",
|
|
1561
|
+
description="Transaction ByteArray that should be send to the wallet for signing",
|
|
1562
|
+
)
|
|
1563
|
+
|
|
1616
1564
|
|
|
1617
|
-
|
|
1618
|
-
|
|
1565
|
+
class TonTransaction(GenericTransaction):
|
|
1566
|
+
block_chain: Blockchain = Field(
|
|
1567
|
+
alias="blockChain",
|
|
1568
|
+
description="The blockchain that this transaction is going to run in",
|
|
1619
1569
|
)
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1570
|
+
from_: str = Field(
|
|
1571
|
+
alias="from",
|
|
1572
|
+
description=("""
|
|
1573
|
+
The sender address in '<wc>:<hex>' format from which DApp intends to
|
|
1574
|
+
send the transaction. Current account.address by default.
|
|
1575
|
+
"""),
|
|
1624
1576
|
)
|
|
1625
|
-
|
|
1626
|
-
alias="
|
|
1627
|
-
description="List of Base64-encoded XDR for each operation in the transaction",
|
|
1577
|
+
messages: List[TonTransactionMessage] = Field(
|
|
1578
|
+
alias="messages", description="Messages to send: min is 1, max is 4."
|
|
1628
1579
|
)
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
alias="preconditions",
|
|
1580
|
+
network: str = Field(
|
|
1581
|
+
alias="network",
|
|
1632
1582
|
description=("""
|
|
1633
|
-
|
|
1634
|
-
|
|
1583
|
+
The network (mainnet or testnet) where DApp intends to send the
|
|
1584
|
+
transaction. If not set, the transaction is sent to the network
|
|
1585
|
+
currently set in the wallet, but this is not safe and DApp should always
|
|
1586
|
+
strive to set the network. If the network parameter is set, but the
|
|
1587
|
+
wallet has a different network set, the wallet should show an alert and
|
|
1588
|
+
DO NOT ALLOW TO SEND this transaction. +mainnet: "-239" testnet: "-3"
|
|
1635
1589
|
"""),
|
|
1636
1590
|
)
|
|
1591
|
+
valid_until: int = Field(
|
|
1592
|
+
alias="validUntil",
|
|
1593
|
+
description="Sending transaction deadline in unix epoch seconds.",
|
|
1594
|
+
)
|
|
1637
1595
|
|
|
1638
1596
|
|
|
1639
|
-
class TransferTransaction(
|
|
1597
|
+
class TransferTransaction(GenericTransaction):
|
|
1640
1598
|
amount: int = Field(
|
|
1641
1599
|
alias="amount",
|
|
1642
1600
|
description="The machine-readable amount of transaction",
|
|
@@ -1646,7 +1604,6 @@ class TransferTransaction(BaseClientModel):
|
|
|
1646
1604
|
alias="asset", description="An asset with its ticker"
|
|
1647
1605
|
)
|
|
1648
1606
|
decimals: int = Field(alias="decimals", description="The decimals of the asset")
|
|
1649
|
-
expected_output: Decimal = Field(alias="expectedOutput")
|
|
1650
1607
|
from_wallet_address: str = Field(
|
|
1651
1608
|
alias="fromWalletAddress",
|
|
1652
1609
|
description="Source wallet address that can sign this transaction",
|
|
@@ -1666,13 +1623,6 @@ class TransferTransaction(BaseClientModel):
|
|
|
1666
1623
|
`transfer`
|
|
1667
1624
|
"""),
|
|
1668
1625
|
)
|
|
1669
|
-
prerequisites: List[
|
|
1670
|
-
Union[
|
|
1671
|
-
EvmApprovePrerequisite,
|
|
1672
|
-
StellarChangeTrustLinePrerequisite,
|
|
1673
|
-
XrplChangeTrustLinePrerequisite,
|
|
1674
|
-
]
|
|
1675
|
-
] = Field(alias="prerequisites")
|
|
1676
1626
|
psbt: Optional[PSBT] = Field(
|
|
1677
1627
|
default=None, alias="psbt", description="Partially signed bitcoin transaction"
|
|
1678
1628
|
)
|
|
@@ -1681,65 +1631,37 @@ class TransferTransaction(BaseClientModel):
|
|
|
1681
1631
|
alias="recipientAddress",
|
|
1682
1632
|
description="Destination wallet address that the fund should be sent to",
|
|
1683
1633
|
)
|
|
1684
|
-
type_: GenericTransactionType = Field(
|
|
1685
|
-
alias="type", description="Blockchain transaction type. e.g. EVM"
|
|
1686
|
-
)
|
|
1687
1634
|
|
|
1688
1635
|
|
|
1689
|
-
class
|
|
1690
|
-
|
|
1691
|
-
type_: str = Field(alias="type")
|
|
1636
|
+
class TrxRawData(BaseClientModel):
|
|
1637
|
+
"""Raw data of TrxTransaction"""
|
|
1692
1638
|
|
|
1639
|
+
contract: List[TrxContractWrapper] = Field(alias="contract")
|
|
1640
|
+
data: str = Field(alias="data")
|
|
1641
|
+
expiration: int = Field(alias="expiration")
|
|
1642
|
+
fee_limit: Optional[int] = Field(default=None, alias="fee_limit")
|
|
1643
|
+
ref_block_bytes: str = Field(alias="ref_block_bytes")
|
|
1644
|
+
ref_block_hash: str = Field(alias="ref_block_hash")
|
|
1645
|
+
timestamp: int = Field(alias="timestamp")
|
|
1693
1646
|
|
|
1694
|
-
class WalletDetails(BaseClientModel):
|
|
1695
|
-
"""A wallet's details"""
|
|
1696
1647
|
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
alias="balances",
|
|
1705
|
-
description=("""
|
|
1706
|
-
Balance of the wallet, null value means server failed to fetch balances,
|
|
1707
|
-
empty list indicates that the wallet is empty
|
|
1708
|
-
"""),
|
|
1709
|
-
)
|
|
1648
|
+
class WalletDetailsResponse(BaseClientModel):
|
|
1649
|
+
"""A list of wallets details"""
|
|
1650
|
+
|
|
1651
|
+
wallets: List[WalletDetails] = Field(alias="wallets")
|
|
1652
|
+
|
|
1653
|
+
|
|
1654
|
+
class XrplTransaction(GenericTransaction):
|
|
1710
1655
|
block_chain: Blockchain = Field(
|
|
1711
1656
|
alias="blockChain",
|
|
1712
|
-
description="The blockchain
|
|
1713
|
-
examples=[Blockchain.BSC],
|
|
1714
|
-
)
|
|
1715
|
-
explorer_url: str = Field(
|
|
1716
|
-
alias="explorerUrl",
|
|
1717
|
-
description="The explorer url of the wallet, e.g. bscscan or harmony explorer",
|
|
1718
|
-
examples=[
|
|
1719
|
-
"https://bscscan.com/address/0x9F8cCdaFCc39F3c7D6EBf637c9151673CBc36b88",
|
|
1720
|
-
],
|
|
1657
|
+
description="The blockchain that this transaction is going to run in",
|
|
1721
1658
|
)
|
|
1722
|
-
|
|
1723
|
-
alias="
|
|
1659
|
+
data: Any = Field(
|
|
1660
|
+
alias="data",
|
|
1724
1661
|
description=("""
|
|
1725
|
-
|
|
1726
|
-
|
|
1662
|
+
Xrpl Json Transaction info baased on [Xrpl
|
|
1663
|
+
Docs](https://xrpl.org/docs/references/protocol/transactions/types)
|
|
1727
1664
|
"""),
|
|
1728
|
-
examples=[False],
|
|
1729
|
-
)
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
class BasicApiMetaResponse(BaseClientModel):
|
|
1733
|
-
"""A wrapper class for all tokens, blockchains, and swappers' metadata of Rango"""
|
|
1734
|
-
|
|
1735
|
-
blockchains: List[BasicApiBlockchainMeta] = Field(
|
|
1736
|
-
alias="blockchains", description="List of all supported blockchains"
|
|
1737
|
-
)
|
|
1738
|
-
swappers: List[SwapperMetaDto] = Field(
|
|
1739
|
-
alias="swappers", description="List of all DEXes & Bridges"
|
|
1740
|
-
)
|
|
1741
|
-
tokens: List[BasicApiToken] = Field(
|
|
1742
|
-
alias="tokens", description="List of all tokens"
|
|
1743
1665
|
)
|
|
1744
1666
|
|
|
1745
1667
|
|
|
@@ -1775,91 +1697,7 @@ class BasicApiQuoteResponse(BaseClientModel):
|
|
|
1775
1697
|
)
|
|
1776
1698
|
|
|
1777
1699
|
|
|
1778
|
-
class
|
|
1779
|
-
block_chain: Blockchain = Field(
|
|
1780
|
-
alias="blockChain",
|
|
1781
|
-
description=("""
|
|
1782
|
-
The blockchain that this transaction will be executed in, same as the
|
|
1783
|
-
input blockchainof create transaction
|
|
1784
|
-
"""),
|
|
1785
|
-
)
|
|
1786
|
-
data: CosmosMessage = Field(
|
|
1787
|
-
alias="data",
|
|
1788
|
-
description=("""
|
|
1789
|
-
A real cosmos message, most fields of this object should be directly
|
|
1790
|
-
passed to wallet for signing by user, the important part is `msgs` field
|
|
1791
|
-
that contains all the cosmos actions that should be performed.
|
|
1792
|
-
"""),
|
|
1793
|
-
)
|
|
1794
|
-
expected_output: Decimal = Field(alias="expectedOutput")
|
|
1795
|
-
from_wallet_address: str = Field(
|
|
1796
|
-
alias="fromWalletAddress",
|
|
1797
|
-
description=("""
|
|
1798
|
-
Address of wallet that this transaction should be executed in, same as
|
|
1799
|
-
the create transaction request's input
|
|
1800
|
-
"""),
|
|
1801
|
-
)
|
|
1802
|
-
prerequisites: List[
|
|
1803
|
-
Union[
|
|
1804
|
-
EvmApprovePrerequisite,
|
|
1805
|
-
StellarChangeTrustLinePrerequisite,
|
|
1806
|
-
XrplChangeTrustLinePrerequisite,
|
|
1807
|
-
]
|
|
1808
|
-
] = Field(alias="prerequisites")
|
|
1809
|
-
raw_transfer: Optional[CosmosRawTransferData] = Field(
|
|
1810
|
-
default=None,
|
|
1811
|
-
alias="rawTransfer",
|
|
1812
|
-
description=("""
|
|
1813
|
-
An alternative to CosmosMessage object for the cosmos wallets that do
|
|
1814
|
-
not support generic Cosmos messages
|
|
1815
|
-
"""),
|
|
1816
|
-
)
|
|
1817
|
-
type_: GenericTransactionType = Field(
|
|
1818
|
-
alias="type", description="Blockchain transaction type. e.g. EVM"
|
|
1819
|
-
)
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
class StellarTransaction(BaseClientModel):
|
|
1823
|
-
block_chain: Blockchain = Field(
|
|
1824
|
-
alias="blockChain",
|
|
1825
|
-
description="The blockchain that this transaction is going to run in",
|
|
1826
|
-
)
|
|
1827
|
-
data: StellarTransactionData = Field(
|
|
1828
|
-
alias="data",
|
|
1829
|
-
description="The data and parameters for building the stellar transaction",
|
|
1830
|
-
)
|
|
1831
|
-
expected_output: Decimal = Field(alias="expectedOutput")
|
|
1832
|
-
prerequisites: List[
|
|
1833
|
-
Union[
|
|
1834
|
-
EvmApprovePrerequisite,
|
|
1835
|
-
StellarChangeTrustLinePrerequisite,
|
|
1836
|
-
XrplChangeTrustLinePrerequisite,
|
|
1837
|
-
]
|
|
1838
|
-
] = Field(alias="prerequisites")
|
|
1839
|
-
type_: GenericTransactionType = Field(
|
|
1840
|
-
alias="type", description="Blockchain transaction type. e.g. EVM"
|
|
1841
|
-
)
|
|
1842
|
-
|
|
1843
|
-
|
|
1844
|
-
class TrxRawData(BaseClientModel):
|
|
1845
|
-
"""Raw data of TrxTransaction"""
|
|
1846
|
-
|
|
1847
|
-
contract: List[TrxContractWrapper] = Field(alias="contract")
|
|
1848
|
-
data: str = Field(alias="data")
|
|
1849
|
-
expiration: int = Field(alias="expiration")
|
|
1850
|
-
fee_limit: Optional[int] = Field(default=None, alias="fee_limit")
|
|
1851
|
-
ref_block_bytes: str = Field(alias="ref_block_bytes")
|
|
1852
|
-
ref_block_hash: str = Field(alias="ref_block_hash")
|
|
1853
|
-
timestamp: int = Field(alias="timestamp")
|
|
1854
|
-
|
|
1855
|
-
|
|
1856
|
-
class WalletDetailsResponse(BaseClientModel):
|
|
1857
|
-
"""A list of wallets details"""
|
|
1858
|
-
|
|
1859
|
-
wallets: List[WalletDetails] = Field(alias="wallets")
|
|
1860
|
-
|
|
1861
|
-
|
|
1862
|
-
class BasicApiTrxTransaction(BaseClientModel):
|
|
1700
|
+
class BasicApiTrxTransaction(GenericTransaction):
|
|
1863
1701
|
payload: Optional[Any] = Field(
|
|
1864
1702
|
default=None,
|
|
1865
1703
|
alias="__payload__",
|
|
@@ -1891,14 +1729,6 @@ class BasicApiTrxTransaction(BaseClientModel):
|
|
|
1891
1729
|
block_chain: BasicApiBlockchainMetaSummary = Field(
|
|
1892
1730
|
alias="blockChain", description="Blockchain metadata"
|
|
1893
1731
|
)
|
|
1894
|
-
expected_output: Decimal = Field(alias="expectedOutput")
|
|
1895
|
-
prerequisites: List[
|
|
1896
|
-
Union[
|
|
1897
|
-
EvmApprovePrerequisite,
|
|
1898
|
-
StellarChangeTrustLinePrerequisite,
|
|
1899
|
-
XrplChangeTrustLinePrerequisite,
|
|
1900
|
-
]
|
|
1901
|
-
] = Field(alias="prerequisites")
|
|
1902
1732
|
raw_data: Optional[TrxRawData] = Field(
|
|
1903
1733
|
default=None, alias="raw_data", description="Raw data of TrxTransaction"
|
|
1904
1734
|
)
|
|
@@ -1910,9 +1740,6 @@ class BasicApiTrxTransaction(BaseClientModel):
|
|
|
1910
1740
|
tx_id: str = Field(
|
|
1911
1741
|
alias="txID", description="the txID data for smart contract call"
|
|
1912
1742
|
)
|
|
1913
|
-
type_: GenericTransactionType = Field(
|
|
1914
|
-
alias="type", description="Blockchain transaction type. e.g. EVM"
|
|
1915
|
-
)
|
|
1916
1743
|
visible: bool = Field(
|
|
1917
1744
|
alias="visible", description="the visible data for smart contract call"
|
|
1918
1745
|
)
|
|
@@ -1943,4 +1770,4 @@ class BasicApiSwapResponse(BaseClientModel):
|
|
|
1943
1770
|
TransferTransaction,
|
|
1944
1771
|
XrplTransaction,
|
|
1945
1772
|
]
|
|
1946
|
-
] = Field(default=None, alias="tx")
|
|
1773
|
+
] = Field(default=None, alias="tx", discriminator="type_")
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|