rango-sdk-basic 0.1.50 → 0.1.52
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.
- package/lib/rango-sdk-basic.cjs.development.js +122 -73
- package/lib/rango-sdk-basic.cjs.development.js.map +1 -1
- package/lib/rango-sdk-basic.cjs.production.min.js +1 -1
- package/lib/rango-sdk-basic.cjs.production.min.js.map +1 -1
- package/lib/rango-sdk-basic.esm.js +122 -73
- package/lib/rango-sdk-basic.esm.js.map +1 -1
- package/lib/services/client.d.ts +3 -1
- package/lib/services/client.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/services/client.ts +27 -0
|
@@ -400,6 +400,7 @@ var tonBlockchain = function tonBlockchain(blockchains) {
|
|
|
400
400
|
RoutingResultType["HIGH_IMPACT"] = "HIGH_IMPACT";
|
|
401
401
|
RoutingResultType["NO_ROUTE"] = "NO_ROUTE";
|
|
402
402
|
RoutingResultType["INPUT_LIMIT_ISSUE"] = "INPUT_LIMIT_ISSUE";
|
|
403
|
+
RoutingResultType["HIGH_IMPACT_FOR_CREATE_TX"] = "HIGH_IMPACT_FOR_CREATE_TX";
|
|
403
404
|
})(exports.RoutingResultType || (exports.RoutingResultType = {}));
|
|
404
405
|
|
|
405
406
|
/**
|
|
@@ -863,11 +864,35 @@ var RangoClient = /*#__PURE__*/function () {
|
|
|
863
864
|
}
|
|
864
865
|
return messagingProtocols;
|
|
865
866
|
}();
|
|
866
|
-
_proto.
|
|
867
|
-
var
|
|
868
|
-
var
|
|
867
|
+
_proto.token = /*#__PURE__*/function () {
|
|
868
|
+
var _token = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(customTokenRequest, options) {
|
|
869
|
+
var axiosResponse;
|
|
869
870
|
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
|
|
870
871
|
while (1) switch (_context5.prev = _context5.next) {
|
|
872
|
+
case 0:
|
|
873
|
+
_context5.next = 2;
|
|
874
|
+
return this.httpService.get("/basic/meta/custom-token?apiKey=" + this.apiKey, _extends({
|
|
875
|
+
params: customTokenRequest
|
|
876
|
+
}, options));
|
|
877
|
+
case 2:
|
|
878
|
+
axiosResponse = _context5.sent;
|
|
879
|
+
return _context5.abrupt("return", axiosResponse.data);
|
|
880
|
+
case 4:
|
|
881
|
+
case "end":
|
|
882
|
+
return _context5.stop();
|
|
883
|
+
}
|
|
884
|
+
}, _callee5, this);
|
|
885
|
+
}));
|
|
886
|
+
function token(_x6, _x7) {
|
|
887
|
+
return _token.apply(this, arguments);
|
|
888
|
+
}
|
|
889
|
+
return token;
|
|
890
|
+
}();
|
|
891
|
+
_proto.quote = /*#__PURE__*/function () {
|
|
892
|
+
var _quote = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(quoteRequest, options) {
|
|
893
|
+
var body, axiosResponse;
|
|
894
|
+
return _regeneratorRuntime().wrap(function _callee6$(_context6) {
|
|
895
|
+
while (1) switch (_context6.prev = _context6.next) {
|
|
871
896
|
case 0:
|
|
872
897
|
body = _extends({}, quoteRequest, {
|
|
873
898
|
from: assetToString(quoteRequest.from),
|
|
@@ -876,7 +901,7 @@ var RangoClient = /*#__PURE__*/function () {
|
|
|
876
901
|
swapperGroups: !!quoteRequest.swapperGroups && quoteRequest.swapperGroups.length > 0 ? quoteRequest.swapperGroups.join(',') : undefined,
|
|
877
902
|
messagingProtocols: !!quoteRequest.messagingProtocols && quoteRequest.messagingProtocols.length > 0 ? quoteRequest.messagingProtocols.join(',') : undefined
|
|
878
903
|
});
|
|
879
|
-
|
|
904
|
+
_context6.next = 3;
|
|
880
905
|
return this.httpService.get("/basic/quote?apiKey=" + this.apiKey, _extends({
|
|
881
906
|
params: body,
|
|
882
907
|
headers: {
|
|
@@ -884,26 +909,26 @@ var RangoClient = /*#__PURE__*/function () {
|
|
|
884
909
|
}
|
|
885
910
|
}, options));
|
|
886
911
|
case 3:
|
|
887
|
-
axiosResponse =
|
|
888
|
-
return
|
|
912
|
+
axiosResponse = _context6.sent;
|
|
913
|
+
return _context6.abrupt("return", axiosResponse.data);
|
|
889
914
|
case 5:
|
|
890
915
|
case "end":
|
|
891
|
-
return
|
|
916
|
+
return _context6.stop();
|
|
892
917
|
}
|
|
893
|
-
},
|
|
918
|
+
}, _callee6, this);
|
|
894
919
|
}));
|
|
895
|
-
function quote(
|
|
920
|
+
function quote(_x8, _x9) {
|
|
896
921
|
return _quote.apply(this, arguments);
|
|
897
922
|
}
|
|
898
923
|
return quote;
|
|
899
924
|
}();
|
|
900
925
|
_proto.isApproved = /*#__PURE__*/function () {
|
|
901
|
-
var _isApproved = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
926
|
+
var _isApproved = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7(requestId, txId, options) {
|
|
902
927
|
var axiosResponse;
|
|
903
|
-
return _regeneratorRuntime().wrap(function
|
|
904
|
-
while (1) switch (
|
|
928
|
+
return _regeneratorRuntime().wrap(function _callee7$(_context7) {
|
|
929
|
+
while (1) switch (_context7.prev = _context7.next) {
|
|
905
930
|
case 0:
|
|
906
|
-
|
|
931
|
+
_context7.next = 2;
|
|
907
932
|
return this.httpService.get("/basic/is-approved?apiKey=" + this.apiKey, _extends({
|
|
908
933
|
params: {
|
|
909
934
|
requestId: requestId,
|
|
@@ -914,26 +939,26 @@ var RangoClient = /*#__PURE__*/function () {
|
|
|
914
939
|
}
|
|
915
940
|
}, options));
|
|
916
941
|
case 2:
|
|
917
|
-
axiosResponse =
|
|
918
|
-
return
|
|
942
|
+
axiosResponse = _context7.sent;
|
|
943
|
+
return _context7.abrupt("return", axiosResponse.data);
|
|
919
944
|
case 4:
|
|
920
945
|
case "end":
|
|
921
|
-
return
|
|
946
|
+
return _context7.stop();
|
|
922
947
|
}
|
|
923
|
-
},
|
|
948
|
+
}, _callee7, this);
|
|
924
949
|
}));
|
|
925
|
-
function isApproved(
|
|
950
|
+
function isApproved(_x10, _x11, _x12) {
|
|
926
951
|
return _isApproved.apply(this, arguments);
|
|
927
952
|
}
|
|
928
953
|
return isApproved;
|
|
929
954
|
}();
|
|
930
955
|
_proto.status = /*#__PURE__*/function () {
|
|
931
|
-
var _status = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
956
|
+
var _status = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8(statusRequest, options) {
|
|
932
957
|
var axiosResponse;
|
|
933
|
-
return _regeneratorRuntime().wrap(function
|
|
934
|
-
while (1) switch (
|
|
958
|
+
return _regeneratorRuntime().wrap(function _callee8$(_context8) {
|
|
959
|
+
while (1) switch (_context8.prev = _context8.next) {
|
|
935
960
|
case 0:
|
|
936
|
-
|
|
961
|
+
_context8.next = 2;
|
|
937
962
|
return this.httpService.get("/basic/status?apiKey=" + this.apiKey, _extends({
|
|
938
963
|
params: statusRequest,
|
|
939
964
|
headers: {
|
|
@@ -941,24 +966,24 @@ var RangoClient = /*#__PURE__*/function () {
|
|
|
941
966
|
}
|
|
942
967
|
}, options));
|
|
943
968
|
case 2:
|
|
944
|
-
axiosResponse =
|
|
945
|
-
return
|
|
969
|
+
axiosResponse = _context8.sent;
|
|
970
|
+
return _context8.abrupt("return", axiosResponse.data);
|
|
946
971
|
case 4:
|
|
947
972
|
case "end":
|
|
948
|
-
return
|
|
973
|
+
return _context8.stop();
|
|
949
974
|
}
|
|
950
|
-
},
|
|
975
|
+
}, _callee8, this);
|
|
951
976
|
}));
|
|
952
|
-
function status(
|
|
977
|
+
function status(_x13, _x14) {
|
|
953
978
|
return _status.apply(this, arguments);
|
|
954
979
|
}
|
|
955
980
|
return status;
|
|
956
981
|
}();
|
|
957
982
|
_proto.swap = /*#__PURE__*/function () {
|
|
958
|
-
var _swap = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
983
|
+
var _swap = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee9(swapRequest, options) {
|
|
959
984
|
var body, axiosResponse;
|
|
960
|
-
return _regeneratorRuntime().wrap(function
|
|
961
|
-
while (1) switch (
|
|
985
|
+
return _regeneratorRuntime().wrap(function _callee9$(_context9) {
|
|
986
|
+
while (1) switch (_context9.prev = _context9.next) {
|
|
962
987
|
case 0:
|
|
963
988
|
body = _extends({}, swapRequest, {
|
|
964
989
|
from: assetToString(swapRequest.from),
|
|
@@ -970,7 +995,7 @@ var RangoClient = /*#__PURE__*/function () {
|
|
|
970
995
|
swapperGroups: !!swapRequest.swapperGroups && swapRequest.swapperGroups.length > 0 ? swapRequest.swapperGroups.join(',') : undefined,
|
|
971
996
|
messagingProtocols: !!swapRequest.messagingProtocols && swapRequest.messagingProtocols.length > 0 ? swapRequest.messagingProtocols.join(',') : undefined
|
|
972
997
|
});
|
|
973
|
-
|
|
998
|
+
_context9.next = 3;
|
|
974
999
|
return this.httpService.get("/basic/swap?apiKey=" + this.apiKey, _extends({
|
|
975
1000
|
params: body,
|
|
976
1001
|
headers: {
|
|
@@ -978,25 +1003,25 @@ var RangoClient = /*#__PURE__*/function () {
|
|
|
978
1003
|
}
|
|
979
1004
|
}, options));
|
|
980
1005
|
case 3:
|
|
981
|
-
axiosResponse =
|
|
982
|
-
return
|
|
1006
|
+
axiosResponse = _context9.sent;
|
|
1007
|
+
return _context9.abrupt("return", axiosResponse.data);
|
|
983
1008
|
case 5:
|
|
984
1009
|
case "end":
|
|
985
|
-
return
|
|
1010
|
+
return _context9.stop();
|
|
986
1011
|
}
|
|
987
|
-
},
|
|
1012
|
+
}, _callee9, this);
|
|
988
1013
|
}));
|
|
989
|
-
function swap(
|
|
1014
|
+
function swap(_x15, _x16) {
|
|
990
1015
|
return _swap.apply(this, arguments);
|
|
991
1016
|
}
|
|
992
1017
|
return swap;
|
|
993
1018
|
}();
|
|
994
1019
|
_proto.reportFailure = /*#__PURE__*/function () {
|
|
995
|
-
var _reportFailure = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
996
|
-
return _regeneratorRuntime().wrap(function
|
|
997
|
-
while (1) switch (
|
|
1020
|
+
var _reportFailure = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee10(requestBody, options) {
|
|
1021
|
+
return _regeneratorRuntime().wrap(function _callee10$(_context10) {
|
|
1022
|
+
while (1) switch (_context10.prev = _context10.next) {
|
|
998
1023
|
case 0:
|
|
999
|
-
|
|
1024
|
+
_context10.next = 2;
|
|
1000
1025
|
return this.httpService.post("/basic/report-tx?apiKey=" + this.apiKey, requestBody, _extends({
|
|
1001
1026
|
headers: {
|
|
1002
1027
|
'X-Rango-Id': this.deviceId
|
|
@@ -1004,22 +1029,22 @@ var RangoClient = /*#__PURE__*/function () {
|
|
|
1004
1029
|
}, options));
|
|
1005
1030
|
case 2:
|
|
1006
1031
|
case "end":
|
|
1007
|
-
return
|
|
1032
|
+
return _context10.stop();
|
|
1008
1033
|
}
|
|
1009
|
-
},
|
|
1034
|
+
}, _callee10, this);
|
|
1010
1035
|
}));
|
|
1011
|
-
function reportFailure(
|
|
1036
|
+
function reportFailure(_x17, _x18) {
|
|
1012
1037
|
return _reportFailure.apply(this, arguments);
|
|
1013
1038
|
}
|
|
1014
1039
|
return reportFailure;
|
|
1015
1040
|
}();
|
|
1016
1041
|
_proto.balance = /*#__PURE__*/function () {
|
|
1017
|
-
var _balance = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
1042
|
+
var _balance = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee11(walletAddress, options) {
|
|
1018
1043
|
var axiosResponse;
|
|
1019
|
-
return _regeneratorRuntime().wrap(function
|
|
1020
|
-
while (1) switch (
|
|
1044
|
+
return _regeneratorRuntime().wrap(function _callee11$(_context11) {
|
|
1045
|
+
while (1) switch (_context11.prev = _context11.next) {
|
|
1021
1046
|
case 0:
|
|
1022
|
-
|
|
1047
|
+
_context11.next = 2;
|
|
1023
1048
|
return this.httpService.get("/basic/balance?apiKey=" + this.apiKey, _extends({
|
|
1024
1049
|
params: walletAddress,
|
|
1025
1050
|
headers: {
|
|
@@ -1027,36 +1052,60 @@ var RangoClient = /*#__PURE__*/function () {
|
|
|
1027
1052
|
}
|
|
1028
1053
|
}, options));
|
|
1029
1054
|
case 2:
|
|
1030
|
-
axiosResponse =
|
|
1031
|
-
return
|
|
1055
|
+
axiosResponse = _context11.sent;
|
|
1056
|
+
return _context11.abrupt("return", axiosResponse.data);
|
|
1032
1057
|
case 4:
|
|
1033
1058
|
case "end":
|
|
1034
|
-
return
|
|
1059
|
+
return _context11.stop();
|
|
1035
1060
|
}
|
|
1036
|
-
},
|
|
1061
|
+
}, _callee11, this);
|
|
1037
1062
|
}));
|
|
1038
|
-
function balance(
|
|
1063
|
+
function balance(_x19, _x20) {
|
|
1039
1064
|
return _balance.apply(this, arguments);
|
|
1040
1065
|
}
|
|
1041
1066
|
return balance;
|
|
1042
1067
|
}();
|
|
1068
|
+
_proto.tokenBalance = /*#__PURE__*/function () {
|
|
1069
|
+
var _tokenBalance = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee12(tokenBalanceRequest, options) {
|
|
1070
|
+
var axiosResponse;
|
|
1071
|
+
return _regeneratorRuntime().wrap(function _callee12$(_context12) {
|
|
1072
|
+
while (1) switch (_context12.prev = _context12.next) {
|
|
1073
|
+
case 0:
|
|
1074
|
+
_context12.next = 2;
|
|
1075
|
+
return this.httpService.get("/basic/token-balance?apiKey=" + this.apiKey, _extends({
|
|
1076
|
+
params: tokenBalanceRequest
|
|
1077
|
+
}, options));
|
|
1078
|
+
case 2:
|
|
1079
|
+
axiosResponse = _context12.sent;
|
|
1080
|
+
return _context12.abrupt("return", axiosResponse.data);
|
|
1081
|
+
case 4:
|
|
1082
|
+
case "end":
|
|
1083
|
+
return _context12.stop();
|
|
1084
|
+
}
|
|
1085
|
+
}, _callee12, this);
|
|
1086
|
+
}));
|
|
1087
|
+
function tokenBalance(_x21, _x22) {
|
|
1088
|
+
return _tokenBalance.apply(this, arguments);
|
|
1089
|
+
}
|
|
1090
|
+
return tokenBalance;
|
|
1091
|
+
}();
|
|
1043
1092
|
_proto.executeEvmRoute = /*#__PURE__*/function () {
|
|
1044
|
-
var _executeEvmRoute2 = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
1093
|
+
var _executeEvmRoute2 = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee13(
|
|
1045
1094
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1046
1095
|
signer, route) {
|
|
1047
1096
|
var prettifiedError, message;
|
|
1048
|
-
return _regeneratorRuntime().wrap(function
|
|
1049
|
-
while (1) switch (
|
|
1097
|
+
return _regeneratorRuntime().wrap(function _callee13$(_context13) {
|
|
1098
|
+
while (1) switch (_context13.prev = _context13.next) {
|
|
1050
1099
|
case 0:
|
|
1051
|
-
|
|
1052
|
-
|
|
1100
|
+
_context13.prev = 0;
|
|
1101
|
+
_context13.next = 3;
|
|
1053
1102
|
return executeEvmRoute(this, signer, route);
|
|
1054
1103
|
case 3:
|
|
1055
|
-
return
|
|
1104
|
+
return _context13.abrupt("return", _context13.sent);
|
|
1056
1105
|
case 6:
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
prettifiedError = prettifyError(
|
|
1106
|
+
_context13.prev = 6;
|
|
1107
|
+
_context13.t0 = _context13["catch"](0);
|
|
1108
|
+
prettifiedError = prettifyError(_context13.t0);
|
|
1060
1109
|
try {
|
|
1061
1110
|
message = (prettifiedError == null ? void 0 : prettifiedError.message) || 'Error executing the route';
|
|
1062
1111
|
this.reportFailure({
|
|
@@ -1072,25 +1121,25 @@ var RangoClient = /*#__PURE__*/function () {
|
|
|
1072
1121
|
throw prettifiedError;
|
|
1073
1122
|
case 11:
|
|
1074
1123
|
case "end":
|
|
1075
|
-
return
|
|
1124
|
+
return _context13.stop();
|
|
1076
1125
|
}
|
|
1077
|
-
},
|
|
1126
|
+
}, _callee13, this, [[0, 6]]);
|
|
1078
1127
|
}));
|
|
1079
|
-
function executeEvmRoute$1(
|
|
1128
|
+
function executeEvmRoute$1(_x23, _x24) {
|
|
1080
1129
|
return _executeEvmRoute2.apply(this, arguments);
|
|
1081
1130
|
}
|
|
1082
1131
|
return executeEvmRoute$1;
|
|
1083
1132
|
}();
|
|
1084
1133
|
_proto.connectedAssets = /*#__PURE__*/function () {
|
|
1085
|
-
var _connectedAssets = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
1134
|
+
var _connectedAssets = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee14(connectedAssetsRequest, options) {
|
|
1086
1135
|
var body, axiosResponse;
|
|
1087
|
-
return _regeneratorRuntime().wrap(function
|
|
1088
|
-
while (1) switch (
|
|
1136
|
+
return _regeneratorRuntime().wrap(function _callee14$(_context14) {
|
|
1137
|
+
while (1) switch (_context14.prev = _context14.next) {
|
|
1089
1138
|
case 0:
|
|
1090
1139
|
body = {
|
|
1091
1140
|
from: assetToString(connectedAssetsRequest.from)
|
|
1092
1141
|
};
|
|
1093
|
-
|
|
1142
|
+
_context14.next = 3;
|
|
1094
1143
|
return this.httpService.get("/basic/connected-assets?apiKey=" + this.apiKey, _extends({
|
|
1095
1144
|
params: body,
|
|
1096
1145
|
headers: {
|
|
@@ -1098,15 +1147,15 @@ var RangoClient = /*#__PURE__*/function () {
|
|
|
1098
1147
|
}
|
|
1099
1148
|
}, options));
|
|
1100
1149
|
case 3:
|
|
1101
|
-
axiosResponse =
|
|
1102
|
-
return
|
|
1150
|
+
axiosResponse = _context14.sent;
|
|
1151
|
+
return _context14.abrupt("return", axiosResponse.data);
|
|
1103
1152
|
case 5:
|
|
1104
1153
|
case "end":
|
|
1105
|
-
return
|
|
1154
|
+
return _context14.stop();
|
|
1106
1155
|
}
|
|
1107
|
-
},
|
|
1156
|
+
}, _callee14, this);
|
|
1108
1157
|
}));
|
|
1109
|
-
function connectedAssets(
|
|
1158
|
+
function connectedAssets(_x25, _x26) {
|
|
1110
1159
|
return _connectedAssets.apply(this, arguments);
|
|
1111
1160
|
}
|
|
1112
1161
|
return connectedAssets;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rango-sdk-basic.cjs.development.js","sources":["../src/types/api/common.ts","../../../node_modules/rango-types/src/api/shared/type-gaurds.ts","../../../node_modules/rango-types/src/api/shared/routing.ts","../../../node_modules/rango-types/src/api/shared/transactions.ts","../../../node_modules/rango-types/src/api/shared/txs/ton.ts","../src/types/utils/errors.ts","../src/utils/promise.ts","../src/services/executor.ts","../src/utils/errors.ts","../src/services/client.ts"],"sourcesContent":["import { Asset } from 'rango-types/lib/api/basic'\nexport * from 'rango-types/lib/api/basic/common'\n\nexport function assetToString(asset: Asset): string {\n if (!!asset.address)\n return `${asset.blockchain}.${asset.symbol}--${asset.address}`\n else return `${asset.blockchain}.${asset.symbol}`\n}\n","import {\n BlockchainMeta,\n CosmosBlockchainMeta,\n EvmBlockchainMeta,\n SolanaBlockchainMeta,\n StarkNetBlockchainMeta,\n TonBlockchainMeta,\n TransferBlockchainMeta,\n TronBlockchainMeta,\n} from './meta.js'\n\nexport const isEvmBlockchain = (\n blockchainMeta: BlockchainMeta\n): blockchainMeta is EvmBlockchainMeta => blockchainMeta.type === 'EVM'\n\nexport const isCosmosBlockchain = (\n blockchainMeta: BlockchainMeta\n): blockchainMeta is CosmosBlockchainMeta => blockchainMeta.type === 'COSMOS'\n\nexport const isSolanaBlockchain = (\n blockchainMeta: BlockchainMeta\n): blockchainMeta is SolanaBlockchainMeta => blockchainMeta.type === 'SOLANA'\n\nexport const isTronBlockchain = (\n blockchainMeta: BlockchainMeta\n): blockchainMeta is TronBlockchainMeta => blockchainMeta.type === 'TRON'\n\nexport const isTransferBlockchain = (\n blockchainMeta: BlockchainMeta\n): blockchainMeta is TransferBlockchainMeta =>\n blockchainMeta.type === 'TRANSFER'\n\nexport const isStarknetBlockchain = (\n blockchainMeta: BlockchainMeta\n): blockchainMeta is StarkNetBlockchainMeta =>\n blockchainMeta.type === 'STARKNET'\n\nexport const isTonBlockchain = (\n blockchainMeta: BlockchainMeta\n): blockchainMeta is TonBlockchainMeta => blockchainMeta.type === 'TON'\n\nexport const evmBlockchains = (blockchains: BlockchainMeta[]) =>\n blockchains.filter(isEvmBlockchain)\n\nexport const solanaBlockchain = (blockchains: BlockchainMeta[]) =>\n blockchains.filter(isSolanaBlockchain)\n\nexport const starknetBlockchain = (blockchains: BlockchainMeta[]) =>\n blockchains.filter(isStarknetBlockchain)\n\nexport const tronBlockchain = (blockchains: BlockchainMeta[]) =>\n blockchains.filter(isTronBlockchain)\n\nexport const cosmosBlockchains = (blockchains: BlockchainMeta[]) =>\n blockchains.filter(isCosmosBlockchain)\n\nexport const transferBlockchains = (blockchains: BlockchainMeta[]) =>\n blockchains.filter(isTransferBlockchain)\n\nexport const tonBlockchain = (blockchains: BlockchainMeta[]) =>\n blockchains.filter(isTonBlockchain)\n","/**\n * Routing Result Type\n *\n */\nexport enum RoutingResultType {\n OK = 'OK',\n HIGH_IMPACT = 'HIGH_IMPACT',\n NO_ROUTE = 'NO_ROUTE',\n INPUT_LIMIT_ISSUE = 'INPUT_LIMIT_ISSUE',\n}\n","/**\n * The type of transaction\n */\nexport enum TransactionType {\n EVM = 'EVM',\n TRANSFER = 'TRANSFER',\n COSMOS = 'COSMOS',\n SOLANA = 'SOLANA',\n TRON = 'TRON',\n STARKNET = 'STARKNET',\n TON = 'TON',\n}\n\n/**\n * The type of transaction\n * @deprecated use TransactionType instead\n */\nexport enum GenericTransactionType {\n EVM = 'EVM',\n TRANSFER = 'TRANSFER',\n COSMOS = 'COSMOS',\n SOLANA = 'SOLANA',\n}\n\n/**\n * A transaction's url that can be displayed to advanced user to track the progress\n *\n * @property {string} url - Url of the transaction in blockchain explorer. example: https://etherscan.io/tx/0xa1a3...\n * @property {string | null} description - A custom display name to help user distinguish the transactions from each\n * other. Example: Inbound, Outbound, Bridge, or null\n *\n */\nexport type SwapExplorerUrl = {\n description: string | null\n url: string\n}\n\n/**\n * APIErrorCode\n *\n * Error code of a swap failure\n *\n */\nexport type APIErrorCode =\n | 'TX_FAIL'\n | 'TX_EXPIRED'\n | 'FETCH_TX_FAILED'\n | 'USER_REJECT'\n | 'USER_CANCEL'\n | 'USER_CANCELED_TX'\n | 'CALL_WALLET_FAILED'\n | 'SEND_TX_FAILED'\n | 'CALL_OR_SEND_FAILED'\n | 'TX_FAILED_IN_BLOCKCHAIN'\n | 'CLIENT_UNEXPECTED_BEHAVIOUR'\n | 'INSUFFICIENT_APPROVE'\n\n/**\n * The function checks if a given string value is a valid API error code.\n * @param {string} value - a string that represents a possible API error code.\n * @returns A boolean value is being returned, indicating whether the input `value` is of type\n * `APIErrorCode` or not.\n */\nexport function isAPIErrorCode(value: string): value is APIErrorCode {\n return [\n 'TX_FAIL',\n 'TX_EXPIRED',\n 'FETCH_TX_FAILED',\n 'USER_REJECT',\n 'USER_CANCEL',\n 'USER_CANCELED_TX',\n 'CALL_WALLET_FAILED',\n 'SEND_TX_FAILED',\n 'CALL_OR_SEND_FAILED',\n 'TX_FAILED_IN_BLOCKCHAIN',\n 'CLIENT_UNEXPECTED_BEHAVIOUR',\n 'INSUFFICIENT_APPROVE',\n ].includes(value)\n}\n\n/**\n * ReportTransactionRequest\n *\n * It should be used when an error happened in client and we want to inform server that transaction failed,\n * E.g. user rejected the transaction dialog or and an RPC error raised during signing tx by user.\n *\n * @property {string} requestId - The requestId from best route endpoint\n * @property {APIErrorCode} eventType - Type of the event that happened, example: USER_REJECT\n * @property {number} [step] - Step number in which failure happened\n * @property {string} [reason] - Reason or message for the error\n * @property {[key: string]: string} [data] - @deprecated A list of key-value for extra details\n * @property {wallet?: string, errorCode? string} [tags] - A list of key-value for pre-defined tags\n *\n */\nexport type ReportTransactionRequest = {\n requestId: string\n eventType: APIErrorCode\n step?: number\n reason?: string\n data?: { [key: string]: string }\n tags?: { wallet?: string; errorCode?: string }\n}\n\n/**\n * The status of transaction in tracking\n */\nexport enum TransactionStatus {\n FAILED = 'failed',\n RUNNING = 'running',\n SUCCESS = 'success',\n}\n\n/**\n * Response body of check-approval\n * You could stop check approval if:\n * 1- approved successfully\n * => isApproved = true\n * 2- approval transaction failed\n * => isApproved = false && txStatus === 'failed'\n * 3- approval transaction succeeded but currentApprovedAmount is still less than requiredApprovedAmount\n * (e.g. user changed transaction data and enter another approve amount in MetaMask)\n * => isApproved = false && txStatus == 'success'\n *\n * @property {boolean} isApproved - A flag which indicates that the approve tx is done or not\n * @property {TransactionStatus | null} txStatus - Status of approve transaction in blockchain,\n * if isArppoved is false and txStatus is failed, it seems that approve transaction failed in blockchain\n * @property {string | null} requiredApprovedAmount - required amount to be approved by user\n * @property {string | null} currentApprovedAmount - current approved amount by user\n *\n */\nexport type CheckApprovalResponse = {\n isApproved: boolean\n txStatus: TransactionStatus | null\n requiredApprovedAmount: string | null\n currentApprovedAmount: string | null\n}\n","import { TransactionType } from '../transactions.js'\nimport { BaseTransaction } from './base.js'\n\nexport enum TonChainID {\n MAINNET = '-239',\n TESTNET = '-3',\n}\n\n/**\n * @property {string} address - Receiver's address\n * @property {string} amount - Amount to send in nanoTon\n * @property {string} [stateInit] - Contract specific data to add to the transaction\n * @property {string} [payload] - Contract specific data to add to the transaction\n */\nexport interface TonMessage {\n address: string\n amount: string\n stateInit?: string\n payload?: string\n}\n\n/**\n * This type of transaction is used for all Ton transactions\n *\n * @property {TransactionType} type - This field equals to TON for all Ton transactions\n * @property {number} validUntil - Sending transaction deadline in unix epoch seconds\n * @property {TonChainID} [network] - The network (mainnet or testnet) where DApp intends to send the transaction. If not set, the transaction is sent to the network currently set in the wallet, but this is not safe and DApp should always strive to set the network. If the network parameter is set, but the wallet has a different network set, the wallet should show an alert and DO NOT ALLOW TO SEND this transaction\n * @property {string} [from] - The sender address in '<wc>:<hex>' format from which DApp intends to send the transaction. Current account.address by default\n * @property {TonMessage[]} messages - Messages to send: min is 1, max is 4\n */\nexport interface TonTransaction extends BaseTransaction {\n type: TransactionType.TON\n validUntil: number\n network?: TonChainID\n from?: string\n messages: TonMessage[]\n}\n\nexport const isTonTransaction = (transaction: {\n type: TransactionType\n}): transaction is TonTransaction => transaction.type === TransactionType.TON\n","export const MetamaskErrorCodes = {\n rpc: {\n invalidInput: -32000,\n resourceNotFound: -32001,\n resourceUnavailable: -32002,\n transactionRejected: -32003,\n methodNotSupported: -32004,\n limitExceeded: -32005,\n parse: -32700,\n invalidRequest: -32600,\n methodNotFound: -32601,\n invalidParams: -32602,\n internal: -32603,\n },\n provider: {\n userRejectedRequest: 4001,\n unauthorized: 4100,\n unsupportedMethod: 4200,\n disconnected: 4900,\n chainDisconnected: 4901,\n },\n}\n","export function sleep(ms: number) {\n return new Promise((resolve) => setTimeout(resolve, ms))\n}\n","import { Signer } from 'ethers'\nimport { RangoClient } from './client'\nimport { EvmTransaction } from '../types/api/txs'\nimport {\n StatusResponse,\n SwapResponse,\n TransactionStatus,\n TransactionType,\n} from '../types/api/transactions'\nimport { sleep } from '../utils/promise'\n\nexport function prepareEvmTransaction(\n evmTx: EvmTransaction,\n isApprove: boolean\n) {\n const gasPrice =\n !!evmTx.gasPrice && !evmTx.gasPrice.startsWith('0x')\n ? '0x' + parseInt(evmTx.gasPrice).toString(16)\n : null\n const manipulatedTx = {\n ...evmTx,\n gasPrice,\n }\n let tx = {}\n if (!!manipulatedTx.from) tx = { ...tx, from: manipulatedTx.from }\n if (isApprove) {\n if (!!manipulatedTx.approveTo) tx = { ...tx, to: manipulatedTx.approveTo }\n if (!!manipulatedTx.approveData)\n tx = { ...tx, data: manipulatedTx.approveData }\n } else {\n if (!!manipulatedTx.txTo) tx = { ...tx, to: manipulatedTx.txTo }\n if (!!manipulatedTx.txData) tx = { ...tx, data: manipulatedTx.txData }\n if (!!manipulatedTx.value) tx = { ...tx, value: manipulatedTx.value }\n if (!!manipulatedTx.gasLimit)\n tx = { ...tx, gasLimit: manipulatedTx.gasLimit }\n if (!!manipulatedTx.gasPrice)\n tx = { ...tx, gasPrice: manipulatedTx.gasPrice }\n }\n return tx\n}\n\nasync function checkApprovalSync(\n requestId: string,\n txId: string,\n rangoClient: RangoClient\n): Promise<boolean> {\n while (true) {\n try {\n const approvalResponse = await rangoClient.isApproved(requestId, txId)\n if (approvalResponse?.isApproved) return true\n if (\n !approvalResponse?.isApproved &&\n approvalResponse?.txStatus === TransactionStatus.FAILED\n )\n return false\n } catch (err) {\n console.log('ignorinig error', { err })\n }\n await sleep(3_000)\n }\n}\n\nexport const checkTransactionStatusSync = async (\n requestId: string,\n txId: string,\n rangoClient: RangoClient\n) => {\n let txStatus: StatusResponse | undefined\n while (true) {\n try {\n txStatus = await rangoClient.status({\n requestId,\n txId,\n })\n } catch (err) {\n console.log('ignorinig error', { err })\n }\n if (!!txStatus) {\n if (\n !!txStatus.status &&\n [TransactionStatus.FAILED, TransactionStatus.SUCCESS].includes(\n txStatus.status\n )\n ) {\n return txStatus\n }\n }\n await sleep(3_000)\n }\n}\n\nexport const executeEvmRoute = async (\n client: RangoClient,\n signer: Signer,\n route: SwapResponse\n): Promise<StatusResponse> => {\n const { tx, requestId, error, resultType } = route\n if (resultType != 'OK') throw new Error(resultType)\n if (!!error || !tx)\n throw new Error(error || 'Error creating the transaction.')\n if (tx?.type !== TransactionType.EVM)\n throw new Error('Non Evm transactions are not supported yet.')\n const evmTransaction = tx as EvmTransaction\n if (!evmTransaction) throw new Error('Transaction is null. Please try again!')\n const txChainId = parseInt(evmTransaction.blockChain.chainId || '-1')\n let signerChainId = await signer.getChainId()\n if (signerChainId !== txChainId) {\n throw new Error(\n `Signer chainId ${signerChainId} doesn't match required chainId ${txChainId}.`\n )\n }\n if (!!evmTransaction.approveTo && !!evmTransaction.approveData) {\n const approveTxData = prepareEvmTransaction(evmTransaction, true)\n const approveTx = await signer.sendTransaction(approveTxData)\n approveTx.wait()\n const isApproved = await checkApprovalSync(\n requestId,\n approveTx.hash,\n client\n )\n if (!isApproved) throw new Error('Error in approve transaction.')\n }\n signerChainId = await signer.getChainId()\n if (signerChainId !== txChainId) {\n throw new Error(\n `Signer chainId ${signerChainId} doesn't match required chainId ${txChainId}.`\n )\n }\n const mainTxData = prepareEvmTransaction(evmTransaction, false)\n const mainTx = await signer.sendTransaction(mainTxData)\n mainTx.wait()\n const status = await checkTransactionStatusSync(\n requestId,\n mainTx.hash,\n client\n )\n if (status.status !== TransactionStatus.SUCCESS)\n throw new Error(`Cross-chain swap failed. ${status.error || ''}`)\n return status\n}\n","import { getMessageFromCode } from 'eth-rpc-errors'\nimport { MetamaskErrorCodes } from '../types/utils/errors'\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport const prettifyError = (error: any) => {\n if (!error) return error\n if (error.code && (error.code === 'ACTION_REJECTED' || error.code === 4001))\n return new Error('Transaction Rejected')\n if (error && typeof error.code === 'number') {\n if (Object.values(MetamaskErrorCodes.provider).includes(error.code)) {\n return new Error(getMessageFromCode(error.code))\n }\n if (Object.values(MetamaskErrorCodes.rpc).includes(error.code)) {\n if (\n error.code === MetamaskErrorCodes.rpc.internal &&\n error.message?.includes('underpriced')\n )\n return new Error('Transaction underpriced')\n if (\n error.message?.includes('intrinsic gas too low') ||\n error.message?.includes('out of gas')\n )\n return new Error('This Gas limit is low.')\n return new Error(getMessageFromCode(error.code))\n }\n }\n if (error.message) return new Error(error.message)\n return error\n}\n","import uuid from 'uuid-random'\n\nimport {\n MetaRequest,\n MetaResponse,\n QuoteRequest,\n QuoteResponse,\n CheckApprovalResponse,\n StatusRequest,\n StatusResponse,\n SwapRequest,\n SwapResponse,\n ReportTransactionRequest,\n WalletDetailsResponse,\n assetToString,\n BlockchainMeta,\n RequestOptions,\n MessagingProtocolsResponse,\n SwapperMetaExtended,\n ConnectedAssetsResponse,\n ConnectedAssetsRequest,\n} from '../types'\nimport { Signer } from 'ethers'\nimport { executeEvmRoute as executeEvmRoute } from './executor'\nimport { prettifyError } from '../utils/errors'\nimport axios, { AxiosInstance } from 'axios'\n\ntype WalletAddress = { blockchain: string; address: string }\n\nexport class RangoClient {\n private readonly deviceId: string\n private readonly apiKey: string\n private readonly apiUrl: string\n private readonly httpService: AxiosInstance\n\n constructor(apiKey: string, debug = false, apiUrl?: string) {\n this.apiUrl = apiUrl || 'https://api.rango.exchange'\n this.apiKey = apiKey\n try {\n if (typeof window !== 'undefined') {\n const deviceId = localStorage.getItem('deviceId')\n if (deviceId) {\n this.deviceId = deviceId\n } else {\n const generatedId = uuid()\n localStorage.setItem('deviceId', generatedId)\n this.deviceId = generatedId\n }\n } else {\n this.deviceId = uuid()\n }\n } catch (e) {\n this.deviceId = uuid()\n }\n this.httpService = axios.create({\n baseURL: this.apiUrl,\n })\n if (debug) {\n this.httpService.interceptors.request.use((request) => {\n console.log('Starting Request', JSON.stringify(request, null, 2))\n return request\n })\n this.httpService.interceptors.response.use((response) => {\n console.log('Response:', JSON.stringify(response, null, 2))\n return response\n })\n }\n }\n\n public async meta(\n metaRequest?: MetaRequest,\n options?: RequestOptions\n ): Promise<MetaResponse> {\n const params = {\n ...metaRequest,\n blockchains: metaRequest?.blockchains?.join(),\n swappers: metaRequest?.swappers?.join(),\n swappersGroups: metaRequest?.swappersGroups?.join(),\n transactionTypes: metaRequest?.transactionTypes?.join(),\n }\n const axiosResponse = await this.httpService.get<MetaResponse>(\n `/basic/meta?apiKey=${this.apiKey}`,\n {\n params,\n ...options,\n }\n )\n return axiosResponse.data\n }\n\n public async chains(options?: RequestOptions): Promise<BlockchainMeta[]> {\n const axiosResponse = await this.httpService.get<BlockchainMeta[]>(\n `/basic/meta/blockchains?apiKey=${this.apiKey}`,\n { ...options }\n )\n return axiosResponse.data\n }\n\n public async swappers(options?: RequestOptions): Promise<SwapperMetaExtended[]> {\n const axiosResponse = await this.httpService.get<SwapperMetaExtended[]>(\n `/basic/meta/swappers?apiKey=${this.apiKey}`,\n { ...options }\n )\n return axiosResponse.data\n }\n\n public async messagingProtocols(\n options?: RequestOptions\n ): Promise<MessagingProtocolsResponse> {\n const axiosResponse =\n await this.httpService.get<MessagingProtocolsResponse>(\n `/basic/meta/messaging-protocols?apiKey=${this.apiKey}`,\n { ...options }\n )\n return axiosResponse.data\n }\n\n public async quote(\n quoteRequest: QuoteRequest,\n options?: RequestOptions\n ): Promise<QuoteResponse> {\n const body = {\n ...quoteRequest,\n from: assetToString(quoteRequest.from),\n to: assetToString(quoteRequest.to),\n swappers:\n !!quoteRequest.swappers && quoteRequest.swappers.length > 0\n ? quoteRequest.swappers.join(',')\n : undefined,\n swapperGroups:\n !!quoteRequest.swapperGroups && quoteRequest.swapperGroups.length > 0\n ? quoteRequest.swapperGroups.join(',')\n : undefined,\n messagingProtocols:\n !!quoteRequest.messagingProtocols &&\n quoteRequest.messagingProtocols.length > 0\n ? quoteRequest.messagingProtocols.join(',')\n : undefined,\n }\n const axiosResponse = await this.httpService.get<QuoteResponse>(\n `/basic/quote?apiKey=${this.apiKey}`,\n {\n params: body,\n headers: { 'X-Rango-Id': this.deviceId },\n ...options,\n }\n )\n return axiosResponse.data\n }\n\n public async isApproved(\n requestId: string,\n txId?: string,\n options?: RequestOptions\n ): Promise<CheckApprovalResponse> {\n const axiosResponse = await this.httpService.get<CheckApprovalResponse>(\n `/basic/is-approved?apiKey=${this.apiKey}`,\n {\n params: { requestId, txId },\n headers: { 'X-Rango-Id': this.deviceId },\n ...options,\n }\n )\n return axiosResponse.data\n }\n\n public async status(\n statusRequest: StatusRequest,\n options?: RequestOptions\n ): Promise<StatusResponse> {\n const axiosResponse = await this.httpService.get<StatusResponse>(\n `/basic/status?apiKey=${this.apiKey}`,\n {\n params: statusRequest,\n headers: { 'X-Rango-Id': this.deviceId },\n ...options,\n }\n )\n return axiosResponse.data\n }\n\n public async swap(\n swapRequest: SwapRequest,\n options?: RequestOptions\n ): Promise<SwapResponse> {\n const body = {\n ...swapRequest,\n from: assetToString(swapRequest.from),\n to: assetToString(swapRequest.to),\n referrerAddress: swapRequest.referrerAddress || null,\n referrerFee: swapRequest.referrerFee || null,\n disableEstimate: swapRequest.disableEstimate || false,\n swappers:\n !!swapRequest.swappers && swapRequest.swappers.length > 0\n ? swapRequest.swappers.join(',')\n : undefined,\n swapperGroups:\n !!swapRequest.swapperGroups && swapRequest.swapperGroups.length > 0\n ? swapRequest.swapperGroups.join(',')\n : undefined,\n messagingProtocols:\n !!swapRequest.messagingProtocols &&\n swapRequest.messagingProtocols.length > 0\n ? swapRequest.messagingProtocols.join(',')\n : undefined,\n }\n const axiosResponse = await this.httpService.get<SwapResponse>(\n `/basic/swap?apiKey=${this.apiKey}`,\n {\n params: body,\n headers: { 'X-Rango-Id': this.deviceId },\n ...options,\n }\n )\n return axiosResponse.data\n }\n\n public async reportFailure(\n requestBody: ReportTransactionRequest,\n options?: RequestOptions\n ): Promise<void> {\n await this.httpService.post(\n `/basic/report-tx?apiKey=${this.apiKey}`,\n requestBody,\n {\n headers: { 'X-Rango-Id': this.deviceId },\n ...options,\n }\n )\n }\n\n public async balance(\n walletAddress: WalletAddress,\n options?: RequestOptions\n ): Promise<WalletDetailsResponse> {\n const axiosResponse = await this.httpService.get<WalletDetailsResponse>(\n `/basic/balance?apiKey=${this.apiKey}`,\n {\n params: walletAddress,\n headers: { 'X-Rango-Id': this.deviceId },\n ...options,\n }\n )\n return axiosResponse.data\n }\n\n public async executeEvmRoute(\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n signer: any,\n route: SwapResponse\n ): Promise<StatusResponse> {\n try {\n return await executeEvmRoute(this, signer as Signer, route)\n } catch (error) {\n const prettifiedError = prettifyError(error)\n try {\n const message = prettifiedError?.message || 'Error executing the route'\n this.reportFailure({\n requestId: route.requestId,\n eventType: 'TX_FAIL',\n reason: message,\n })\n } catch (err) {\n console.log({ err })\n }\n throw prettifiedError\n }\n }\n\n public async connectedAssets(\n connectedAssetsRequest: ConnectedAssetsRequest,\n options?: RequestOptions\n ): Promise<ConnectedAssetsResponse> {\n const body = {\n from: assetToString(connectedAssetsRequest.from),\n }\n\n const axiosResponse = await this.httpService.get<ConnectedAssetsResponse>(\n `/basic/connected-assets?apiKey=${this.apiKey}`,\n {\n params: body,\n headers: { 'X-Rango-Id': this.deviceId },\n ...options,\n }\n )\n return axiosResponse.data\n }\n}\n"],"names":["assetToString","asset","address","blockchain","symbol","isEvmBlockchain","blockchainMeta","MetamaskErrorCodes","rpc","invalidInput","resourceNotFound","resourceUnavailable","transactionRejected","methodNotSupported","limitExceeded","parse","invalidRequest","methodNotFound","invalidParams","internal","provider","userRejectedRequest","unauthorized","unsupportedMethod","disconnected","chainDisconnected","sleep","ms","Promise","resolve","setTimeout","prepareEvmTransaction","evmTx","isApprove","gasPrice","startsWith","parseInt","toString","manipulatedTx","_extends","tx","from","approveTo","to","approveData","data","txTo","txData","value","gasLimit","checkApprovalSync","_x","_x2","_x3","_checkApprovalSync","apply","arguments","_asyncToGenerator","_regeneratorRuntime","mark","_callee3","requestId","txId","rangoClient","approvalResponse","wrap","_callee3$","_context3","prev","next","isApproved","sent","abrupt","txStatus","TransactionStatus","FAILED","t0","console","log","err","stop","checkTransactionStatusSync","_ref","_callee","_callee$","_context","status","SUCCESS","includes","_x4","_x5","_x6","executeEvmRoute","_ref2","_callee2","client","signer","route","error","resultType","evmTransaction","txChainId","signerChainId","approveTxData","approveTx","mainTxData","mainTx","_callee2$","_context2","Error","type","TransactionType","EVM","blockChain","chainId","getChainId","sendTransaction","wait","hash","_x7","_x8","_x9","prettifyError","code","Object","values","getMessageFromCode","_error$message","_error$message2","_error$message3","message","RangoClient","apiKey","debug","apiUrl","window","deviceId","localStorage","getItem","generatedId","uuid","setItem","e","httpService","axios","create","baseURL","interceptors","request","use","JSON","stringify","response","_proto","prototype","meta","_meta","metaRequest","options","_metaRequest$blockcha","_metaRequest$swappers","_metaRequest$swappers2","_metaRequest$transact","params","axiosResponse","blockchains","join","swappers","swappersGroups","transactionTypes","get","chains","_chains","_swappers","messagingProtocols","_messagingProtocols","_callee4","_callee4$","_context4","quote","_quote","_callee5","quoteRequest","body","_callee5$","_context5","length","undefined","swapperGroups","headers","_isApproved","_callee6","_callee6$","_context6","_x10","_status","_callee7","statusRequest","_callee7$","_context7","_x11","_x12","swap","_swap","_callee8","swapRequest","_callee8$","_context8","referrerAddress","referrerFee","disableEstimate","_x13","_x14","reportFailure","_reportFailure","_callee9","requestBody","_callee9$","_context9","post","_x15","_x16","balance","_balance","_callee10","walletAddress","_callee10$","_context10","_x17","_x18","_executeEvmRoute2","_callee11","prettifiedError","_callee11$","_context11","eventType","reason","_x19","_x20","connectedAssets","_connectedAssets","_callee12","connectedAssetsRequest","_callee12$","_context12","_x21","_x22"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;SAGgBA,aAAaA,CAACC,KAAY;EACxC,IAAI,CAAC,CAACA,KAAK,CAACC,OAAO,EACjB,OAAUD,KAAK,CAACE,UAAU,SAAIF,KAAK,CAACG,MAAM,UAAKH,KAAK,CAACC,OAAO,CAAE,KAC3D,OAAUD,KAAK,CAACE,UAAU,SAAIF,KAAK,CAACG,MAAM;AACjD;;mBCkC8B,2BAAAC;;;qDAIUC;;;AAGtC;;;AAKF;;;yDAI0C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,CACF;UAAA;YAPKM,aAAa,GAAAgF,UAAA,CAAA7K,IAAA;YAAA,OAAA6K,UAAA,CAAA5K,MAAA,WAQZ4F,aAAa,CAACvH,IAAI;UAAA;UAAA;YAAA,OAAAuM,UAAA,CAAApK,IAAA;;SAAAiK,SAAA;KAC1B;IAAA,SAAAF,gBAAAM,IAAA,EAAAC,IAAA;MAAA,OAAAN,gBAAA,CAAAzL,KAAA,OAAAC,SAAA;;IAAA,OAAAuL,eAAA;;EAAA,OAAA5G,WAAA;AAAA;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"rango-sdk-basic.cjs.development.js","sources":["../src/types/api/common.ts","../../../node_modules/rango-types/src/api/shared/type-gaurds.ts","../../../node_modules/rango-types/src/api/shared/routing.ts","../../../node_modules/rango-types/src/api/shared/transactions.ts","../../../node_modules/rango-types/src/api/shared/txs/ton.ts","../src/types/utils/errors.ts","../src/utils/promise.ts","../src/services/executor.ts","../src/utils/errors.ts","../src/services/client.ts"],"sourcesContent":["import { Asset } from 'rango-types/lib/api/basic'\nexport * from 'rango-types/lib/api/basic/common'\n\nexport function assetToString(asset: Asset): string {\n if (!!asset.address)\n return `${asset.blockchain}.${asset.symbol}--${asset.address}`\n else return `${asset.blockchain}.${asset.symbol}`\n}\n","import {\n BlockchainMeta,\n CosmosBlockchainMeta,\n EvmBlockchainMeta,\n SolanaBlockchainMeta,\n StarkNetBlockchainMeta,\n TonBlockchainMeta,\n TransferBlockchainMeta,\n TronBlockchainMeta,\n} from './meta.js'\n\nexport const isEvmBlockchain = (\n blockchainMeta: BlockchainMeta\n): blockchainMeta is EvmBlockchainMeta => blockchainMeta.type === 'EVM'\n\nexport const isCosmosBlockchain = (\n blockchainMeta: BlockchainMeta\n): blockchainMeta is CosmosBlockchainMeta => blockchainMeta.type === 'COSMOS'\n\nexport const isSolanaBlockchain = (\n blockchainMeta: BlockchainMeta\n): blockchainMeta is SolanaBlockchainMeta => blockchainMeta.type === 'SOLANA'\n\nexport const isTronBlockchain = (\n blockchainMeta: BlockchainMeta\n): blockchainMeta is TronBlockchainMeta => blockchainMeta.type === 'TRON'\n\nexport const isTransferBlockchain = (\n blockchainMeta: BlockchainMeta\n): blockchainMeta is TransferBlockchainMeta =>\n blockchainMeta.type === 'TRANSFER'\n\nexport const isStarknetBlockchain = (\n blockchainMeta: BlockchainMeta\n): blockchainMeta is StarkNetBlockchainMeta =>\n blockchainMeta.type === 'STARKNET'\n\nexport const isTonBlockchain = (\n blockchainMeta: BlockchainMeta\n): blockchainMeta is TonBlockchainMeta => blockchainMeta.type === 'TON'\n\nexport const evmBlockchains = (blockchains: BlockchainMeta[]) =>\n blockchains.filter(isEvmBlockchain)\n\nexport const solanaBlockchain = (blockchains: BlockchainMeta[]) =>\n blockchains.filter(isSolanaBlockchain)\n\nexport const starknetBlockchain = (blockchains: BlockchainMeta[]) =>\n blockchains.filter(isStarknetBlockchain)\n\nexport const tronBlockchain = (blockchains: BlockchainMeta[]) =>\n blockchains.filter(isTronBlockchain)\n\nexport const cosmosBlockchains = (blockchains: BlockchainMeta[]) =>\n blockchains.filter(isCosmosBlockchain)\n\nexport const transferBlockchains = (blockchains: BlockchainMeta[]) =>\n blockchains.filter(isTransferBlockchain)\n\nexport const tonBlockchain = (blockchains: BlockchainMeta[]) =>\n blockchains.filter(isTonBlockchain)\n","/**\n * Routing Result Type\n *\n */\nexport enum RoutingResultType {\n OK = 'OK',\n HIGH_IMPACT = 'HIGH_IMPACT',\n NO_ROUTE = 'NO_ROUTE',\n INPUT_LIMIT_ISSUE = 'INPUT_LIMIT_ISSUE',\n HIGH_IMPACT_FOR_CREATE_TX = 'HIGH_IMPACT_FOR_CREATE_TX',\n}\n","/**\n * The type of transaction\n */\nexport enum TransactionType {\n EVM = 'EVM',\n TRANSFER = 'TRANSFER',\n COSMOS = 'COSMOS',\n SOLANA = 'SOLANA',\n TRON = 'TRON',\n STARKNET = 'STARKNET',\n TON = 'TON',\n}\n\n/**\n * The type of transaction\n * @deprecated use TransactionType instead\n */\nexport enum GenericTransactionType {\n EVM = 'EVM',\n TRANSFER = 'TRANSFER',\n COSMOS = 'COSMOS',\n SOLANA = 'SOLANA',\n}\n\n/**\n * A transaction's url that can be displayed to advanced user to track the progress\n *\n * @property {string} url - Url of the transaction in blockchain explorer. example: https://etherscan.io/tx/0xa1a3...\n * @property {string | null} description - A custom display name to help user distinguish the transactions from each\n * other. Example: Inbound, Outbound, Bridge, or null\n *\n */\nexport type SwapExplorerUrl = {\n description: string | null\n url: string\n}\n\n/**\n * APIErrorCode\n *\n * Error code of a swap failure\n *\n */\nexport type APIErrorCode =\n | 'TX_FAIL'\n | 'TX_EXPIRED'\n | 'FETCH_TX_FAILED'\n | 'USER_REJECT'\n | 'USER_CANCEL'\n | 'USER_CANCELED_TX'\n | 'CALL_WALLET_FAILED'\n | 'SEND_TX_FAILED'\n | 'CALL_OR_SEND_FAILED'\n | 'TX_FAILED_IN_BLOCKCHAIN'\n | 'CLIENT_UNEXPECTED_BEHAVIOUR'\n | 'INSUFFICIENT_APPROVE'\n\n/**\n * The function checks if a given string value is a valid API error code.\n * @param {string} value - a string that represents a possible API error code.\n * @returns A boolean value is being returned, indicating whether the input `value` is of type\n * `APIErrorCode` or not.\n */\nexport function isAPIErrorCode(value: string): value is APIErrorCode {\n return [\n 'TX_FAIL',\n 'TX_EXPIRED',\n 'FETCH_TX_FAILED',\n 'USER_REJECT',\n 'USER_CANCEL',\n 'USER_CANCELED_TX',\n 'CALL_WALLET_FAILED',\n 'SEND_TX_FAILED',\n 'CALL_OR_SEND_FAILED',\n 'TX_FAILED_IN_BLOCKCHAIN',\n 'CLIENT_UNEXPECTED_BEHAVIOUR',\n 'INSUFFICIENT_APPROVE',\n ].includes(value)\n}\n\n/**\n * ReportTransactionRequest\n *\n * It should be used when an error happened in client and we want to inform server that transaction failed,\n * E.g. user rejected the transaction dialog or and an RPC error raised during signing tx by user.\n *\n * @property {string} requestId - The requestId from best route endpoint\n * @property {APIErrorCode} eventType - Type of the event that happened, example: USER_REJECT\n * @property {number} [step] - Step number in which failure happened\n * @property {string} [reason] - Reason or message for the error\n * @property {[key: string]: string} [data] - @deprecated A list of key-value for extra details\n * @property {wallet?: string, errorCode? string} [tags] - A list of key-value for pre-defined tags\n *\n */\nexport type ReportTransactionRequest = {\n requestId: string\n eventType: APIErrorCode\n step?: number\n reason?: string\n data?: { [key: string]: string }\n tags?: { wallet?: string; errorCode?: string }\n}\n\n/**\n * The status of transaction in tracking\n */\nexport enum TransactionStatus {\n FAILED = 'failed',\n RUNNING = 'running',\n SUCCESS = 'success',\n}\n\n/**\n * Response body of check-approval\n * You could stop check approval if:\n * 1- approved successfully\n * => isApproved = true\n * 2- approval transaction failed\n * => isApproved = false && txStatus === 'failed'\n * 3- approval transaction succeeded but currentApprovedAmount is still less than requiredApprovedAmount\n * (e.g. user changed transaction data and enter another approve amount in MetaMask)\n * => isApproved = false && txStatus == 'success'\n *\n * @property {boolean} isApproved - A flag which indicates that the approve tx is done or not\n * @property {TransactionStatus | null} txStatus - Status of approve transaction in blockchain,\n * if isArppoved is false and txStatus is failed, it seems that approve transaction failed in blockchain\n * @property {string | null} requiredApprovedAmount - required amount to be approved by user\n * @property {string | null} currentApprovedAmount - current approved amount by user\n *\n */\nexport type CheckApprovalResponse = {\n isApproved: boolean\n txStatus: TransactionStatus | null\n requiredApprovedAmount: string | null\n currentApprovedAmount: string | null\n}\n","import { TransactionType } from '../transactions.js'\nimport { BaseTransaction } from './base.js'\n\nexport enum TonChainID {\n MAINNET = '-239',\n TESTNET = '-3',\n}\n\n/**\n * @property {string} address - Receiver's address\n * @property {string} amount - Amount to send in nanoTon\n * @property {string} [stateInit] - Contract specific data to add to the transaction\n * @property {string} [payload] - Contract specific data to add to the transaction\n */\nexport interface TonMessage {\n address: string\n amount: string\n stateInit?: string\n payload?: string\n}\n\n/**\n * This type of transaction is used for all Ton transactions\n *\n * @property {TransactionType} type - This field equals to TON for all Ton transactions\n * @property {number} validUntil - Sending transaction deadline in unix epoch seconds\n * @property {TonChainID} [network] - The network (mainnet or testnet) where DApp intends to send the transaction. If not set, the transaction is sent to the network currently set in the wallet, but this is not safe and DApp should always strive to set the network. If the network parameter is set, but the wallet has a different network set, the wallet should show an alert and DO NOT ALLOW TO SEND this transaction\n * @property {string} [from] - The sender address in '<wc>:<hex>' format from which DApp intends to send the transaction. Current account.address by default\n * @property {TonMessage[]} messages - Messages to send: min is 1, max is 4\n */\nexport interface TonTransaction extends BaseTransaction {\n type: TransactionType.TON\n validUntil: number\n network?: TonChainID\n from?: string\n messages: TonMessage[]\n}\n\nexport const isTonTransaction = (transaction: {\n type: TransactionType\n}): transaction is TonTransaction => transaction.type === TransactionType.TON\n","export const MetamaskErrorCodes = {\n rpc: {\n invalidInput: -32000,\n resourceNotFound: -32001,\n resourceUnavailable: -32002,\n transactionRejected: -32003,\n methodNotSupported: -32004,\n limitExceeded: -32005,\n parse: -32700,\n invalidRequest: -32600,\n methodNotFound: -32601,\n invalidParams: -32602,\n internal: -32603,\n },\n provider: {\n userRejectedRequest: 4001,\n unauthorized: 4100,\n unsupportedMethod: 4200,\n disconnected: 4900,\n chainDisconnected: 4901,\n },\n}\n","export function sleep(ms: number) {\n return new Promise((resolve) => setTimeout(resolve, ms))\n}\n","import { Signer } from 'ethers'\nimport { RangoClient } from './client'\nimport { EvmTransaction } from '../types/api/txs'\nimport {\n StatusResponse,\n SwapResponse,\n TransactionStatus,\n TransactionType,\n} from '../types/api/transactions'\nimport { sleep } from '../utils/promise'\n\nexport function prepareEvmTransaction(\n evmTx: EvmTransaction,\n isApprove: boolean\n) {\n const gasPrice =\n !!evmTx.gasPrice && !evmTx.gasPrice.startsWith('0x')\n ? '0x' + parseInt(evmTx.gasPrice).toString(16)\n : null\n const manipulatedTx = {\n ...evmTx,\n gasPrice,\n }\n let tx = {}\n if (!!manipulatedTx.from) tx = { ...tx, from: manipulatedTx.from }\n if (isApprove) {\n if (!!manipulatedTx.approveTo) tx = { ...tx, to: manipulatedTx.approveTo }\n if (!!manipulatedTx.approveData)\n tx = { ...tx, data: manipulatedTx.approveData }\n } else {\n if (!!manipulatedTx.txTo) tx = { ...tx, to: manipulatedTx.txTo }\n if (!!manipulatedTx.txData) tx = { ...tx, data: manipulatedTx.txData }\n if (!!manipulatedTx.value) tx = { ...tx, value: manipulatedTx.value }\n if (!!manipulatedTx.gasLimit)\n tx = { ...tx, gasLimit: manipulatedTx.gasLimit }\n if (!!manipulatedTx.gasPrice)\n tx = { ...tx, gasPrice: manipulatedTx.gasPrice }\n }\n return tx\n}\n\nasync function checkApprovalSync(\n requestId: string,\n txId: string,\n rangoClient: RangoClient\n): Promise<boolean> {\n while (true) {\n try {\n const approvalResponse = await rangoClient.isApproved(requestId, txId)\n if (approvalResponse?.isApproved) return true\n if (\n !approvalResponse?.isApproved &&\n approvalResponse?.txStatus === TransactionStatus.FAILED\n )\n return false\n } catch (err) {\n console.log('ignorinig error', { err })\n }\n await sleep(3_000)\n }\n}\n\nexport const checkTransactionStatusSync = async (\n requestId: string,\n txId: string,\n rangoClient: RangoClient\n) => {\n let txStatus: StatusResponse | undefined\n while (true) {\n try {\n txStatus = await rangoClient.status({\n requestId,\n txId,\n })\n } catch (err) {\n console.log('ignorinig error', { err })\n }\n if (!!txStatus) {\n if (\n !!txStatus.status &&\n [TransactionStatus.FAILED, TransactionStatus.SUCCESS].includes(\n txStatus.status\n )\n ) {\n return txStatus\n }\n }\n await sleep(3_000)\n }\n}\n\nexport const executeEvmRoute = async (\n client: RangoClient,\n signer: Signer,\n route: SwapResponse\n): Promise<StatusResponse> => {\n const { tx, requestId, error, resultType } = route\n if (resultType != 'OK') throw new Error(resultType)\n if (!!error || !tx)\n throw new Error(error || 'Error creating the transaction.')\n if (tx?.type !== TransactionType.EVM)\n throw new Error('Non Evm transactions are not supported yet.')\n const evmTransaction = tx as EvmTransaction\n if (!evmTransaction) throw new Error('Transaction is null. Please try again!')\n const txChainId = parseInt(evmTransaction.blockChain.chainId || '-1')\n let signerChainId = await signer.getChainId()\n if (signerChainId !== txChainId) {\n throw new Error(\n `Signer chainId ${signerChainId} doesn't match required chainId ${txChainId}.`\n )\n }\n if (!!evmTransaction.approveTo && !!evmTransaction.approveData) {\n const approveTxData = prepareEvmTransaction(evmTransaction, true)\n const approveTx = await signer.sendTransaction(approveTxData)\n approveTx.wait()\n const isApproved = await checkApprovalSync(\n requestId,\n approveTx.hash,\n client\n )\n if (!isApproved) throw new Error('Error in approve transaction.')\n }\n signerChainId = await signer.getChainId()\n if (signerChainId !== txChainId) {\n throw new Error(\n `Signer chainId ${signerChainId} doesn't match required chainId ${txChainId}.`\n )\n }\n const mainTxData = prepareEvmTransaction(evmTransaction, false)\n const mainTx = await signer.sendTransaction(mainTxData)\n mainTx.wait()\n const status = await checkTransactionStatusSync(\n requestId,\n mainTx.hash,\n client\n )\n if (status.status !== TransactionStatus.SUCCESS)\n throw new Error(`Cross-chain swap failed. ${status.error || ''}`)\n return status\n}\n","import { getMessageFromCode } from 'eth-rpc-errors'\nimport { MetamaskErrorCodes } from '../types/utils/errors'\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport const prettifyError = (error: any) => {\n if (!error) return error\n if (error.code && (error.code === 'ACTION_REJECTED' || error.code === 4001))\n return new Error('Transaction Rejected')\n if (error && typeof error.code === 'number') {\n if (Object.values(MetamaskErrorCodes.provider).includes(error.code)) {\n return new Error(getMessageFromCode(error.code))\n }\n if (Object.values(MetamaskErrorCodes.rpc).includes(error.code)) {\n if (\n error.code === MetamaskErrorCodes.rpc.internal &&\n error.message?.includes('underpriced')\n )\n return new Error('Transaction underpriced')\n if (\n error.message?.includes('intrinsic gas too low') ||\n error.message?.includes('out of gas')\n )\n return new Error('This Gas limit is low.')\n return new Error(getMessageFromCode(error.code))\n }\n }\n if (error.message) return new Error(error.message)\n return error\n}\n","import uuid from 'uuid-random'\n\nimport {\n MetaRequest,\n MetaResponse,\n QuoteRequest,\n QuoteResponse,\n CheckApprovalResponse,\n StatusRequest,\n StatusResponse,\n SwapRequest,\n SwapResponse,\n ReportTransactionRequest,\n WalletDetailsResponse,\n assetToString,\n BlockchainMeta,\n RequestOptions,\n MessagingProtocolsResponse,\n SwapperMetaExtended,\n ConnectedAssetsResponse,\n ConnectedAssetsRequest,\n CustomTokenRequest,\n CustomTokenResponse,\n TokenBalanceRequest,\n TokenBalanceResponse,\n} from '../types'\nimport { Signer } from 'ethers'\nimport { executeEvmRoute as executeEvmRoute } from './executor'\nimport { prettifyError } from '../utils/errors'\nimport axios, { AxiosInstance } from 'axios'\n\ntype WalletAddress = { blockchain: string; address: string }\n\nexport class RangoClient {\n private readonly deviceId: string\n private readonly apiKey: string\n private readonly apiUrl: string\n private readonly httpService: AxiosInstance\n\n constructor(apiKey: string, debug = false, apiUrl?: string) {\n this.apiUrl = apiUrl || 'https://api.rango.exchange'\n this.apiKey = apiKey\n try {\n if (typeof window !== 'undefined') {\n const deviceId = localStorage.getItem('deviceId')\n if (deviceId) {\n this.deviceId = deviceId\n } else {\n const generatedId = uuid()\n localStorage.setItem('deviceId', generatedId)\n this.deviceId = generatedId\n }\n } else {\n this.deviceId = uuid()\n }\n } catch (e) {\n this.deviceId = uuid()\n }\n this.httpService = axios.create({\n baseURL: this.apiUrl,\n })\n if (debug) {\n this.httpService.interceptors.request.use((request) => {\n console.log('Starting Request', JSON.stringify(request, null, 2))\n return request\n })\n this.httpService.interceptors.response.use((response) => {\n console.log('Response:', JSON.stringify(response, null, 2))\n return response\n })\n }\n }\n\n public async meta(\n metaRequest?: MetaRequest,\n options?: RequestOptions\n ): Promise<MetaResponse> {\n const params = {\n ...metaRequest,\n blockchains: metaRequest?.blockchains?.join(),\n swappers: metaRequest?.swappers?.join(),\n swappersGroups: metaRequest?.swappersGroups?.join(),\n transactionTypes: metaRequest?.transactionTypes?.join(),\n }\n const axiosResponse = await this.httpService.get<MetaResponse>(\n `/basic/meta?apiKey=${this.apiKey}`,\n {\n params,\n ...options,\n }\n )\n return axiosResponse.data\n }\n\n public async chains(options?: RequestOptions): Promise<BlockchainMeta[]> {\n const axiosResponse = await this.httpService.get<BlockchainMeta[]>(\n `/basic/meta/blockchains?apiKey=${this.apiKey}`,\n { ...options }\n )\n return axiosResponse.data\n }\n\n public async swappers(options?: RequestOptions): Promise<SwapperMetaExtended[]> {\n const axiosResponse = await this.httpService.get<SwapperMetaExtended[]>(\n `/basic/meta/swappers?apiKey=${this.apiKey}`,\n { ...options }\n )\n return axiosResponse.data\n }\n\n public async messagingProtocols(\n options?: RequestOptions\n ): Promise<MessagingProtocolsResponse> {\n const axiosResponse =\n await this.httpService.get<MessagingProtocolsResponse>(\n `/basic/meta/messaging-protocols?apiKey=${this.apiKey}`,\n { ...options }\n )\n return axiosResponse.data\n }\n\n\n public async token(\n customTokenRequest?: CustomTokenRequest,\n options?: RequestOptions\n ): Promise<CustomTokenResponse> {\n const axiosResponse = await this.httpService.get<CustomTokenResponse>(\n `/basic/meta/custom-token?apiKey=${this.apiKey}`,\n { params: customTokenRequest, ...options }\n )\n return axiosResponse.data\n }\n\n public async quote(\n quoteRequest: QuoteRequest,\n options?: RequestOptions\n ): Promise<QuoteResponse> {\n const body = {\n ...quoteRequest,\n from: assetToString(quoteRequest.from),\n to: assetToString(quoteRequest.to),\n swappers:\n !!quoteRequest.swappers && quoteRequest.swappers.length > 0\n ? quoteRequest.swappers.join(',')\n : undefined,\n swapperGroups:\n !!quoteRequest.swapperGroups && quoteRequest.swapperGroups.length > 0\n ? quoteRequest.swapperGroups.join(',')\n : undefined,\n messagingProtocols:\n !!quoteRequest.messagingProtocols &&\n quoteRequest.messagingProtocols.length > 0\n ? quoteRequest.messagingProtocols.join(',')\n : undefined,\n }\n const axiosResponse = await this.httpService.get<QuoteResponse>(\n `/basic/quote?apiKey=${this.apiKey}`,\n {\n params: body,\n headers: { 'X-Rango-Id': this.deviceId },\n ...options,\n }\n )\n return axiosResponse.data\n }\n\n public async isApproved(\n requestId: string,\n txId?: string,\n options?: RequestOptions\n ): Promise<CheckApprovalResponse> {\n const axiosResponse = await this.httpService.get<CheckApprovalResponse>(\n `/basic/is-approved?apiKey=${this.apiKey}`,\n {\n params: { requestId, txId },\n headers: { 'X-Rango-Id': this.deviceId },\n ...options,\n }\n )\n return axiosResponse.data\n }\n\n public async status(\n statusRequest: StatusRequest,\n options?: RequestOptions\n ): Promise<StatusResponse> {\n const axiosResponse = await this.httpService.get<StatusResponse>(\n `/basic/status?apiKey=${this.apiKey}`,\n {\n params: statusRequest,\n headers: { 'X-Rango-Id': this.deviceId },\n ...options,\n }\n )\n return axiosResponse.data\n }\n\n public async swap(\n swapRequest: SwapRequest,\n options?: RequestOptions\n ): Promise<SwapResponse> {\n const body = {\n ...swapRequest,\n from: assetToString(swapRequest.from),\n to: assetToString(swapRequest.to),\n referrerAddress: swapRequest.referrerAddress || null,\n referrerFee: swapRequest.referrerFee || null,\n disableEstimate: swapRequest.disableEstimate || false,\n swappers:\n !!swapRequest.swappers && swapRequest.swappers.length > 0\n ? swapRequest.swappers.join(',')\n : undefined,\n swapperGroups:\n !!swapRequest.swapperGroups && swapRequest.swapperGroups.length > 0\n ? swapRequest.swapperGroups.join(',')\n : undefined,\n messagingProtocols:\n !!swapRequest.messagingProtocols &&\n swapRequest.messagingProtocols.length > 0\n ? swapRequest.messagingProtocols.join(',')\n : undefined,\n }\n const axiosResponse = await this.httpService.get<SwapResponse>(\n `/basic/swap?apiKey=${this.apiKey}`,\n {\n params: body,\n headers: { 'X-Rango-Id': this.deviceId },\n ...options,\n }\n )\n return axiosResponse.data\n }\n\n public async reportFailure(\n requestBody: ReportTransactionRequest,\n options?: RequestOptions\n ): Promise<void> {\n await this.httpService.post(\n `/basic/report-tx?apiKey=${this.apiKey}`,\n requestBody,\n {\n headers: { 'X-Rango-Id': this.deviceId },\n ...options,\n }\n )\n }\n\n public async balance(\n walletAddress: WalletAddress,\n options?: RequestOptions\n ): Promise<WalletDetailsResponse> {\n const axiosResponse = await this.httpService.get<WalletDetailsResponse>(\n `/basic/balance?apiKey=${this.apiKey}`,\n {\n params: walletAddress,\n headers: { 'X-Rango-Id': this.deviceId },\n ...options,\n }\n )\n return axiosResponse.data\n }\n\n public async tokenBalance(\n tokenBalanceRequest: TokenBalanceRequest,\n options?: RequestOptions\n ): Promise<TokenBalanceResponse> {\n const axiosResponse = await this.httpService.get<TokenBalanceResponse>(\n `/basic/token-balance?apiKey=${this.apiKey}`,\n { params: tokenBalanceRequest, ...options }\n )\n return axiosResponse.data\n }\n\n public async executeEvmRoute(\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n signer: any,\n route: SwapResponse\n ): Promise<StatusResponse> {\n try {\n return await executeEvmRoute(this, signer as Signer, route)\n } catch (error) {\n const prettifiedError = prettifyError(error)\n try {\n const message = prettifiedError?.message || 'Error executing the route'\n this.reportFailure({\n requestId: route.requestId,\n eventType: 'TX_FAIL',\n reason: message,\n })\n } catch (err) {\n console.log({ err })\n }\n throw prettifiedError\n }\n }\n\n public async connectedAssets(\n connectedAssetsRequest: ConnectedAssetsRequest,\n options?: RequestOptions\n ): Promise<ConnectedAssetsResponse> {\n const body = {\n from: assetToString(connectedAssetsRequest.from),\n }\n\n const axiosResponse = await this.httpService.get<ConnectedAssetsResponse>(\n `/basic/connected-assets?apiKey=${this.apiKey}`,\n {\n params: body,\n headers: { 'X-Rango-Id': this.deviceId },\n ...options,\n }\n )\n return axiosResponse.data\n }\n}\n"],"names":["assetToString","asset","address","blockchain","symbol","isEvmBlockchain","blockchainMeta","MetamaskErrorCodes","rpc","invalidInput","resourceNotFound","resourceUnavailable","transactionRejected","methodNotSupported","limitExceeded","parse","invalidRequest","methodNotFound","invalidParams","internal","provider","userRejectedRequest","unauthorized","unsupportedMethod","disconnected","chainDisconnected","sleep","ms","Promise","resolve","setTimeout","prepareEvmTransaction","evmTx","isApprove","gasPrice","startsWith","parseInt","toString","manipulatedTx","_extends","tx","from","approveTo","to","approveData","data","txTo","txData","value","gasLimit","checkApprovalSync","_x","_x2","_x3","_checkApprovalSync","apply","arguments","_asyncToGenerator","_regeneratorRuntime","mark","_callee3","requestId","txId","rangoClient","approvalResponse","wrap","_callee3$","_context3","prev","next","isApproved","sent","abrupt","txStatus","TransactionStatus","FAILED","t0","console","log","err","stop","checkTransactionStatusSync","_ref","_callee","_callee$","_context","status","SUCCESS","includes","_x4","_x5","_x6","executeEvmRoute","_ref2","_callee2","client","signer","route","error","resultType","evmTransaction","txChainId","signerChainId","approveTxData","approveTx","mainTxData","mainTx","_callee2$","_context2","Error","type","TransactionType","EVM","blockChain","chainId","getChainId","sendTransaction","wait","hash","_x7","_x8","_x9","prettifyError","code","Object","values","getMessageFromCode","_error$message","_error$message2","_error$message3","message","RangoClient","apiKey","debug","apiUrl","window","deviceId","localStorage","getItem","generatedId","uuid","setItem","e","httpService","axios","create","baseURL","interceptors","request","use","JSON","stringify","response","_proto","prototype","meta","_meta","metaRequest","options","_metaRequest$blockcha","_metaRequest$swappers","_metaRequest$swappers2","_metaRequest$transact","params","axiosResponse","blockchains","join","swappers","swappersGroups","transactionTypes","get","chains","_chains","_swappers","messagingProtocols","_messagingProtocols","_callee4","_callee4$","_context4","token","_token","_callee5","customTokenRequest","_callee5$","_context5","quote","_quote","_callee6","quoteRequest","body","_callee6$","_context6","length","undefined","swapperGroups","headers","_isApproved","_callee7","_callee7$","_context7","_x10","_x11","_x12","_status","_callee8","statusRequest","_callee8$","_context8","_x13","_x14","swap","_swap","_callee9","swapRequest","_callee9$","_context9","referrerAddress","referrerFee","disableEstimate","_x15","_x16","reportFailure","_reportFailure","_callee10","requestBody","_callee10$","_context10","post","_x17","_x18","balance","_balance","_callee11","walletAddress","_callee11$","_context11","_x19","_x20","tokenBalance","_tokenBalance","_callee12","tokenBalanceRequest","_callee12$","_context12","_x21","_x22","_executeEvmRoute2","_callee13","prettifiedError","_callee13$","_context13","eventType","reason","_x23","_x24","connectedAssets","_connectedAssets","_callee14","connectedAssetsRequest","_callee14$","_context14","_x25","_x26"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;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