rango-sdk-basic 0.1.51 → 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
|
@@ -395,6 +395,7 @@ var RoutingResultType;
|
|
|
395
395
|
RoutingResultType["HIGH_IMPACT"] = "HIGH_IMPACT";
|
|
396
396
|
RoutingResultType["NO_ROUTE"] = "NO_ROUTE";
|
|
397
397
|
RoutingResultType["INPUT_LIMIT_ISSUE"] = "INPUT_LIMIT_ISSUE";
|
|
398
|
+
RoutingResultType["HIGH_IMPACT_FOR_CREATE_TX"] = "HIGH_IMPACT_FOR_CREATE_TX";
|
|
398
399
|
})(RoutingResultType || (RoutingResultType = {}));
|
|
399
400
|
|
|
400
401
|
/**
|
|
@@ -868,11 +869,35 @@ var RangoClient = /*#__PURE__*/function () {
|
|
|
868
869
|
}
|
|
869
870
|
return messagingProtocols;
|
|
870
871
|
}();
|
|
871
|
-
_proto.
|
|
872
|
-
var
|
|
873
|
-
var
|
|
872
|
+
_proto.token = /*#__PURE__*/function () {
|
|
873
|
+
var _token = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(customTokenRequest, options) {
|
|
874
|
+
var axiosResponse;
|
|
874
875
|
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
|
|
875
876
|
while (1) switch (_context5.prev = _context5.next) {
|
|
877
|
+
case 0:
|
|
878
|
+
_context5.next = 2;
|
|
879
|
+
return this.httpService.get("/basic/meta/custom-token?apiKey=" + this.apiKey, _extends({
|
|
880
|
+
params: customTokenRequest
|
|
881
|
+
}, options));
|
|
882
|
+
case 2:
|
|
883
|
+
axiosResponse = _context5.sent;
|
|
884
|
+
return _context5.abrupt("return", axiosResponse.data);
|
|
885
|
+
case 4:
|
|
886
|
+
case "end":
|
|
887
|
+
return _context5.stop();
|
|
888
|
+
}
|
|
889
|
+
}, _callee5, this);
|
|
890
|
+
}));
|
|
891
|
+
function token(_x6, _x7) {
|
|
892
|
+
return _token.apply(this, arguments);
|
|
893
|
+
}
|
|
894
|
+
return token;
|
|
895
|
+
}();
|
|
896
|
+
_proto.quote = /*#__PURE__*/function () {
|
|
897
|
+
var _quote = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(quoteRequest, options) {
|
|
898
|
+
var body, axiosResponse;
|
|
899
|
+
return _regeneratorRuntime().wrap(function _callee6$(_context6) {
|
|
900
|
+
while (1) switch (_context6.prev = _context6.next) {
|
|
876
901
|
case 0:
|
|
877
902
|
body = _extends({}, quoteRequest, {
|
|
878
903
|
from: assetToString(quoteRequest.from),
|
|
@@ -881,7 +906,7 @@ var RangoClient = /*#__PURE__*/function () {
|
|
|
881
906
|
swapperGroups: !!quoteRequest.swapperGroups && quoteRequest.swapperGroups.length > 0 ? quoteRequest.swapperGroups.join(',') : undefined,
|
|
882
907
|
messagingProtocols: !!quoteRequest.messagingProtocols && quoteRequest.messagingProtocols.length > 0 ? quoteRequest.messagingProtocols.join(',') : undefined
|
|
883
908
|
});
|
|
884
|
-
|
|
909
|
+
_context6.next = 3;
|
|
885
910
|
return this.httpService.get("/basic/quote?apiKey=" + this.apiKey, _extends({
|
|
886
911
|
params: body,
|
|
887
912
|
headers: {
|
|
@@ -889,26 +914,26 @@ var RangoClient = /*#__PURE__*/function () {
|
|
|
889
914
|
}
|
|
890
915
|
}, options));
|
|
891
916
|
case 3:
|
|
892
|
-
axiosResponse =
|
|
893
|
-
return
|
|
917
|
+
axiosResponse = _context6.sent;
|
|
918
|
+
return _context6.abrupt("return", axiosResponse.data);
|
|
894
919
|
case 5:
|
|
895
920
|
case "end":
|
|
896
|
-
return
|
|
921
|
+
return _context6.stop();
|
|
897
922
|
}
|
|
898
|
-
},
|
|
923
|
+
}, _callee6, this);
|
|
899
924
|
}));
|
|
900
|
-
function quote(
|
|
925
|
+
function quote(_x8, _x9) {
|
|
901
926
|
return _quote.apply(this, arguments);
|
|
902
927
|
}
|
|
903
928
|
return quote;
|
|
904
929
|
}();
|
|
905
930
|
_proto.isApproved = /*#__PURE__*/function () {
|
|
906
|
-
var _isApproved = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
931
|
+
var _isApproved = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7(requestId, txId, options) {
|
|
907
932
|
var axiosResponse;
|
|
908
|
-
return _regeneratorRuntime().wrap(function
|
|
909
|
-
while (1) switch (
|
|
933
|
+
return _regeneratorRuntime().wrap(function _callee7$(_context7) {
|
|
934
|
+
while (1) switch (_context7.prev = _context7.next) {
|
|
910
935
|
case 0:
|
|
911
|
-
|
|
936
|
+
_context7.next = 2;
|
|
912
937
|
return this.httpService.get("/basic/is-approved?apiKey=" + this.apiKey, _extends({
|
|
913
938
|
params: {
|
|
914
939
|
requestId: requestId,
|
|
@@ -919,26 +944,26 @@ var RangoClient = /*#__PURE__*/function () {
|
|
|
919
944
|
}
|
|
920
945
|
}, options));
|
|
921
946
|
case 2:
|
|
922
|
-
axiosResponse =
|
|
923
|
-
return
|
|
947
|
+
axiosResponse = _context7.sent;
|
|
948
|
+
return _context7.abrupt("return", axiosResponse.data);
|
|
924
949
|
case 4:
|
|
925
950
|
case "end":
|
|
926
|
-
return
|
|
951
|
+
return _context7.stop();
|
|
927
952
|
}
|
|
928
|
-
},
|
|
953
|
+
}, _callee7, this);
|
|
929
954
|
}));
|
|
930
|
-
function isApproved(
|
|
955
|
+
function isApproved(_x10, _x11, _x12) {
|
|
931
956
|
return _isApproved.apply(this, arguments);
|
|
932
957
|
}
|
|
933
958
|
return isApproved;
|
|
934
959
|
}();
|
|
935
960
|
_proto.status = /*#__PURE__*/function () {
|
|
936
|
-
var _status = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
961
|
+
var _status = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8(statusRequest, options) {
|
|
937
962
|
var axiosResponse;
|
|
938
|
-
return _regeneratorRuntime().wrap(function
|
|
939
|
-
while (1) switch (
|
|
963
|
+
return _regeneratorRuntime().wrap(function _callee8$(_context8) {
|
|
964
|
+
while (1) switch (_context8.prev = _context8.next) {
|
|
940
965
|
case 0:
|
|
941
|
-
|
|
966
|
+
_context8.next = 2;
|
|
942
967
|
return this.httpService.get("/basic/status?apiKey=" + this.apiKey, _extends({
|
|
943
968
|
params: statusRequest,
|
|
944
969
|
headers: {
|
|
@@ -946,24 +971,24 @@ var RangoClient = /*#__PURE__*/function () {
|
|
|
946
971
|
}
|
|
947
972
|
}, options));
|
|
948
973
|
case 2:
|
|
949
|
-
axiosResponse =
|
|
950
|
-
return
|
|
974
|
+
axiosResponse = _context8.sent;
|
|
975
|
+
return _context8.abrupt("return", axiosResponse.data);
|
|
951
976
|
case 4:
|
|
952
977
|
case "end":
|
|
953
|
-
return
|
|
978
|
+
return _context8.stop();
|
|
954
979
|
}
|
|
955
|
-
},
|
|
980
|
+
}, _callee8, this);
|
|
956
981
|
}));
|
|
957
|
-
function status(
|
|
982
|
+
function status(_x13, _x14) {
|
|
958
983
|
return _status.apply(this, arguments);
|
|
959
984
|
}
|
|
960
985
|
return status;
|
|
961
986
|
}();
|
|
962
987
|
_proto.swap = /*#__PURE__*/function () {
|
|
963
|
-
var _swap = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
988
|
+
var _swap = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee9(swapRequest, options) {
|
|
964
989
|
var body, axiosResponse;
|
|
965
|
-
return _regeneratorRuntime().wrap(function
|
|
966
|
-
while (1) switch (
|
|
990
|
+
return _regeneratorRuntime().wrap(function _callee9$(_context9) {
|
|
991
|
+
while (1) switch (_context9.prev = _context9.next) {
|
|
967
992
|
case 0:
|
|
968
993
|
body = _extends({}, swapRequest, {
|
|
969
994
|
from: assetToString(swapRequest.from),
|
|
@@ -975,7 +1000,7 @@ var RangoClient = /*#__PURE__*/function () {
|
|
|
975
1000
|
swapperGroups: !!swapRequest.swapperGroups && swapRequest.swapperGroups.length > 0 ? swapRequest.swapperGroups.join(',') : undefined,
|
|
976
1001
|
messagingProtocols: !!swapRequest.messagingProtocols && swapRequest.messagingProtocols.length > 0 ? swapRequest.messagingProtocols.join(',') : undefined
|
|
977
1002
|
});
|
|
978
|
-
|
|
1003
|
+
_context9.next = 3;
|
|
979
1004
|
return this.httpService.get("/basic/swap?apiKey=" + this.apiKey, _extends({
|
|
980
1005
|
params: body,
|
|
981
1006
|
headers: {
|
|
@@ -983,25 +1008,25 @@ var RangoClient = /*#__PURE__*/function () {
|
|
|
983
1008
|
}
|
|
984
1009
|
}, options));
|
|
985
1010
|
case 3:
|
|
986
|
-
axiosResponse =
|
|
987
|
-
return
|
|
1011
|
+
axiosResponse = _context9.sent;
|
|
1012
|
+
return _context9.abrupt("return", axiosResponse.data);
|
|
988
1013
|
case 5:
|
|
989
1014
|
case "end":
|
|
990
|
-
return
|
|
1015
|
+
return _context9.stop();
|
|
991
1016
|
}
|
|
992
|
-
},
|
|
1017
|
+
}, _callee9, this);
|
|
993
1018
|
}));
|
|
994
|
-
function swap(
|
|
1019
|
+
function swap(_x15, _x16) {
|
|
995
1020
|
return _swap.apply(this, arguments);
|
|
996
1021
|
}
|
|
997
1022
|
return swap;
|
|
998
1023
|
}();
|
|
999
1024
|
_proto.reportFailure = /*#__PURE__*/function () {
|
|
1000
|
-
var _reportFailure = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
1001
|
-
return _regeneratorRuntime().wrap(function
|
|
1002
|
-
while (1) switch (
|
|
1025
|
+
var _reportFailure = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee10(requestBody, options) {
|
|
1026
|
+
return _regeneratorRuntime().wrap(function _callee10$(_context10) {
|
|
1027
|
+
while (1) switch (_context10.prev = _context10.next) {
|
|
1003
1028
|
case 0:
|
|
1004
|
-
|
|
1029
|
+
_context10.next = 2;
|
|
1005
1030
|
return this.httpService.post("/basic/report-tx?apiKey=" + this.apiKey, requestBody, _extends({
|
|
1006
1031
|
headers: {
|
|
1007
1032
|
'X-Rango-Id': this.deviceId
|
|
@@ -1009,22 +1034,22 @@ var RangoClient = /*#__PURE__*/function () {
|
|
|
1009
1034
|
}, options));
|
|
1010
1035
|
case 2:
|
|
1011
1036
|
case "end":
|
|
1012
|
-
return
|
|
1037
|
+
return _context10.stop();
|
|
1013
1038
|
}
|
|
1014
|
-
},
|
|
1039
|
+
}, _callee10, this);
|
|
1015
1040
|
}));
|
|
1016
|
-
function reportFailure(
|
|
1041
|
+
function reportFailure(_x17, _x18) {
|
|
1017
1042
|
return _reportFailure.apply(this, arguments);
|
|
1018
1043
|
}
|
|
1019
1044
|
return reportFailure;
|
|
1020
1045
|
}();
|
|
1021
1046
|
_proto.balance = /*#__PURE__*/function () {
|
|
1022
|
-
var _balance = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
1047
|
+
var _balance = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee11(walletAddress, options) {
|
|
1023
1048
|
var axiosResponse;
|
|
1024
|
-
return _regeneratorRuntime().wrap(function
|
|
1025
|
-
while (1) switch (
|
|
1049
|
+
return _regeneratorRuntime().wrap(function _callee11$(_context11) {
|
|
1050
|
+
while (1) switch (_context11.prev = _context11.next) {
|
|
1026
1051
|
case 0:
|
|
1027
|
-
|
|
1052
|
+
_context11.next = 2;
|
|
1028
1053
|
return this.httpService.get("/basic/balance?apiKey=" + this.apiKey, _extends({
|
|
1029
1054
|
params: walletAddress,
|
|
1030
1055
|
headers: {
|
|
@@ -1032,36 +1057,60 @@ var RangoClient = /*#__PURE__*/function () {
|
|
|
1032
1057
|
}
|
|
1033
1058
|
}, options));
|
|
1034
1059
|
case 2:
|
|
1035
|
-
axiosResponse =
|
|
1036
|
-
return
|
|
1060
|
+
axiosResponse = _context11.sent;
|
|
1061
|
+
return _context11.abrupt("return", axiosResponse.data);
|
|
1037
1062
|
case 4:
|
|
1038
1063
|
case "end":
|
|
1039
|
-
return
|
|
1064
|
+
return _context11.stop();
|
|
1040
1065
|
}
|
|
1041
|
-
},
|
|
1066
|
+
}, _callee11, this);
|
|
1042
1067
|
}));
|
|
1043
|
-
function balance(
|
|
1068
|
+
function balance(_x19, _x20) {
|
|
1044
1069
|
return _balance.apply(this, arguments);
|
|
1045
1070
|
}
|
|
1046
1071
|
return balance;
|
|
1047
1072
|
}();
|
|
1073
|
+
_proto.tokenBalance = /*#__PURE__*/function () {
|
|
1074
|
+
var _tokenBalance = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee12(tokenBalanceRequest, options) {
|
|
1075
|
+
var axiosResponse;
|
|
1076
|
+
return _regeneratorRuntime().wrap(function _callee12$(_context12) {
|
|
1077
|
+
while (1) switch (_context12.prev = _context12.next) {
|
|
1078
|
+
case 0:
|
|
1079
|
+
_context12.next = 2;
|
|
1080
|
+
return this.httpService.get("/basic/token-balance?apiKey=" + this.apiKey, _extends({
|
|
1081
|
+
params: tokenBalanceRequest
|
|
1082
|
+
}, options));
|
|
1083
|
+
case 2:
|
|
1084
|
+
axiosResponse = _context12.sent;
|
|
1085
|
+
return _context12.abrupt("return", axiosResponse.data);
|
|
1086
|
+
case 4:
|
|
1087
|
+
case "end":
|
|
1088
|
+
return _context12.stop();
|
|
1089
|
+
}
|
|
1090
|
+
}, _callee12, this);
|
|
1091
|
+
}));
|
|
1092
|
+
function tokenBalance(_x21, _x22) {
|
|
1093
|
+
return _tokenBalance.apply(this, arguments);
|
|
1094
|
+
}
|
|
1095
|
+
return tokenBalance;
|
|
1096
|
+
}();
|
|
1048
1097
|
_proto.executeEvmRoute = /*#__PURE__*/function () {
|
|
1049
|
-
var _executeEvmRoute2 = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
1098
|
+
var _executeEvmRoute2 = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee13(
|
|
1050
1099
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1051
1100
|
signer, route) {
|
|
1052
1101
|
var prettifiedError, message;
|
|
1053
|
-
return _regeneratorRuntime().wrap(function
|
|
1054
|
-
while (1) switch (
|
|
1102
|
+
return _regeneratorRuntime().wrap(function _callee13$(_context13) {
|
|
1103
|
+
while (1) switch (_context13.prev = _context13.next) {
|
|
1055
1104
|
case 0:
|
|
1056
|
-
|
|
1057
|
-
|
|
1105
|
+
_context13.prev = 0;
|
|
1106
|
+
_context13.next = 3;
|
|
1058
1107
|
return executeEvmRoute(this, signer, route);
|
|
1059
1108
|
case 3:
|
|
1060
|
-
return
|
|
1109
|
+
return _context13.abrupt("return", _context13.sent);
|
|
1061
1110
|
case 6:
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
prettifiedError = prettifyError(
|
|
1111
|
+
_context13.prev = 6;
|
|
1112
|
+
_context13.t0 = _context13["catch"](0);
|
|
1113
|
+
prettifiedError = prettifyError(_context13.t0);
|
|
1065
1114
|
try {
|
|
1066
1115
|
message = (prettifiedError == null ? void 0 : prettifiedError.message) || 'Error executing the route';
|
|
1067
1116
|
this.reportFailure({
|
|
@@ -1077,25 +1126,25 @@ var RangoClient = /*#__PURE__*/function () {
|
|
|
1077
1126
|
throw prettifiedError;
|
|
1078
1127
|
case 11:
|
|
1079
1128
|
case "end":
|
|
1080
|
-
return
|
|
1129
|
+
return _context13.stop();
|
|
1081
1130
|
}
|
|
1082
|
-
},
|
|
1131
|
+
}, _callee13, this, [[0, 6]]);
|
|
1083
1132
|
}));
|
|
1084
|
-
function executeEvmRoute$1(
|
|
1133
|
+
function executeEvmRoute$1(_x23, _x24) {
|
|
1085
1134
|
return _executeEvmRoute2.apply(this, arguments);
|
|
1086
1135
|
}
|
|
1087
1136
|
return executeEvmRoute$1;
|
|
1088
1137
|
}();
|
|
1089
1138
|
_proto.connectedAssets = /*#__PURE__*/function () {
|
|
1090
|
-
var _connectedAssets = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
1139
|
+
var _connectedAssets = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee14(connectedAssetsRequest, options) {
|
|
1091
1140
|
var body, axiosResponse;
|
|
1092
|
-
return _regeneratorRuntime().wrap(function
|
|
1093
|
-
while (1) switch (
|
|
1141
|
+
return _regeneratorRuntime().wrap(function _callee14$(_context14) {
|
|
1142
|
+
while (1) switch (_context14.prev = _context14.next) {
|
|
1094
1143
|
case 0:
|
|
1095
1144
|
body = {
|
|
1096
1145
|
from: assetToString(connectedAssetsRequest.from)
|
|
1097
1146
|
};
|
|
1098
|
-
|
|
1147
|
+
_context14.next = 3;
|
|
1099
1148
|
return this.httpService.get("/basic/connected-assets?apiKey=" + this.apiKey, _extends({
|
|
1100
1149
|
params: body,
|
|
1101
1150
|
headers: {
|
|
@@ -1103,15 +1152,15 @@ var RangoClient = /*#__PURE__*/function () {
|
|
|
1103
1152
|
}
|
|
1104
1153
|
}, options));
|
|
1105
1154
|
case 3:
|
|
1106
|
-
axiosResponse =
|
|
1107
|
-
return
|
|
1155
|
+
axiosResponse = _context14.sent;
|
|
1156
|
+
return _context14.abrupt("return", axiosResponse.data);
|
|
1108
1157
|
case 5:
|
|
1109
1158
|
case "end":
|
|
1110
|
-
return
|
|
1159
|
+
return _context14.stop();
|
|
1111
1160
|
}
|
|
1112
|
-
},
|
|
1161
|
+
}, _callee14, this);
|
|
1113
1162
|
}));
|
|
1114
|
-
function connectedAssets(
|
|
1163
|
+
function connectedAssets(_x25, _x26) {
|
|
1115
1164
|
return _connectedAssets.apply(this, arguments);
|
|
1116
1165
|
}
|
|
1117
1166
|
return connectedAssets;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rango-sdk-basic.esm.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;;;yDAI0CA;;;;;;;;;;;;;;;;;;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A;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.esm.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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AA;AAAA;;;;"}
|
package/lib/services/client.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { MetaRequest, MetaResponse, QuoteRequest, QuoteResponse, CheckApprovalResponse, StatusRequest, StatusResponse, SwapRequest, SwapResponse, ReportTransactionRequest, WalletDetailsResponse, BlockchainMeta, RequestOptions, MessagingProtocolsResponse, SwapperMetaExtended, ConnectedAssetsResponse, ConnectedAssetsRequest } from '../types';
|
|
1
|
+
import { MetaRequest, MetaResponse, QuoteRequest, QuoteResponse, CheckApprovalResponse, StatusRequest, StatusResponse, SwapRequest, SwapResponse, ReportTransactionRequest, WalletDetailsResponse, BlockchainMeta, RequestOptions, MessagingProtocolsResponse, SwapperMetaExtended, ConnectedAssetsResponse, ConnectedAssetsRequest, CustomTokenRequest, CustomTokenResponse, TokenBalanceRequest, TokenBalanceResponse } from '../types';
|
|
2
2
|
declare type WalletAddress = {
|
|
3
3
|
blockchain: string;
|
|
4
4
|
address: string;
|
|
@@ -13,12 +13,14 @@ export declare class RangoClient {
|
|
|
13
13
|
chains(options?: RequestOptions): Promise<BlockchainMeta[]>;
|
|
14
14
|
swappers(options?: RequestOptions): Promise<SwapperMetaExtended[]>;
|
|
15
15
|
messagingProtocols(options?: RequestOptions): Promise<MessagingProtocolsResponse>;
|
|
16
|
+
token(customTokenRequest?: CustomTokenRequest, options?: RequestOptions): Promise<CustomTokenResponse>;
|
|
16
17
|
quote(quoteRequest: QuoteRequest, options?: RequestOptions): Promise<QuoteResponse>;
|
|
17
18
|
isApproved(requestId: string, txId?: string, options?: RequestOptions): Promise<CheckApprovalResponse>;
|
|
18
19
|
status(statusRequest: StatusRequest, options?: RequestOptions): Promise<StatusResponse>;
|
|
19
20
|
swap(swapRequest: SwapRequest, options?: RequestOptions): Promise<SwapResponse>;
|
|
20
21
|
reportFailure(requestBody: ReportTransactionRequest, options?: RequestOptions): Promise<void>;
|
|
21
22
|
balance(walletAddress: WalletAddress, options?: RequestOptions): Promise<WalletDetailsResponse>;
|
|
23
|
+
tokenBalance(tokenBalanceRequest: TokenBalanceRequest, options?: RequestOptions): Promise<TokenBalanceResponse>;
|
|
22
24
|
executeEvmRoute(signer: any, route: SwapResponse): Promise<StatusResponse>;
|
|
23
25
|
connectedAssets(connectedAssetsRequest: ConnectedAssetsRequest, options?: RequestOptions): Promise<ConnectedAssetsResponse>;
|
|
24
26
|
}
|